OSDN Git Service

* c-decl.c (current_function_decl): Move to toplev.c.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
2
3         * decl.c (current_function_decl): Move to toplev.c.
4
5 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
6
7         * pt.c (fn_type_unification): Unify return type, whenever
8         provided.
9         (get_bindings_real): Only pass return type when necessary.
10         Remove explicit return type check.
11         * class.c (resolve_address_of_overloaded_function): Pass desired
12         return type to fn_type_unification.
13
14 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15
16         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
17         DECL_FIELD_SIZE.
18         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
19         DECL_FIELD_SIZE.
20         * rtti.c (expand_class_desc): Likewise.
21         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
22         (THUNK_VCALL_OFFSET): Likewise.
23         (THUNK_DELTA): Reflect changes in ../tree.h.
24
25 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
26
27         * search.c (protected_accessible_p): Also allow the access if
28         the member is public in DERIVED.  Lose TYPE parm.
29         (friend_accessible_p): Lose TYPE parm.
30         (accessible_p): Adjust.
31
32 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
33
34         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
35         on things that are not sizes; ssize_binop deleted.
36         Call size_diffop when appropriate.
37         (dfs_build_vcall_offset_vtbl_entries): Likewise.
38         (build_primary_vtable, build_secondary_vtable): Likewise.
39         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
40         Variable I is HOST_WIDE_INT.
41         (get_vfield_offset): Pass proper types to size_binop.
42         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
43         (finish_struct_1): Likewise.
44         (skip_rtti_stuff): Arg N is now pointer to signed.
45         (layout_class_type): Use size_zero_node.
46         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
47         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
48         * decl.c (complete_arry_type): Pass proper types to size_binop.
49         (xref_basetypes): BINFO_OFFSET is sizetype.
50         * error.c (dump_expr): Don't use size_binop non-sizes.
51         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
52         * init.c (construct_virtual_bases): Fix type error.
53         (build_vec_delete_1): Pass proper type to size_binop and don't
54         fold result.
55         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
56         * rtti.c (get_base_offset): Pass proper type to size_binop.
57         * search.c (dfs_find_vbases): Fix type error.
58         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
59         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
60         * tree.c (debug_binfo): Variable N is signed.
61         Use HOST_WIDE_INT_PRINT_DEC.
62         * typeck.c (comptypes): sizetype is same as equivalent integer type.
63         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
64         size_one_node and size_zero_node.
65         (c_alignof): Use size_one_node.
66         (build_component_addr): Pass proper types to size_binop.
67         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
68
69 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
70
71         Implement class scope using-declarations for functions.
72         * class.c (handle_using_decl): Call add_method for used functions.
73         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
74         (add_method): Used functions are hidden by local functions.
75         (check_bases_and_members): Handle using-decls before finalizing
76         CLASSTYPE_METHOD_VEC.
77         * call.c (add_function_candidate): Add ctype parm; if non-zero,
78         override the type of 'this' accordingly.
79         (add_template_candidate, add_template_candidate_real): Add ctype parm.
80         (convert_class_to_reference, build_user_type_conversion_1, 
81         build_new_function_call, build_object_call, build_new_op,
82         build_new_method_call): Pass ctype parm.
83
84         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
85         the baselink.
86         * call.c (convert_class_to_reference, build_user_type_conversion_1, 
87         build_new_function_call, build_object_call, build_new_op,
88         build_new_method_call, build_op_delete_call): Don't get basetype_path
89         from a baselink.
90         * typeck.c (build_component_ref): Likewise.
91         * init.c (build_offset_ref): Likewise.
92         (resolve_offset_ref): Don't call enforce_access.  
93         Call build_scoped_ref.
94         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
95         would cause an error or if -pedantic.
96         * class.c (alter_access): Lose binfo parm.
97
98 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
99
100         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
101         types.
102
103 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
104
105         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
106         pseudo_type_info creation into the std namespace
107
108 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
109
110         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
111         (import_export_class): Remove declaration.
112         * decl2.c (import_export_class): Make it static.
113         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
114         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
115         EXPR_WITH_FILE_LOCATION.
116         * lex.c (check_newline): Tweak filename/lineno setting.
117         * semantics.c (begin_while_stmt): Fix typo in comment.
118         
119 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
120
121         * lang-options.h (-fmessage-length=): Add missing option.
122
123         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
124
125 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
126
127         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
128
129 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
130
131         * optimize.c (expand_call_inline): Emit the return label before
132         evaluating the return value.
133
134 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
135
136         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
137         than duplicating functionality here.
138         * optimize.c: Include input.h.
139         (expand_call_inline): Use push_srcloc and pop_srcloc.
140         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
141         * parse.c: Regenerated.
142         * Makefile.in (lex.o): Depend on input.h.
143         (optimize.o): Likewise.
144         
145 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
146
147         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
148         function type, rather than ICE.
149
150 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
151
152         * decl.c (grokdeclarator): Call decl_type_access_control.
153         * parse.y (parse_end_decl): Don't call decl_type_access_control if
154         decl is null.
155
156 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
157
158         * decl.c (decls_match): Remove obsolete static member nadgering.
159
160 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
161
162         * decl.c (grokdeclarator): Change ANSI to ISO.
163         * lex.c (consume_string, readescape, do_identifier): Likewise.
164         (parse_float, real_yylex): Likewise.
165         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
166         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
167         new_type_id, maybe_label_decls, simple_stmt, 
168         for.init.statement): Likewise.
169         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
170         * semantics.c (finish_named_return_value): Likewise.
171         * parse.c: Regenerate.
172
173 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
174
175         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
176         (CPTI_CLASS_STAR_TYPE): Remove.
177         (vtable_index_type): Likewise.
178         (class_star_type_node): Remove.
179         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
180         (build_binary_op_nodefault): Remove.
181         * call.c (build_new_op): Use build_binary_op instead of
182         build_binary_op_nodefault.
183         * decl.c (init_decl_processing): Remove class_star_type_node
184         initialization.  Make delta_type_node ptrdiff_type_node under the
185         new ABI.  Initialize vtable_index_type.
186         (build_ptrmemfunc_type): Build different structures for the new
187         ABI.
188         (build_enumerator): Use build_binary_op instead of
189         build_binary_op_nodefault.
190         * method.c (build_overload_value): Mangle pointers-to-members
191         appropriately under the new ABI.
192         * typeck.c (build_array_ref): Use build_binary_op instead of
193         build_binary_op_nodefault.
194         (get_member_function_from_ptrfunc): Adjust for the new ABI.
195         (build_binary_op_nodefault): Rename to ...
196         (build_binary_op): ... this.  Remove old version.  Adjust for
197         pointer-to-member comparisons under the new ABI.
198         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
199         (build_ptrmemfunc): Adjust for the new ABI.
200         (expand_ptrmemfunc_cst): Likewise.
201         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
202         (pfn_from_ptrmemfunc): Adjust for the new ABI.
203         
204 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
205
206         * call.c (build_object_call): Compress consecutive calls to
207         cp_error.
208         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
209         (build_op_delete_call): Adjust message formatting.
210
211         * class.c (check_bases): Compress consecutive calls to
212         cp_pedwarn. 
213         (finish_struct_anon): Say 'ISO C++'.
214
215         * decl.c (start_decl): Same here.
216         (grok_reference_init): Likewise.
217         (grokfndecl): Correct message formatting.
218         (grokfndecl): Improve diagnostic.
219         (check_static_variable_definition): Likewise. Say 'ISO C++'
220         (compute_array_index_type): Say 'ISO C++'
221         (create_array_type_for_decl): Compress consecutive calls to
222         cp_error. 
223         (grokdeclarator): Say 'ISO C++'
224         (grok_op_properties): Likewise.
225
226         * decl2.c (delete_sanity): Clairify diagnostic.
227         (check_member_template): Same here.
228         (grok_function_init): Use consistent terminology.
229
230         * expr.c (do_case): Say 'ISO C++'
231
232         * friend.c (do_friend): Compress consecutive calls to warning.
233         
234 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
235
236         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
237         * class.c (build_secondary_vtable): Reorganize.  Don't create a
238         new vtable under the new ABI.
239         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
240         computing the size.
241         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
242         the initializing elements.
243         (initialize_vtable): New function.
244         (dfs_finish_vtbls): Use it.
245         (dfs_accumulate_vtbl_inits): New function.
246         (finish_vtbls): Merge primary and secondary vtables under the new
247         ABI.
248         (finish_struct_1): Remove redundant call to layout_vtable_decl.
249         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
250         aren't VAR_DECLs.
251
252         * class.c (build_vtable): New function, split out from ...
253         (get_vtable_decl): ... here, and ...
254         (build_secondary_vtable): ... here.
255
256         * pt.c (tsubst_decl): Fix formatting.
257         
258 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
259
260         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
261         (avoid_overlap, build_base_field): Likewise.
262         (build_base_field, build_base_fields, is_empty_class): 
263         Test DECL_SIZE with integer_zero.
264         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
265         * cp-tree.h (struct lang_type): New field size_unit.
266         (CLASSTYPE_SIZE_UNIT): New macro.
267         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
268         (cp_finish_decl): Delete -Wlarger-than processing.
269         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
270         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
271         * tree.c (make_binfo): binfo vector is one entry longer.
272         (walk_tree): Walk DECL_SIZE_UNIT.
273
274 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
275
276         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
277         comment.
278         (build_vtable_entry): Don't assume all vtable entries are
279         functions.
280         (build_vtbl_initializer): Adjust accordingly.
281         (get_vtable_decl): Fix formatting.
282         
283 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
284
285         * semantics.c (deferred_type_access_control): Walk the entire
286         type_lookups list.
287         (save_type_access_control): Rename from 
288         initial_deferred_type_access_control.  Just remember the value.
289         (decl_type_access_control): New fn.
290         (begin_function_definition): Use deferred_type_access_control, after
291         we've started the function.  Set type_lookups to error_mark_node.
292         * parse.y (frob_specs, fn.def1): Adjust.
293         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
294         (parse_end_decl, parse_bitfield0, parse_method): New fns.
295         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
296         (after_type_component_declarator0): Likewise.
297         (after_type_component_declarator): Likewise.
298         (notype_component_declarator): Likewise.
299         * cp-tree.h: Adjust.
300
301         * decl.c (redeclaration_error_message): Allow redeclaration of 
302         namespace-scope decls.
303
304 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
305
306         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
307
308 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
309
310         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
311         * decl2.c (grokclassfn): Likewise.
312
313         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
314
315         * decl2.c (lang_decode_option): Don't set default message length
316         here.
317         * lex.c (lang_init_options): Set it here.
318
319 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
320
321         Make DECL_CONTEXT mean the class in which a member function was
322         declared, even for a virtual function.
323         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
324         (DECL_FRIEND_CONTEXT): New macro.
325         (DECL_REAL_CONTEXT): Remove.
326         (SET_DECL_FRIEND_CONTEXT): Likewise.
327         (DECL_VIRTUAL_CONTEXT): Adjust.
328         (DECL_CLASS_SCOPE_P): Use TYPE_P.
329         (add_friends): Remove.
330         (hack_decl_function_context): Likewise.
331         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
332         CP_DECL_CONTEXT.
333         (build_over_call): Fix indentation.  Use DECL_CONTEXT
334         instead of DECL_CLASS_CONTEXT.
335         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
336         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
337         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
338         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
339         (build_base_field): Likewise.
340         (finish_struct_1): Likewise.
341         (build_self_reference): Likewise.
342         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
343         DECL_REAL_CONTEXT.
344         (pushtag): Use decl_function_context, not
345         hack_decl_function_context.
346         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
347         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
348         (pushdecl): Remove bogus code.
349         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
350         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
351         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
352         Use decl_function_context, nothack_decl_function_context.
353         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
354         (grokdeclarator): Likewise.  Use decl_function_context, not
355         hack_decl_function_context.
356         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
357         (start_function): Use DECL_FRIEND_CONTEXT, not
358         DECL_CLASS_CONTEXT.  Use decl_function_context, not
359         hack_decl_function_context.
360         (finish_function): Use decl_function_context, not
361         hack_decl_function_context.
362         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
363         DECL_CLASS_CONTEXT.
364         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
365         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
366         (grokfield): Likewise.
367         (finish_builtin_type): Likewise.
368         (finish_vtable_vardec): Use decl_function_context, not
369         hack_decl_function_context.
370         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
371         (start_static_initialization_or_destruction): Likewise.
372         (finish_static_initialization_or_destruction): Likewise.
373         (mark_used): Adjust logic for deciding when to synthesize methods.
374         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
375         DECL_REAL_CONTEXT.
376         * error.c (dump_function_decl): Use DECL_CONTEXT, not
377         DECL_CLASS_CONTEXT.
378         * friend.c (is_friend): Likewise.
379         (add_friends): Remove.
380         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
381         * lex.c (begin_definition_of_inclass_inline): Use
382         decl_function_context, not hack_decl_function_context.
383         (process_next_inline): Likewise.
384         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
385         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
386         DECL_CLASSS_CONTEXT.
387         (hack_identifier): Likewise.
388         (synthesize_method):  Use decl_function_context, not
389         hack_decl_function_context.
390         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
391         DECL_REAL_CONTEXT.
392         (is_member_template): Use decl_function_context, not
393         hack_decl_function_context.  Use DECL_CONTEXT, not
394         DECL_CLASS_CONTEXT.
395         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not 
396         DECL_CLASS_CONTEXT.
397         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
398         DECL_REAL_CONTEXT.
399         (push_template_decl_real): Likewise.
400         (instantiate_class_template): Don't call add_friends.
401         (tsubst_default_argument): Use DECL_CONTEXT, not
402         DECL_REAL_CONTEXT.
403         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
404         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
405         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
406         DECL_CLASS_CONTEXT.
407         * repo.c (repo_inline_used): Likewise.
408         * search.c (current_scope): Adjust for new _CONTEXT macros.
409         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
410         DECL_REAL_CONTEXT.
411         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
412         (lookup_fnfields_here):Likewise.
413         (check_final_overrider): Likewise.
414         (init_vbase_pointers): Likewise.
415         (virtual_context): Likewise.
416         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
417         (expand_body): Use decl_function_context, not
418         hack_decl_function_context.
419         * tree.c (hack_decl_function_context): Remove.
420         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
421         DECL_CLASS_CONTEXT.
422         * typeck2.c (error_not_base_type): Likewise.
423         
424 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
425
426         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
427
428 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
429
430         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
431
432 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
433
434         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
435
436 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
437
438         * decl2.c (lang_decode_option): Enable automatic line wrapping.
439
440 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
441
442         * parse.y (frob_specs): Split out...
443         (parse_decl): From here.
444         (fn.def2): Call initial_deferred_type_access_control.
445         (after_type_component_declarator0): Call frob_specs.
446         (notype_component_declarator0): Likewise.
447         * search.c (friend_accessible_p): Nested classes are friends of their
448         enclosing classes.
449
450 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
451
452         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
453         used to create an implicit temporary.
454
455         * class.c (dfs_modify_vtables): Tweak calculation of functions to
456         override.
457
458 2000-02-08  Nathan Sidwell  <nathan@acm.org>
459
460         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
461         strip array element qualifiers too.
462
463 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
464
465         * decl.c (store_parm_decls): Don't build cleanups for parameters
466         while processing_template_decl.
467
468 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
469
470         * cp-tree.h (struct saved_scope): Add incomplete field.
471         (namespace_scope_incomplete): New macro.
472         * decl.c (pushdecl): Use it.
473         (hack_incomplete_structures): Use it.  See through artificial
474         binding levels.
475         (mark_saved_scope): Mark it.
476
477         Implement access control for nested types.
478         * search.c (type_access_control): New fn.
479         (accessible_p): Now we do perform access control for types.
480         * semantics.c (deferred_type_access_control): New fn.
481         (initial_deferred_type_access_control): New fn.
482         (begin_function_definition): Call it.  Add lookups parm.
483         * decl.c (struct binding_level): Add this_class field.
484         (pushlevel_class): Set it.
485         (mark_binding_level): Mark it.
486         (lookup_name_real): Use it.  Call type_access_control.
487         (mark_saved_scope): Mark lookups field.
488         * cp-tree.h (flagged_type_tree): Add lookups field.
489         (struct saved_scope): Add lookups field.
490         (type_lookups): New macro.
491         * parse.y (declmods): Now <ftype>.
492         (parse_decl): Add lookups parm.  Call 
493         initial_deferred_type_access_control.
494         (lang_extdef): Clear type_lookups.
495         (typed_declspecs, declmods, typespec): Set lookups field.
496         (initdcl): Call deferred_type_access_control.
497         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
498         component_decl_1, named_parm): Adjust.
499         * friend.c (is_friend): Nested classes are friends of their
500         enclosing classes.
501
502         * class.c (currently_open_derived_class): New fn.
503         * method.c (hack_identifier): Use it.
504
505         * lex.c (do_identifier): Remove obsolete code.
506
507         * parse.y (typed_typespecs): Propagate new_type_flag properly.
508
509 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
510
511         * tinfo.h: Remove apostrophes from C++ comment (xgettext
512         thinks this file is plain C).
513
514 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
515
516         * Makefile.in (call.o): Depend on $(EXPR_H).
517
518         * call.c: Include "expr.h".
519
520         * class.c (dump_class_hierarchy): Add prototype.
521
522         * search.c (dfs_get_pure_virtuals): Likewise.
523
524 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
525
526         * parse.y (simple_stmt): Allow :: token in asm parameter list.
527         * parse.c: Rebuilt.
528
529 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
530
531         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
532         Store it in DECL_FCONTEXT.
533         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
534
535 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
536
537         * tinfo.h (old abi): #include "tconfig.h".
538         * tinfo.cc (convert_to_base): Move into old abi section.
539
540 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
541
542         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
543         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
544         (BINFO_PRIMARY_BINFO): New macro.
545         (BF_DELTA): Rename to ...
546         (BV_DELTA): ... this.
547         (BF_VCALL_INDEX): Rename to ...
548         (BV_VCALL_INDEX): ... this.
549         (BF_FN): Rename to ...
550         (BV_FN): ... this.
551         * class.c (build_vbase_path): Adjust for changes to reverse_path.
552         (set_rtti_entry): Rename BF_ macros to BV_ variants.
553         (modify_vtable_entry): Simplify.
554         (add_virtual_function): Rename BF_ macros to BV_ variants.
555         (build_vtable_initializer): Likewise.
556         (get_class_offset_1): Remove.
557         (dfs_get_class_offset): Likewise.
558         (get_class_offset): Likewise.
559         (dfs_find_final_overrider): New function.
560         (find_final_overrider): Likewise.
561         (modify_one_vtable): Remove.
562         (dfs_find_base): New function.
563         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
564         find_final_overrider.
565         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
566         virtuals.
567         (dfs_fixup_vtable_deltas): Remove.
568         (override_one_vtable): Remove.
569         (merge_overrides): Likewise.
570         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
571         unreal chilren of virtual bases.
572         (finish_struct_1): Don't use merge_overrides.  Don't use
573         dfs_fixup_vtable_deltas.
574         * tree.c (reverse_path): Return a TREE_LIST, not a chain of 
575         BINFOs.
576         
577 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
578             Jason Merrill  <jason@yorick.cygnus.com>
579
580         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
581
582 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
583
584         * exception.cc (__throw_bad_typeid): Add missing std::.
585
586 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
587
588         * cp-tree.h (make_thunk): PROTO -> PARAMS.
589
590 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
591
592         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
593
594         Runtime support for new-abi rtti.
595         * inc/typeinfo (type_info::operator!=): Define in class.
596         (type_info::before, type_info::name, type_info::operator==,
597         type_info::operator!=): Define new ABI implementations.
598         (type_info::is_pointer_p, type_info::is_function_p): Declare
599         new virtual functions.
600         (type_info::do_catch, type_info::do_upcast): Likewise.
601         
602         * tinfo.h (__base_class_info): Define new class.
603         (__class_type_info): Likewise.
604         (__si_class_type_info): Likewise.
605         (__vmi_class_type_info): Likewise.
606         (__dynamic_cast): Prototype.
607         
608         * tinfo.cc: Conditionalize old and new rtti mechanisms.
609         (type_info::is_pointer_p): Define new function.
610         (type_info::is_function_p): Likewise.
611         (type_info::do_catch): Likewise.
612         (type_info::do_upcast): Likewise.
613         (vtable_prefix): New structure for vtable access.
614         (adjust_pointer): Define new template function.
615         (contained_p, public_p, virtual_p, contained_public_p,
616         contained_nonpublic_p, contained_nonvirtual_p): Define new
617         functions.
618         (nonvirtual_base_type): New local variable.
619         (__class_type_info::~__class_type_info): Define.
620         (__si_class_type_info::~__si_class_type_info): Likewise.
621         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
622         (__class_type_info::do_catch): Define new function.
623         (__class_type_info::do_upcast): Likewise.
624         (__class_type_info::find_public_src): Likewise.
625         (__class_type_info::do_find_public_src): Likewise.
626         (__si_class_type_info::do_find_public_src): Likewise.
627         (__vmi_class_type_info::do_find_public_src): Likewise.
628         (__class_type_info::do_dyncast): Likewise.
629         (__si_class_type_info::do_dyncast): Likewise.
630         (__vmi_class_type_info::do_dyncast): Likewise.
631         (__class_type_info::do_upcast): Likewise.
632         (__si_class_type_info::do_upcast): Likewise.
633         (__vmi_class_type_info::do_upcast): Likewise.
634         (__dynamic_cast): Likewise.
635         
636         * tinfo2.cc (__fundamental_type_info): Define new class.
637         (__pointer_type_info): Likewise.
638         (__reference_type_info): Likewise.
639         (__array_type_info): Likewise.
640         (__function_type_info): Likewise.
641         (__enum_type_info): Likewise.
642         (__ptr_to_member_type_info): Likewise.
643         (__fundamental_type_info::~__fundamental_type_info): Define.
644         (__pointer_type_info::~__pointer_type_info): Likewise.
645         (__reference_type_info::~__reference_type_info): Likewise.
646         (__array_type_info::~__array_type_info): Likewise.
647         (__function_type_info::~__function_type_info): Likewise.
648         (__enum_type_info::~__enum_type_info): Likewise.
649         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
650         (__pointer_type_info::do_catch): Define new function.
651         (__ptr_to_member_type_info::do_catch): Define new function.
652         
653         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
654         (__is_pointer): Likewise.
655
656         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
657
658 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
659
660         * cp/class.c (build_vtable): Rename to build_primary_vtable.
661         (prepare_fresh_vtable): Rename to build_secondary_vtable.
662         (make_new_vtable): New function.
663         (modify_vtable_entry): Handle generation of new vtables correctly.
664         (modify_one_vtable): Remove unused parameter.
665         (dfs_fixup_vtable_deltas): Likewise.
666         (override_one_vtable): Use build_secondary_vtable.
667         (finish_struct_1): Use build_primary_vtable and
668         build_secondary_vtable.
669         
670 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
671
672         * cp/decl.c: Adjust variable names, comments, help strings.
673
674 2000-01-29  Nathan Sidwell  <nathan@acm.org>
675
676         * new2.cc (operator delete[]): Use operator delete, don't assume
677         implementation.
678
679 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
680
681         * class.c (build_vtbl_initializer): Add argument to
682         build_vtable_entry call.
683
684 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
685
686         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
687         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
688         (BF_DELTA): New macro.
689         (BF_VCALL_INDEX): Likewise.
690         (BF_FN): Likewise.
691         (THUNK_VCALL_OFFSET): Likewise.
692         (make_thunk): Change prototype.
693         * class.c (build_vtable_entry): Integrate
694         build_vtable_entry_for_fn.  Handle vcall indices.
695         (build_vtable_entry_for_fn): Remove.
696         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
697         BF_VCALL_INDEX, BF_FN.
698         (modify_vtable_entry): Integrate common code from
699         modify_one_vtable and dfs_fixup_vtable_deltas.
700         (add_virtual_function): Set BF_VCALL_INDEX.
701         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
702         and BF_FN.
703         (modify_one_vtable): Simplify.
704         (dfs_fixup_vtable_deltas): Likewise.
705         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN. 
706         * method.c (make_thunk): Handle vcall indices.
707         
708 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
709
710         Compiler side new abi rtti (not enabled).
711         * cp-tree.h (new_abi_rtti_p): New macro.
712         (emit_support_tinfos): Prototype new function.
713         (tinfo_decl_p): Likewise.
714         (emit_tinfo_decl): Likwise.
715         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
716         macros.
717         (doing_runtime): New local static.
718         (init_rtti_processing): Add new-abi initializer.
719         (get_tinfo_decl): Add new-abi logic.
720         (tinfo_from_decl): Likewise.
721         (build_dynamic_cast_1): Likewise.
722         (qualifier_flags): New static function.
723         (tinfo_base_init): Likewise.
724         (generic_initializer): Likewise.
725         (ptr_ref_initializer): Likewise.
726         (ptmd_initializer): Likewise.
727         (class_hint_flags): Likewise.
728         (class_initializer): Likewise.
729         (synthesize_tinfo_var): Likewise.
730         (create_real_tinfo_var): Likewise.
731         (create_pseudo_type_info): Likewise.
732         (get_vmi_pseudo_type_info): Likewise.
733         (create_tinfo_types): Likewise.
734         (emit_support_tinfos): New global function.
735         (tinfo_decl_p): New global predicate.
736         (emit_tinfo_decl): New global function.
737         * class.c (set_rtti_entry): Generalize for old and new rtti.
738         (build_vtbl_initializer): Likewise.
739         * decl2.c (finish_file): Likewise.
740
741 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
742
743         * cp/optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
744         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
745
746 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
747
748         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
749         for scopes.
750
751 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
752
753         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
754
755 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
756
757         * cp/optimize.c (calls_setjmp_r): Supply new argument
758         to special_function_p.
759
760 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
761
762         * call.c: PROTO -> PARAMS.
763         * class.c: Likewise.
764         * cp-tree.h: Likewise.
765         * cvt.c: Likewise.
766         * decl.c: Likewise.
767         * decl.h: Likewise.
768         * decl2.c: Likewise.
769         * dump.c: Likewise.
770         * errfn.c: Likewise.
771         * error.c: Likewise.
772         * except.c: Likewise.
773         * expr.c: Likewise.
774         * init.c: Likewise.
775         * input.c: Likewise.
776         * lex.c: Likewise.
777         * lex.h: Likewise.
778         * method.c: Likewise.
779         * optimize.c: Likewise.
780         * parse.y: Likewise.
781         * pt.c: Likewise.
782         * repo.c: Likewise.
783         * rtti.c: Likewise.
784         * search.c: Likewise.
785         * semantics.c: Likewise.
786         * spew.c: Likewise.
787         * tree.c: Likewise.
788         * typeck.c: Likewise.
789         * typeck2.c: Likewise.
790         * xref.c: Likewise.
791
792 2000-01-25  Richard Henderson  <rth@cygnus.com>
793
794         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
795
796 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
797
798         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
799         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
800         (struct vcall_offset_data_s): New type.
801         (dfs_vcall_offset_queue_p): New function.
802         (dfs_build_vcall_offset_vtbl_entries): Likewise.
803         (build_vcall_offset_vtbl_entries): Likewise.
804         (layout_vtable_decl): Likewise.
805         (num_vfun_entries): Likewise.
806         (num_extra_vtbl_entries): Add the entries for vcall offsets.
807         (build_vtbl_initializer): Likewise.
808         (dfs_finish_vtabls): Use layout_vtable_decl.
809         (modify_one_vtables): Always duplicate vtables under the new ABI.
810         (finish_struct_1): Use layout_vtable_decl.
811         
812 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
813
814         * decl.c (member_function_or_else): Change third arg from a format
815         specifier to an `enum overload_flags'.  Callers changed.
816
817 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
818
819         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
820         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
821         build_const_cast, get_delta_difference, check_return_expr): Avoid
822         ANSI string concatenation usage.  
823
824 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
825
826         * class.c (layout_class_type): Put the fields required to make a
827         class non-empty at the end, not the beginning, of the TYPE_FIELDs
828         list.
829
830 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
831
832         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
833         template.
834
835         * decl2.c (mark_used): Do instantiate inlines that have been
836         explicitly instantiated.
837
838 2000-01-24  Richard Henderson  <rth@cygnus.com>
839
840         * call.c (build_over_call): Use expand_tree_builtin.
841         * typeck.c (build_function_call_real): Likewise.
842         (build_binary_op_nodefault): Handle unordered compares.
843
844 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
845
846         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
847         cp_tree_index values.
848         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
849         New global node #defines for them.
850         * rtti.c (call_void_fn): Replace with ...
851         (build_runtime_decl): ... new static function.
852         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
853         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
854         (build_dynamic_cast_1): Always produce correctly typed result.
855         Explicitly produce type_info addresses. Use dynamic_cast_node.
856         * exception.cc (__throw_bad_cast): Return `void *'.
857         (__throw_bad_typeid): Return `const type_info &'.
858
859 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
860
861         * cp-tree.h (get_vtable_decl): Prototype new function.
862         * class.c (get_vtable_decl): New function. Broken out from ...
863         (build_vtable): ... here. Use it.
864         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
865         by get_vtable_decl.
866
867 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
868
869         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
870         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
871         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
872         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
873         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
874         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
875         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
876         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
877         (CPTI_TINFO_VAR_ID): New enumeration.
878         (__tp_desc_type_node, __access_mode_type_node,
879         __bltn_desc_type_node, __user_desc_type_node,
880         __class_desc_type_node, __ptr_desc_type_node,
881         __attr_desc_type_node, __func_desc_type_node,
882         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
883         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
884         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
885         enum_desc_type_node, class_desc_type_node,
886         si_class_desc_type_node, vmi_class_desc_type_node,
887         ptmd_desc_type_node, base_desc_type_node): New #defines.
888         (tinfo_fn_id, tinfo_fn_type): Rename to ...
889         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
890         (tinfo_var_id): New enumeration.
891         (DECL_TINFO_FN_P): Augment comment.
892         * decl.c (cp_global_trees): Adjust documentation.
893         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
894         tinfo_decl_type and tinfo_var_id.
895         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
896         (build_typeid): Remove unused variable.
897         (get_tinfo_var): Use tinfo_var_id.
898         (tinfo_name): New static function.
899         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
900         (tinfo_from_decl): Likewise.
901         (get_base_offset): New static function, broken out of
902         expand_class_desc.
903         (expand_si_desc): Use tinfo_name.
904         (expand_class_desc): Likewise. Lose local static variable.
905         Use base_desc_type_node. Use get_base_offset.
906         (expand_ptr_desc): Use tinfo_name.
907         (expand_attr_desc): Likewise.
908         (expand_generic_desc): Likewise.
909
910         * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
911         * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
912
913 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
914
915         * cp-tree.h (__eprintf): Remove declaration.
916         * tree.c (__eprintf): Remove definition.
917
918 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
919             Mark Mitchell  <mark@codesourcery.com>
920
921         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
922         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
923
924 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
925
926         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
927
928 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
929
930         * cp-tree.h (register_dtor_fn): New function.
931         * decl.c (destroy_local_static): Rename to ...
932         (register_dtor_fn): ... this.  Give it external linkage.
933         (expand_static_init): Use it.
934         * decl2.c (do_static_initialization): Likewise, if using
935         __cxa_atexit.
936         (do_static_destruction): Check that __cxa_atexit is not in use.
937         (finish_file): Don't call do_static_destruction if using
938         __cxa_atexit.
939
940         * typeck.c (convert_arguments): Restore two-message error
941         reporting.
942         
943 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
944
945         Remap dynamic cast hint values to be consistent across ABIs.
946         * search.c (dynamic_cast_base_recurse): Remap generated value.
947         (get_dynamic_cast_base_type): Adjust documentation.
948         * tinfo.h (__user_type_info::dyncast): Likewise.
949         (__user_type_info::find_public_subobj): Remap BOFF meaning.
950         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
951         (__class_type_info::do_dyncast): Likewise.
952         (__class_type_info::do_find_public_subobj): Likewise.
953         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.     
954
955 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.coom>
956
957         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
958
959         * typeck2.c (incomplete_type_error): Restore previous
960         cp_error and cp_error_at call sequence.
961         
962 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
963
964         * class.c (dump_class_hierarchy): Make format agree with argument;
965         cast pointer to unsigned long and print with %lx.
966         
967 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery>
968
969         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
970         
971         * typeck.c (composite_pointer_type, common_type,
972         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
973         build_function_call_real, convert_arguments,
974         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
975         build_unary_op, mark_addressable, build_compound_expr,
976         build_static_cast, build_reinterpret_cast, build_const_cast,
977         build_c_cast, build_modify_expr, get_delta_difference,
978         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with 
979         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
980         into a single one.
981         * typeck2.c (readonly_error, abstract_virtuals_error,
982         process_init_constructor, check_for_new_type): Likewise.
983
984 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
985
986         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
987         VAR_DECLs.
988
989 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
990
991         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
992         (build_x_typeid): Likewise.
993         (get_tinfo_fn): Likewise.
994         (get_tinfo_fn_unused): Rename to ...
995         (get_tinfo_decl): ... here.
996         * rtti.c (build_headof): Replace logic error with assertion.
997         (get_tinfo_fn_dynamic): Rename to ...
998         (get_tinfo_decl_dynamic): ... here. Make static. Use
999         complete_type_or_else.
1000         (build_x_typeid): Move into ...
1001         (build_typeid): ... here. Adjust call to
1002         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
1003         throw_bad_typeid expression.
1004         (get_tinfo_fn_unused): Rename to ...
1005         (get_tinfo_decl): ... here. Adjust comment.
1006         (get_tinfo_fn): Delete.
1007         (tinfo_from_decl): New static function.
1008         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
1009         (get_typeid): Use complete_type_or_else.
1010         (build_dynamic_cast_1): Adjust calls to
1011         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
1012         * parse.y (primary): Adjust call to build_typeid.
1013         * except.c (build_eh_type_type_ref): Adjust call to
1014         get_tinfo_decl. Mark as used.
1015         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
1016         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
1017         * parse.c: Regenerated.
1018
1019 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
1020
1021         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
1022         calling convention.
1023         (resolves_to_fixed_type_p): Document calling convention.
1024         * rtti.c (build_x_typeid): Initialize NONNULL.
1025
1026         * cp-tree.h (build_shared_int_cst): New function.
1027         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
1028         * class.c (modify_vtable_entry): Likewise.
1029         (add_virtual_function): Split out code to generated shared
1030         INTEGER_CSTs to build_share_int_cst.
1031         (modify_all_vtables): Handle all the overridden functions here.
1032         Add overridden functions from non-primary virtual bases to the
1033         primary vtable.
1034         (finish_struct_1): Adjust call to modify_all_vtables.  Add
1035         overridden functions from non-primary bases to the vtable.
1036         * tree.c (build_shared_int_cst): New function.
1037         
1038         * cp-tree.h (scratchalloc): Remove.
1039         (build_scratch_list): Likewise.
1040         * call.c (convert_class_to_reference): Replace build_scratch_list
1041         and build_expr_list with build_tree_list.
1042         (add_candidate): Replace scratchalloc with expralloc.  Note memory
1043         leak.
1044         (build_user_type_conversion_1):  Replace build_scratch_list
1045         and build_expr_list with build_tree_list.
1046         (build_new_op): Likewise.
1047         (build_op_delete_call): Likewise.
1048         (convert_like): Likewise.
1049         * cvt.c (ocp_convert): Likewise.
1050         * decl.c (start_decl): Likewise.
1051         (start_function): Likewise.
1052         (finish_destructor_body): Likewise.
1053         (maybe_build_cleanup_1): Likewise.
1054         * decl2.c (reparse_decl_as_expr): Likewise.
1055         * init.c (perform_member_init): Likewise.
1056         (expand_cleanup_for_base): Likewise.
1057         (build_builtin_delete_call): Likewise.
1058         (build_new_1): Likewise.
1059         (build_delete): Likewise.
1060         * method.c (do_build_assign_ref): Likewise.
1061         * parse.y (already_scoped_stmt): Likewise.
1062         (nontrivial_exprlist): Likewise.
1063         (net_initializer): Likewise.
1064         (initlist): Likewise.
1065         * parse.c: Regenerated.
1066         * rtti.c (build_x_typeid): Likewise.
1067         (build_dynamic_cast_1): Likewise.
1068         * typeck.c (build_x_compound_expr): Likewise.
1069         (build_static_cast): Likewise.
1070         (build_modify_expr): Likewise.
1071         
1072         * cp-tree.h (DECL_VINDEX): Add documentation.
1073         * class.c (build_vtable_entry): Likewise.
1074         (start_vtable): Add comment.
1075         (add_virtual_function): Replace pending_hard_virtuals with
1076         overridden_virtuals and pending_virtuals with new_virtuals.
1077         Replace redundant assignments with assertions.
1078         (check_for_override): Add comment.
1079         (check_bases_and_members): Replace pending_hard_virtuals with
1080         overridden_virtuals and pending_virtuals with new_virtuals.
1081         (create_vtbl_ptr): Likewise.
1082         (layout_class_type): Likewise.
1083         (finish_struct_1): Likewise.  Add comments.
1084         
1085 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
1086
1087         * class.c (finish_struct_1): Replace redundant code with
1088         assertions.
1089
1090         * cp-tree.h (flag_new_abi): Move.
1091         (flag_use_cxa_atexit): Likewise.
1092         (flag_honor_std): Likewise.
1093         (flag_rtti): Likewise.
1094         (vbase_offsets_in_vtable_p): Define.
1095         (vptrs_present_everywhere_p): Likewise.
1096         (TYPE_CONTAINS_VPTR_P): Likewise.
1097         (dfs_walk_real): Declare.
1098         * class.c (build_vbase_pointer_fields): Check
1099         vbase_offsets_in_vtable_p.
1100         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
1101         BINFO_VPTR_FIELD.
1102         (build_vbase_offset_vtbl_entries): Simplify.
1103         (build_vbase_offset_vtbl_entries): Adjust.
1104         (build_vbase_pointer): Add ability to look up vbase offsets in
1105         vtable. 
1106         (start_vtable): New function.
1107         (add_virtual_function): Use it.
1108         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
1109         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
1110         (build_vtbl_initializer): Take the type of the complete object as
1111         input.  Use it to correctly calculate vbase offsets.
1112         (dfs_finish_vtbls): Pass the complete type to
1113         build_vtbl_initializer.
1114         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
1115         (create_vtable_ptr): Create a vtable even if there are no
1116         new virtual functions, under the new ABI.
1117         (finish_struct_1): Likewise.
1118         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
1119         * decl.c (exapnd_static_init): Remove call to
1120         preserve_initializer.
1121         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
1122         vtables.
1123         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
1124         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
1125         (construct_virtual_bases): Don't initialize virtual base pointers
1126         under the new ABI.
1127         (build_aggr_init): Clean up comment.
1128         (expand_aggr_init_1): Likewise.
1129         * rtti.c (expand_class_desc): Store the virtual function table
1130         index where the vbase offset lives in the offset field.
1131         * search.c (dfs_walk_real): Make it global.
1132         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
1133         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
1134         
1135         * tinfo.h (USItype): Make it signed under the new ABI.
1136         * tinfo.cc (convert_to_base): New function.  Encapsulate base
1137         conversion logic here.
1138         (__class_type_info::do_upcast): Use it.
1139         (__class_type_info::do_dyncast): Likewise.
1140         (__class_type_info::do_find_public_subobj): Likewise.
1141         
1142         * init.c (construct_virtual_bases): Don't look up the addresses of
1143         virtual bases at run-time.
1144
1145         * class.c (build_vbase_pointer): Relocate.
1146         (build_vbase_pointer_fields): Likewise.
1147         (dfs_build_vbase_offset_vtbl_entries): Likewise.
1148         (build_vbase_offset_vtbl_entries): Likewise.
1149
1150         * decl.c (init_decl_processing): Complain if -fnew-abi
1151         -fno-vtable-thunks is used.
1152
1153         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
1154         flag_new_abi.
1155
1156 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
1157
1158         * cp-tree.h (num_extra_vtbl_entries): New function.
1159         (size_extra_vtbl_entries): Likewise.
1160         (dfs_vtable_path_unmark): Likewise.
1161         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
1162         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
1163         * class.c (num_extra_vtbl_entries): New function.
1164         (size_extra_vtbl_entries): Likewise.
1165         (dfs_build_vbase_offset_vtbl_entries): New function.
1166         (build_vbase_offset_vtbl_entries): Likewise.
1167         (build_vtbl_initializer): Use it.
1168         (finish_struct_1): Adjust vtable sizes (using
1169         num_extra_vtbl_entries).
1170         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
1171         THUNK_DECL is non-NULL before expanding it.
1172         * init.c (expand_virtual_init): Adjust the vtable pointer by
1173         size_extra_vtbl_entries before storing it.
1174         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
1175         Handle TREE_LIST parameters here, not in the dfs_* functions.
1176         (dfs_unmarked_real_bases_queue_p): Adjust.
1177         (dfs_marked_real_bases_queue_p): Likewise.
1178         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
1179         (dfs_vtable_path_marked_real_bases_queue_p): New function.
1180         (dfs_vtable_path_unmark): Likewise.
1181         
1182 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
1183
1184         * optimize.c (copy_body_r): Clear the operand three of a
1185         TARGET_EXPR when copying it.
1186
1187 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1188
1189         * method.c (build_decl_overload_real): Check whether we are in ::
1190         before returning __builtin_new/delete.
1191
1192 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
1193
1194         * pt.c (tsubst_friend_function): Improve comment.
1195         (instantiate_decl): Avoid crashing when a "nested" function is
1196         instantiated from the top level.
1197         
1198         * dump.c (dqeueue_and_dump): Dump
1199         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
1200
1201 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1202
1203         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
1204
1205 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
1206
1207         * g++spec.c (lang_specific_driver): Add -fnew-abi if
1208         ENABLE_NEW_GXX_ABI defined.
1209         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
1210         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
1211         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
1212
1213 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
1214
1215         * decl.c (start_cleanup_fn): Call pushdecl.
1216
1217         * call.c (convert_class_to_reference): Fix typos.
1218         (build_conditional_expr): Handle errors gracefully.
1219         * class.c (push_nested_class): Likewise.
1220         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
1221         (DECL_THIS_EXTERN): Use it.
1222         (DECL_THIS_STATIC): Likewise.
1223         * cvt.c (convert_to_void): Handle errors gracefully.
1224         (build_expr_type_conversion): Likewise.
1225         * decl.c (maybe_push_decl): Likewise.
1226         (start_decl_1): Likewise.
1227         (require_complete_types_for_parms): Likewise.
1228         * parse.y (structsp): Likewise.
1229         (base_class): Likewise.
1230         * parse.c: Regenerated.
1231         * pt.c (finish_member_template_decl): Likewise.
1232         * typeck.c (decay_conversion): Likewise.
1233         
1234         * cp-tree.h (dfs_skip_vbases): New function.
1235         (find_vbase_instance): Likewise.
1236         * class.c (determine_primary_base): Allow a nearly empty base to
1237         serve as a primary base class under the new ABI.
1238         (get_class_offset_1): Rename to ...
1239         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
1240         messages here.
1241         (get_class_offset): Use it.  Issue error messages here.
1242         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
1243         find the right copies of virtual bases.
1244         (fixup_vtable_deltas1): Rename to ...
1245         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
1246         bases as primary bases.
1247         (fixup_vtable_deltas): Remove.
1248         (override_one_vtable): Handle virtual bases as primary bases.
1249         (merge_overrides): Likewise.
1250         (finish_struct_1): Likewise.
1251         (dump_class_hierarchy): Dump primary-ness of bases as well.
1252         * search.c (mark_primary_bases): Use a pre-order traversal to
1253         handle primary virtual bases.
1254         (dfs_skip_vbases): New fiunction.
1255         (expand_upcast_fixups): Adjust to handle primary virtual bases.
1256         (fixup_virtual_upcast_offsets): Likewise.
1257         (fixup_all_virtual_upcast_offsets): Likewise.
1258         (dfs_find_vbase_instances): New function.
1259         (find_vbase_instance): Likewise.
1260         
1261 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
1262
1263         * lex.c (DIR_SEPARATOR): Delete macro.
1264
1265 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
1266  
1267        * decl2.c (lang_decode_option): Handle automatic line wrapping
1268        option.
1269         
1270 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
1271
1272         * friend.c (do_friend): Don't resolve scopes when processing
1273         template declarations, even if the qualifying scope doesn't
1274         involve template parameters.
1275
1276 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
1277
1278         * class.c (dfs_modify_vtables_queue_p): Remove.
1279         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
1280         and dfs_marked_real_bases_queue_p instead of
1281         dfs_modify_vtables_queue_p.
1282
1283         * class.c (build_vbase_path): Simplify.
1284         (dfs_propagate_binfo_offsets): New function.
1285         (propagate_binfo_offsets): Use it.
1286         (remove_base_field): Simplify.
1287         (dfs_set_offset_for_vbases): Remove.
1288         (dfs_set_offset_for_shared_vbases): New function.
1289         (dfs_set_offset_for_unshared_vbases): Likewise.
1290         (layout_virtual_bases): Use them.
1291         (layout_basetypes): Don't call propagate_binfo_offsets.
1292         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
1293         for the vbases.
1294         
1295         * class.c (build_base_field): New function, split out from ...
1296         (build_base_fields): ... here.  Use it.  Allocate primary bases
1297         first, under the new ABI.
1298         (get_vtable_entry): Remove.
1299         (remove_base_field): New function, split out from ...
1300         (remove_base_fields): ... here.  Adjust since primary bases come
1301         first under the new ABI.
1302         
1303         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
1304         (initialize_vtbl_ptrs): New function.
1305         (expand_indirect_vtbls_init): Change prototype.
1306         (convert_pointer_to_vbase): Declare.
1307         * init.c (expand_direct_vtbls_init): Remove.
1308         (dfs_initialize_vtbl_ptrs): New function.
1309         (initialize_vtbl_ptrs): Likewise.
1310         (emit_base_init): Use initialize_vtbl_ptrs.
1311         * search.c (convert_pointer_to_vbase): Make it global.
1312         (expand_indirect_vtbls_init): Remove vtable initialization code.
1313         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
1314         
1315         * class.c (dfs_finish_vtbls): New function.
1316         (finish_vtbls): Use it.
1317         (dump_class_hierarchy): New function.
1318         
1319         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
1320         (BINFO_VBASE_PRIMARY_P): New macro.
1321         (BINFO_VIRTUALS): Add to documentation.
1322         (SET_BINFO_PRIMARY_MARKED_P): Remove.
1323         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1324         (dfs_mark_primary_bases_queue_p): Likewise.
1325         (dfs_unmarked_real_bases_queue_p): New function.
1326         (dfs_marked_real_bases_queue_p): Likewise.
1327         * search.c (dfs_mark_primary_bases): Adjust.
1328         (mark_primary_bases): Likewise.
1329         (get_shared_vbase_if_not_primary): New function.
1330         (dfs_unmarked_real_bases_queue_p): Likewise.
1331         (dfs_marked_real_bases_queue_p): Likewise.
1332         (dfs_get_pure_virtuals): Simplify.
1333         (get_pure_virtuals): Likewise.
1334         
1335 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1336
1337         * lex.c: Include tm_p.h.
1338
1339 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
1340
1341         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
1342
1343 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
1344
1345         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
1346         * pt.c (instantiate_decl): Defer comdat templates that might not be
1347         needed.
1348         
1349         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
1350         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
1351         (finish_file): Likewise.
1352
1353         * decl2.c (import_export_class): Undo 12/14 change.
1354
1355         * error.c (dump_decl): operator new, not operatornew.
1356
1357         * class.c (field_decl_cmp): A nontype is "greater" than a type.
1358         * search.c (lookup_field_1): Look for the last field with the
1359         desired name.
1360
1361 2000-01-05  Nathan Sidwell  <nathan@acm.org>
1362
1363         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
1364         FUNCTION_DECL.
1365
1366 2000-01-05  Nathan Sidwell  <nathan@acm.org>
1367
1368         * typeck.c (build_static_cast): Don't strip target qualifiers
1369         when casting from a class.
1370
1371 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1372
1373         * class.c (warn_hidden): Initialize variable `fndecl'.
1374
1375 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
1376
1377         * decl.c (flag_isoc9x): New variable to be able to use code in
1378         c-common.c.  For now always zero.
1379
1380 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
1381
1382         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
1383         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
1384         or unshare_base_binfos for virtual bases here.
1385         * search.c (dfs_get_vbase_types): Do it here.
1386         (get_vbase_types): Adjust.
1387         
1388 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
1389
1390         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
1391         (BINFO_PRIMARY_MARKED_P): Use flag 5.
1392         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
1393         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1394         (unmark_primary_bases): Remove declaration.
1395         (unmarkedp): Declare.
1396         (dfs_vbase_unmark): Likewise.
1397         * class.c (determine_primary_base): Return immediately if there
1398         are no base classes.  Call mark_primary_bases here.
1399         (modify_all_direct_vtables): Remove.
1400         (modify_all_indirect_vtables): Remove.
1401         (dfs_modify_vtables_queue_p): New function.     
1402         (dfs_modify_vtables): New function.
1403         (modify_all_vtables): Use them.
1404         (build_base_fields): Build FIELD_DECLs for primary virtual base
1405         classes.
1406         (create_vtable_ptr): Don't call determine_primary_base here.
1407         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
1408         (dfs_set_offset_for_vbases): ... this.
1409         (layout_virtual_bases): Use it.
1410         (layout_class_type): Call determine_primary_base here.
1411         * search.c (unmarkedp): Make it global.
1412         (shared_marked_p): Simplify.
1413         (shared_unmarked_p): Likewise.
1414         (dfs_primary_bases_queue_p): Remove.
1415         (dfs_unmark_primary_bases): Likewise.
1416         (unmark_primary_bases): Likewise.
1417         (mark_primary_bases): Simplify.
1418         (get_pure_virtuals): Don't call mark_primary_bases here.
1419         (dfs_vbase_unmark): New function.
1420         (get_vbase_types): Simplify.
1421
1422         * class.c (struct base_info): Remove.
1423         (determine_primary_base): Take has_virtual_p rather than a
1424         base_info as input.  Don't calculate max_has_virtual.
1425         (finish_struct_bits): Remove max_has_virtual argument.
1426         (create_vtable_ptr): Remove max_has_virtual_p argument.
1427         (layout_virtual_bases): Remove max argument.
1428         (layout_basetypes): Likewise.
1429         (layout_class_type): Remove max_has_virtual_p argument.
1430         (finish_struct_1): Remove max_has_virtual.
1431
1432         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
1433         (layout_basetypes): Remove.
1434         * class.c (propagate_binfo_offsets): Moved here from tree.c.
1435         Update to handle primary virtual bases.
1436         (remove_base_fields): New function, split out from
1437         layout_basetypes.
1438         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
1439         (layout_virtual_bases): New function, split out from
1440         layout_basetypes.  Update to handle primary virtual bases.
1441         (layout_basetypes): Moved here from tree.c.  Use
1442         remove_base_fields and layout_virtual_bases.
1443         * search.c (dfs_mark_primary_bases_queue_p): New function.
1444         (mark_primary_bases): Use it.
1445         * tree.c (CEIL): Remove.
1446         (propagate_binfo_offsets): Remove.
1447         (layout_basetypes): Remove.
1448         
1449 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
1450
1451         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
1452         (BINFO_PRIMARY_MARKED_P): New macro.
1453         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
1454         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
1455         (mark_primary_bases): New function.
1456         (unmark_primary_bases): Likewise.
1457         * search.c (get_abstract_virtuals_1): Remove.
1458         (dfs_mark_primary_bases): New function.
1459         (mark_primary_bases): Likewise.
1460         (dfs_unmark_primary_bases): Likewise.
1461         (unmark_primary_bases): Likewise.
1462         (dfs_get_pure_virtuals): Likewise.
1463         
1464 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
1465
1466         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
1467         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
1468         (modify_one_vtable): Adjust.
1469         (fixup_vtable_deltas1): Likewise.
1470         (override_one_vtable): Likewise.
1471         * search.c (get_abstract_virtuals_1): Likewise.
1472         (get_pure_virtuals): Likewise.
1473         (expand_upcast_fixups): Likewise.
1474         * tree.c (debug_binfo): Likewise.
1475         
1476         * class.c (build_vtable): Don't return a value.  Don't rebuild
1477         vtables for bases that have already been handled.
1478         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
1479         already been handled.
1480         (modify_one_vtable): Adjust accordingly.
1481         (fixup_vtable_deltas1): Likewise.
1482         (finish_struct_1): Likewise.
1483
1484 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1485
1486         * call.c (build_new_method_call): Also check destructors.
1487
1488 1999-12-31  Mark Mitchell  <mark@codesourcery.com>
1489
1490         * cp-tree.h (VF_NORMAL_VALUE): Remove.
1491         * class.c (struct base_info): Remove vfield, vfields, and rtti.
1492         (set_primary_base): New function, split out from ...
1493         (finish_base_struct): ... here.  Rename to ...
1494         (determine_primary_base): ... this.  Simplify.
1495         (create_vtable_ptr): Tweak accordingly.
1496         (finish_struct_1): Simplify.
1497         
1498         * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
1499         (CLASSTYPE_N_BASECLASSES): Likewise.
1500         (BINFO_FOR_VBASE): New macro.
1501         (get_vbase_types): Change prototype.
1502         * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
1503         (prepare_fresh_vtable): Likewise.
1504         (finish_vtbls): Likewise.
1505         (get_class_offset_1): Likewise.
1506         (modify_all_indirect_vtables): Likewise.
1507         (build_vbase_pointer_fields): Likewise.
1508         * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
1509         * init.c (sort_base_init): Use BINFO_FOR_VBASE.
1510         (expand_member_init): Likewise.
1511         * search.c (get_base_distance): Likewise.
1512         (lookup_field_queue_p): Likewise.
1513         (virtual_context): Likewise.
1514         (get_vbase_types): Don't return a value.  Set
1515         CLASSTYPE_VBASECLASSES here.
1516         * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
1517         
1518 1999-12-30  Mark Mitchell  <mark@codesourcery.com>
1519
1520         * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
1521
1522 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
1523
1524         * class.c (create_vtable_ptr): Put the vtable at the beginning of
1525         the class, not the end, in the new ABI.
1526         * tree.c (propagate_binfo_offsets): Do the right thing for the new
1527         ABI.
1528
1529 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
1530
1531         * cp-tree.h (lang_type): Add nearly_empty_p.  Adjust dummy.
1532         (CLASSTYPE_NEARLY_EMPTY_P): New macro.
1533         * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
1534         (check_field_decls): Likewise.
1535         (check_bases_and_members): Likewise.
1536
1537 1999-12-28  Mark Mitchell  <mark@codesourcery.com>
1538
1539         * cp-tree.h (do_inline_function_hair): Remove.
1540         * class.c (layout_class_type): New function, split out from
1541         finish_struct_1.
1542         (fixup_pending_inline): Likewise.
1543         (fixup_inline_methods): New function.
1544         * method.c (fixup_pending_inline): Remove.
1545         (do_inline_function_hair): Likewise.
1546         
1547         * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
1548         new ABI.
1549         
1550         * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
1551         (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
1552         (CLASSTYPE_PURE_VIRTUALS): ... this.
1553         (lang_decl_flags): Replace abstract_virtual with pure_virtual.
1554         (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
1555         (DECL_PURE_VIRTUAL_P): ... this.
1556         (get_abstract_virtuals): Rename to ...
1557         (get_pure_virtuals): ... this.
1558         * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
1559         DECL_ABSTRACT_VIRTUAL_P.  Replace CLASSTYPE_ABSTRACT_VIRTUALS with
1560         CLASSTYPE_PURE_VIRTUALS.
1561         * class.c (build_vtable_entry): Likewise.
1562         (finish_struct_bits): Likewise.  Call get_pure_virtuals, not
1563         get_abstract_virtuals.
1564         (build_vtbl_initializer): Likewise.
1565         (override_one_vtable): Likewise.
1566         (check_methods): Likewise.
1567         * decl.c (duplicate_decls): Likewise.
1568         (redeclaration_error_message): Likewise.
1569         (lang_mark_tree): Likewise.
1570         * decl2.c (grok_function_init): Likewise.
1571         (import_export_vtable): Likewise.
1572         (import_expor_class): Likewise.
1573         * typeck2.c (abstract_virtuals_error): Likewise.
1574         * xref.c (GNU_xref_member): Likewise.
1575         * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
1576         
1577 1999-12-26  Zack Weinberg  <zack@wolery.cumb.org>
1578
1579         * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
1580         throughout.
1581
1582 1999-12-26  Mark Mitchell  <mark@codesourcery.com>
1583
1584         * decl.c (store_return_init): Use mode of old RTL generated for
1585         DECL_RESULT, not the mode of DECL_RESULT itself.
1586         * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
1587         for functions that used named return values.
1588         
1589 1999-12-24  Mark Mitchell  <mark@codesourcery.com>
1590
1591         * semantics.c (expand_body): Use
1592         note_deferral_of_defined_inline_function.
1593
1594 1999-12-22  Mark Mitchell  <mark@codesourcery.com>
1595
1596         * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
1597
1598 1999-12-22  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
1599
1600         * error.c (dump_decl): Support named return values.
1601
1602 1999-12-20  Mark Mitchell  <mark@codesourcery.com>
1603
1604         * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
1605         (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
1606         (CLASSTYPE_PRIMARY_BINFO): Likewise.
1607         * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
1608         TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
1609         (check_bases_and_members): Set them here instead.
1610         (create_vtable_ptr): New function, split out from ...
1611         (finish_struct_1): ... here.  Use it.  Tidy.  Use
1612         CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
1613         * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
1614         the first field in the class.
1615         * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES.  Handle
1616         seeing TYPE_VFIELD as the first field in the class.
1617         
1618         * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
1619         (TYPE_POLYMORPHIC_P): ... this.
1620         (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
1621         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
1622         (TREE_CALLS_NEW): Remove.
1623         (TREE_MANGLED): Likewise.
1624         * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
1625         and TYPE_POLYMORPHIC_P.
1626         * class.c (check_bases): Likewise.
1627         (finish_base_struct): Likewise.
1628         (finish_struct_bits): Likewise.
1629         (check_for_override): Likewise.
1630         (finish_struct_1): Likewise.
1631         (get_vfield_name): Likewise.
1632         * decl.c (xref_basetypes): Likewise.
1633         * decl2.c (import_export_class): Likewise.
1634         (import_export_decl): Likewise.
1635         * error.c (dump_function_decl): Likewise.
1636         * pt.c (instantiate_class_template): Likewise.
1637         * repo.c (repo_inline_used): Likewise.
1638         * rtti.c (build_headof): Likewise.
1639         (get_tinfo_fn_dynamic): Likewise.
1640         (build_x_typeid): Likewise.
1641         (get_tinfo_var): Likewise.
1642         (build_dynamic_cast_1): Likewise.
1643         (synthesize_tinfo_fn): Likewise.
1644         * search.c (lookup_field_1): Likewise.
1645         (dfs_debug_mark): Likewise.
1646         (maybe_suppress_debug_info): Likewise.
1647         * typeck.c (build_component_ref): Likewise.
1648         (build_component_addr): Likewise.
1649         * typeck2.c (process_init_constructor): Likewise.
1650         
1651 1999-12-20  Nathan Sidwell  <nathan@acm.org>
1652
1653         * typeck.c (strip_all_pointer_quals): New static function.
1654         (build_static_cast): Use it. Don't use at_least_as_qualified_p.
1655
1656 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
1657
1658         * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
1659         (dso_handle_node): New macro.
1660         (flag_use_cxa_atexit): New variable.
1661         (declare_global_var): New function.
1662         (start_anon_func): Remove declaration.
1663         (end_anon_func): Likewise.
1664         * decl.c (get_atexit_node): New function, split out from
1665         destroy_local_static.  Handle flag_use_cxa_atexit.
1666         (get_dso_handle_node): Likewise.
1667         (start_cleanup_fn): Renamed from start_anon_func.  Moved here from
1668         except.c.  Handle flag_use_cxa_atexit.
1669         (end_cleanup_fn): Renamed from end_anon_func.  Moved here from
1670         except.c.
1671         (declare_global_var): New variable.
1672         (destroy_local_static): Handle flag_use_cxa_atexit.
1673         * decl2.c (flag_use_cxa_atexit): New variable.
1674         (lang_f_options): Likewise.
1675         * except.c (start_anon_func): Remove.
1676         (end_anon_func): Liekwise.
1677         * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
1678         * rtti.c (get_tinfo_var): Use declare_global_var.
1679
1680 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
1681
1682         * class.c (check_field_decls): Don't return a value.
1683         (avoid_overlap): Moved here from tree.c.
1684         (build_base_fields): Likewise.
1685         (check_bases): New function, split out from finish_base_struct.
1686         (check_bases_and_members): New function, split out from 
1687         finish_struct_1.
1688         (struct base_info): Remove cant_have_default_ctor,
1689         cant_have_const_ctor, cant_have_asn_ref.
1690         (finish_base_struct): Split semantic analysis into check_bases.
1691         (finish_struct_methods): Fix bogus assertion.
1692         (check_field_decls): Call finish_struct_anon here.
1693         (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
1694         (finish_struct_1): Use check_bases_and_members.  Reorganize.
1695         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
1696         (build_base_fields): Don't declare.
1697         * tree.c (avoid_overlap): Remove.
1698         (build_base_fields): Likewise.
1699         
1700         * optimize.c (struct inline_data): Remove scope_stmt.
1701         (remap_block): Don't use insert_block_after_note.  Don't update
1702         scope_stmt.
1703         (expand_call_inline): Don't update scope_stmt.
1704         (optimize_function): Don't initialize scope_stmt.
1705         * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
1706         NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
1707
1708 1999-12-15  Mark Mitchell  <mark@codesourcery.com>
1709
1710         * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
1711         out of the class, rather than taking them as parameters.
1712         (build_vbase_pointer_fields): Move here from tree.c.
1713         (build_vtbl_or_vbase_field): New function.
1714         (check_methods): Likewise.
1715         (remove_zero_width_bitfields): Likewise.
1716         (add_virtual_function): Use tree_cons instead of temp_tree_cons.
1717         (delete_duplicate_fields_1): Tidy.  Don't delete duplicate
1718         USING_DECLs here.
1719         (finish_struct_methods): Handle the case where there are no
1720         methods here.
1721         (get_basefndecls): Use tree_cons instead of temp_tree_cons.
1722         (check_field_decls): Call delete_duplicate_fields here.
1723         (finish_struct_1): Tidy.  Use check_methods and
1724         remove_zero_width_bitfields.
1725         * cp-tree.h (build_vbase_pointer_fields): Remove.
1726         * decl.c (grokdeclarator): Use tree_cons instead of
1727         temp_tree_cons.
1728         * decl2.c (qualified_lookup_using_namespace): Use tree_cons
1729         instead of temp_tree_cons.
1730         * lex.c (cons_up_default_function): Remove dead code.
1731         * method.c (fixup_pending_inline): New function, split out from ...
1732         (do_inline_function_hair): ... here.
1733         * tree.c (build_vbase_pointer_fields): Remove.
1734         
1735 1999-12-15  Jason Merrill  <jason@casey.cygnus.com>
1736
1737         * tree.c (walk_tree): Walk operand subtrees in forward order.
1738         * optimize.c (expand_call_inline): Likewise.
1739         (optimize_function): Initialize id->scope_stmt to something useful.
1740         (remap_block): Assume id->scope_stmt has a useful value.
1741
1742 1999-12-15  Nathan Sidwell  <nathan@acm.org>
1743
1744         * typeck.c (build_c_cast): Expand warning message. Move pointer
1745         alignment warning to after the cast. Don't warn about pointer
1746         alignment when given a pointer to incomplete.
1747
1748 1999-12-15  Richard Henderson  <rth@cygnus.com>
1749
1750         * cp-tree.h (make_aggr_type): Declare.
1751         * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
1752         (make_aggr_type): New.
1753
1754         * decl.c (build_typename_type, init_decl_processing): Use it.
1755         (build_ptrmemfunc_type, xref_tag): Likewise.
1756         * except.c (call_eh_info): Likewise.
1757         * init.c (init_init_processing): Likewise.
1758         * pt.c (process_template_parm, lookup_template_class): Likewise.
1759         * rtti.c (expand_class_desc): Likewise.
1760         * semantics.c (begin_class_definition, finish_typeof): Likewise.
1761         * tree.c (copy_template_template_parm): Likewise.
1762
1763 1999-12-15  Jason Merrill  <jason@yorick.cygnus.com>
1764
1765         * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
1766         sizeof (struct tree_common).
1767
1768 1999-12-14  Jason Merrill  <jason@casey.cygnus.com>
1769
1770         * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
1771         outermost block to point to the inlined function decl.
1772
1773         * error.c (dump_decl): operator==, not operator ==.
1774         (op_to_string): Likewise.
1775
1776         * decl.c (compute_array_index_type): Handle null name.
1777
1778         * decl2.c (ambiguous_decl): Fix to match comment.
1779         (lookup_using_namespace): Adjust.
1780
1781         * decl2.c (import_export_class): Don't ignore dllimport.
1782
1783 1999-12-14  Mark Mitchell  <mark@codesourcery.com>
1784
1785         * class.c (check_field_decls): Split out from ...
1786         (finish_struct_1): ... here.  Use it.  Tidy.
1787
1788         * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
1789         * optimize.c (copy_body_r): Pass it.
1790         * tree.c (remap_save_expr): Clear walk_subtrees for an
1791         already-handled SAVE_EXPR.
1792         (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
1793
1794         * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
1795         * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
1796
1797         * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
1798
1799 1999-12-14  Mumit Khan  <khan@xraylith.wisc.edu>
1800
1801         * class.c (finish_base_struct): Allow multiple COM base classes
1802         as well as non-COM bases as long as it's not the leftmost.
1803
1804 1999-12-13  Mumit Khan  <khan@xraylith.wisc.edu>
1805
1806         * lex.c (saving_parse_to_obstack): New global.
1807         (reinit_parse_for_block): Use.
1808         (reinit_parse_for_expr): Use.
1809         (check_newline): Use.
1810
1811 1999-12-13  Mark Mitchell  <mark@codesourcery.com>
1812
1813         * optimize.c (initialize_inlined_parameters): Take FN to which the
1814         parameters belong as an argument.
1815         (expand_call_inline): Expand calls into the parameter
1816         initializations before pushing the function onto the list of
1817         functions we are presently expanding.
1818
1819 1999-12-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1820
1821         * class.c (get_vtable_name): Use a literal format string and
1822         VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
1823         (prepare_fresh_vtable): Likewise.
1824
1825         * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
1826         VTABLE_NAME_FORMAT.
1827
1828         * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
1829
1830         * init.c (build_vec_init): Initialize variable `try_body'.
1831
1832         * lex.c (yyerror): Don't call a variadic function with a
1833         non-literal format string.
1834
1835         * optimize.c (optimize_function): Call memset, not bzero.
1836
1837         * pt.c (for_each_template_parm_r): Add static prototype.
1838
1839 1999-12-09  Andreas Jaeger  <aj@suse.de>
1840
1841         * except.c (expand_throw): Add static attribute to match
1842         prototype.
1843
1844         * Makefile.in (semantics.o): Add dependency on output.h.
1845         * semantics.c: Include output.h for declaration of
1846         make_function_rtl.
1847
1848 1999-12-09  Mark Mitchell  <mark@codesourcery.com>
1849
1850         * decl.c (init_decl_processing): Reenable inlining on trees.
1851         (finish_function): Likewise.
1852         * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
1853         * semantics.c (simplify_aggr_init_exprs): New function.
1854         (expand_body): Use it.
1855         * tree.c (walk_tree): Special-case TARGET_EXPRs since they
1856         sometimes present the same sub-tree twice.
1857         
1858         * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
1859         `csl'.
1860
1861         * semantics.c (finish_switch_cond): Do conversions here, not ...
1862         * typeck.c (c_expand_start_case): Here.
1863
1864         * semantics.c (do_poplevel): Remove unused variable.
1865         
1866 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
1867
1868         * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
1869         unless we're declaring the variable in question.
1870
1871 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
1872
1873         * decl.c (init_decl_processing): #if 0 last patch.
1874         (finish_function): Likewise.
1875
1876 1999-12-05  Mark Mitchell  <mark@codesourcery.com>
1877
1878         * decl.c (init_decl_processing): Set flag_inline_trees if
1879         !flag_no_inline.
1880
1881         * cp-tree.h (calls_setjmp_p): Declare.
1882         * decl.c (finish_function): Mark functions that call setjmp as
1883         uninlinable.
1884         * optimize.c (calls_setjmp_r): New function.
1885         (calls_setjmp_p): Likewise.
1886
1887 1999-12-04  Mark Mitchell  <mark@codesourcery.com>
1888
1889         * optimize.c (expand_call_inline): Wrap the expanded call in an
1890         EXPR_WITH_FILE_LOCATION node to get correct line numbers for
1891         inlined functions.
1892
1893         * optimize.c (inline_data): Remove fns_top.  Add scope_stmt.  Add
1894         in_target_cleanup_p.
1895         (remap_decl): New function.
1896         (remap_block): Likewise.
1897         (copy_scope_stmt): Likewise.
1898         (copy_body_r): Use remap_decl and copy_scope_stmt.
1899         (copy_body): Use VARRAY_TOP_TREE.
1900         (initialize_inlined_parameters): Likewise.
1901         (declare_return_variable): Likewise.
1902         (inlinable_function_p): Check flag_inline_trees.
1903         (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
1904         specially.  Use VARRAY_PUSH_TREE.  Create a BLOCK for the
1905         parameters of the inlined function.
1906         (optimize_function): Prevent recursion into partially complete
1907         functions.
1908         
1909         * cp-tree.def (SCOPE_STMT): Take one operand.
1910         * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
1911         (SCOPE_NULLIFIED_P): Redefine.
1912         (SCOPE_NO_CLEANUPS_P): New macro.
1913         (add_scope_stmt): Change prototype.
1914         * decl.c (poplevel): Tidy.  Warn about unused variables here.
1915         Record SCOPE_STMT_BLOCKs.
1916         (finish_function): Keep DECL_INITIAL for functions that might be
1917         inlined.
1918         * ir.texi: Document SCOPE_NO_CLEANUPS_P.
1919         * semantics.c: Include rtl.h.
1920         (add_scope_stmt): Return the new scope statement and, for an
1921         end-of-scope statement, its matching begin statement.  Don't set
1922         SCOPE_NULLIFIED_P.
1923         (do_pushlevel): Simplify, now that we are always
1924         function-at-a-time.
1925         (do_poplevel): Likewise.  Record SCOPE_STMT_BLOCKs.
1926         (expand_stmt): Don't call expand_start_bindings or
1927         expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
1928         * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
1929         SCOPE_NULLIFIED_P.
1930         * Makefile.in (semantics.o): Depend on RTL_H.
1931         
1932         * decl2.c (pending_statics_used): Make it a macro.
1933         (saved_inlines_used): Likewise.
1934         (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
1935         (mark_inline_for_output): Likewise.
1936         (ssdf_decls_used): Remove.
1937         (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
1938         (generate_ctor_or_dtor_function): Adjust accordingly.
1939         
1940 1999-11-24  Geoffrey Keating  <geoffk@cygnus.com>
1941             Greg McGary  <gkm@gnu.org>
1942
1943         * decl.c (duplicate_decls): Merge
1944         DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
1945         DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
1946
1947 1999-12-02  Mike Stump  <mrs@wrs.com>
1948
1949         * init.c (perform_member_init): Handle parse errors better.
1950
1951 1999-12-01  Mark Mitchell  <mark@codesourcery.com>
1952
1953         * cp-tree.h (min_tree_cons): Remove.
1954         (scratch_ovl_cons): Likewise.
1955         * decl.c (saveable_obstack): Don't declare.
1956         (duplicate_decls): Tweak error-message.
1957         (initialize_local_var): Explicitly mark the definition as static.
1958         (finish_function): Call permanent_allocation, just so
1959         that the middle-end sees the obstacks it expects.
1960         (mark_cp_function_context): Likewise.
1961         * init.c (build_new): Don't use min_tree_cons.
1962         * lex.c (permanent_obstack): Don't declare.
1963         (current_obstack, saveable_obstack): Likewise.
1964         * spew.c (current_obstack, saveable_obstack): Likewise.
1965         * tree.c (current_obstack, saveable_obstack): Likewise.
1966         (scratch_ovl_cons): Remove.
1967         (build_min_nt): Don't mess with obstacks.
1968         (build_min): Likewise.
1969         (min_tree_cons): Remove
1970         * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
1971         (build_x_function_call): Likewise.
1972         (build_c_cast): Don't use min_tree_cons.
1973         
1974 1999-11-29  Mark Mitchell  <mark@codesourcery.com>
1975
1976         * pt.c (tsubst_decl): Robustify.
1977
1978 1999-11-27  Mark Mitchell  <mark@codesourcery.com>
1979
1980         * decl2.c (finish_file): Call expand_body for inline functions
1981         that will be written out but that do not yet have RTL.
1982         * semantics.c (expand_body): Do not generate RTL For inline
1983         functions that do not yet need to be written out.
1984
1985 1999-11-25  Mark Mitchell  <mark@codesourcery.com>
1986
1987         * Make-lang.in (CXX_SRCS): Add optimize.c.  
1988         * Makefile.in (CXX_OBJS): Add optimize.o.
1989         (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
1990         (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
1991         (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
1992         (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
1993         (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
1994         (dump.o): Likewise.
1995         (optimize.o): New target.  
1996         * class.c: Don't include splay-tree.h.
1997         * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.  
1998         * cp-tree.h: Include splay-tree.h.
1999         (DECL_UNINLINABLE): New macro.
2000         (CTOR_BEGIN_P, CTOR_END_P): New macros.
2001         (flag_inline_trees): New variable.
2002         (local_variable_p): New function.
2003         (nonstatic_local_decl_p): Likewise.
2004         (optimize_function): Likewise.
2005         (cplus_unsave_expr_now): Remove.
2006         (copy_tree_r): Declare.
2007         (remap_save_expr): Likewise.  
2008         * decl.c (local_variable_p): Don't
2009         make it static.
2010         (local_variable_p_walkfn): New function.
2011         (make_rtl_for_local_static): Remove code to try to avoid writing
2012         out static constants.
2013         (emit_local_var): Fix indentation.
2014         (nonstatic_local_decl_p): New function.
2015         (check_default_argument): Use local_variable_p_walkfn, not
2016         local_variable_p, when walking the tree.
2017         (start_function): Set the DECL_CONTEXT for automatically generated
2018         labels.
2019         (finish_constructor_body): Use CTOR_STMT to mark the end of a
2020         constructor.  
2021         * decl2.c: Don't include splay-tree.h.
2022         (flag_inline_trees): Define.  
2023         * dump.c: Don't include
2024         splay-tree.h.  
2025         * except.c (expand_end_catch_block): Fix comment formatting.
2026         (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
2027         (expand_throw): Tidy comment.  
2028         * init.c (build_vec_delete_1): Use create_temporary_var.  
2029         * lex.c (cplus_tree_code_type): Make it static.
2030         (cplus_tree_code_length): Likewise.
2031         (cplus_tree_code_name): Likewise.  
2032         * optimize.c: New file.  
2033         * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
2034         with computed gotos.
2035         (setup_vtbl_ptr): Mark the beginnings of constructors with
2036         CTOR_STMT.
2037         (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
2038         (expand_body): Call optimize_function.  Save bodies if we're doing
2039         inlining on trees.
2040         * tree.c: Don't include splay-tree.h.  Include insn-config.h and
2041         integrate.h.
2042         (copy_tree_r): Make it public.
2043         (statement_code_p): New function.
2044         (mark_local_for_remap_r): Likewise.
2045         (cp_usave_r): Likewise.
2046         (cp_unsave): Likewise.
2047         (build_cplus_new): Set DECL_CONTEXT for temporary variables.
2048         (walk_tree): Walk into `s' class nodes.  Walk statement chains.
2049         (copy_tree_r): Handle 's' class nodes.  Restore chains for
2050         statements.  Nullify scopes.  Don't copy types.
2051         (init_tree): Set lang_unsave to cp_unsave.
2052         (remap_save_expr): Define.
2053         * ir.texi: Document CTOR_STMT.
2054         
2055 1999-11-24  Jason Merrill  <jason@casey.cygnus.com>
2056
2057         * search.c (note_debug_info_needed): Do perform this optimization
2058         for dwarf2.  
2059         (maybe_suppress_debug_info): Likewise.  Start by clearing
2060         TYPE_DECL_SUPPRESS_DEBUG.
2061
2062 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
2063
2064         * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
2065
2066         * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
2067
2068 1999-11-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2069
2070         * decl.c (pushdecl, grokdeclarator): Don't call a variadic
2071         function with a non-literal format string.
2072
2073         * lex.c (do_identifier): Likewise.
2074
2075         * typeck.c (build_unary_op): Likewise.
2076
2077 1999-11-23  Mark Mitchell  <mark@codesourcery.com>
2078
2079         * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
2080
2081 1999-11-22  Mark Mitchell  <mark@codesourcery.com>
2082
2083         * cp-tree.def (CTOR_COMPLETE): New tree node.
2084         * decl.c (finish_constructor_body): Add it, to mark the end of the
2085         constructor.
2086         (finish_function): Don't call end_protect_partials here.
2087         * ir.texi (CTOR_COMPLETE): Document it.
2088         * semantics.c (expand_stmt): Handle it.
2089         
2090         * cp-tree.def (FUNCTION_NAME): New tree node.
2091         * cp-tree.h (current_function_name_declared): Tweak documentation.
2092         (lang_decl_flags): Add pretty_function_p, adjust dummy.
2093         (DECL_PRETTY_FUNCTION_P): New macro.
2094         * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
2095         etc., in a template function.  Use at_function_scope_p instead of
2096         expanding it inline.
2097         * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
2098         specially.
2099         (tsubst): Handle FUNCTION_NAME.
2100         (tsubst_copy): Likewise.
2101         (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
2102         etc. in instantiation.
2103         * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
2104         even in template functions.
2105         (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
2106         conditional scope at the top of a destructor.
2107         
2108         * error.c (dump_function_decl): Use `[ with ... ]' syntax for
2109         specializations too.
2110
2111 1999-11-22  Nathan Sidwell  <nathan@acm.org>
2112
2113         * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
2114         when actually negative.
2115
2116         * typeck.c (convert_for_assignment): Expand comment about
2117         strange NULL check, moved from ...
2118         (convert_for_initialization): ... here. Remove unneeded
2119         code.
2120
2121 1999-11-21  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
2122
2123         * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
2124         * init.c (build_vec_delete, build_vec_delete_1): Likewise.
2125         Always destruct virtual bases of array components, but never
2126         delete them.
2127         (build_vec_init): Adjust invocations.
2128         (build_delete): Likewise.
2129         * decl2.c (delete_sanity): Likewise.
2130
2131 1999-11-19  Nathan Sidwell  <nathan@acm.org>
2132
2133         * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
2134         * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
2135         * decl2.c (grok_method_quals): Accept `restrict' as applying to
2136         the object pointer. Return such qualifiers.
2137         (grokclassfn): Apply this pointer qualifiers. Cleanup unused
2138         variables.
2139
2140 1999-11-18  Mark Mitchell  <mark@codesourcery.com>
2141
2142         * except.c (expand_end_catch_block): Fix typo.
2143         (expand_exception_blocks): Simplify.  Don't call
2144         expand_leftover_cleanups.
2145
2146 1999-11-15  Jason Merrill  <jason@casey.cygnus.com>
2147
2148         * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
2149         * pt.c (tsubst, case INTEGER_TYPE): Call it.  
2150         Check uses_template_parms.
2151
2152         * class.c (finish_struct): If we're a local class in a template
2153         function, add a TAG_DEFN.
2154         * pt.c (lookup_template_class): If this is a local class in a
2155         template function, call pushtag.
2156         (tsubst_expr, case TAG_DEFN): Handle classes, too.
2157
2158         Emit debug info with the vtable.
2159         * search.c (maybe_suppress_debug_info): New function...
2160         * class.c (finish_struct_1): ...split out from here.
2161         * cp-tree.h: Declare it.
2162         * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
2163         if we're writing out the vtable.
2164         * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p, 
2165         note_debug_info_needed): #if 0 out.
2166
2167 1999-11-14  Mark Mitchell  <mark@codesourcery.com>
2168
2169         * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
2170         * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
2171         TREE_PERMANENT.
2172         * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
2173         * decl2.c (lookup_arg_dependent): Use it.
2174         
2175         * cp-tree.h (cp_finish_decl): Change prototype.
2176         (finish_static_data_member_decl): Likewise.
2177         (push_permanent_obstack): Remove declaration.
2178         (push_expression_obstack): Likewise.
2179         (push_scratch_obstack): Likewise.
2180         (DECL_TEMPLATE_PARM_P): Robustify.
2181         (SET_DECL_TEMPLATE_PARM_P): New macro.
2182         * class.c (add_method): Don't manipulate obstacks.
2183         (finish_vtbls): Likewise.
2184         * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
2185         * decl.c (binding_for_name): Don't manipulate obstacks.
2186         (maybe_push_to_top_level): Likewise.
2187         (pop_from_top_level): Likewise.
2188         (duplicate_decls): Likewise.
2189         (pushdecl): Likewise.
2190         (implicitly_declare): Likewise.
2191         (build_typename_type): Likewise.
2192         (start_decl): Likewise.
2193         (cp_finish_decl): Likewise.
2194         (finish_decl): Likewise.
2195         (destroy_local_static): Likewise.
2196         (expand_static_init): Likewise.
2197         (complete_array_type): Likewise.
2198         (grokvardecl): Likewise.
2199         (build_ptrmemfnc_type): Likewise.
2200         (grokdeclarator): Likewise.
2201         (xref_tag): Likewise.
2202         (xref_basetypes): Likewise.
2203         (start_enum): Likewise.
2204         (finish_enum): Likewise.
2205         (start_function): Likewise.
2206         (finish_function): Likewise.
2207         (start_method): Adjust call to cp_finish_decl.
2208         * decl2.c (finish_static_data_member_decl): Don't manipulate
2209         obstacks.
2210         (grokfield): Likewise.
2211         (grokbitfield): Likewise.
2212         (get_temp_name): Likewise.
2213         (get_sentry): Likewise.
2214         (fnish_file): Likewise.
2215         (lookup_arg_dependent): Likewise.
2216         * except.c (call_eh_info): Likewise.
2217         (push_eh_info): Likewise.
2218         (do_pop_exception): Likewise.
2219         (initialize_handler_parm): Likewise.
2220         (expand_end_eh_spec): Likewise.
2221         (alloc_eh_object): Likewise.
2222         (expand_throw): Likewise.
2223         * expr.c (extract_scalar_init): Likewise.
2224         * init.c (build_java_class_ref): Likewise.
2225         * lex.c (get_time_identifier): Likewise.
2226         (snarf_defarg): Likewise.
2227         (add_defarg_fn): Likewise.
2228         (is_global): Simplify.
2229         (do_identifier): Don't check TREE_PERMANENT.
2230         * method.c (emit_thunk): Don't manipulate obstacks.
2231         * parse.y (condition): Adjust call to cp_finish_decl.
2232         (primary): Likewise.
2233         (initdcl): Likewise.
2234         (initdcl0_innards): Likewise.
2235         (nomods_initdcl0): Likewise.
2236         * pt.c (push_inline_template_parms_recursive): Use
2237         SET_DECL_TEMPLATE_PARM_P.
2238         (process_template_parm): Likewise.
2239         (lookup_template_class): Don't manipulate obstacks.
2240         (instantiate_class_template): Adjust call to
2241         finish_static_data_member_decl.
2242         (tsubst_decl): Don't manipulate obstacks.
2243         (tsubst_expr): Likewise.
2244         (instantiate_template): Likewise.
2245         (instantiate_decl): Adjust calls to cp_finish_decl.
2246         * rtti.c (call_void_fn): Don't manipulate obstacks.
2247         (get_tinfo_var): Likewise.
2248         (get_tinfo_fn_unused): Likewise.
2249         (build_dynamic_cast_1): Likewise.
2250         (expand_si_desc): Likewise.
2251         (expand_class_desc): Likewise.
2252         (expand_ptr_desc): Likewise.
2253         (expand_attr_desc): Likewise.
2254         (expand_generic_desc): Likewise.
2255         (synthesize_tinfo_fn): Likewise.
2256         * search.c (expand_upcast_fixups): Likewise.
2257         * semantics.c (finish_asm_stmt): Likewise.
2258         (finish_named_return_value): Likewise.
2259         (begin_class_definition): Likewise.
2260         (finish_class_definition): Likewise.
2261         (finish_typeof): Likewise.
2262         * tree.c (build_cplus_method_type): Likewise.
2263         (reverse_path): Likewise.
2264         (copy_template_template_parm): Likewise.
2265         (build_expr_ptr_wrapper): Likewise.
2266         (push_expression_obstack): Remove.
2267         (push_permanent_obstack): Likewise.
2268         * typeck.c (mark_addressable): Likewise.
2269         
2270 1999-11-13  Mark Mitchell  <mark@codesourcery.com>
2271
2272         * call.c (build_conditional_expr): Use build_target_expr_with_type.
2273         (convert_like): Likewise.
2274         (build_over_call): Likewise.
2275         * cp-tree.h (build_target_expr): Remove.
2276         (build_target_expr_with_type): New function.
2277         * cvt.c (build_up_reference): Use get_target_expr.
2278         * decl.c (build_target_expr): Move to ...
2279         * tree.c (build_target_expr): Here.  Make it static.
2280         (build_target_expr_with_type): New function.  Set DECL_CONTEXT on
2281         the temporary VAR_DECLs.
2282         (get_target_expr): Use it.
2283
2284 1999-11-13  Jason Merrill  <jason@yorick.cygnus.com>
2285
2286         * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
2287         * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
2288         * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
2289         * class.c (set_rtti_entry): Use it.
2290
2291 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
2292
2293         * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
2294         here.
2295         * semantics.c (finish_expr_stmt): Call it here instead.  Move
2296         default_conversion logic to semantic-analysis time.
2297
2298 1999-11-12  Jason Merrill  <jason@yorick.cygnus.com>
2299
2300         * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
2301
2302 Fri Nov 12 12:56:32 MST 1999    Diego Novillo <dnovillo@cygnus.com>
2303
2304         * init.c (init_init_processing): Re-instated Nov 11 patch after
2305         approval.
2306
2307 Fri Nov 12 10:42:02 MST 1999    Diego Novillo <dnovillo@cygnus.com>
2308
2309         * init.c (init_init_processing): Undo patch from Nov 11, 1999.
2310         Patch had not been approved yet.
2311
2312 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
2313
2314         * decl.c (compute_array_index_type): New function, split out from
2315         grokdeclarator.
2316         (create_array_type_for_decl): Likewise.
2317         (grokdeclarator): Use them.
2318
2319         * semantics.c (expand_stmt): Don't suspend_momentary or
2320         resume_momentary.
2321
2322 Thu Nov 11 12:42:11 MST 1999    Diego Novillo <dnovillo@cygnus.com>
2323
2324         * init.c (init_init_processing): Header information for
2325         arrays allocated via `new' should have the same alignment used by
2326         malloc.
2327
2328 1999-11-10  Mark Mitchell  <mark@codesourcery.com>
2329
2330         * error.c (dump_function_name): Don't crash if given a friend
2331         pseudo-instantiation.
2332
2333         * cp-tree.h (build_enumerator): Change prototype.
2334         * decl.c (enum_next_value): Remove.
2335         (enum_overflow): Likewise.
2336         (init_decl_processing): Don't register enum_next_value as a root.
2337         (start_enum): Clear TYPE_VALUES for a redefined enum.
2338         (finish_enum): Reset the type of enumeration constants.
2339         (build_enumerator): Fix indentation.  Don't copy CONST_DECLs when
2340         we don't need to.  Maintain the TYPE_VALUES list and look there
2341         for the previously defined enumeration constant.  Let enumeration
2342         constants have the type of their values until the enumeration type
2343         is complete.
2344         * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
2345         (structsp): Adjust.
2346         * parse.c: Regenerated.
2347         * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
2348         
2349 Wed Nov 10 12:43:21 1999  Philippe De Muyter  <phdm@macqel.be>
2350                           Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2351
2352         * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
2353
2354 1999-11-09  Mark Mitchell  <mark@codesourcery.com>
2355
2356         * cp-tree.h (language_function): Remove x_last_dtor_insn and
2357         x_last_parm_cleanup_insn.
2358         * decl.c (last_dtor_insn): Remove.
2359         (last_parm_cleanup_insn): Likewise.
2360         (expand_start_early_try_stmts): Don't set them.
2361         (store_parm_decls): Likewise.
2362         (save_function_data): Or save them.
2363         (mark_lang_function): Or mark them.
2364
2365 1999-11-08  Mark Mitchell  <mark@codesourcery.com>
2366
2367         * decl.c (store_parm_decls): Generate cleanup code at
2368         semantic-analysis time.  Destroy objects in the correct order.
2369
2370 1999-11-07  Mark Mitchell  <mark@codesourcery.com>
2371
2372         * cp-tree.h (begin_new_placement): Remove.
2373         (finish_new_placement): Likewise.
2374         * class.c (finish_struct_1): Don't suspend_momentary or
2375         resume_momentary.
2376         * decl.c (grokdeclarator): Likewise.
2377         (maybe_build_cleanup_1): Likewise.
2378         * except.c (push_eh_cleanup): Likewise.
2379         (build_terminate_handler): Likewise.
2380         * init.c (build_new_1): Likewise.
2381         * parse.y (parse_decl): Change prototype.
2382         (initdecls, notype_initdecls, initdcl): Don't return int.
2383         (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
2384         (.begin_new_placement): Remove.
2385         (.finish_new_placement): Likewise.
2386         (nonmomentary_expr): Likewise.
2387         (suspend_mom): Likewise.
2388         (condition): Don't suspend_momentary, resume_momentary, or keep
2389         track of need to resume.
2390         (unary_expr): Likewise.
2391         (new_placement): Likewise.
2392         (decl): Likewise.
2393         (structsp): Likewise.
2394         (new_type_id): Likewise.
2395         (maybe_parmlist): Likewise.
2396         (direct_after_type_declaration): Likewise.
2397         (direct_new_declarator): Likewise.
2398         (direct_abstract_declaration): Likewise.
2399         * parse.c: Regenerated.
2400         * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
2401         * semantics.c (begin_new_placement): Remove.
2402         (finish_new_placement): Likewise.
2403         
2404 1999-11-05  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2405
2406         * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
2407         (DECL_TEMPLATE_INFO): Use it.
2408         * decl.c (warn_extern_redeclared_static): Do nothing for
2409         TEMPLATE_DECLs.
2410         * decl2.c (mark_used): Explicitly check for function or variable.
2411         * semantics.c (finish_unary_op_expr): Check whether result is also
2412         an INTEGER_CST.
2413
2414 1999-11-05  Mark Mitchell  <mark@codesourcery.com>
2415
2416         * Makefile.in (typeck2.o): Depend on output.h.
2417         * typeck2.c: Include output.h.
2418
2419         * decl.c (flag_ansi): Remove declaration.
2420
2421         * pt.c (tinst_level_tick): Make it static.
2422         (last_template_error_tick): Likewise.
2423         
2424         * cp-tree.h (mapcar): Remove declaration.
2425         (search_tree): Likewise.
2426         (walk_tree_fn): New typedef.
2427         (walk_tree): New function.
2428         * tree.c (bot_manip): Change prototype.  Adjust to be called via
2429         walk_tree.
2430         (bot_replace): Likewise.
2431         (no_linkage_helper): Likewise.
2432         (copy_tree_r): New function.
2433         (search_tree): Rename, and adjust, to become ...
2434         (walk_tree): New function.
2435         (mapcar): Remove.
2436         (target_remap): Remove.
2437         (target_remap_count): Likewise.
2438         (break_out_target_exprs): Use walk_tree.
2439         * decl.c (local_variable_p): Change prototype.
2440         (check_default_argument): Use walk_tree.
2441         * pt.c (for_each_template_parm_r): New function, split out from ...
2442         (for_each_template_parm): Here.  Use it, via walk_tree.
2443         
2444 1999-11-03  Mark Mitchell  <mark@codesourcery.com>
2445
2446         * class.c (check_bitfield_decl): New function, split out from
2447         finish_stuct_1.
2448         (check_field_decl): Likewise.  Recursively examine members of
2449         anonymous structs.
2450         (finish_struct_1): Use them.
2451         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
2452         
2453 1999-11-02  Mark Mitchell  <mark@codesourcery.com>
2454
2455         * decl.c (grokfndecl): Remove dead code.
2456
2457         * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
2458
2459 1999-11-02  Scott Snyder  <snyder@fnal.gov>
2460
2461         * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
2462         IMAGPART_EXPR.
2463         * pt.c (tsubst_copy): Likewise.
2464
2465 1999-11-01  Jason Merrill  <jason@yorick.cygnus.com>
2466
2467         * decl2.c (maybe_make_one_only): Always make things comdat on
2468         ELF targets, too.
2469
2470 1999-10-31  Mark Mitchell  <mark@codesourcery.com>
2471
2472         * decl.c (finish_function): Call free_after_parsing for functions
2473         we are not immediately turning into RTL.
2474
2475 1999-10-31  Brendan Kehoe  <brendan@cygnus.com>
2476
2477         * cp-tree.h (flag_dump_translation_unit): Add decl.
2478
2479 Sat Oct 30 22:42:50 1999  Stephen L Moshier <moshier@mediaone.net>
2480
2481         * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
2482
2483 1999-10-30  Mark Mitchell  <mark@codesourcery.com>
2484
2485         * decl.c (pop_cp_function_context): Don't call free on a NULL
2486         pointer.
2487         * semantics.c: Include ggc.h.
2488         (expand_body): Do garbage-collection after processing a template
2489         function.  Clear DECL_SAVED_TREE after generating RTL for a
2490         function.
2491         * Makefile.in (semantics.o): Depend on ggc.h.
2492         
2493 1999-10-29  Mark Mitchell  <mark@codesourcery.com>
2494
2495         * cp-tree.h (make_typename_type): Change prototype.
2496         * decl.c (make_typename_type): Only complain if so requested.
2497         * parse.y (nested_name_specifier): Adjust calls.
2498         (typename_sub0): Likewise.
2499         (typename_sub1): Likewise.
2500         * parse.c: Regenerated.
2501         * pt.c (convert_template_argument): Pass complain to
2502         make_typename_type.
2503         (tsubst): Likewise.
2504         
2505 1999-10-28  Mark Mitchell  <mark@codesourcery.com>
2506
2507         * semantics.c (finish_handler): End the scope of the handler
2508         before attaching it to the statement-tree.
2509
2510 1999-10-28  Ian Lance Taylor  <ian@zembu.com>
2511
2512         * rtti.c (build_dynamic_cast_1): Give a better error message for
2513         an attempt to dynamic_cast from a non-polymorphic type.
2514
2515 1999-10-27  Mark Mitchell  <mark@codesourcery.com>
2516
2517         * cp-tree.h (make_temp_vec): Remove.
2518         (make_scratch_vec): Likewise.
2519         * call.c (add_function_candidate): Use make_tree_vec.
2520         (add_conv_candidate): Likewise.
2521         (build_builtin_candidate): Likewise.
2522         (add_template_candidate_real): Likewise.
2523         * class.c (resolve_address_of_overloaded_function): Likewise.
2524         * decl.c (start_function): Don't fool with the momentary obstack.
2525         (finish_function): Likewise.
2526         * init.c (expand_direct_vtbls_init): Likewise.
2527         (begin_init_stmts): Likewise.
2528         (finish_init_stmts): Likewise.
2529         * pt.c (add_to_template_args): Use make_tree_vec.
2530         (check_explicit_specialization): Likewise.
2531         (coerce_template_parms): Likewise.
2532         (lookup_template_class): Don't fool with the momentary obstack.
2533         (instantiate_class_template): Likewise.
2534         (tsubst_template_arg_vector): Use make_tree_vec.
2535         (tsubst_aggr_type): Don't fool with the momentary obstack.
2536         (tsubst_decl): Likewise.  Use make_tree_vec.
2537         (try_one_overload): Likewise.
2538         (try_class_unification):  Don't fool with the momentary obstack.
2539         (get_bindings_real): Use make_tree_vec.
2540         (set_mangled_name_for_template_decl): Likewise.
2541         * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
2542         * semantics.c (finish_expr_stmt): Likewise.
2543         (finish_do_stmt): Likewise.
2544         (finish_for_expr): Likewise.
2545         (finish_switch_cond): Likewise.
2546         (do_pushlevel): Likewise.
2547         (do_poplevel): Likewise.
2548         * tree.c (make_temp_vec): Remove.
2549         
2550         * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs.  Dump
2551         CLEANUP_P for a TRY_BLOCK.
2552         * ir.texi: Document SAVE_EXPR.
2553
2554 Tue Oct 26 23:29:56 1999  Jeffrey A Law  (law@cygnus.com)
2555
2556         * call.c (build_over_call):  Check that the built-in function is
2557         of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
2558         * typeck.c (build_function_call_real): Similarly. 
2559
2560 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
2561
2562         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS.  Don't call
2563         remember_end_note.
2564
2565 1999-10-24  Mark Mitchell  <mark@codesourcery.com>
2566
2567         * decl.c (push_overloaded_decl_1): Use pushdecl.
2568         
2569         * decl.c (auto_function): Replace #ifdef'd __inline with just
2570         plain inline.
2571         * lex.c (my_get_run_time): Likeise.
2572         (yyprint): Likewise.
2573         (identifier_type): Likewise.
2574         * method.c (start_squangling): Likewise.
2575         (end_squangling): Likewise.
2576         (icat): Likewise.
2577         (old_backref_index): Likewise.
2578         (flush_repeats): Likewise.
2579         (issue_ktype): Likewise.
2580         * parse.y (empty_parms): Likewise.
2581         * parse.c: Regenerated.
2582         
2583 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
2584
2585         * dump.c (dequeue_and_dump): Replace several uses of
2586         queue_and_dump_index with dump_child.
2587
2588 1999-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2589
2590         * expr.c: Include tm_p.h.
2591
2592 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
2593
2594         * cp-tree.h (SCOPE_PARTIAL_P): New macro.
2595         (pushlevel_temporary): Remove.
2596         (add_scope_stmt): New function.
2597         * decl.c (pushlevel_temporary): Remove.
2598         (poplevel): Use add_scope_stmt.
2599         (start_decl_1): Likewise.
2600         * semantics.c (add_scope_stmt): New function.
2601         (do_pushlevel): Use it.
2602         (do_poplevel): Use it.
2603         (expand_stmt): Check SCOPE_PARTIAL_P.
2604         
2605         * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
2606         * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
2607         * expr.c (cplus_expand_expr): Expand it.
2608         * ir.texi: Document EMPTY_CLASS_EXPR.
2609         
2610 1999-10-20  Mark Mitchell  <mark@codesourcery.com>
2611
2612         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
2613         parameters as having namespace scope.
2614
2615 1999-10-19  Mark Mitchell  <mark@codesourcery.com>
2616
2617         * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
2618         (mangling_flags): New type.
2619         (build_overload_int): Change prototype.
2620         (build_overload_value): Likewise.
2621         (numeric_output_need_bar): Improve comment.
2622         (mangle_expression): New function, broken out from ...
2623         (build_overload_int): Here.
2624         (build_overload_value): Adjust for use of mangling flags.  Don't
2625         warn about real-valued template parameters here.  Do handle
2626         complex expressions involving real-valued template parameters.
2627         (build_template_parm_names): Encase non-type template parameters
2628         in underscores, if necessary.
2629         (process_overload_item): Remove conditional on
2630         PARM_CAN_BE_ARRAY_TYPE.
2631
2632 1999-10-17  Mark Mitchell  <mark@codesourcery.com>
2633
2634         * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
2635
2636         * ir.texi: Clean up documentation of RETURN_INIT.
2637         
2638 1999-10-15  Greg McGary  <gkm@gnu.org>
2639
2640         * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
2641         (lang_init): Set default for flag_bounds_check if still "unspecified".
2642
2643 1999-10-13  Andrew Haley  <aph@cygnus.com>
2644
2645         * class.c (finish_struct_1): Force alignment of non-bitfields to
2646         BITS_PER_UNIT.
2647
2648 Wed Oct 13 22:01:35 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
2649
2650         * typeck2.c (process_init_constructor): Handle empty constructors.
2651
2652 1999-10-13  Jason Merrill  <jason@yorick.cygnus.com>
2653
2654         * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
2655
2656         * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
2657         array error.
2658
2659 1999-10-13  Mark Mitchell  <mark@codesourcery.com>
2660
2661         * decl.c (make_rtl_for_local_static): Don't create register RTL
2662         for addressable constants.
2663
2664 1999-10-13  Nathan Sidwell  <nathan@acm.org>
2665
2666         * cp-tree.h (build_x_va_arg): Prototype new function.
2667         * call.c (build_x_va_arg): Define it.
2668         * parse.y (unary_expr): Call build_x_va_arg.
2669         
2670         * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
2671         * call.c (convert_type_from_ellipsis): Define it.
2672         * decl.c (init_decl_processing): Set lang_type_promotes_to.
2673
2674         * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
2675
2676 1999-10-11  Jason Merrill  <jason@yorick.cygnus.com>
2677
2678         * class.c (fixed_type_or_null): Always set *nonnull.
2679
2680 1999-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2681
2682         * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
2683         __GNUC__ and __GNUC_MINOR__.
2684
2685 1999-10-09  Mark Mitchell  <mark@codesourcery.com>
2686
2687         * cp-tree.h (make_rtl_for_local_static): New function.  
2688         * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
2689         local statics ...
2690         (make_rtl_for_local_static): Here.
2691         * semantics.c (expand_stmt): Use make_rtl_for_local_static.
2692         
2693 1999-10-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2694
2695         * method.c: Include tm_p.h.
2696
2697 1999-10-7   Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
2698
2699         * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
2700         * lex.c (cp_make_lake_type): Likewise.
2701         * tree.c (init_tree): Init make_lang_type_fn.
2702         
2703 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
2704
2705         * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
2706         paramter.
2707         
2708         * semantics.c (expand_stmt): Don't pretend to have asmspecs for
2709         local statics if we don't really have them.
2710
2711         * ir.texi: Improve documentation for STMT_EXPR.  Describe
2712         CLEANUP_POINT_EXPR.
2713
2714 1999-10-07  Jason Merrill  <jason@yorick.cygnus.com>
2715
2716         * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
2717
2718 1999-10-07  Greg McGary  <gkm@gnu.org>
2719
2720         * class.c (finish_struct_1): Use simpler method of
2721         removing elements of a singly-linked list which doesn't
2722         lose for classes without data members.
2723
2724 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
2725
2726         * friend.c (make_friend_class): Robustify.
2727
2728         * semantics.c (finish_object_call_expr): Reject calls to template
2729         types.
2730
2731 1999-10-06  Mark Mitchell  <mark@codesourcery.com>
2732
2733         * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
2734
2735         * cp-tree.h (CLASSTYPE_VFIELD): Remove.
2736         * call.c (build_vfield_ref): Use TYPE_VFIELD, not
2737         CLASSTYPE_VFIELD.
2738         * class.c (get_vfield_offset): Likewise.
2739         (finish_base_struct): Likewise.
2740         (modify_one_vtable): Likewise.
2741         (fixup_vtable_deltas): Likewise.
2742         (finish_struct_1): Likewise.
2743         * init.c (expand_virtual_init): Likewise.
2744         * search.c (lookup_field_1): Likewise.
2745         (expand_upcast_fixups): Likewise.
2746         * typeck.c (build_component_ref): Likewise.
2747         (build_binary_op_nodefault): Likewise.
2748         
2749         * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
2750         * ir.texi: Document TYPE_VFIELD.
2751
2752 1999-10-06  Brendan Kehoe  <brendan@cygnus.com>
2753
2754         * decl.c (grokdeclarator): Only warn about non-zero arrays if
2755         !in_system_header (linux socketbits.h can give this for
2756         __cmsg_data, which is using a GNU extension).
2757
2758 1999-10-05  Mark Mitchell  <mark@codesourcery.com>
2759
2760         * decl2.c (start_static_storage_duration_function): Push the
2761         function declaration so it ends up in namespace scope.
2762
2763         * dump.c (DUMP_CHILDREN): Remove.
2764         (DUMP_BINFO): Adjust.
2765         (struct dump_node_info): Remove dump_children_p.
2766         (queue_and_dump_type): Remove dump_children_p parameter.
2767         (queue): Don't set dump_children_p.
2768         (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
2769         queue_and_dump_index.
2770         (dequeue_and_dump): Unconditionally print children.  Adjust calls
2771         to functions mentioned above.
2772         (dump_node):  Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
2773         
2774         * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
2775         * dump.c (dequeue_and_dump): Dump them.
2776         
2777         * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
2778
2779         * decl.c (start_function): Set current_in_charge_parm for
2780         constructors, too, where appropriate.
2781         * search.c (fixup_all_virtual_upcast_offsets): New function.
2782         (expand_indirect_vtbls_init): Use it.
2783         
2784 1999-10-04  Nathan Sidwell  <nathan@acm.org>
2785
2786         * decl2.c (grok_alignof): Don't decay lvalues.
2787         
2788         * init.c (build_new): Remove unused variable.
2789
2790 1999-10-04  Mark Mitchell  <mark@codesourcery.com>
2791
2792         * cp-tree.h (struct language_function): Remove static_labelno.
2793         (static_labelno): Remove macro.
2794         * method.c (build_overload_nested_name): Make static_labelno
2795         static here.
2796         
2797         * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
2798         to decide whether or not a function is defined.
2799
2800         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
2801         situations where make_node will do it automatically.
2802         * decl.c (grok_reference_init): Likewise.
2803         (expand_static_init): Likewise.
2804         (do_static_initialization): Likewise.
2805         * init.c (perform_member_init): Likewise.
2806         (expand_aggr_init_1): Likewise.
2807         (build_new_1): Likewise.
2808         * method.c (do_build_copy_constructor): Likewise.
2809         (do_build_assign_ref): Likewise.
2810         * search.c (expand_upcast_fixups): Likewise.
2811         * semantics.c (finish_stmt_expr): Likewise.
2812         * typeck.c (build_unary_op): Likewise.
2813         (check_return_expr): Likewise.
2814
2815 1999-10-04  Jason Merrill  <jason@yorick.cygnus.com>
2816
2817         * init.c (build_vec_delete_1): Fold COND_EXPRs.
2818
2819 1999-10-03  Mark Mitchell  <mark@codesourcery.com>
2820
2821         * cp-tree.def (VEC_INIT_EXPR): Remove.
2822         * cp-tree.h (struct stmt_tree): New type.
2823         (struct saved_scope): Remove firstobj.  Add x_saved_tree,
2824         x_stmt_tree.
2825         (class_cache_firstobj): Remove.
2826         (struct language_function): Remove stmts_are_full_exprs_p,
2827         x_last_tree, and x_last_expr_type.  Add x_stmt_tree.
2828         (current_stmt_tree): New macro.
2829         (last_tree): Adjust.
2830         (last_expr_type): Likewise.
2831         (doing_semantic_analysis_p): Simplify.
2832         (stmts_are_full_exprs_p): Adjust.
2833         (begin_tree): Remove prototype.
2834         (end_tree): Likewise.
2835         (begin_stmt_tree): Change prototype.
2836         (finish_stmt_tree): Likewise.
2837         (building_stmt_tree): Simplify.
2838         * decl.c (mark_stmt_tree): New function.
2839         (mark_saved_scope): Use it.
2840         (start_function): Rearrange slightly to call begin_stmt_tree 
2841         earlier.
2842         (save_function_data): Tweak.
2843         (finish_function): Adjust call to finish_stmt_tree.
2844         (mark_lang_function): Use mark_stmt_tree.
2845         * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
2846         * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
2847         (build_vec_init): Remove creation of stand-in intializer.
2848         * pt.c (begin_tree): Remove.
2849         (end_tree): Likewise.
2850         * semantics.c (SET_LAST_STMT): New macro.  Use it throughout.
2851         (begin_compound_stmt): Handle a compound-statement outside of a
2852         function.
2853         (begin_stmt_expr): Handle a statement-expression outsidef of a
2854         function.
2855         (finish_stmt_expr): Likewise.
2856         (begin_class_definition): Don't call begin_tree.
2857         (finish_inline_definitions): Don't call end_tree.
2858         (begin_stmt_tree): Take a pointer to tree, not a function as input.
2859         (finish_stmt_tree): Likewise.
2860         * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
2861         (mapcar): Likewise.
2862         
2863         * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
2864         * parse.c: Regenerated.
2865         
2866         * dump.c (dqueue_and_dump): Dump bitfieldness.
2867         
2868         * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
2869         bitfields, rather than DECL_BIT_FIELD.
2870         * ir.texi: Document how to tell whether or not a field is a
2871         bitfield.
2872         
2873         * lex.c (make_lang_type): Fix typo in comment.
2874
2875 1999-10-01  Jason Merrill  <jason@yorick.cygnus.com>
2876
2877         * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
2878
2879 1999-10-01  Mark Mitchell  <mark@codesourcery.com>
2880
2881         * pt.c (tsubst_decl): If the type of a template instantiation is
2882         bogus, so is the whole instantiation.
2883
2884 1999-09-30  Mark Mitchell  <mark@codesourcery.com>
2885
2886         * decl.c (initialize_local_var): Handle static variables here.
2887         (cp_finish_decl): Tweak handling of function-scope static
2888         variables.
2889         * semantics.c (expand_stmt): Handle DECL_STMTs for static
2890         variables.
2891
2892         * method.c (emit_thunk): Don't crash when -fsyntax-only.
2893
2894         * cp-tree.h (lang_decl_flags): Add global_ctor_p and
2895         global_dtor_p.  Add init_priority.
2896         (DECL_ACCESS): Adjust accordingly.
2897         (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
2898         (GLOBAL_INIT_PRIORITY): Likewise.
2899         * decl.c (lang_mark_tree): Adjust accordingly.
2900         (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 
2901         and GLOBAL_INIT_PRIORITY.
2902         * dump.c (dequeue_and_dump): Print them.
2903         * ir.texi: Document them.
2904
2905         * decl2.c (struct priority_info_s): Remove initialization_sequence
2906         and destruction_sequence.
2907         (start_static_storage_duration_function): Return the body of the
2908         function.  Convert for function-at-a-time mode.
2909         (generate_inits_for_priority): Remove.
2910         (finish_static_storage_duration_function): Change prototype.
2911         Adjust for function-at-a-time mode.
2912         (do_static_initialization): Likewise.
2913         (do_static_destruction): Likewise.
2914         (do_static_initialization_and_destruction): Remove.
2915         (start_static_initialization_or_destruction): New function.
2916         (finish_static_initialization_or_destruction): Likewise.
2917         (get_priority_info): Don't manipulation initialization_sequence or
2918         destruction_sequence.
2919         (prune_vars_needing_no_initialization): New function.
2920         (write_out_vars): Likewise.
2921         (finish_file): Use the various new functions instead of the old.
2922         
2923 Thu Sep 30 00:13:27 1999  Dirk Zoller  <duz@rtsffm.com>
2924
2925         * cp-tree.h (warn_float_equal): Declare.
2926         * decl2.c (warn_float_equal): Define.
2927         (lang_decode_option): Recognize -W[no-]float-equal.
2928         * typeck.c (build_binary_op_nodefault): Conditionally warn
2929         about equality tests of floating point types.
2930
2931 1999-09-29  Jason Merrill  <jason@yorick.cygnus.com>
2932
2933         Support normal type_info-based EH mechanisms with -fno-rtti.
2934         * except.c (build_eh_type_type): Remove special -fno-rtti handling.
2935         (build_eh_type_type_ref): Likewise.
2936         (build_eh_type): Remove.
2937         (expand_throw): Call build_eh_type_type, not build_eh_type.
2938         * decl2.c (import_export_decl): Don't associate the tinfo fn with
2939         the vtable if -fno-rtti.
2940         * decl.c (init_decl_processing): Always init_rtti_processing.
2941
2942         * rtti.c (get_typeid): Don't complain about -fno-rtti.
2943
2944         * class.c (class_cache_obstack, class_obstack): Remove.
2945         (init_class_processing): Don't initialize class_obstack.
2946         (push_cache_obstack): Remove.
2947         (pushclass): Don't call it.
2948         * cp-tree.h: Remove prototype for push_cache_obstack.
2949         * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
2950         (pushlevel_class): Don't push_decl_level.
2951         (poplevel_class): Don't pop_stack_level.
2952         (push_class_level_binding): Don't push_cache_obstack.
2953         (init_decl_processing): Don't intialize decl_obstack.
2954         * search.c (push_class_decls): Don't push_cache_obstack.
2955         * tree.c (list_hash_add): Put hash node on permanent_obstack.
2956         (hash_tree_cons): Don't mess with obstacks.
2957         (print_lang_statistics): Don't print stats for class_obstack and
2958         decl_obstack.
2959
2960 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
2961
2962         * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
2963         * ir.texi: Document DECL_EXTERNAL.
2964
2965         * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
2966         * ir.texi: Document THUNK_DECLs.
2967
2968         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
2969         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
2970         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
2971         * error.c (dump_template_bindings): Remove unused parameter.
2972         Handle multiple levels of template parameters.
2973         (dump_template_decl): Use `parms', not `args', for template
2974         parameters.  Fix thinko.
2975         (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION.  Don't pass
2976         flags to dump_template_bindings.
2977         * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
2978         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
2979         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
2980         (tsubst_copy): Clarify variable name.
2981         (most_general_template): Robustify.
2982         
2983 1999-09-29  Nathan Sidwell  <nathan@acm.org>
2984
2985         * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
2986         to change primary template rendering.
2987
2988 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
2989
2990         * cp-tree.h (UPT_TEMPLATE): Remove.
2991         (UPT_PARMS): Likewise.
2992         (DECL_NEEDED_P): New macro.
2993         * decl2.c (finish_vtable_vardecl): Use it.
2994         (finish_objects): Don't crash with -fsyntax-only.
2995         (finish_file): Use DECL_NEEDED_P.  Don't prune vtables when
2996         -fsyntax-only.
2997         * pt.c (tsubst_friend_function): Remove FIXME that talks about
2998         obstacks.
2999         (tsubst_expr): Correct handling of function try-blocks.
3000         * semantics.c: Include flags.h.
3001         (expand_body): Don't do RTL generation if -fsyntax-only.
3002         * Makefile.in (semantics.o): Depends on flags.h.
3003         
3004 1999-09-28  Gabriel Dos Reis  <gdr@codesourcery.com>
3005
3006         * pt.c (most_general_template): Adjust declaration.
3007
3008         * cp-tree.h: (most_general_template): Declare.
3009
3010         * error.c (dump_template_value): Rename to ...
3011         (dump_template_argument): This.
3012         (dump_template_argument_list): New function.
3013         (dump_type): Use it.
3014         (dump_template_parameter): New function.
3015         (dump_template_decl): Use it.
3016         (dump_template_bindings): New function.
3017         (dump_function_decl): Use it. Pretty print function template
3018         instantiations.
3019
3020 1999-09-28  Nathan Sidwell  <nathan@acm.org>
3021
3022         * decl.c (grokdeclarator): Distinguish parameter context for
3023         diagnostics. Tidy up missing type diagnostic.
3024         Diagnose `explicit' in one place. Diagnose `mutable' in one place.
3025
3026 1999-09-28  Mark Mitchell  <mark@codesourcery.com>
3027
3028         * ir.texi: Improve documentation for TARGET_EXPR.
3029
3030 1999-09-27  Nathan Sidwell  <nathan@acm.org>
3031
3032         Augment stringification of trees.
3033         * cp-tree.h (tree_string_flags): New error stringifying enumeration.
3034         (fndecl_as_string, type_as_string_real, args_as_string,
3035         code_as_string, language_as_string, parm_as_string,
3036         op_as_string, assop_as_string, cv_as_string): Remove.
3037         (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
3038         (context_as_string): Declare new function.
3039         * error.c (cp_printers): Move definition.
3040         (OB_UNPUT): Remove.
3041         (OB_END_TEMPLATE_ID): Adjust.
3042         (interesting_scope_p): Remove.
3043         (dump_scope): New static function.
3044         (dump_qualifiers): Adjust prototype, reimplement.
3045         (dump_template_value): Use tree_string_flags.
3046         (dump_type_real): Move back to dump_type.
3047         (dump_type): Adjust prototype. Use tree_string_flags.
3048         (dump_aggr_type): Likewise. Use dump_template_parms.
3049         (dump_type_prefix): Adjust prototype. Use tree_string_flags.
3050         Return pad flag.
3051         (dump_type_suffix): Adjust prototype. Use tree_string_flags.
3052         (dump_simple_decl): Likewise.
3053         (dump_decl): Likewise. Use dump_template_decl.
3054         (dump_template_decl): New static function broken out of dump_decl.
3055         (dump_function_decl): Adjust prototype. Use tree_string_flags.
3056         (dump_parameters): Likewise. Prefix space.
3057         (dump_exception_spec): Adjust prototype. Use tree_string_flags.
3058         (dump_function_name): Likewise. Use dump_template_parms.
3059         (dump_template_parms): New static function broken out of
3060         dump_function_name.
3061         (dump_expr_list): Adjust prototype. Use tree_string_flags.
3062         (dump_expr): Likewise.
3063         (fndecl_as_string): Removed
3064         (type_as_string_real): Removed
3065         (dump_binary_op): Adjust prototype. Use tree_string_flags.
3066         (dump_unary_op): Likewise.
3067         (type_as_string): Likewise.
3068         (expr_as_string): Likewise.
3069         (decl_as_string): Likewise.
3070         (context_as_string): New function.
3071         (lang_decl_name): Adjust.
3072         (decl_to_string): New static print callback.
3073         (expr_to_string): Likewise.
3074         (fndecl_to_string): Likewise.
3075         (code_as_string): Renamed to ...
3076         (code_to_string): ... here. Adjust.
3077         (language_as_string): Renamed to ...
3078         (language_to_string): ... here. Adjust.
3079         (parm_as_string): Renamed to ...
3080         (parm_to_string): ... here.
3081         (op_as_string): Renamed to ...
3082         (op_to_string): ... here.
3083         (assop_as_string): Renamed to ...
3084         (assop_to_string): ... here.
3085         (type_to_string): New static print callback.
3086         (args_as_string): Renamed to ...
3087         (args_to_string): ... here. Adjust.
3088         (cv_as_string): Renamed to ...
3089         (cv_to_string): ... here. Adjust.
3090         * pt.c (mangle_class_name_for_template): Use tree_string_flags.
3091         (print_template_context): Likewise.
3092
3093 1999-09-26  Mark Mitchell  <mark@codesourcery.com>
3094
3095         * cp-tree.h (expand_throw): Remove prototype.
3096         * except.c (expand_throw): Make it static.  Use tree-generation
3097         functions, rather than RTL-generation functions.
3098         (build_throw): Use it.
3099         * expr.c: Include except.h.
3100         (cplus_expand_expr): Don't call expand_throw here.
3101         * Makefile.in (expr.o): Depend on except.h.
3102         * ir.texi: Update documentation for THROW_EXPR.
3103         
3104         * decl.c (start_function): Set x_dont_save_pending_sizes rather
3105         than calling get_pending_sizes.
3106         * init.c (build_new): Don't save and restore
3107         immediate_size_expand; instead, assert that it has the expected
3108         value already.
3109
3110 1999-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3111
3112         * lex.c (compiler_error): Add missing call to va_end().
3113
3114 1999-09-25  Mark Mitchell  <mark@codesourcery.com>
3115
3116         * dump.c (dequeue_and_dump): Handle RESULT_DECL.
3117         * ir.texi: Document RESULT_DECL and DECL_RESULT.
3118
3119         * cp-tree.h (check_return_expr): New function.
3120         * decl.c (finish_constructor_body): New function.
3121         (pushdecl): Put global friend functions in namespace binding
3122         level, not the class binding level.
3123         (finish_destructor_body): Make sure the dtor_label is always
3124         defined.  Fix typo in comment.
3125         (finish_function): Move generation of constructor-termination code
3126         to semantic-analysis time.  Move generation of implicit `main'
3127         return value to semantic-analysis time.
3128         * semantics.c (finish_return_stmt): Generate goto's to
3129         ctor_label/dtor_label here.  Use check_return_expr to do semantic
3130         analysis on the returned expression.
3131         * typeck.c (maybe_warn_about_returning_address_of_local): New
3132         function split out from c_expand_return.
3133         (check_return_expr): Likewise.
3134         (c_expand_return): Just generate the RTL for the return.
3135         
3136 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
3137
3138         * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
3139         (cleanup_type): Likewise.
3140         (search_tree): Change prototype.
3141         * decl.c (local_variable_p): Adjust for new interface to
3142         search_tree.
3143         (check_default_argument): Likewise.
3144         * error.c (dump_expr): Handle INIT_EXPR.
3145         * except.c (expand_throw): Don't make cleanup_type a local static.
3146         * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
3147         * init.c (build_new): Call build_new_1 directly, rather than
3148         building a NEW_EXPR.
3149         (build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
3150         processing file-scope initializers.
3151         * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
3152         * tree.c: Include splay-tree.h
3153         (no_linkage_helper): Adjust for new interface to search_tree.
3154         (search_tree): Pass around pointers to tree nodes, rather than the
3155         nodes themselves.  Handle VEC_INIT_EXPR.
3156         (no_linkage_check): Adjust for new interface to search_tree.
3157         (mapcar): Handle VEC_INIT_EXPR.
3158         (target_remap): New variable.
3159         (bot_manip): Use it.
3160         (bot_replace): New function.
3161         (break_out_target_exprs): Use it to remap all variables used in a
3162         default argument expression.
3163         * typeck.c (build_modify_expr): Don't crash when outside a
3164         function and presented with an INIT_EXPR assignment
3165         * Makefile.in (tree.o): Depend on splay-tree.h.
3166
3167 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
3168
3169         * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
3170         DECL_BUILT_IN.
3171         (builtin_function): New arg CLASS.  Arg CODE now of type int.  All
3172         callers changed.
3173         Set the builtin's DECL_BUILT_IN_CLASS.
3174
3175 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
3176
3177         * decl.c (pushdecl): Don't make local declarations of extern
3178         variables give the variable a DECL_CONTEXT for the function.
3179         (make_rtl_for_nonlocal_decl): Don't fuss with obstacks.  Simplify.
3180         Don't accidentally make RTL for local declarations.
3181         (emit_local_var): Handle declarations with asm-specifiers here.
3182         
3183 1999-09-23  Mark Mitchell  <mark@codesourcery.com>
3184
3185         * ir.texi: Improve documentation for TARGET_EXPRs.  Discuss
3186         STMT_IS_FULL_EXPR_P.
3187
3188         * cp-tree.h (language_function): Add cannot_inline.
3189         * decl.c (start_function): Restore current_function_cannot_inline
3190         from the saved value.
3191         (save_function_data): Save current_function_cannot_inline.
3192         * decl2.c (start_objects): Change prototype.  Build the function
3193         in function-at-a-time mode.
3194         (finish_objects): Likewise.
3195         (generate_ctor_or_dtor_function): Adjust accordingly.
3196         
3197         * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
3198         * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
3199         Don't call expand_anon_union_decl here
3200         * semantics.c (exapnd_stmt): Call it here, instead.
3201         * typeck.c (mark_addressable): Addressed variables are implicitly
3202         used.
3203         
3204 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3205
3206         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
3207         (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
3208         (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
3209         * cp-tree.h: Add tree checking macros to various tree access
3210         macros. 
3211         * ptree.c (print_lang_decl): Test for function or variable
3212         before accessing template info.
3213
3214 1999-09-23  Jason Merrill  <jason@yorick.cygnus.com>
3215
3216         * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
3217         * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
3218         * decl2.c (lang_f_options): Add -fshort-wchar.
3219         * cp-tree.h: Declare flag_short_wchar.
3220         * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 
3221         int' for wchar_t.
3222
3223 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3224
3225         * ir.texi: Fix formatting errors and typos.
3226
3227 1999-09-22  Mark Mitchell  <mark@codesourcery.com>
3228
3229         * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
3230
3231         * decl.c (pushdecl): Do create a binding for extern "C" functions,
3232         but not for their DECL_ASSEMBLER_NAMEs.
3233         (lookup_name_current_level): Fix formatting.
3234         (xref_tag): Likewise.
3235         * decl2.c (start_objects): Mark static constructors and
3236         destructors as used.
3237
3238 1999-09-22  Jason Merrill  <jason@yorick.cygnus.com>
3239
3240         * decl.c (define_case_label): Don't crash if we're not in a switch.
3241
3242         * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
3243         * lang-options.h: Restore -fthis-is-variable.  Remove help strings
3244         for unsupported flags.
3245
3246 1999-09-21  Jason Merrill  <jason@yorick.cygnus.com>
3247
3248         * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
3249         Accept and warn about -fthis-is-variable.
3250
3251 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
3252
3253         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
3254         CLEANUP_STMT, and SCOPE_STMT.
3255
3256         * decl2.c (lang_decode_option): Adjust, in the wake of recent
3257         changes to option processing.
3258
3259 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3260
3261         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
3262         function pointer from pmfs with no object given.
3263         (convert_for_assignment): Do not return error when converting
3264         pmfs.
3265
3266 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
3267
3268         * lex.c (internal_filename): New variable.
3269         (INTERNAL_FILENAME): New macro.
3270         (init_parse): Allocate internal_filename and mark as root.  Use it
3271         instead of a string constant.
3272
3273 1999-09-21  Nathan Sidwell  <nathan@acm.org>
3274
3275         Reimplement dynamic cast and catch matching.
3276         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
3277         * search.c (dynamic_cast_base_recurse): New function.
3278         (get_dynamic_cast_base_type): New function for dynamic cast.
3279         * rtti.c (build_dynamic_cast_1): Determine source and target
3280         class relationship. Call __dynamic_cast_2.
3281         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
3282         (__user_type_info::dyncast): New dynamic cast dispatcher.
3283         (__user_type_info::sub_kind): New nested enumeration.
3284         (__user_type_info::contained_p): sub_kind predicate.
3285         (__user_type_info::contained_public_p): Likewise.
3286         (__user_type_info::contained_nonpublic_p): Likewise.
3287         (__user_type_info::contained_nonvirtual_p: Likewise.
3288         (__user_type_info::upcast_result): New nested struct.
3289         (__user_type_info::dyncast_result): New nested struct.
3290         (*::do_upcast): New catch function.
3291         (*::do_dyncast): New dynamic cast function.
3292         (__user_type_info::find_public_subobj): New dynamic cast
3293         helper dispatcher.
3294         (*::do_find_public_subobj): New dynamic cast helper function.
3295         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
3296         (__user_type_info::dyncast): Define dynamic cast dispatcher.
3297         (*::do_upcast): Define catch function.
3298         (*::do_dyncast): Define dynamic cast function.
3299         (*::do_find_public_subobj): Define dynamic cast helper function.
3300         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
3301         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
3302         (__dynamic_cast_2): New dynamic cast runtime.
3303
3304 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
3305
3306         * cp-tree.h (finish_stmt_expr): Change prototype.
3307         * expr.c (cplus_expand_expr): Adjust call accordingly.
3308         * init.c (finish_init_stmts): Likewise.
3309         * parse.y (primary): Likewise.
3310         * pt.c (tsubst_copy): Likewise.
3311         * semantics.c (finish_stmt_expr): Don't take two parameters.
3312         Don't remove generated BLOCKs from the block-tree.
3313
3314         Remove support for assigning to `this'.
3315         * NEWS: Note that fact.
3316         * class.c (build_vbase_path): Don't check flag_this_is_variable.
3317         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
3318         (language_function): Remove assigns_this, just_assigned_this, and
3319         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
3320         (base_init_expr): Remove.
3321         (current_vcalls_possible_p): New macro.
3322         (vtbls_set_up_p): Likewise.
3323         (emit_base_init): Change prototype.
3324         * decl.c (finish_destructor_body): New function, split out from
3325         finish_function.
3326         (current_function_assigns_this): Remove.
3327         (current_function_just_assigned_this): Likewise.
3328         (start_function): Don't set them.
3329         (finish_function): Don't check them.  Don't emit
3330         base-initialization code here.  Generate code for destructors when
3331         doing semantic analysis.
3332         (finish_stmt): Don't check current_function_just_assigned_this.
3333         * decl2.c (lang_f_options): Remove this-is-variable.
3334         (lang_decode_option): Likewise.
3335         (grokclassfn): Don't check flag_this_is_variable.
3336         * init.c (emit_base_init): Return the expression generated.
3337         (construct_virtual_bases): Don't push/pop obstacks.  Fix
3338         typo.
3339         (build_new_1): Don't check flag_this_is_variable.
3340         (get_temp_regvar): Don't set DECL_REGISTER.
3341         (build_vec_init): Don't call use_variable.
3342         * lang-options.h: Remove "-fthis-is-variable" and
3343         "-fno-this-is-variable".
3344         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
3345         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
3346         expand_expr_stmt.
3347         * semantics.c (finish_expr_stmt_real): Rename to ...
3348         (finish_expr_stmt): This.  Remove assigned_this parameter.
3349         (begin_if_stmt): Call do_pushlevel before starting the statement.
3350         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
3351         blocks.
3352         (setup_vtbl_ptr): Emit initialization code for bases and members
3353         at semantic-analysis time.  Emit code to initialize vtables in
3354         destructors here.
3355         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
3356         Don't handle CTOR_INITIALIZER any more.
3357         * typeck.c (build_modify_expr): Don't check for assignments to
3358         this.
3359         (c_expand_return): Don't suggest assigning to `this'.
3360         
3361         * Makefile.in (decl.o): Depend on RTL_H.
3362         (decl2.o): Likewise.
3363         (class.o): Likewise.
3364         (call.o): Likewise.
3365         (method.o): Likewise.
3366         (search.o): Likewise.
3367         (tree.o): Likewise.
3368         (pt.o): Likewise.
3369
3370         * decl.c (duplicate_decls): When a builtin function is redeclared
3371         as static, make sure it is mangled correctly.
3372
3373         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
3374         detail about the statement-tree.
3375         
3376 1999-09-20  Nathan Sidwell  <nathan@acm.org>
3377
3378         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
3379
3380 1999-09-20  Nick Clifton  <nickc@cygnus.com>
3381
3382         * decl2.c (lang_decode_option): Extend comment.
3383
3384 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
3385
3386         * typeck.c: Include "tm_p.h".
3387
3388 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
3389
3390         * ir.texi: New file.
3391
3392 1999-09-19  Paul Burchard <burchard@pobox.com>
3393
3394         * semantics.c (expand_stmt): Initialize return value.
3395
3396 1999-09-18  Paul Burchard <burchard@pobox.com>
3397
3398         * gxxint.texi: G++ now implements namespaces.
3399         
3400 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
3401
3402         * decl.c (pop_label): Don't warn about unused labels more than
3403         once.
3404         * semantics.c (finish_goto_stmt): Always marked used labels as
3405         used.
3406
3407         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
3408         even when the declaration is external.
3409         (cp_finish_decl): Adjust call to layout_var_decl.
3410         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
3411
3412 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
3413
3414         * typeck.c (get_member_function_from_ptrfunc): Always consider
3415         virtuality inside member pointer.
3416
3417 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
3418
3419         Turn on function-at-a-time processing.  
3420         * cp-tree.h (doing_semantic_analysis_p): New macro.
3421         (SF_DEFAULT): Define to zero, not SF_EXPAND.
3422         (start_handler_parms): Change prototype.
3423         (expand_start_catch_block): Likewise.
3424         (expand_end_catch_block): Likewise.
3425         (expand_start_eh_spec): Likewise.
3426         (expand_end_eh_spec): Declare.
3427         (finish_handler_parms): Change prototype.
3428         (begin_catch_block): Declare.
3429         (finish_handler): Change prototype.
3430         (do_pushlevel): Declare.
3431         (do_poplevel): Likewise.  
3432         * decl.c (pushlevel): Don't create
3433         binding levels when not doing semantic analysis.
3434         (poplevel): Don't pop them.
3435         (pushdecl): Assert that we are never called when not doing
3436         semantic analysis.
3437         (pushdecl_top_level): Use push_to_top_level.
3438         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
3439         label when expanding.
3440         (cp_finish_decl): Only inject for-scope variables when doing
3441         semantic analysis.  Add comments.
3442         (start_handler_parms): Return the handler parm.
3443         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
3444         already set.  Reinitialize from saved function data if available.
3445         Don't pushlevel when not doing semantic analysis.
3446         (store_parm_decls): Only generate RTL when expanding.  Only
3447         pushdecl when doing semantic analysis.  Set
3448         current_eh_spec_try_block if appropriate.
3449         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
3450         Combine common code.  Don't poplevel when not doing semantic
3451         analysis.
3452         (push_cp_function_context): Don't expand functions without an
3453         explicit call to expand_body.
3454         (mark_lang_function): Make eh_spec_try_block and
3455         x_scope_stmt_stack.  
3456         * except.c (expand_end_eh_spec): Don't
3457         declare.
3458         (process_start_catch_block): Likewise.
3459         (push_eh_cleanup): Use finish_decl_cleanup.
3460         (initialize_handler_parm): New function.
3461         (expand_start_catch_block): Use it.
3462         (expand_end_catch_block): Use tree-generation functions, not
3463         RTL-generation functions.
3464         (expand_start_eh_spec): Likewise.
3465         (expand_end_eh_spec): Likewise.
3466         (expand_exception_blocks): Simplify.
3467         (start_anon_func): Use do_pushlevel.
3468         (end_anon_func): Use do_poplvel.  Call expand_body for the
3469         function.  
3470         * expr.c (do_case): Don't call define_case_label.  
3471         * init.c (create_temporary_var): Set DECL_CONTEXT for local
3472         variables.  
3473         * method.c (emit_thunk): Call expand_body for the
3474         thunk.
3475         (sythesize_method): Likewise.  
3476         * parse.y (handler_args): Give it ttype.
3477         (eat_saved_input): Call expand_body.
3478         (base_init): Use do_pushlevel.
3479         (pending_inline): Call expand_body.
3480         (handler): Adjust calls to finish_handler_parms and
3481         finish_handler.
3482         (handler_args): Don't call expand_start_catch_block.  Return the
3483         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
3484         * parse.c: Regenerated.
3485         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
3486         * semantics.c (do_pushlevel): Give it external linkage.  Build
3487         SCOPE_STMTs.
3488         (do_poplevel): Likewise.
3489         (finish_case_label): Call define_case_label when doing semantic
3490         analysis.
3491         (finish_goto_stmt): Create RTL for labels.
3492         (finish_function_try_block): Set in_function_try_handler
3493         unconditionally.
3494         (finish_function_handler_sequence): Unset it.
3495         (finish_handler_parms): Use expand_start_catch_block even when
3496         building a statement-tree.
3497         (begin_catch_block): New function.
3498         (finish_handler): Move a little RTL-generation logic here.
3499         (finish_decl_cleanup): Allow cleanups for empty declarations.
3500         (finish_named_return_value): Don't pushdecl when not doing
3501         semantic analysis.
3502         (expand_stmt): Don't do semantic analysis for variable
3503         declarations.  Handle START_CATCH_STMT.  Call expand_label
3504         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
3505         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
3506         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
3507         RETURN_INIT and function try blocks.
3508         
3509         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
3510         x_scope_stmt_stack.  Add x_in_charge_parm.
3511         (current_eh_spec_try_block): New macro.
3512         (current_scope_stmt_stack): Likewise.
3513         (current_in_charge_parm): Likewise.
3514         * decl.c (start_function): Initialize current_in_charge_parm.
3515         (finish_function): Use current_in_charge_parm rather than looking
3516         up __in_chrg.
3517         * search.c (expand_indirect_vtbls_init): Likewise.
3518
3519         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
3520         (TRY_BLOCK): Likewise.
3521         (HANDLER): Likewise.
3522         (START_CATCH_STMT): New tree node.
3523         (SCOPE_STMT): Likewise.
3524         * cp-tree.h (SCOPE_BEGIN_P): New macro.
3525         (SCOPE_NULLIFIED_P): Likewise.
3526         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
3527         (struct lang_decl): Add saved_language_function.
3528         (DECL_PENDING_INLINE_INFO): Adjust documentation.
3529         (DECL_PENDING_INLINE_P): New macro.
3530         (TYPE_TI_ARGS): Fix typo in comment.
3531         (DECL_SAVED_TREE): Add to documentation.
3532         (DECL_SAVED_FUNCTION_DATA): New macro.
3533         (START_CATCH_TYPE): Likewise.
3534         (SCOPE_END_P): New macro.
3535         (declare_parm_level): Don't declare.
3536         * decl.c (mark_lang_function): New function, split out from
3537         mark_cp_function_context.
3538         (save_function_data): New function.
3539         (declare_parm_level): Remove.
3540         (finish_function): Use save_function_data to squirrel away
3541         important stuff for later use.
3542         (mark_cp_function_context): Use mark_function_data.
3543         (lang_mark_tree): Likewise.
3544         * lex.c (begin_definition_of_inclass_inline): Set
3545         DECL_PENDING_INLINE_P.
3546         (store_pending_inline): Clear it.
3547         * pt.c (tsubst_decl): Likewise.
3548
3549 1999-09-17  Nathan Sidwell  <nathan@acm.org>
3550
3551         * call.c (perform_implicit_conversion): Deal with error_mark_node.
3552
3553 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
3554
3555         * decl.c (warn_extern_redeclared_static): Don't get confused by
3556         static member functions.
3557         (duplicate_decls): Merge DECL_THIS_STATIC.
3558
3559         * decl.c (expand_static_init): Make sure assignments to local
3560         statics actually occur.
3561
3562 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
3563
3564         * cp-tree.h (poplevel_class): Declare.
3565         * class.c (popclass): Use poplevel_class, not poplevel.
3566         * decl.c (poplevel_class): Don't make it static.  Don't return a
3567         value.
3568         (poplevel): Don't call poplevel_class; abort in a class
3569         binding level is seen.
3570         * semantics.c (finish_translation_unit): Use pop_everything.
3571         * parse.y (member_init): Allow errors.
3572         (pending_inline): Call finish_function.
3573         * parse.c: Regenerated.
3574         * Makefile.in (CONFLICTS): Adjust.
3575
3576 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
3577         
3578         * error.c: Reduce code duplication.
3579         (dump_template_value): New function.
3580         (dump_type_real): Use it.
3581         (dump_decl): Likewise.
3582         (dump_function_name): Likewise.
3583         (dump_function_decl): Don't be too talkative about function return
3584         type variety.
3585
3586 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3587
3588         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
3589
3590         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
3591
3592 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
3593
3594         * decl2.c (finish_file): Also call check_global_declarations for
3595         the pending_statics list.
3596
3597 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
3598
3599         * lex.c (cp_pragma_implementation): Allow #pragma implementation
3600         in header files.
3601
3602 1999-09-15  Richard Henderson  <rth@cygnus.com>
3603
3604         * lex.c (mark_impl_file_chain): Follow the next chain.
3605
3606 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
3607
3608         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
3609         problems with extern "C" functions redeclared as static.
3610         (duplicate_decls): When a builtin is redeclared static, make the
3611         new function have internal linkage.
3612         
3613 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
3614
3615         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
3616         * pt.c (tsubst_copy): Likewise.
3617         * tree.c (search_tree): Likewise.
3618         (mapcar): Likewise.
3619
3620 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3621
3622         * typeck2.c (ack): Don't declare progname.
3623
3624 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
3625
3626         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
3627         filenames with ggc_alloc_string.
3628
3629 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
3630
3631         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
3632         TARGET_EXPR.
3633         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
3634         the TARGET_EXPR.
3635         * cvt.c (build_up_reference): Likewise.
3636         * tree.c (build_cplus_new): Likewise.
3637         (get_target_expr): Likewise.
3638         
3639 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
3640
3641         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
3642
3643 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
3644
3645         * cp-tree.h (build_target_expr): New function.
3646         * call.c (build_conditional_expr): Use build_target_expr.
3647         (convert_like): Likewise.
3648         (build_over_call): Likewise.
3649         * cvt.c (build_up_reference): Likewise.
3650         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
3651         (destroy_local_var): Here.
3652         (build_target_expr): New function.
3653         * tree.c (build_cplus_new): Use it.
3654         (get_target_expr): Likewise.
3655
3656 1999-09-13  Nathan Sidwell  <nathan@acm.org>
3657
3658         * typeck.c (expr_sizeof): Don't decay arrays and functions.
3659         Remove misleading comment.
3660         (build_compound_expr): Don't decay arrays.
3661
3662 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
3663
3664         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
3665         class rvalues again.
3666
3667 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3668
3669         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
3670
3671         * g++spec.c: Include gcc.h.
3672         (lang_specific_driver): Constify a char*.  Call xcalloc, not
3673         xmalloc/bzero.  All calls to the function pointer parameter now
3674         explicitly call `fatal'.
3675
3676 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
3677
3678         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
3679         * cvt.c (ocp_convert): Complete the from and destination types.
3680         Adjust warning about functions always being `true' in conditionals.
3681         * decl.c (duplicate_decls): Don't play funny games with abort.
3682         * error.c (dump_expr): Handle OVERLOADs.
3683         * spew.c (probe_obstack): Remove.
3684         * typeck.c (condition_conversion): Use perform_implicit_conversion.
3685         
3686 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
3687
3688         * cp-tree.h (auto_function, define_function): Adjust prototypes.
3689         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
3690         changed.
3691         (auto_function): Likewise, for CODE arg.
3692         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
3693         (builtin_function): ... here.
3694
3695 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
3696
3697         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
3698         (init_decl_processing): Don't set TREE_PERMANENT for the
3699         error_mark_node.
3700         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
3701         (grokdeclarator): Likewise.
3702         (grokparms): Don't check TREE_PERMANENT when building up lists.
3703         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
3704         (mark_inline_for_output): Likewise.
3705         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
3706         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
3707         * lex.c (check_newline): Don't check ggc_p; it is always one.
3708         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
3709         * spew.c (yylex): Don't copy_node or probe_obstacks for
3710         non-permanent CONSTANTs and STRINGs.
3711         * tree.c (build_cplus_array_type_1): Don't fuss with
3712         TREE_PERMANENT on ARRAY_TYPEs.
3713         
3714         * cp-tree.def (CLEANUP_STMT): New node.
3715         * cp-tree.h (language_function): Add name_declared.
3716         (current_function_name_declared): New macro.
3717         (CLEANUP_DECL): New macro.
3718         (CLEANUP_EXPR): Likewise.
3719         (emit_local_var): Likewise.
3720         (finish_decl_cleanup): New function.
3721         * cvt.c (build_up_reference): Simplify.
3722         (ocp_convert): Remove dead code.
3723         * decl.c (start_decl): Remove call to add_decl_stmt.
3724         (grok_reference_init): Adjust, to handle bindings temporaries to
3725         references.  Remove dead code.
3726         (initialize_local_var): Don't generate RTL for
3727         declarations here, or build cleanups here.  Don't fuss with
3728         obstacks.  Replace expand_start_target_temps calls with explicit
3729         setting of stms_are_full_exprs_p.
3730         (destroy_local_var): New function.
3731         (emit_local_var): Likewise.
3732         (cp_finish_decl): Use them, as appropriate.
3733         (start_function): Announce template functions.
3734         (store_parm_decls): Don't call declare_function_name here.
3735         (finish_stmt): Don't start emit base-initialization code when just
3736         building the statement-tree.
3737         * init.c (create_temporary_var): Move add_decl_stmt call ...
3738         (get_temp_regvar): Here.
3739         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
3740         cp_finish_decl would expect.  Don't call add_decl_stmt.
3741         * semantics.c (begin_compound_stmt): Call declare_function_name,
3742         if appropriate.
3743         (finish_decl_cleanup): New function.
3744         (expand_stmt): Use emit_local_var to output variables.          
3745         (expand_body): Set current_funtion_name_declared.
3746         
3747 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
3748
3749         * cp-tree.h (finish_cleanup_try_block): New function.
3750         * semantics.c (finish_cleanup_try_block): Add comment.
3751
3752 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
3753
3754         * cp-tree.h: Delete declarations for all tree nodes now moved to
3755         global_trees.
3756         * decl.c: Delete their definitions.
3757         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
3758         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
3759         provide defaults.
3760         (init_decl_processing): Call build_common_tree_nodes and
3761         build_common_tree_nodes_2 instead of building their nodes here.
3762         Don't add gc roots for them.
3763
3764 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
3765
3766         * cp-tree.h (language_function): Rename expanding_p to
3767         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
3768         (expanding_p): Adjust accordingly.
3769         (TREE_VIA_PRIVATE): Fix typo in comment.
3770         (DECL_REFERENCE_SLOT): Remove.
3771         (SET_DECL_REFERENCE_SLOT): Likewise.
3772         * decl.c (named_label_uses): Adjust. Remove chicken comment.
3773         (push_overloaded_decl): Don't truncate the chain of bindings when
3774         adding an overloaded function.
3775         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
3776         (initialize_local_var): Fix typo in comment.
3777         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
3778         * decl2.c (start_objects): Make the fact that we are expanding
3779         the generated function right away explicit.
3780         (start_static_storage_duration_function): Likewise.
3781         (finish_file): Fix typo in comment.
3782         * init.c (build_vec_init): Correct bugs in handling cleanups.
3783         * semantics.c (maybe_convert_cond): New function.
3784         (FINISH_COND): Always store the condition, even if there's
3785         a declaration.
3786         (finish_if_stmt_cond): Use maybe_convert_cond.
3787         (finish_while_stmt_cond): Likewise.
3788         (finish_do_stmt): Likewise.
3789         (finish_for_cond): Likewise.
3790         (expand_cond): Adjust.
3791         
3792         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
3793         * init.c (perform_member_init): Remove obstack machinations.
3794         (expand_cleanup_for_base): Likewise.
3795         (finish_init_stmts): Mark the statement-expression as used.
3796         * method.c (emit_thunk): Use tree-generating functions, not
3797         RTL.
3798         (do_build_copy_constructor): Likewise.
3799         (do_build_assign_ref): Likewise.
3800         (synthesize_method): Likewise.  Keep track of line numbers.
3801         * pt.c (tsubst_expr): Handle various kinds of try blocks.
3802         * semantics.c (expand_stmts): Remove.
3803         (begin_function_try_block): Set FN_TRY_BLOCK_P.
3804         (finish_function_try_block): Be careful rechaining 
3805         function try blocks.
3806         (expand_stmt): Loop through all the statements at a given level.
3807         (exapnd_body): Be careful with line-numbers here too.  Prepare for
3808         being called directly from the parser.
3809
3810         * cp-tree.h (finish_function): Adjust prototype.
3811         * decl.c (finish_function): Return the function compiled.
3812         * pt.c (instantiate_decl): Don't play games with obstacks.
3813         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
3814         (search_tree): Likewise.
3815         * typeck.c: Fix typo in comment.
3816         * typeck2.c (store_init_value): Add comment.
3817
3818         * cp-tree.h (CPTI_ATEXIT): New macro.
3819         (atexit_node): Likewise.
3820         * decl.c (destroy_local_static): New function, broken out from ...
3821         (expand_static_init): Here.
3822
3823         * rtti.c (get_tinfo_var): These should always be global
3824         (expand_si_desc): Use tree, not RTL, functions to generate code.
3825         (expand_class_desc): Likewise.
3826         (expand_ptr_desc): Likewise.
3827         (expand_attr_desc): Likewise.
3828         (expand_generic_desc): Likewise.
3829         (synthesize_tinfo_fn): Likewise.
3830
3831 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
3832
3833         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
3834         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
3835         RECHAIN_STMTS. 
3836         (RECHAIN_STMST_FROM_CHAIN): Likewise.
3837
3838         * parse.y (simple_stmt): Fix typo in last change.
3839
3840         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
3841         (STMT_IS_FULL_EXPR_P): Likewise.
3842         (STMT_LINENO_FOR_FN_P): Likewise.
3843         (prep_stmt): New function.
3844         (building_stmt_tree): Tweak for safety.
3845         * pt.c (tsubst_expr): Use prep_stmt throughout.
3846         (add_tree): Move it to semantics.c
3847         * semantics.c (add_tree): Move it here.
3848         (finish_expr_stmt_real): New function.
3849         (finish_expr_stmt): Use it.
3850         (finish_if_stmt_cond): Use FINISH_COND.
3851         (finish_while_stmt_cond): Likewise.
3852         (finish_for_cond): Likewise.
3853         (finish_stmt_tree): Tweak line-number handling.
3854         (prep_stmt): New function.
3855         (expand_stmt): Use it.
3856         
3857         * cp-tree.h (begin_switch_stmt): Adjust prototype.
3858         (finish_switch_cond): Likewise.
3859         * parse.y (simple_stmt): Adjust accordingly.
3860         * parse.c: Regenerated.
3861         * pt.c (tsubst_expr): Adjust accordingly.
3862         * semantics.c (expand_cond): New function.
3863         (FINISH_COND): New macro.
3864         (begin_switch_stmt): Build the SWITCH_STMT here.
3865         (finish_switch_stmt_cond): Not here.
3866         (expand_stmt): Adjust calls to begin_switch_stmt and
3867         finish_switch_cond.  Use expand_cond throughout.
3868
3869         * dump.c (dequeue_and_dump): Dump types for constants.
3870         Describe DECL_ARG_TYPE more intuitively.
3871         Handle ARRAY_REF.
3872
3873         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
3874         (lang_cleanup_tree): Remove.
3875         * lex.c (make_lang_type): Use ggc_alloc to allocate
3876         TYPE_LANG_SPECIFIC.
3877
3878         Reorganize per-function data.
3879         * cp-tree.h (saved_scope): Add function_decl, bindings.
3880         (language_function): Rename binding_level to bindings.
3881         (cp_function_chain): Use the current_function, not the
3882         outer_function_chain.
3883         (current_class_ptr): Make it work, even when there's no 
3884         current function.
3885         (current_class_ref): Likewise.
3886         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
3887         macros.
3888         (clear_temp_name): Remove.
3889         * decl.c (check_function_type): New function, broken out from
3890         start_function.
3891         (current_binding_level): Adjust definition.
3892         (pushlevel): Simplify.
3893         (poplevel): Don't use named_label_uses when we're outside
3894         a function scope.
3895         (mark_saved_scope): Mark function_decl and bindings.
3896         (maybe_push_to_top_level): Don't unconditionally push a new
3897         function context.  Save bindings and the current_function_decl.
3898         Don't clear named_labels.
3899         (pop_from_top_level): Pop function context if appropriate.
3900         (init_decl_processing): Set init_lang_status and free_lang_status,
3901         rather than save_lang_status and restore_lang_status.
3902         (start_function): Take SF_* flags.  Don't clear per-function data.
3903         Reorder and simplify to use new per-function data code.  Add
3904         asserts.
3905         (store_parm_decls): Don't call init_function_start here.
3906         (finish_function): Adjust for new handling of per-function data.
3907         (push_cp_function_context): Simplify.
3908         (mark_cp_function_context): Change binding_level to bindings.
3909         * decl2.c (clear_temp_name): Remove.
3910         (start_objects): Use SF flags to start_function.
3911         (start_static_storage_duration_function): Likewise.
3912         * except.c (start_anon_func): Remove redundant calls to 
3913         push_function_context_to.  Use SF flags to start function.
3914         (end_anon_func): Remove redundant call to pop_function_context
3915         from.
3916         * lex.c (reinit_parse_for_function): Don't initialize per-function 
3917         data.
3918         * method.c (emit_thunk): Clear current_function after calling
3919         assemble_end_function.  Use SF flags for start_function.
3920         (synthesize_method): Use SF flags for start_function.
3921         * parse.c: Regenerated.
3922         * parse.y (fn.defpen): Likewise.
3923         (pending_inline): Clear current_function, even if something goes
3924         wrong.
3925         * pt.c (instantiate_decl): Use SF flags to start_function.
3926         Don't save and restore expanding_p.
3927         (add_tree): Handle the case where we are outside any function.
3928         (end_tree): Likewise.
3929         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
3930         * semantics.c (begin_function_definition): Likewise.
3931         (expand_body): Likewise.
3932         
3933 1999-09-09  Nathan Sidwell  <nathan@acm.org>
3934
3935         * cp-tree.h (convert_to_void): Prototype new function.
3936         (require_complete_type_in_void): Remove prototype.
3937         * cvt.c (convert_to_void): New function.
3938         (ocp_convert): Use convert_to_void.
3939         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
3940         expressions.
3941         * typeck.c (require_complete_type_in_void): Remove function.
3942         (build_compound_expr): Use convert_to_void.
3943         (build_static_cast): Likewise.
3944         (build_c_cast): Likewise.
3945         * semantics.c (finish_expr_stmt): Do not decay full expressions.
3946         
3947         * typeck.c (build_x_compound_expr): Add FIXME.
3948
3949 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
3950
3951         * cp-tree.h (scratch_tree_cons): Remove.
3952         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
3953         and perm_tree_cons with plain tree_cons.
3954         * class.c: Likewise.
3955         * decl.c: Likewise.
3956         * decl2.c: Likewise.
3957         * except.c: Likewise.
3958         * expr.c: Likewise.
3959         * init.c: Likewise.
3960         * lex.c: Likewise.
3961         * method.c: Likewise.
3962         * parse.y: Likewise.
3963         * pt.c: Likewise.
3964         * repo.c: Likewise.
3965         * rtti.c: Likewise.
3966         * search.c: Likewise.
3967         * typeck.c: Likewise.
3968         * parse.c: Regenerated.
3969         * tree.c (build_srcloc): Simplify.
3970         
3971 1999-09-08  Bruce Korb  autogen@linuxbox.com
3972
3973         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
3974
3975 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
3976
3977         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
3978         Remove next.
3979         (LANG_DECL_PERMANENT): Remove.
3980         * decl.c (duplicate_decls): Don't mess about with obstacks trying
3981         to free memory.
3982         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
3983         * lex.c (free_lang_decl_chain): Remove.
3984         (build_lang_decl): Don't use obstacks.
3985         (retrofit_lang_decl): Likewise.
3986         (copy_lang_decl): Likewise.
3987
3988         * cp-tree.h (saved_scope): Remove old_binding_level and 
3989         function_decl.  Tidy up.
3990         * decl.c (mark_saved_scope): Don't set them.
3991         (maybe_push_to_top_level): Clear memory.
3992
3993         * decl.c (layout_var_decl): Change prototype.  Don't complete
3994         types for external objects.
3995         (check_initializer): Likewise.  Tidy.
3996         (initialize_local_var): Complete types here.
3997         (cp_finish_decl): Not here.  Reorganize a little.
3998         (grokvardecl): Don't complete types here.
3999
4000         * decl.c (start_function): Clear last_dtor_insn and
4001         last_parm_cleanup_insn. 
4002         (push_cp_function_context): Just copy over a little of
4003         the old context, not all of it.
4004
4005         * cp-tree.h (copy_to_permanent): Remove.
4006         (permanent_p): Likewise.
4007         * decl.c (building_typename_type): Don't use copy_to_permanent.
4008         (start_decl): Likewise.
4009         (grok_reference_init): Likewise.
4010         (cp_finish_decl): Likewise.
4011         * init.c (build_new_1): Don't use mapcar.
4012         (build_vec_delete_1): Don't use copy_to_permanent.
4013         (build_vec_init): Likewise.
4014         * parse.y (primary): Likewise.
4015         * parse.c: Regenerated.
4016         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
4017         (lookup_template_class): Likewise.
4018         (tsubst_friend_function): Likewise.
4019         (instantiate_class_template): Likewise.
4020         (tsubst_decl): Likewise.
4021         (tsubst): Likewise.
4022         (instantiate_template): Likewise.
4023         (unify): Likewise.
4024         * rtti.c (get_tinfo_fn): Likewise.
4025         (build_dynamic_cast): Likewise.
4026         * semantics.c (finish_if_stmt_cond): Likewise.
4027         (finish_while_stmt_cond): Likewise.
4028         (finish_do_stmt): Likewise.
4029         (finish_for_cond): Likewise.
4030         (finish_for_expr): Likewise.
4031         (finish_cleanup): Likewise.
4032         (add_decl_stmt): Likewise.
4033         (finish_named_return_value): Likewise.
4034         (finish_qualified_call_expr): Likewise.
4035         * tree.c (perm_manip): Remove.
4036         (build_exception_variant): Don't use copy_to_permanent.
4037         (permanent_p): Remove.
4038         (copy_to_permament): Remove.
4039         (build_min_nt): Don't use copy_to_permanent.
4040         (build_min): Likewise.
4041         (min_tree_cons): Likewise.
4042         * typeckc.c (build_static_cast): Likewise.
4043         (build_reinterpret_cast): Likewise.
4044         (build_const_cast): Likewise.
4045         
4046 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
4047
4048         * decl.c (ggc_p): Set it to 1.
4049         (mark_saved_scope): Add prototype.
4050
4051 1999-09-07  Richard Henderson  <rth@cygnus.com>
4052
4053         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
4054         * typeck.c (self_promoting_args_p): Delete.
4055
4056 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
4057
4058         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
4059         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
4060
4061 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
4062
4063         * Makefile.in (tree.o): Depend on ggc.h.
4064         * class.c (make_method_vec): Remove.
4065         (free_method_vec): Likewise.
4066         (free_method_vecs): Remove.
4067         (add_method): Don't use them.
4068         * cp-tree.def (PTRMEM_CST): Make it longer.
4069         (TEMPLATE_PARM_INDEX): Make it shorter.
4070         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
4071         (template_parm_index): Remove RTL field.
4072         (ptrmem_cst): Add RTL field.
4073         (finish_function): Removed parameter.
4074         (process_next_inline): Change prototype.
4075         (init_cplus_unsave): Rename to init_tree.
4076         (binding_init): Remove.
4077         * decl.c (free_binding_nodes): Remove.
4078         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
4079         (pop_binding): Don't use free_binding_nodes.
4080         (free_binding_vecs): Remove.
4081         (store_bindings): Don't use them.
4082         (pop_from_top_level): Likewise.
4083         (lookup_namespace_name): Simplify.
4084         (build_typename_type): Don't use obstack_free.
4085         (unqualified_namespace_lookup): Simplify.
4086         (lookup_name_real): Simplify.
4087         (start_function): Remove comment about leaks.
4088         (finish_function): Removed nested parameter.  Call
4089         expand_end_bindings even when building_stmt_tree.
4090         Call ggc_push_context and ggc_pop_context around
4091         rest_of_compilation, if necessary.
4092         (mark_cp_function_context): Handle a NULL language-context.
4093         (lang_mark_false_label_stack): Fix typo.
4094         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
4095         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
4096         pointer to method types.
4097         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
4098         * decl2.c (finish_objects): Adjust call to finish_function.
4099         (finish_static_store_duration_function): Likewise.
4100         (do_nonmember_using_decl): Remove call to binding_init.
4101         * except.c (end_anon_func): Adjust call to finish_function.
4102         * lex.c (mark_impl_file_chain): New function.
4103         (init_parse): Call init_tree, not init_cplus_unsave.
4104         Add GC roots.
4105         (cp_pramga_interface): Use xmalloc, not permalloc.
4106         (cp_pragma_implementation): Likewise.
4107         (begin_definition_of_inclass_inline): Simplify.
4108         (process_next_inline): Adjust prototype.
4109         (do_scoped_id): Don't call binding_init.
4110         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
4111         * method.c (emit_thunk): Adjust call to finish_function.
4112         (synthesize_method): Likewise.
4113         * parse.y (%union): Add a new `pi' variant.
4114         (PRE_PARSED_FUNCTION_DECL): Use it.
4115         (fn.defpen): Likewise.
4116         (fndef): Adjust call to finish_function.
4117         * pt.c (instantiate_decl): Likewise.
4118         * rtti.c (syntheisze_tinfo_fn): Likewise.
4119         * semantics.c (expand_body): Likewise.
4120         * tree.c: Include ggc.h.
4121         (mark_list_hash): New function.
4122         (binding_init): Remove.
4123         (init_cplus_unsave): Rename to ...
4124         (init_tree): This.  Add GC roots.
4125         
4126 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
4127
4128         Get ready for garbage collection.
4129         * Makefile.in (CXX_TREE_H): Add varray.h
4130         (lex.o): Depend on ggc.h.
4131         (decl.o): Likewise.
4132         (decl2.o): Likewise.
4133         (method.o): Likewise.
4134         (search.o): Likewise.
4135         (pt.o): Likewise.
4136         (repo.o): Likewise.
4137         * class.c: Include ggc.h.
4138         (current_class_name): Remove.
4139         (current_class_type): Likewise.
4140         (current_access_specifier): Likewise.
4141         (previous_class_type): Likewise.
4142         (previous_class_values): Likewise.
4143         (class_cache_firstobj): Likewise.
4144         (current_lang_base): Likewise.
4145         (current_lang_stack): Likewise.
4146         (current_lang_stacksize): Likewise.
4147         (lang_name_c): Likewise.
4148         (lang_name_cplusplus): Likewise.
4149         (lang_name_java): Likewise.
4150         (current_lang_name): Likewise.
4151         (base_layout_decl): Likewise.
4152         (access_default_node): Likewise.
4153         (access_public_node): Likewise.
4154         (access_protected_node): Likewise.
4155         (access_private_node): Likewise.
4156         (access_default_virtual_node): Likewise.
4157         (access_public_virtual_node): Likewise.
4158         (access_protected_virtual_node): Likewise.
4159         (access_private_virtual_node): Likewise.
4160         (signed_zero_node): Likewise.
4161         (init_class_processing): Don't build base_layout_decl.
4162         (push_lang_context): Adjust now that current_lang_base is a varray.
4163         (pop_lang_context): Likewise.
4164         * cp-tree.h: Include varray.h.
4165         (cp_global_trees): Add access_default, access_public,
4166         access_protected, access_private, access_default_virtual,
4167         access_public_virtual, access_protected_virtual,
4168         access_private_virtual, ctor_identifier, delta2_identifier, 
4169         delta_identifier, dtor_identifier, in_charge_identifier,
4170         index_identifier, nelts_identifier, this_identifier,
4171         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
4172         lang_name_c, lang_name_cplusplus, lang_name_java,
4173         empty_except_spec, null, jclass, minus_one, terminate.
4174         (saved_scope): Move here from decl.c.  Define globals in terms of
4175         saved_scope: current_namespace, current_class_name,
4176         current_class_type, current_access_specifier, current_lang_stack,
4177         current_lang_base, current_lang_name, current_function_parms,
4178         current_template_parms, processing_template_decl,
4179         processing_specialization, processing_explicit_instantiation,
4180         previous_class_type, previous_class_values, class_cache_firstobj.
4181         (scope_chain): New variable.
4182         (init_pt): New function.
4183         * decl.c (current_namespace): Remove.
4184         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
4185         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
4186         (delta_identifier, delta2_identifier): Likewise.
4187         (pfn_or_delta2_identifier, tag_identifier): Likewise
4188         (vt_off_identifier, empty_except_spec, null_node): Likewise.
4189         (current_function_parms, current_lang_base): Remove.
4190         (current_lang_stack, previous_class_values): Remove.
4191         (class_binding_level): Macroize.
4192         (saved_scope): Remove.
4193         (current_saved_scope): Rename to scope_chain.
4194         (mark_saved_scope): Adjust for new scope structure.
4195         (maybe_push_to_top_level): Likewise.
4196         (pop_from_top_level): Likewise.
4197         (duplicate_decls): Adjust now that current_lang_base is a varray.
4198         (build_typename_type): Call ggc_add_tree_hash_table_root.
4199         (init_decl_processing): Call init_pt.  Call push_to_top_level to
4200         set up globals.  Add GC roots.
4201         (xref_basetypes): Adjust now that current_lang_base is a varray.
4202         * decl.h (this_identifier): Remove.
4203         (in_charge_identifier): Likewise.
4204         * decl2.c: Don't include varray.h.
4205         (current_namespace): Remove.
4206         (init_decl2): Add GC roots.
4207         * except.c (Terminate): Remove. 
4208         (init_exception_processing): Use terminate_node instead.
4209         (build_terminate_handler): Likewise.
4210         * init.c (nc_nelts_field_id): Remove.
4211         (minus_one): Likewise.
4212         (init_init_processing): Use minus_one_node and nelts_identifier
4213         instead.  Add GC roots.
4214         (jclass_node): Remove.
4215         (build_new_1): Use nelts_identifier.
4216         (build_vec_init): Likewise.
4217         (build_vec_delete): Likewise.
4218         * lex.c: Include ggc.h.
4219         (defarg_fn): Move declaration early.
4220         (defarg_parms): Likewise.
4221         (init_parse): Add GC roots.
4222         (handle_cp_pragma): Remove redundant declaration of
4223         pending_vtables.
4224         * method.c: Include ggc.h.
4225         (btypelist): Make it a varray.  All uses changed.
4226         (ktypelist): Likewise.
4227         (init_method): Add GC roots.
4228         * pt.c: Don't include varray.h.  Include ggc.h.
4229         (current_template_parms): Remove.
4230         (processing_template_decl): Likewise.
4231         (processing_specialization): Likewise.
4232         (processing_explicit_instantiation): Likewise.
4233         (init_pt): New function.
4234         * repo.c: Include ggc.h.
4235         (init_repo): Add GC roots.
4236         * search.c: Don't include varray.h.
4237         (_vptr_name): Remove.
4238         (lookup_field_1): Use vtpr_identifier instead.
4239         (expand_indirect_vtbls_init): Remove redundant declaration of
4240         in_charge_identifier.
4241         (init_search_processing): Use vptr_identifier.
4242         
4243 1999-09-05  Richard Henderson  <rth@cygnus.com>
4244             Bernd Schmidt <bernds@cygnus.co.uk>
4245             Mark Mitchell  <mark@codesourcery.com>
4246
4247         * Makefile.in (parse.o): Depend on ggc.h.
4248         (decl2.o): Depend on ggc.h.
4249         (init.o): Depend on ggc.h.
4250         * cp-tree.h (init_decl2): Declare.
4251         (cp_parse_init): Likewise.
4252         * decl.c (ggc_p): Define to zero.
4253         (mark_saved_scope): New function.
4254         (init_decl_processing): Call cp_parse_init, and cp_decl2.
4255         Register GC roots.
4256         (expand_static_init): Add GC roots.
4257         * decl2.c: Include ggc.h.
4258         (init_decl2): New function.
4259         * init.c: Include ggc.h.
4260         (init_init_processing): Add GC roots.
4261         * parse.y: Include ggc.h.
4262         (cp_parse_init): New function.
4263         
4264 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
4265
4266         * decl.c (init_decl_processing): Set mark_lang_status.
4267         (lang_mark_false_label_stack): Adjust prototype.
4268         * decl2.c (grok_function_init): Remove extraneous declaration of
4269         abort_fndecl.
4270
4271         * Make-lang.in (cc1plus): Remove dependency on GGC.
4272         * Makefile.in (OBJS): Don't mention ggc-simple.o.
4273         (OBJDEPS): Don't mention ggc-simple.o.
4274
4275         * Make-lang.in (cc1plus): Depend on $(GGC).
4276         * Makefile.in (OBJS): Add ggc-simple.o.
4277         (OBJDEPS): Likewise.
4278         * cp-tree.h (language_function): Rename members to `x_' versions;
4279         we now have x_named_labels, x_ctor_label, x_dtor_label,
4280         x_base_init_list, x_member_init_list, x_base_init_expr,
4281         x_current_class_ptr, x_current_class_ref, x_last_tree,
4282         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
4283         x_result_rtx. 
4284         (dtor_label, ctor_label, current_base_init_list,
4285         current_member_init_list, base_init_expr, current_class_ptr,
4286         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
4287         * decl.c: Include ggc.h.
4288         (last_dtor_insn): Adjust to use x_ names.
4289         (last_parm_cleanup_insn): Likewise.
4290         (original_result_rtx): Likewise.
4291         (named_labels): Likewise.
4292         (mark_binding_level): New function.
4293         (mark_cp_function_context): Likewise.
4294         (mark_false_label_stack): Likewise.
4295         (lang_mark_tree): Likewise.
4296         (lang_cleanup_tree): Likewise.
4297         
4298 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
4299
4300         * Makefile.in (CXX_TREE_H): Include function.h.
4301         (decl.o): Don't depend on function.h.
4302         (decl2.o): Likewise.
4303         (typeck.o): Likewise.
4304         (init.o): Likewise.
4305         (method.o): Likewise.
4306         * cp-tree.h: Include function.h.
4307         (cp_function): Rename to language_function.  Remove next.
4308         (cp_function_chain): Make it a macro, not a variable.
4309         (push_cp_function_context): Don't declare.
4310         (pop_cp_function_context): Likewise.
4311         * decl.c: Don't include function.h.
4312         (push_cp_function_context): Make it static.  Make it suitable for
4313         a save_lang_status callback.
4314         (pop_cp_function_context): Likewise.
4315         (maybe_push_to_top_level): Call push_function_context_to, not
4316         push_cp_function_context.
4317         (pop_from_top_level): Call pop_function_context_from, not
4318         pop_cp_function_context.
4319         (init_decl_processing):  Set save_lang_status and
4320         restore_lang_status.  Call push_function_context_to, not
4321         push_cp_function_context.
4322         (cp_function_chain): Remove.
4323         * decl2.c: Don't include function.h.
4324         * except.c: Don't include function.h.
4325         (start_anon_func): Call push_function_context_to, not
4326         push_cp_function_context.
4327         (end_anon_func):  Call pop_function_context_from, not
4328         pop_cp_function_context.
4329         * init.c: Don't include function.h.
4330         * lex.c (begin_definition_of_inclass_inline): Call
4331         push_function_context_to, not push_cp_function_context. 
4332         (process_next_inline):  Call pop_function_context_from, not
4333         pop_cp_function_context.
4334         * method.c: Don't include function.h.
4335         (synthesize_method): Call push_function_context_to, not
4336         push_cp_function_context.  Call pop_function_context_from, not
4337         pop_cp_function_context.
4338         * typeck.c: Don't include function.h.
4339         
4340         * decl.c (expand_static_init): Tweak handling of static
4341         initializations for objects without constructors.
4342
4343 1999-09-03  Nathan Sidwell  <nathan@acm.org>
4344
4345         * typeck.c (build_indirect_ref): Reject dereference of pointer to
4346         void.
4347
4348 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
4349
4350         * cp-tree.h (cp_function): Move here, from decl.c.
4351         (cp_function_chain): Declare.
4352         (dtor_label): New macro, instead of variable.
4353         (ctor_label): Likewise.
4354         (current_base_init_list): Likewise.
4355         (current_member_init_list): Likewise.
4356         (base_init_expr): Likewise.
4357         (current_class_ptr): Likewise.
4358         (current_class_ref): Likewise.
4359         (last_tree): Likewise.
4360         (last_expr_type): Likewise.
4361         (current_function_returns_value): Likewise.
4362         (current_function_returns_null): Likewise.
4363         (current_function_just_assigned_this): Likewise.
4364         (current_function_parms_stored): Likewise.
4365         (temp_name_counter): Likewise.
4366         (static_labelno): Likewise.
4367         (expanding_p): Likewise.
4368         (stmts_are_full_exprs_p): Likewise.
4369         (in_function_try_handler): Likewise.
4370         (lang_type): Remove nested type_flags.  All uses changed.
4371         * call.c (ctor_label): Remove.
4372         (dtor_label): Likewise.
4373         * class.c (current_class_ptr): Remove.
4374         (current_class_ref): Likewise.
4375         * decl.c (static_labelno): Remove.
4376         (dtor_label): Likewise.
4377         (last_dtor_insn): New macro, instead of variable.
4378         (last_parm_cleanup_insn): Likewise.
4379         (original_result_rtx): Likewise.
4380         (in_function_try_handler): Remove.
4381         (named_label_uses): New macro, instead of variable.
4382         (named_labels): Likewise.
4383         (current_function_returns_value): Remove.
4384         (current_function_returns_null): Likewise.
4385         (current_function_assigns_this): New macro, instead of variable.
4386         (current_function_just_assigned_this): Likewise.
4387         (current_binding_level): Likewise.
4388         (init_decl_processing): Call push_cp_function_context.
4389         (cp_function): Move to cp-tree.h
4390         (cp_function_chain): Make it global.
4391         (temp_name_counter): Remove.
4392         (push_cp_function_context): Simplify.
4393         (pop_cp_function_context): Likewise.
4394         * decl2.c (temp_name_counter): Remove.
4395         * init_c (current_base_init_list): Likewise.
4396         (current_member_init_list): Likewise.
4397         (base_init_expr): Likewise.
4398         * method.c (static_labelno): Likewise.
4399         * pt.c (last_tree): Likewise.
4400         * semantics.c (expanding_p): Likewise.
4401         (stmts_are_full_exprs_p): Likewise.
4402         (last_expr_type): Likewise.
4403         * typeck.c (dtor_label): Likewise.
4404         (ctor_label): Likewise.
4405         
4406 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
4407
4408         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
4409         (arg_assoc_class): Use arg_assoc_template_arg for template
4410         arguments. 
4411         (arg_assoc): Likewise.
4412         * pt.c (mangle_class_name_for_template): Allow member template
4413         template arguments.
4414
4415 1999-09-02  Nathan Sidwell  <nathan@acm.org>
4416
4417         * call.c (build_conditional_expr): Warn on enum mismatches.
4418         (convert_arg_to_ellipsis): Move non-pod check to after
4419         conversion.
4420
4421 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4422
4423         * gxx.gperf (hash, is_reserved_word): Add prototypes.
4424
4425         * init.c (build_vec_init): Initialize variable `try_block'.
4426
4427         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
4428         Likewise for bzero/memset.
4429         (token_getch, token_put_back): Add static prototypes.  Remove
4430         `inline' from the definitions.
4431         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
4432
4433 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
4434
4435         * cp-tree.h (lang_type): Move align into type_flags.
4436         (CLASSTYPE_ALIGN): Adjust accordingly.
4437         * call.c (direct_reference_binding): Remove misleading comment.
4438
4439 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4440
4441         * parse.y (language_string): Constify.
4442
4443 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4444
4445         * repo.c (getpwd): Don't prototype.
4446         * xref.c (getpwd): Likewise
4447
4448 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4449
4450         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
4451         Remove hacks for stuff which now comes from libiberty.
4452
4453 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
4454
4455         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
4456
4457 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
4458
4459         * cp-tree.h (begin_init_stmts): Declare.
4460         (finish_init_stmts): Likewise.
4461         * cvt.c (build_up_reference): Wrap the declaration of a temporary
4462         in a statement-expression so that we will see it when expanding
4463         tree structure later.
4464         * init.c (begin_init_stmts): Don't make it static.
4465         (finish_init_stmts): Likewise.
4466
4467         * cp-tree.h (start_handler_parms): New function.
4468         (expand_start_catch_block): Take only one parameter.
4469         (start_handler_parms): New function.
4470         * decl.c (start_handler_parms): Define it.
4471         * except.c (process_start_catch_block): Take only one parameter.
4472         Don't call grokdeclarator here.
4473         (expand_start_catch_block): Don't call grokdeclarator here,
4474         either.
4475         * parse.y (handler_args): Adjust call to
4476         expand_start_catch_block.  Use start_handler_parms.
4477         * pt.c (push_template_decl_real): Make permanent lists have
4478         permanent elements.
4479         (tsubst_expr): Adjust calls to expand_start_catch_block
4480         appropriately.
4481         * semantics.c (expand_stmt): Likewise.
4482         
4483 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
4484
4485         * pt.c (push_template_decl_real): Use template declaration from
4486         class type if it exists.
4487
4488 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
4489
4490         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
4491         (maybe_inject_for_scope_var): Declare it.
4492         (initialize_local_var): Likewise.
4493         * decl.c (maybe_inject_for_scope_var): Make it global.
4494         (initialize_local_var): Likewise.  Move cleanup handling here,
4495         from cp_finish_decl.
4496         (make_rtl_for_nonlocal_decl): Use
4497         push_obstacks_nochange/pop_obstacks, rather than
4498         end_temporary_allocation/resume_temporary_allocation.
4499         (cp_finish_decl): Try to complete the type of a variable when it
4500         is declared.  Move cleanup-handling to initialize_local_var.
4501         (expand_static_init): Use tree-building code, rather than
4502         RTL-building code.
4503         * decl2.c (get_temp_name): Assert non-initializedness of
4504         temporaries.
4505         * init.c (create_temporary_var): Move RTL-assigning code to ...
4506         (get_temp_regvar): Here.
4507         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
4508         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
4509         call initialize_local_var to generate initialization code.
4510         
4511 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4512
4513         * cp-tree.h (fndecl_as_string, type_as_string,
4514         type_as_string_real, args_as_string, decl_as_string,
4515         expr_as_string, code_as_string, language_as_string,
4516         parm_as_string, op_as_string, assop_as_string, cv_as_string,
4517         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
4518
4519         * errfn.c (cp_printer): Likewise.
4520
4521         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
4522         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
4523         cp_file_of, code_as_string, language_as_string, parm_as_string,
4524         op_as_string, assop_as_string, args_as_string, cv_as_string):
4525         Likewise.
4526
4527         * tree.c (lang_printable_name): Likewise.
4528
4529 1999-08-28  Richard Henderson  <rth@cygnus.com>
4530
4531         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
4532
4533 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
4534
4535         * cp-tree.h (strip_array_types): New function.
4536         * decl.c (maybe_deduce_size_from_array_init): New function, split
4537         out from cp_finish_decl.
4538         (layout_var_decl): Likewise.
4539         (maybe_commonize_var): Likewise.
4540         (maybe_inject_for_scope_var): Likewise.
4541         (initialize_local_var): Likewise.
4542         (build_cleanup_on_safe_obstack): Likewise.
4543         (check_initializer): Likewise.
4544         (make_rtl_for_nonlocal_decl): Likewise.
4545         (cp_finish_decl): Use them.
4546         * typeck.c (strip_array_types): New function.
4547         
4548         * cp-tree.def (LABEL_STMT): New tree node.
4549         * cp-tree.h (LABEL_STMT_LABEL): New macro.
4550         (shadow_label): Remove.
4551         (declare_local_label): New function.
4552         (finish_label_decl): Likewise.
4553         * decl.c (make_label_decl): New function, split out from
4554         lookup_label.
4555         (shadowed_labels): Remove.
4556         (binding_level): Add shadowed_labels.
4557         (clear_binding_level): Remove.
4558         (push_binding_level): Just bzero the new binding level.
4559         (pushlevel): Fix indentation.
4560         (pop_label): New function.
4561         (pop_labels): Likewise, split out from poplevel.
4562         (poplevel): Pop local labels.  Use pop_labels.
4563         (maybe_push_to_top_level): Don't clear shadowed_labels.
4564         (lookup_label): Use make_label_decl.
4565         (shadow_label): Remove.
4566         (declare_local_label): New function.
4567         (define_label): Simplify.
4568         (start_function): Don't clear shadowed_labels.
4569         (cp_function): Remove shadowed_labels.
4570         (push_cp_function_context): Don't save shadowed_labels.
4571         (pop_cp_function_context): Don't restore it.
4572         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
4573         * parse.y (label_decl): Use finish_label_decl.
4574         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
4575         declarations.
4576         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
4577         building_stmt_tree.
4578         (finish_label_decl): New function.
4579         (expand_stmt): Handle LABEL_STMTs and local label declarations.
4580         
4581 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
4582
4583         * decl.c (lookup_label): Build labels on the permanent obstack
4584         when building statement trees.  Don't build RTL for labels when
4585         building statement trees.
4586         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
4587         building statement trees.
4588         (finish_label_stmt): Likewise.
4589         (expand_stmt): Adjust accordingly.
4590         * pt.c (tsubst_expr); Likewise.
4591         (do_decl_instantiation): Robustify.
4592         
4593         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
4594         * tree.c (build_cplus_new): Set it.
4595         * expr.c (cplus_expand_expr): Use it.
4596         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
4597         
4598         * decl.c (store_parm_decls): Reset immediate_size_expand.
4599         (finish_function): Likewise.
4600         
4601         * tree.c (cplus_unsave_expr_now): Don't return a value.
4602
4603         * semantics.c (do_poplevel): Always initialize the return value.
4604
4605 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
4606
4607         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
4608         * tree.h (cplus_unsave_expr_now) : Same.
4609
4610 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
4611
4612         * decl.c (grokdeclarator): Amend comment.
4613         * except.c (expand_start_catch_block): Call push_template_decl for
4614         catch-block parameters.
4615         * method.c (synthesize_method): Build an empty compound statement
4616         for the body of a constructor.
4617
4618 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
4619
4620         * tree.c (cp_build_qualified_type_real): If we're asking for the
4621         same quals we already have, just return.
4622
4623 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
4624
4625         * cp-tree.def (SUBOBJECT): New tree node.
4626         * cp-tree.h (CLEANUP_P): New macro.
4627         (SUBOBJECT_CLEANUP): Likewise.
4628         (keep_next_level): Add parameter.
4629         (get_temp_regvar): Don't declare.
4630         (emit_base_init): Remove parameter.
4631         (expand_aggr_init): Rename to build_aggr_init.
4632         (expand_vec_init): Rename to build_vec_init.
4633         (do_pushlevel): Remove.
4634         (do_poplevel): Likewise.
4635         (finish_cleanup): New function.
4636         (finish_subobject): Likewise.
4637         (stmts_are_full_exprs_p): New variable.
4638         * decl.c (keep_next_level): Add parameter.
4639         (cp_finish_decl): Use build_aggr_init, not
4640         expand_aggr_init.  Use finish_expr_stmt to expand the code.
4641         (expand_static_init): Use tree-generating, not RTL-generating,
4642         functions to handle the initialization.
4643         (start_function): Remove dead code.  Always have a momentary
4644         obstack inside the function, even before hitting the first curly
4645         brace.
4646         (cplus_expand_expr_stmt): Move calls to
4647         expand_{start,end}_target_temps into semantics.c.
4648         (cp_function): Add stmts_are_full_exprs_p.
4649         (push_cp_function_context): Save it.
4650         (pop_cp_function_context): Restore it.
4651         * decl2.c (get_temp_regvar): Move to init.c.
4652         (do_static_initialization): Use build_{aggr,vec}_init.
4653         (do_static_destruction): Fix typo in comment.
4654         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
4655         * except.c (expand_throw): Use create_temporary_var.
4656         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
4657         * init.c (expand_vec_init_try_block): Remove.
4658         (expand_vec_init_catch_clause): Likewise.
4659         (get_temp_regvar): New function.
4660         (begin_init_stmts): Likewise.
4661         (finish_init_stmts): Likewise.
4662         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
4663         structure here.
4664         (emit_base_init): Likewise.  Remove unused parameter.
4665         (expand_virtual_init): Likewise.
4666         (expand_cleanup_for_base): Use finish_subobject.
4667         (expand_aggr_vbase_init_1): Simplify.
4668         (construct_virtual_bases): Use tree-generating functions to build
4669         up initialization.
4670         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
4671         (expand_default_init): Likewise.
4672         (expand_aggr_init_1): Likewise.
4673         (expand_vec_init): Rename to build_vec_init.
4674         * method.c (do_build_copy_constructor): Use tree-generating
4675         functions.  Don't call clear_last_expr.
4676         (do_build_assign_ref): Likewise.
4677         (synthesize_method): Call clear_last_expr here.
4678         * parse.y (base_init): Don't call clear_last_expr here.
4679         (nodecls): Likewise.
4680         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
4681         * semantics.c (do_pushlevel): Move to here.
4682         (do_poplevel): Likewise.
4683         (stmts_are_full_exprs_p): New variable.
4684         (finish_expr_stmt): Handle logic for temoprary cleanup here.
4685         (finish_for_stmt): Use finish_expr_stmt.
4686         (finish_cleanup): New function.
4687         (finish_function_try_block): Fix indentation.
4688         (finish_subobject): New function.
4689         (setup_vtbl_ptr): Call keep_next_level here.
4690         (finish_stmt_expr): Handle a block with no scope inside the
4691         statement-expression.
4692         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
4693         SUBOBJECT.
4694         * tree.c (search_tree): Handle INIT_EXPR.
4695         (mapcar): Likewise.
4696         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
4697         * typeck2.c (store_init_value): Change expand_aggr_init to
4698         build_aggr_init in comment.
4699         
4700 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
4701
4702         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
4703
4704 1999-08-25  Nathan Sidwell  <nathan@acm.org>
4705
4706         * decl2.c (handle_class_head): Be graceful about additional
4707         scope qualifiers. Adjust comments to reflect reality.
4708
4709 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
4710
4711         * call.c (build_conditional_expr): Fix typo.
4712         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
4713         lvalue before trying to mess with the sides.
4714
4715         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
4716
4717 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
4718
4719         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
4720
4721 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
4722
4723         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
4724         Return arbitrary pointer or NULL.
4725         (check_eh_spec): Call __throw_type_match_rtti_2.
4726         * tinfo.h (*::dcast): Return int.  Add valp parm.
4727         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
4728         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
4729         (__throw_type_match_rtti): Now just a wrapper.
4730
4731         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
4732         (init_exception_processing): Don't initialize them.
4733
4734 1999-08-23  Paul Burchard <burchard@pobox.com>
4735
4736         * decl.c (check_default_argument): Fix typo.
4737
4738 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
4739
4740         * cp-tree.def (STMT_EXPR): Fix typo in node name.
4741
4742         * dump.c (dump_next_stmt): New function.
4743         (dequeue_and_dump): Use it.
4744         
4745         * pt.c (tsubst_copy): Make sure to initialize return value for a
4746         STMT_EXPR, even when processing_template_decl.
4747         * semantics.c (finish_stmt_expr): A statement-expression whose
4748         last statement is not an expression-statement has type `void'.  
4749         
4750 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
4751
4752         * semantics.c (finish_stmt_expr): Fix typo in comment.
4753         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
4754         (mapcar): Likewise.
4755         * init.c (build_vec_delete_1): Make the children of a permanent
4756         BIND_EXPR permanent.
4757         * pt.c (register_specialization): Don't register a specialization
4758         more than once.
4759         
4760 1999-08-18  Andrew Haley  <aph@cygnus.com>
4761
4762         * method.c (process_overload_item): Call build_mangled_C9x_name ()
4763         for all integer parameter types larger than long long.
4764
4765 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
4766
4767         * pt.c (redeclare_class_template): Merge default template
4768         arguments in both directions.
4769
4770         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
4771         compiler_error message.
4772
4773 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
4774
4775         * cp-tree.h: Declare flag_use_repository.
4776         * pt.c (do_decl_instantiation): Don't complain about duplicate
4777         instantiation with -frepo.
4778         (do_type_instantiation): Likewise.
4779
4780         * pt.c (push_template_decl_real): Complain about everything
4781         that isn't a valid template.
4782
4783         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
4784         affect inlines.
4785
4786 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
4787
4788         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
4789         * decl2.c (build_expr_from_tree): Handle it.
4790         * error.c (dump_expr): Likewise.
4791         * pt.c (for_each_template_parm): Likewise.
4792         (tsubst_copy): Likewise.
4793         * tree.c (search_tree): Likewise.
4794         * semantics.c (finish_pseudo_destructor_call): Create it.
4795         
4796 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
4797
4798         * search.c (setup_class_bindings): Robustify.
4799         * typeck.c (common_type): Use same_type_p, not pointer equality,
4800         to compare types.
4801
4802         * cp-tree.h (build_lang_field_decl): Remove.
4803         * class.c (build_vtable): Replace calls to build_lang_field_decl
4804         with build_lang_decl.
4805         (prepare_fresh_vtable): Likewise.
4806         (finish_struct_1): Likewise.
4807         (init_class_processing): Likewise.
4808         * decl.c (push_using_decl): Likewise.
4809         (init_decl_processsing): Likewise.
4810         (grokvardecl): Likewise.
4811         (build_ptrmemfunc_type): Likewise.
4812         (grokdeclarator): Likewise.
4813         (build_enumerator): Likewise.
4814         * decl2.c (grok_x_components): Likewise.
4815         (do_class_using_decl): Likewise.
4816         * except.c (call_eh_info): Likewise.
4817         * init.c (init_init_processing): Likewise.
4818         * rtti.c (expand_class_decl): Likewise.
4819         * tree.c (build_base_fields): Likewise.
4820         (build_vbase_pointer_fields): Likewise.
4821         * lex.c (build_lang_decl): Build declarations on the permanent
4822         obstack if we're building statmeent trees.
4823         (retrofit_lang_decl): Handle both the full lang_decl and also the
4824         smaller lang_decl_flags here.
4825         (build_lang_field_decl): Remove.
4826         * pt.c (push_template_decl_real): Issue errors for variable
4827         declarations that are not static members.
4828
4829 1999-08-18  Richard Henderson  <rth@cygnus.com>
4830
4831         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
4832         (mapcar): Likewise.
4833
4834 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
4835
4836         * cp-tree.h (back_end_hook): New variable.
4837         * decl2.c (back_end_hook): Define it.
4838         (finish_file): If it's non-NULL, call it.
4839
4840         * decl.c (add_decl_to_level): New function.
4841         (push_local_binding): Use it.
4842         (find_binding): Fix typo in comment.
4843         (pushdecl): Use add_decl_to_level.  Put templates on the
4844         corresponding namespace-scope binding levels.
4845         * dump.c (dequeue_and_dump): Print the specializations of a
4846         template.
4847         * pt.c (push_template_decl_real): Don't push a template multiple
4848         times.
4849
4850 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
4851
4852         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
4853         (CALL_DECLARATOR_QUALS): Likewise.
4854         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
4855         * decl.c (grokdeclarator): Adjust to use them.
4856         * decl2.c (grokfield): Likewise.
4857         (reparse_absdcl_as_casts): Likewise.
4858         * lex.c (make_call_declarator): Likewise.
4859         (set_quals_and_spec): Likewise.
4860         * pt.c (tsubst): Likewise.
4861         * tree.c (mapcar): Remove special hack to handle third operand of
4862         a CALL_EXPR.
4863
4864 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
4865
4866         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
4867         * class.c (build_vtable): Use build_lang_field_decl to build the
4868         VAR_DECLs for vtables.
4869         (prepare_fresh_vtable): Likewise.
4870         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
4871         CAN_HAVE_FULL_LANG_DECL_P.
4872         (push_using_decl): Use build_lang_decl to build USING_DECLs.
4873         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
4874         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
4875         (build_lang_field_decl): Likewise.
4876         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
4877         to copy.
4878         
4879         * cp-tree.def (STMT_EXPR): New tree node.
4880         * cp-tree.h (STMT_EXPR_STMT): New macro.
4881         (store_return_init): Change prototype.
4882         (finish_named_return_value): New function.
4883         (expand_stmt): Likewise.
4884         (expand_body): Likewise.
4885         (begin_stmt_tree): Likewise.
4886         (finish_stmt_tree): Likewise.
4887         (expanding_p): New variable.
4888         (last_expr_type): Likewise.
4889         (building_stmt_tree): New macro.
4890         * decl.c (start_function): Use building_stmt_tree, not
4891         processing_template_decl, where appropriate.
4892         (store_parm_decls): Likewise.
4893         (store_return_init): Move most of the body to semantics.c.
4894         (finish_function): Use building_stmt_tree.
4895         (finish_stmt): Clear last_expr_type here.
4896         (cp_function): Add expanding_p, last_tree, last_expr_type.
4897         (push_cp_function_context): Save them.
4898         (pop_cp_function_context): Restore them.
4899         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
4900         * error.c (dump_expr): Handle STMT_EXPR.
4901         * except.c (expand_start_catch_block): Use building_stmt_tree.
4902         Use add_decl_stmt.
4903         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
4904         (do_case): Move add_tree call to semantics.c.
4905         * parse.y (return_init): Use finish_named_return_value.
4906         (for.init.statement): Use finish_expr_stmt.
4907         * parse.c: Regenerated.
4908         * pt.c (do_pushlevel): Move to semantics.c.
4909         (do_poplevel): Likewise.
4910         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
4911         (tsubst_expr): Don't expand all the way to RTL here.  Handle
4912         RETURN_INIT and CTOR_INITIALIZER.
4913         (instantiate_decl): Call expand_body after tsubst'ing into
4914         DECL_SAVED_TREE.
4915         * semantics.c (expand_stmts): New function.
4916         (expanding_p): New variable.
4917         (last_expr_type): Likewise.
4918         (finish_expr_stmt): Use building_stmt_tree.
4919         (begin_if_stmt): Likewise.
4920         (finish_if_stmt_cond): Likewise.
4921         (finish_then_clause): Likewise.
4922         (begin_else_clause): Likewise.
4923         (finish_else_clause): Likewise.
4924         (begin_while_stmt): Likewise.
4925         (finish_while_stmt_cond): Likewise.
4926         (finish_while_stmt): Likewise.
4927         (finish_do_body): Likewise.
4928         (finish_do_stmt): Likewise.
4929         (finish_return_stmt): Likewise.
4930         (begin_for_stmt): Likewise.
4931         (fnish_for_init_stmt): Likewise.
4932         (finish_for_cond): Likewise.
4933         (finish_for_expr): Likewise.
4934         (finish_for_stmt): Likewise.
4935         (finish_break_stmt): Likewise.
4936         (finish_continue_stmt): Likewise.
4937         (finish_switch_cond): Likewise.
4938         (finish_switch_stmt): Likewise.
4939         (finish_case_label): Call add_tree here if necessary.
4940         (finish_goto_statement): Use building_stmt_tree.
4941         (begin_try_block): Likewise.
4942         (begin_function_try_block): Likewise.
4943         (finish_try_block): Likewise.
4944         (finish_function_try_block): Likewise.
4945         (finish_handler_sequence): Likewise.
4946         (finish_function_handler_sequence): Likewise.
4947         (begin_handler): Likewise.
4948         (finish_handler_parms): Likewise.
4949         (finish_handler): Likewise.
4950         (begin_compound_stmt): Likewise.
4951         (finish_compound_stmt): Likewise.
4952         (finish_asm_stmt): Likewise.
4953         (finish_label_stmt): Likewise.
4954         (finish_named_return_value): New function.
4955         (setup_vtbl_ptr): Moved here from decl2.c.
4956         (do_pushlevel): Moved here from pt.c.
4957         (do_poplevel): Likewise.
4958         (begin_stmt_expr): Use building_stmt_tree.
4959         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
4960         when building_stmt_tree.
4961         (begin_stmt_tree): New function.
4962         (finish_stmt_tree): Likewise.
4963         (expand_stmt): Likewise.
4964         (expand_body): Likewise.
4965         * tree.c (build_cplus_method_type): Make sure the argument types
4966         end up on the same obstack as the METHOD_TYPE.
4967         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
4968         THROW_EXPR, STMT_EXPR.
4969         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
4970         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
4971         sorry, if an unsupported node is encountered.
4972         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
4973         (c_expand_return): Don't call add_tree here.
4974         
4975 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
4976
4977         * pt.c (check_default_tmpl_args): Don't check in local scopes.
4978         (tsubst_decl): Make sure the declaration is on a saveable
4979         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
4980         variable.
4981         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
4982         
4983 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
4984
4985         Speed up Koenig lookup.
4986         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
4987         to return namespaces we've looked at.
4988         * decl2.c (lookup_using_namespace): Likewise.
4989         (add_function): Don't call ovl_member.
4990         (lookup_arg_dependent): Initialize k.namespaces to the list of 
4991         namespaces seen in unqualified lookup.
4992         * call.c (equal_functions): Move here from tree.c.
4993         (joust): Use it to handle duplicate candidates.
4994         * tree.c (ovl_member): Use ==.
4995
4996 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
4997
4998         * cp-tree.def (DECL_STMT): Make it smaller.
4999         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
5000         (lang_decl): ... here.  Add next.
5001         (DECL_SAVED_TREE): Adjust accordingly.
5002         (DECL_IMPLICIT_TYPEDEF_P): New macro.
5003         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
5004         (DECL_STMT_DECL): Likewise.
5005         (create_implicit_typedef): New function.
5006         (maybe_push_decl): Likewise.
5007         (tsubst_default_argument): New function.
5008         (at_function_scope_p): Likewise.
5009         (add_decl_stmt): Likewise.
5010         (push_permanent_obstack): Likewise.
5011         * call.c (convert_default_arg): Use tsubst_default_argument.
5012         * class.c (add_method): Use push_permanent_obstack.
5013         (build_self_reference): Create a TEMPLATE_DECL for the
5014         self-reference, if necessary.
5015         * decl.c (pseudo_global_level_p): Only look at the current binding
5016         level.
5017         (push_binding): Use push_permanent_obstack.
5018         (create_implicit_typedef): New function.
5019         (pushtag): Use it.
5020         (duplicate_decls): Use push_permanent_obstack.
5021         (maybe_push_decl): New function.
5022         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
5023         (start_decl_1): Remove dead code.
5024         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
5025         pseudo_global_level_p.
5026         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
5027         template.
5028         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
5029         pseudo_global_level_p.
5030         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
5031         a template.
5032         (get_sentry): Use push_permanent_obstack.
5033         * dump.c (dequeue_and_dump): Enable DECL_STMT.
5034         * except.c (call_eh_info): Use push_permanent_obstack.
5035         (build_eh_type_ref): Likewise.
5036         (do_pop_exception): Likewise.
5037         (expand_eh_spec): Likewise.
5038         (alloc_eh_object): Likewise.
5039         (expand_throw): Likewise.
5040         * init.c (build_java_class_ref): Likewise.
5041         * lex.c (get_time_identifier): Likewise.
5042         (free_lang_decl_chain): Correct type.
5043         (retrofit_lang_decl): Adjust accordingly.
5044         (build_lang_field_decl): Likewise.
5045         * lex.h (free_lang_decl_chain): Likewise.
5046         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
5047         * parse.c: Regenerated.
5048         * pt.c (tsubst_default_arguments): New function.
5049         (retrieve_local_specialization): Likewise.
5050         (register_local_specialization): Likewise.
5051         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
5052         pseudo_global_level_p to determine whether or not a template is
5053         primary.
5054         (lookup_template_class): Likewise.  Use create_implicit_typedef.
5055         (instantiate_class_template): Call tsubst_default_arguments for
5056         member functions, if appropriate.
5057         (tsubst_default_argument): New function.
5058         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
5059         * search.c (at_function_scope_p): New function.
5060         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
5061         (finish_label_stmt): Likewise.
5062         (add_decl_stmt): New function.
5063         (begin_class_definition): Likewise.
5064         (finish_typeof): Likewise.
5065         * tree.c (copy_template_template_parm): Likewise.
5066         (copy_to_permanent): Likewise.
5067         (push_permanent_obstack): Define.
5068         (mark_addressable): Use it.
5069         * typeck.c (mark_addressable): Likewise.
5070         
5071 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
5072
5073         * cp-tree.h (init_cplus_unsave): New.
5074         (cplus_unsave_expr_now): New.
5075         * lex.c (init_parse): Call init_cplus_unsave.
5076         * tree.c (init_cplus_unsave): New.
5077         (cplus_unsave_expr_now): New.
5078
5079 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
5080
5081         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
5082         decl_constant_value to simplify array bounds.
5083
5084 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
5085
5086         * lang-options.h: Add -fms-extensions.
5087         * cp-tree.h: Declare flag_ms_extensions.
5088         * decl2.c: Define it.
5089         * class.c (instantiate_type): Don't complain about taking the address
5090         of a bound member function if -fms-extensions.
5091         * typeck.c (build_unary_op): Likewise.
5092         * decl.c (grokdeclarator): Or about implicit int.
5093         * init.c (resolve_offset_ref): Or about implicit '&'.
5094
5095 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
5096
5097         * cp-tree.h (minimal_parse_mode): Remove.
5098         (finish_label_stmt): New function.
5099         * decl.c (saved_scope): Remove minimal parse mode.
5100         (maybe_push_to_top_level): Don't save it.
5101         (pop_from_top_level): Don't restore it.
5102         (define_label): Split out template-handling code to semantics.c.
5103         (start_decl): Don't use minimal_parse_mode.
5104         (cp_finish_decl): Likewise.
5105         (start_function): Don't increment it.
5106         (store_return_init): Don't use it.
5107         (finish_function): Don't decrement it.
5108         * parse.y (label_colon): Use finish_label_stmt throughout.
5109         * parse.c: Regenerated.
5110         * pt.c (minimal_parse_mode): Don't define it.
5111         (tsubst_expr): Use finish_label_stmt.
5112         * semantics.c (finish_label_stmt): New function.
5113
5114         * dump.c (queue): Be careful when computing bitmasks.
5115         (dequeue_and_dump): Describe binfos as binfos, not as
5116         vectors.
5117         
5118         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
5119         throughout.     
5120         * parse.c: Regenerated.
5121         
5122         * Make-lang.in (CXX_SRCS): Remove sig.c.
5123         * Makefile.in (CXX_OBJS): Remove sig.o.
5124         (sig.o): Remove.
5125         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
5126         (CPTI_SIGNATURE_TYPE): Likewise.
5127         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
5128         (opaque_type_node): Likewise.
5129         (signature_type_node): Likewise.
5130         (sigtable_entry_type): Likewise.
5131         (flag_handle_signatures): Likewise.
5132         (lang_type): Remove is_signature, is_signature_pointer,
5133         is_signature_reference, has_opaque_typedecls,
5134         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
5135         signature_pointer_to, signature_reference_to.
5136         (IS_SIGNATURE): Remove.
5137         (SET_SIGNATURE): Remove.
5138         (CLEAR_SIGNATURE): Remove.
5139         (IS_SIGNATURE_POINTER): Remove.
5140         (IS_SIGNATURE_REFERENCE): Remove.
5141         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
5142         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
5143         (CLASSTYPE_SIGNATURE): Remove.
5144         (SIGNATURE_TYPE): Remove.
5145         (SIGNATURE_METHOD_VEC): Remove.
5146         (SIGNATURE_POINTER_TO): Remove.
5147         (SIGNATURE_REFERENCE_TO): Remove.
5148         (lang_decl_flags): Remove is_default_implementation.  Rename
5149         memfunc_pointer_to to saved_tree.
5150         (IS_DEFAULT_IMPLEMENTATION): Remove.
5151         (DECL_MEMFUNC_POINTER_TO): Remove.
5152         (DECL_MEMFUNC_POINTING_TO): Remove.
5153         (DECL_SAVED_TREE): Adjust definition.
5154         (tag_types): Remove signature_type_node.
5155         (SIGNATURE_FIELD_NAME): Remove.
5156         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
5157         (SIGNATURE_OPTR_NAME): Likewise.
5158         (SIGNATURE_SPTR_NAME): Likewise.
5159         (SIGNATURE_POINTER_NAME): Likewise.
5160         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
5161         (SIGNATURE_REFERENCE_NAME): Likewise.
5162         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
5163         (SIGTABLE_PTR_TYPE): Likewise.
5164         (SIGTABLE_NAME_FORMAT): Likewise.
5165         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
5166         (SIGTABLE_TAG_NAME): Likewise.
5167         (SIGTABLE_VB_OFF_NAME): Likewise.
5168         (SIGTABLE_VT_OFF_NAME): Likewise.
5169         (finish_base_specifiers): Change prototype.
5170         (build_signature_pointer_type): Remove.
5171         (build_signature_reference_type): Remove.
5172         (build_signature_pointer_constructor): Remove.
5173         (build_signature_method_call): Remove.
5174         (build_optr_ref): Likewise.
5175         (append_signature_fields): Likewise.
5176         (signature_error): Likewise.
5177         * call.c (build_this): Remove signature support.
5178         (build_over_call): Likewise.
5179         (build_new_method_call): Likewise.
5180         * class.c (add_implicitly_declared_members): Likewise.
5181         (finish_struct_1): Likewise.
5182         (finish_struct): Likewise.
5183         * cvt.c (cp_convert_to_pointer): Likewise.
5184         (convert_to_pointer_force): Likewise.
5185         (ocp_convert): Likewise.
5186         * decl.c (sigtable_decl_p): Remove.
5187         (init_decl_processing): Remove support for signatures.
5188         (cp_finish_decl): Likewise.
5189         (grokdeclarator): Likewise.
5190         (grokparms): Likewise.
5191         (xref_tag): Likewise.
5192         (start_function): Likewise.
5193         (start_method): Likewise.
5194         * decl2.c (finish_sigtable_vardecl): Remove.
5195         (flag_handle_signatures): Remove.
5196         (lang_f_options): Remove handle-signatures.
5197         (grokfield): Remove support for signatures.
5198         (grokbitfield): Likewise.
5199         (finish_file): Likewise.
5200         (reparse_absdcl_as_casts): Likewise.
5201         * error.c (dump_type_real): Likewise.
5202         (dump_function_decl): Likewise.
5203         * friend.c (make_friend_class): Likewise.
5204         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
5205         * hash.h: Regenerated.
5206         * init.c (build_new_1): Remove support for signatures.
5207         * lang-options.h: Remove -fhandle-signatures,
5208         -fno-handle-signatures. 
5209         * lex.c (init_parse): Remove support for signatures.
5210         (yyprint): Likewise.
5211         * lex.h (rid): Remove RID_SIGNATURE.
5212         * method.c (build_decl_overload_real): Remove support for
5213         signatures. 
5214         (hack_identifier): Likewise.
5215         * parse.y (base_class): Likewise.
5216         (base_class.1): Likewise.
5217         (access_specifier): Likewise.
5218         * search.c (lookup_member): Likewise.
5219         * semantics.c (finish_qualified_object_call_expr): Likewise.
5220         (finish_template_type_parm): Likewise.
5221         (begin_class_definition): Likewise.
5222         (finish_base_specifier): Likewise.
5223         * sig.c: Remove.
5224         * tree.c (build_cplus_method_type): Remove support for signatures.
5225         * typeck.c (require_complete_type): Likewise.
5226         (c_sizeof): Likewise.
5227         (c_alignof): Likewise.
5228         (build_object_ref): Likewise.
5229         (build_component_ref): Likewise.
5230         (build_indirect_ref): Likewise.
5231         (build_c_cast): Likewise.
5232         (build_modify_expr): Likewise.
5233         (convert_for_initialization): Likewise.
5234         * typeck2.c (signature_error): Remove.
5235         (store_init_value): Remove support for signatures.
5236         (digest_init): Likewise.
5237         (build_x_arrow): Likewise.
5238         (build_functional_cast): Likewise.
5239         * xref.c (GNU_xref_decl): Likewise.
5240         
5241 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
5242
5243         * lex.c (do_identifier): Remove unnecessary lookup of class field.
5244
5245 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
5246
5247         * decl2.c (set_decl_namespace): Do not complain about non-matching
5248         decls if processing a template.
5249
5250 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
5251
5252         * decl.c (build_ptrmemfunc_type): Handle qualified
5253         pointer-to-member types here.
5254         * tree.c (cp_build_qualified_type_real): Simplify handling here.
5255
5256 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5257
5258         * lex.c (lang_identify): Likewise.
5259
5260 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
5261
5262         * Makefile.in: Update dependencies.
5263         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
5264         NULL_RTX.
5265         * decl.c: Include "function.h"
5266         (cleanup_label, return_label): Delete declarations.
5267         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
5268         (finish_function): Rename last_parm_insn variable to
5269         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
5270         * decl2.c: Include "function.h".
5271         (rtl_expr_chain): Delete declaration.
5272         * method.c: Include "function.h"
5273         * tree.c (build_vbase_pointer_fields): Don't initialize
5274         DECL_SAVED_INSNS with NULL_RTX.
5275         * typeck.c: Include "function.h"
5276
5277 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
5278
5279         * semantics.c (begin_function_try_block, finish_function_try_block,
5280         finish_function_handler_sequence): New fns.
5281         * parse.y (function_try_block): Use them.
5282         * pt.c (instantiate_decl): Likewise.
5283
5284         * cp-tree.h: Declare in_function_try_handler.
5285         * decl.c: Define it.
5286         (start_function): Clear it.
5287         (struct cp_function, push_cp_function_context): Save it.
5288         (pop_cp_function_context): Restore it.
5289         * parse.y (function_try_block): Set and clear it.
5290         * except.c (expand_end_catch_block): Rethrow if we reach the end
5291         of a function-try-block handler in a ctor or dtor.
5292         * typeck.c (c_expand_return): Complain about returning from a
5293         function-try-block handler of a ctor.
5294
5295         * parse.y (function_try_block): Call end_protect_partials
5296         before expand_start_all_catch.
5297
5298 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
5299
5300         * decl.c (struct binding_level): Add eh_region field.
5301         (push_binding_level): Set it.
5302         (define_label): Complain about jumping into an EH block.
5303
5304         * ptree.c (print_lang_type): Print the real type of a PMF.
5305         Print what exceptions a fn type throws.
5306
5307 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5308
5309         * class.c (count_fields, add_fields_to_vec): Add static prototype.
5310
5311         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
5312         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
5313         char*.
5314
5315         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
5316         Constify a char*.
5317
5318         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
5319         char*.
5320
5321         * dump.c (queue_and_dump_index, dump_int, dump_string,
5322         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
5323         a char*.
5324         (dump_stmt): Add static prototype.
5325
5326         * errfn.c (cp_thing): Constify a char*.
5327
5328         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
5329         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
5330         dump_expr): Constify a char*.
5331
5332         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
5333         read_line_number): Add static prototype.
5334         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
5335         (real_yylex): Move label `letter' into the scope where it is used.
5336
5337         * method.c (build_mangled_template_parm_index, build_overload_int,
5338         build_decl_overload_real, get_id_2): Constify a char*.
5339
5340         * search.c (check_final_overrider): Make static.
5341
5342         * typeck.c (composite_pointer_type): Constify a char*.
5343
5344 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
5345
5346         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
5347         we're looking at a class.
5348
5349         * decl.c (lookup_name_real): Set the complain flag if we're
5350         looking for a namespace member.
5351
5352         * lex.c (real_yylex): We can have a number with no digits.
5353
5354         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
5355
5356         * search.c (binfo_from_vbase): New fn.
5357         * cp-tree.h: Declare it.
5358         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
5359         from pointer to member of virtual base.  
5360         * typeck.c (get_delta_difference): Likewise.
5361
5362 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
5363
5364         * pt.c (tsubst): Use build_index_type to build in-template array
5365         index type.  Fixes g++.oliva/dwarf1.C.
5366         * decl.c (grokdeclarator): Likewise, just for consistency, as it
5367         doesn't seem to trigger the bug without it.
5368
5369 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
5370
5371         * typeck2.c (add_exception_specifier): Use complete_type.
5372
5373 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
5374
5375         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
5376         (dump_binary_op): Bulletproof.
5377         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
5378         * tree.c (search_tree): Don't enumerate all the nodes of classes
5379         `1', `2', and `<'; handle them generically.  Don't be sorry about
5380         "unrecognized tree codes"; just abort.
5381         (no_linkage_check): Don't do linkage checks for templates.
5382         
5383         * tree.c (cp_build_qualified_type_real): Handle
5384         pointer-to-member-function types correctly.
5385
5386 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
5387
5388         * decl.c (pushdecl): Only give an error for shadowing a parm 
5389         from *this* function.
5390
5391 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
5392
5393         * typeck2.c: Update URLs and mail addresses.
5394
5395 1999-08-04  Nathan Sidwell  <nathan@acm.org>
5396
5397         * cp-tree.h (empty_except_spec): New global var.
5398         (compexcepttypes): Remove prototype.
5399         (comp_except_specs): Prototype new global function.
5400         (add_exception_specifier): Prototype new global function.
5401         * decl.c (empty_except_spec): Define new global var.
5402         (duplicate_decls): Use comp_except_specs, reword error message.
5403         (init_decl_processing): Initialize empty_except_spec.
5404         Adjust build_exception_variant calls.
5405         * parse.y (exception_specification_opt): Use empty_except_spec.
5406         (ansi_raise_identifier): Call check_for_new_type.
5407         (ansi_raise_identifiers): Use add_exception_specifier.
5408         * pt.c (tsubst): Use add_exception_specifier to build exception
5409         specifier.
5410         * search.c (check_final_overrider): New static function, broken
5411         out of get_matching_virtual. Check throw specifiers, reword
5412         diagnostics.
5413         (get_matching_virtual): Use check_final_overrider.
5414         * tree.c (build_exception_variant): Use comp_except_specs.
5415         * typeck.c (compexcepttypes): Remove.
5416         (comp_except_types): New static function, helper for
5417         comp_except_specs. Compare two types as exception specifiers.
5418         (comp_except_specs): New global function, compare two exception
5419         specifiers.
5420         (comptypes): Adjust for comp_except_specs.
5421         * typeck2.c (add_exception_specifier): New global function.
5422         
5423         * class.c (check_for_override): Reword error message.
5424
5425 1999-08-03  Nathan Sidwell  <nathan@acm.org>
5426
5427         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
5428         * cp-tree.h (struct lang_type): Added non_pod_class flag.
5429         (CLASSTYPE_NON_POD_P): New macro to access it.
5430         * class.c (finish_struct_1): Determine non-PODness.
5431         Check for arrays of pointers (-Weffc++).
5432         Remove array inspection duplicated code.
5433         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
5434         Use CLASSTYPE_NON_POD_P.
5435
5436 1999-08-03  Nathan Sidwell  <nathan@acm.org>
5437
5438         * class.c (duplicate_tag_error): Preserve template information.
5439
5440 1999-08-03  Nathan Sidwell  <nathan@acm.org>
5441
5442         * decl.c (start_enum): Show location of previous definition.
5443         * parse.y (enumlist_opt): New reduction.
5444         (structsp): Simplify enum rules to use enumlist_opt.
5445
5446 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
5447
5448         * lex.c (yyprint): Handle PFUNCNAME.
5449
5450         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
5451         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
5452
5453 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
5454
5455         * decl.c (start_decl): Set attributes before duplicate_decls call.
5456
5457 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
5458
5459         * Make-lang.in (CXX_SRCS): Add dump.c.
5460         * Makefile.in (CXX_OBJS): Add dump.o.
5461         (dump.o): New target.
5462         * cp-tree.h (DECL_CONV_FN_P): Document.
5463         (DECL_OVERLOADED_OPERATOR_P): New function.
5464         (TYPE_PTRMEM_CLASS_TYPE): New macro.
5465         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
5466         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
5467         (ASM_VOLATILE_P): New macro.
5468         (STMT_LINENO): Likewise.
5469         (cp_namespace_decls): New function.
5470         (dump_node_to_file): New function.
5471         * decl.c (cp_namespace_decls): New function.
5472         (walk_namespaces_r): Use it.
5473         (wrapup_globals_for_namespace): Likewise.
5474         * decl2.c (flag_dump_translation_unit): New variable.
5475         (lang_decode_option): Handle -fdump-translation-unit.
5476         (finish_file): If flag_dump_translation_unit is set, dump the
5477         translation unit.
5478         * dump.c: New file.
5479         * lang-options.h: Add -fdump-translation-unit.
5480         * pt.c (tsubst_template_parms): Robustify.
5481         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
5482         (tsubst_expr): Use STMT_LINENO.
5483         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
5484         for invalid cv-qualifiers even while building templates.
5485         
5486 1999-08-02  Richard Henderson  <rth@cygnus.com>
5487
5488         * call.c: Include defaults.h instead of expr.h.
5489         * decl.c: Likewise.
5490         * pt.c: Likewise.
5491         * typeck.c: Include defaults.h.
5492
5493 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
5494
5495         * lex.c (errorcount, sorrycount): Don't declare.
5496         * repo.c (errorcount, sorrycount): Likewise.
5497         * typeck2.c (errorcount, sorrycount): Likewise.
5498
5499 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
5500
5501         * call.c (convert_default_arg, build_over_call): Change all uses of
5502         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
5503         Ensure expr.h is included.
5504         * decl.c (grokparams): Ditto.
5505         * pt.c (tsubst_decl): Ditto.
5506         * typeck.c (convert_arguments): Ditto.
5507
5508 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
5509
5510         * class.c (mark_overriders): Fix order of args to overrides.
5511         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
5512         functions with the same name.
5513
5514 1999-08-02  Richard Henderson  <rth@cygnus.com>
5515
5516         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
5517
5518 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
5519
5520         * call.c (build_conditional_expr): Fix typo in comment.
5521
5522 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
5523
5524         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
5525         case_stack; use in_control_zone_p.
5526         * typeck.c (c_expand_return): Likewise.
5527
5528 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
5529
5530         * except.c (catch_clauses): Delete declaration.
5531
5532 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
5533
5534         * call.c (build_conditional_expr): Call convert_from_reference to
5535         avoid reference/non-reference type confusion.  Fix typo.
5536
5537 1999-07-30  Richard Henderson  <rth@cygnus.com>
5538
5539         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
5540         * cp-tree.h (initializer_constant_valid_p): Remove.
5541
5542 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
5543
5544         * call.c (conditional_conversion): Don't build BASE_CONVs for
5545         conversions between things that have the same type.
5546         (build_conditional_expr): Tweak.
5547         (convert_like): Some BASE_CONVs really do require the generation
5548         of code.
5549         
5550         * init.c (perform_member_init): Don't go through build_modify_expr
5551         for simple initializations.
5552
5553 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
5554
5555         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
5556         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
5557         virtual functions and MI.  Simplify.
5558
5559         * method.c: Remove prototype for largest_union_member.
5560         * pt.c (determine_specialization): Fix uninitialized warning.
5561         * lex.c (real_yylex): Likewise.
5562
5563 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
5564
5565         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
5566         here too.
5567
5568         * cp-tree.h (BINFO_VIRTUALS): Document new format.
5569         * class.c (modify_one_vtable): Change prototype accordingly.
5570         (modify_all_vtables): Likewise.
5571         (modify_all_direct_vtables): Likewise.
5572         (modify_all_indirect_vtables): Likewise.
5573         (build_vtable_entry_for_fn): New function.
5574         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
5575         (modify_vtable_entry): Likewise.
5576         (add_virtual_function): Likewise.
5577         (build_vtbl_initializer): New function.
5578         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
5579         (fixup_vtable_deltas1): Likewise.
5580         (fixup_vtable_deltas): Likewise.
5581         (override_one_vtable): Likewise.
5582         (finish_struct_1): Likewise.
5583
5584         * error.c (dump_expr): Likewise.
5585         * search.c (get_abstract_virtuals_1): Likewise.
5586         (get_abstract_virtuals): Likewise.
5587         (expand_upcast_fixups): Likewise.
5588         * tree.c (debug_binfo): Likewise.
5589         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
5590         __pure_virtual here.
5591         
5592 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
5593
5594         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
5595         as per 1999-07-26 change.
5596
5597         * typeck.c (c_sizeof): Don't allow non-static data members.
5598         (expr_sizeof): Likewise.
5599
5600 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
5601
5602         * input.c (feed_input): Only touch lineno and input_filename
5603         if !USE_CPPLIB.  Save the old values before setting the new ones.
5604
5605         * input.c (feed_input): Add file, line parms.
5606         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
5607         (real_yylex): Check linemode before input_redirected().
5608
5609         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
5610         from op new to warning.
5611
5612 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
5613
5614         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
5615         * call.c: All uses changed.
5616         * typeck.c: Likewise.
5617
5618 1999-07-26  Nathan Sidwell  <nathan@acm.org>
5619
5620         * exception.cc (__cplus_type_matcher): Match __eh_matcher
5621         prototype.
5622
5623 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
5624
5625         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
5626         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
5627         (strip_top_quals): Declare.
5628         (ncp_convert): Likewise.
5629         (type_after_usual_arithmetic_converions): Likewise.
5630         (composite_pointer_type): Likewise.
5631         * call.c (strip_top_quals): Don't make it static.
5632         (promoted_arithmetic_type_p): New function.
5633         (conditional_conversion): Likewise.
5634         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
5635         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
5636         for converting a type to itself.
5637         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
5638         (implicit_conversion): Make sure the from and to types are
5639         complete.
5640         (add_builtin_candidate): Correct handling of ?: operator.
5641         (add_builtin_candidates): Improve documentation.
5642         (build_conditional_expr): New function.
5643         (can_convert): Implement in terms of can_convert_arg.
5644         (ncp_convert): New function.
5645         * typeck.c (type_after_usual_arithmetic_conversions): New
5646         function, split out from common_type.
5647         (composite_pointer_type): New function, split out from
5648         build_conditional_expr.
5649         (common_type): Use type_after_usual_arithmetic_conversions.
5650         Remove redundant attribute merging.
5651         (comptypes): Tidy.  Handle COMPLEX_TYPE.
5652         (build_binary_op_nodefault): Use null_ptr_cst_p.
5653         (build_conditional_expr): Remove.
5654         (convert_for_assignment): Use new conversion functions.
5655         
5656         * cp-tree.h (abstract_virtuals_error): Change declaration.
5657         * typeck2.c (abstract_virtuals_error): Check to see if an error
5658         ocurred, and return a boolean value accordingly.
5659         (build_functional_cast): Adjust accordingly.
5660         * class.c (finish_struct_1): Likewise.
5661         * cvt.c (ocp_convert): Likewise.
5662         * decl.c (cp_finish_decl): Likewise.
5663         (grokparams): Likewise.
5664         (grok_op_properties): Likewise.
5665         (start_function): Likewise.
5666         * init.c (build_new_1): Likewise.
5667
5668         * pt.c (unify): Don't get confused by pointers-to-member functions.
5669
5670         * search.c (build_cplus_new): Robustify.
5671         
5672 1999-07-24  Richard Henderson  <rth@cygnus.com>
5673
5674         * gxx.gperf (__builtin_va_arg): New.
5675         * parse.y (VA_ARG): New token.
5676         (unary_expr): Recognize it.
5677
5678 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
5679
5680         * g++FAQ.texi: Deleted per Joe Buck's request.
5681         * Makefile.in: Corresponding changes.
5682
5683 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
5684
5685         * lex.c: Sync with C frontend.
5686         (whitespace_cr): New fn.
5687         (skip_white_space): Use it.
5688         (init_parse): Reorder.
5689         (yyprint): Support CONSTANT.
5690         (pragma_getc, pragma_ungetc): Bring back.
5691         (read_line_number): Change in_system_header directly.
5692         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
5693         (parse_float): Update to C version.
5694         (yylex): Handle '$' under the letter case.
5695         Remove looking_for_typename handling.
5696         Support hex floating point constants.
5697         Follow C's lead for choosing type of integer constants.
5698         Rearrange stuff to match C frontend.
5699         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
5700         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
5701
5702 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
5703
5704         * call.c (reference_binding): Tweak.
5705         (mayble_handle_implicit_object): Use direct_reference_binding to
5706         create the right implicit conversion sequence.
5707
5708 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
5709
5710         * pt.c (convert_nontype_argument): Don't call decl_constant_value
5711         if we're converting to a reference type.
5712
5713         * call.c (NEED_TEMPORARY_P): New macro.
5714         (standard_conversion): Set it, for derived-to-base conversions.
5715         (reference_related_p): New function.
5716         (reference_compatible_p): Likewise.
5717         (convert_class_to_reference): Likewise.
5718         (direct_reference_binding): Likewise.
5719         (reference_binding): Rework for standards-compliance.
5720         (convert_like): Adjust accordingly.
5721         (maybe_handle_ref_bind): Simplify; the right conversion sequences
5722         are now built up in reference_binding.
5723         (initialize_reference): New function.
5724         * cp-tree.h (ICS_USER_FLAG): Document.
5725         (ICS_THIS_FLAG): Likewise.
5726         (ICS_BAD_FLAG): Likewise.
5727         (NEED_TEMPORARY_P): Likewise.
5728         (cp_lvalue_kind): New type.
5729         (real_lvalue_p): Return it.
5730         * error.c (dump_expr): Provide more accurate representation for
5731         AGGR_INIT_EXPRs.
5732         * init.c (expand_default_init): Do not try to perform implicit
5733         conversions for a brace-enclosed initializer.
5734         * search.c (lookup_conversions): Document.
5735         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
5736         appropriately.
5737         (real_lvalue_p): Adjust accordingly.
5738         (lvalue_p): Likewise.
5739         (build_cplus_new): Don't allow the creation of an abstract class.
5740         * typeck.c (convert_for_initialization): Use initialize_reference.
5741         
5742 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
5743
5744         * lex.c (real_yylex) : Correct the test for overflow when lexing
5745         integer literals.
5746
5747 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
5748
5749         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
5750         not DECL_BUILT_IN, to determine if a function is internally declared.
5751         (duplicate_decls): Likewise.  Improve handling of builtins.
5752         (push_overloaded_decl): Remove special handling of builtins.
5753
5754         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
5755
5756         * decl.c (grokdeclarator): Pull out decl_constant_value in
5757         templates, too.
5758
5759         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
5760         * cp-tree.h, pt.c, semantics.c: Adjust.
5761         * method.c (largest_union_member): Remove.
5762
5763         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
5764
5765         * lex.c (token_getch, token_put_back): New fns.
5766         (real_yylex): Use them.
5767
5768         * lex.c (lang_init): Generalize.
5769         (lang_init_options): Tell cpplib this is C++.
5770         (nextchar): Remove.  Replace uses with put_back.
5771         (skip_white_space): Handle linemode here.  Optimize for cpplib.
5772         (extend_token_buffer_to): New fn.
5773         (extend_token_buffer): Use it.
5774         (read_line_number, check_newline): Just deal with tokens.
5775         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
5776         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
5777         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
5778         * parse.y (PAREN_STAR_PAREN): Remove.
5779         * input.c: Don't use the putback machinery with cpplib.
5780         (sub_getch): Fold back into getch.
5781         (getch): Don't handle linemode here.
5782         (feed_input): Unget any text in the token buffer.
5783
5784         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
5785         nextyychar, nextyylval): Remove.
5786
5787 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
5788             Jason Merrill  <jason@yorick.cygnus.com>
5789
5790         * lex.c (indent_level): New variable.
5791         (init_parse): Set cpp_token to CPP_DIRECTIVE.
5792         (consume_string): Make this smart about USE_CPPLIB.
5793         (yyungetc): Use put_back function.
5794         (pragma_getc, pragma_ungetc): Functions deleted.
5795         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
5796         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
5797         pragma_ungetc.
5798         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
5799         Also, clean up cases where we redundantly set token_buffer[0].
5800         (read_line_number): New fn.
5801         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
5802         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
5803         (sub_getch): Conditionalize out code that's not appropriate if
5804         USE_CPPLIB.
5805         (put_back): Rewrite in case USE_CPPLIB is defined.
5806         (input_redirected): Ditto.
5807
5808 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
5809
5810         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
5811         c_global_trees and accessor macros defined in c-common.h.
5812         (cp_tree_index): New enumeration.
5813         (cp_global_trees): Declare new array.  Add accessor macros for it, and
5814         delete declarations of tree nodes replaced by it.
5815         (builtin_function): Delete macro, add declaration for new function.
5816         Include c-common.h.
5817         * decl.c: Delete definitions for tree nodes that were replaced by
5818         cp_global_trees and c_global_trees.
5819         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
5820         to generate the common builtins here.
5821         (builtin_function): New function.
5822         * decl2.c (abort_fndecl): Delete declaration.
5823         * except.c (expand_builtin_return_address): Delete declaration.
5824         (builtin_return_address_fndecl): Delete variable.
5825         (const_ptr_type_node): Delete declaration.
5826         * lex.c (cons_up_default_function): Delete declaration of
5827         void_list_node.
5828         * parse.y (void_list_node): Delete declaration.
5829         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
5830         Delete variables.
5831         (const_string_type_node): Delete declaration.
5832         * search.c (abort_fndecl): Delete declaration.
5833         * Makefile.in: Update dependencies.
5834
5835 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
5836
5837         * pt.c (check_default_tmpl_args): Move test for missing default
5838         arguments here, from ...
5839         (end_template_parm_list): Here.
5840
5841 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
5842
5843         * decl.c (lookup_nested_type): Remove.
5844         (pushtag): Don't call it.
5845
5846 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
5847
5848         * Makefile.in (INTERFACE): Bump to 2.
5849
5850 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
5851         
5852         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
5853         instructions to gcc.gnu.org.  Removed e-mail address.
5854
5855 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
5856
5857         * pt.c (determine_specialization): Tighten error-checking.
5858         (end_template_parm_list): Likewise.
5859
5860 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
5861
5862         * pt.c (check_default_tmpl_args): Handle friends defined in the
5863         class just like member functions defined in the class.
5864
5865 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
5866             Jason Merrill  <jason@yorick.cygnus.com>
5867
5868         * cp-tree.h (struct lang_decl): Added field for storing sorted
5869         FIELD_DECLs (used in TYPE_DECLs).
5870         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
5871         (DECL_SORTED_FIELDS): New macro.
5872         * class.c (method_name_cmp): New function.
5873         (finish_struct_methods): Modified to support sorting and searching
5874         methods.
5875         (finish_struct_anon): Changed code in inner loop to use ELT rather 
5876         than UELT (which required an extra indirection for every reference).
5877         (field_decl_cmp): New function to support sorting FIELD_DECLs.
5878         (finish_struct_1): Sort fields.
5879         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
5880         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
5881         Also, switch to using array indexing rather than a changing pointer.
5882         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
5883         DECL_SORTED_FIELDS.
5884
5885 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
5886
5887         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
5888         casts in system headers or extern "C" blocks.
5889
5890         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
5891         errors to pedwarn.
5892
5893 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
5894
5895         * decl2.c (write_virtuals): Deleted declaration.
5896         * cp-tree.h (write_virtuals): Deleted extern declaration.
5897         * class.c (finish_struct_1): Removed #if 0'd code that mentions
5898         write_virtuals.
5899         * semantics.c (begin_class_definition): Rewrite code to not depend
5900         on write_virtuals.
5901
5902         * lex.c (cp_pragma_interface): New function.
5903         (cp_pragma_implementation): Likewise.
5904         (handle_cp_pragma): Call them.
5905
5906         * typeck.c (comptypes): Simplify C code in look_hard.
5907
5908         * xref.c (PALLOC): Use xcalloc, not calloc.
5909         (SALLOC): Use xmalloc, not malloc.
5910
5911         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
5912
5913         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
5914         is NO_DEBUG.
5915
5916         * decl.c (duplicate_decls): If a redeclaration doesn't match the
5917         initial declaration, then don't save the inline info and by all
5918         means don't mark the function as a builtin function.
5919
5920         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
5921         CURRENT_CLASS_TYPE is 0.
5922
5923         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
5924         NULL_TREE.
5925
5926         * ptree.c (print_lang_type): Added vtable-needs-writing.
5927
5928 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
5929
5930         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
5931
5932 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
5933
5934         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
5935         Merged into c-common.
5936
5937 1999-07-05  Dave Brolley  <brolley@cygnus.com>
5938
5939         * lex.c (errorcount): Declare it.
5940         (finish_parse): Update errorcount for when using CPPLIB.
5941
5942 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
5943
5944         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
5945         parameters.
5946         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
5947         * decl.c (push_class_binding): Use it.
5948         (lookup_name_real): Likewise.
5949
5950 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
5951
5952         * cp-tree.h (widest_integer_literal_type_node,
5953         widest_unsigned_literal_type) : New.
5954         * decl.c (widest_integer_literal_type_node,
5955         widest_unsigned_literal_type) : New.
5956         (init_decl_processing): Handle/use the two new types.
5957         * lex.c (real_yylex): Same.
5958         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
5959         Same. 
5960
5961 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
5962
5963         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
5964         to anonymous cv-qualified types.
5965
5966 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
5967
5968         * lex.c (real_yylex) : Change integer literal overflow handling to
5969         be like c-lex.c.
5970
5971         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
5972
5973 1999-06-28  Richard Henderson  <rth@cygnus.com>
5974
5975         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
5976
5977 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
5978
5979         * error.c (dump_type_real): Handle TREE_LIST again.
5980
5981         * typeck.c (comp_target_parms): Don't complain about 
5982         converting from () to (...) if !flag_strict_prototype.
5983
5984         * decl.c (grokdeclarator): Update the names of all variants when
5985         de-anonymizing.
5986
5987 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
5988
5989         * init.c (expand_aggr_vbase_init): Rename to
5990         construct_virtual_bases.  Conditionalize construction here, 
5991         rather than ...
5992         (emit_base_init): Here.
5993
5994 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
5995
5996         * semantics.c (finish_asm_stmt): Apply decay conversions to
5997         input operands.
5998
5999         * decl.c (expand_static_init): When building an anonymous function
6000         for use with atexit, compute its body before and after entering
6001         the function.
6002
6003         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
6004         EXIT_EXPR.
6005         
6006 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
6007
6008         * init.c (expand_aggr_vbase_init): Add flag parameter.
6009         (build_partial_cleanup_for): Remove, inlining into ..
6010         (expand_cleanup_for_base): ... here.  Take flag parameter.
6011         (emit_base_init): Pass the in_chrg parameter to
6012         emit_aggr_vbase_init. 
6013         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
6014         
6015 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
6016
6017         * decl2.c (import_export_decl): Use same_type_p, rather than
6018         relying on pointer-equality for types.
6019
6020         * method.c (do_build_copy_constructor): Simplify.
6021
6022         * call.c (build_method_call): Remove bogus code for two-argument
6023         delete.
6024         * init.c (build_new_1): Expand on comment, and remove dead code.
6025
6026         * init.c (expand_cleanup_for_base): New function, split out
6027         from ...
6028         (emit_base_init): Here.
6029         (expand_aggr_vbase_init): Use it.
6030
6031 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
6032
6033         * cp-tree.h (class_cache_firstobj): Declare.
6034         (maybe_push_cache_obstack): Rename to push_cache_obstack.
6035         * class.c (permanent_obstack): Remove declaration.
6036         (class_cache_firstobj): Make it global.
6037         (add_method): Don't use permanent_obstack directly.
6038         (pushclass): Only free the class_cache_obstack if we know how far
6039         back to free it.
6040         (maybe_push_cache_obstack): Rename to push_cache_obstack.
6041         * decl.c: Remove dead comment.
6042         (saved_scope): Add class_cache_firstobj.
6043         (push_to_top_level): Save it.
6044         (pop_from_top_level): Restore it.
6045         (push_class_level_binding): Use push_cache_obstack, not
6046         maybe_push_cache_obstack.
6047         * search.c (push_class_decls): Likewise.
6048         
6049 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6050
6051         * pt.c (tsubst_friend_function): Push into namespace of friend
6052         function before pushdecl'ing it.
6053
6054 1999-06-14  Nathan Sidwell  <nathan@acm.org>
6055
6056         * call.c (build_new_op): Remove REF_BIND from all operands.
6057
6058 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
6059
6060         * init.c (build_new_1): Look up operator delete even if there was
6061         no explicit new placement.
6062
6063 1999-06-08  Nathan Sidwell  <nathan@acm.org>
6064
6065         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
6066         of ...
6067         (build_throw): ... here. Call it.
6068         (process_start_catch_block): Call it.
6069
6070 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
6071
6072         * search.c (convert_pointer_to_single_level): Reimplement without
6073         using get_binfo.
6074
6075 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
6076
6077         * method.c (is_back_referenceable_type): Back-reference bools when
6078         not squangling.
6079
6080 1999-06-07  Dave Brolley  <brolley@cygnus.com>
6081
6082         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
6083         * input.c (putback_buffer): New structure type.
6084         (putback): Replaces putback_char member.
6085         (putback): Replaces putback_char static variable.
6086         (feed_input): Use putback.
6087         (end_input): Use putback.
6088         (sub_getch): Use putback.
6089         (put_back): Use putback.
6090
6091 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
6092
6093         * decl.c (grokdeclarator): Fix typo in last change.
6094
6095 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
6096
6097         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
6098         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
6099
6100 1999-06-04  Nathan Sidwell  <nathan@acm.org>
6101
6102         * except.c (build_throw): Check throw expression validity.
6103
6104 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
6105
6106         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
6107         just because flag_signed_bitfields is false.
6108
6109 1999-06-03  Nathan Sidwell  <nathan@acm.org>
6110
6111         * semantics.c (begin_class_definition): Update the struct's
6112         location here ...
6113         * class.c (finish_struct): ... rather than here.
6114
6115         * decl.c (make_typename_type): Don't rely on uninitialized
6116         variable.
6117
6118 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6119
6120         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
6121
6122 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
6123
6124         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
6125         and friends rather than messing with current_obstack directly.
6126         (cp_build_qualified_type_real): Rework ARRAY_TYPE
6127         allocation to match practice throughout the rest of the 
6128         compiler.
6129
6130 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
6131
6132         * lex.c (make_lang_type): Create TYPE_BINFO for
6133         TEMPLATE_TYPE_PARMs just like for non-template types.
6134
6135         * decl.c (start_decl): Move checks on initialization to ...
6136         (cp_finish_decl): Here.  Tidy formatting slightly.
6137
6138 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
6139
6140         * decl.c (add_binding): Don't complain about a redeclaration of a
6141         semantically identical typedef in a local scope.
6142
6143 1999-05-28  Nathan Sidwell  <nathan@acm.org>
6144
6145         * decl.c (complete_array_type): Allocate off same obstack. Fix
6146         DO_DEFAULT comment to match reality.
6147
6148         * friend.c (make_friend_class): Fix diagnostic typo.
6149
6150 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
6151
6152         * decl.c (lookup_namespace_name): Handle getting a
6153         TEMPLATE_ID_EXPR.
6154         (expand_static_init): Don't call pushdecl for implicitly declared
6155         `atexit' used to register destructors.
6156
6157 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
6158
6159         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
6160         intialize a vtable.
6161
6162         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
6163         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
6164         by combining TEMPLATE_INFO and LEVEL into a single union.
6165         (DECL_TEMPLATE_INFO): Reformat.
6166         (DECL_SAVED_TREE): Document.
6167         (DECL_TEMPLATE_INJECT): Remove.
6168         * class.c (finish_struct): Remove code to deal with
6169         DECL_TEMPLATE_INJECT. 
6170
6171         * decl.c (maybe_process_template_type_declaration): Handle all new
6172         types in templates uniformly.
6173         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
6174         DECL_CONTEXT.
6175         * pt.c (lookup_template_class): Inject template instantiations of
6176         forward-declarations.
6177         (instantiate_class_template): Remove code processing
6178         DECL_TEMPLATE_INJECT.
6179         
6180         * pt.c (lookup_template_class): Tweak lookup to find member
6181         templates.
6182
6183         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
6184         ASM_CV_QUAL.
6185         * semantics.c (finish_asm_stmt): Make strings permanent if they're
6186         used in a template.
6187         
6188 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
6189
6190         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
6191         parts of pointer to data member types.
6192
6193 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
6194
6195         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
6196         and then make it look like `abort'.  Just use `abort' instead.
6197         
6198         * typeck.c (build_static_cast): Don't allow static_casts that cast
6199         away constness.
6200         (casts_away_constness_r): New function.
6201         (casts_away_constness): Likewise.
6202
6203         * decl.c (lookup_tag): Remove code no longer needed after
6204         name-lookup improvements.
6205         * decl2.c (handle_class_head): Make error-recovery more robust.
6206         * friend.c (make_friend_class): Reject templated typename types.
6207         * lex.c (is_global): A template parameter isn't global.
6208         * parse.y (class_head): Robustify.
6209         * parse.c: Regenerated.
6210         
6211 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
6212
6213         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
6214         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
6215         
6216         * cp-tree.h (push_nested_namespace): Declare.
6217         (pop_nested_namespace): Likewise.
6218         * decl.c (push_nested_namespace): New function.
6219         (pop_nested_namespace): Likewise.
6220         * pt.c (instantiate_class_template): Use them.
6221
6222         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
6223
6224         * cp-tree.h (cplus_expand_constant): Declare.
6225         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
6226         converted from one pointer-to-object type to another.
6227         * expr.c (cplus_expand_constant): Don't make it static.
6228         * typeck.c (build_component_ref): Don't crash when presented with
6229         a component which is a TEMPLATE_DECL.
6230         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
6231         cast from a pointer-to-member constant to its own type does not
6232         result in a valid non-type template argument.
6233
6234 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
6235             Nathan Sidwell  <nathan@acm.org>
6236         
6237         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
6238         * cp-tree.h: Fix typo in documentation on pointers-to-members.
6239         (cp_build_qualified_type): Make it a macro.
6240         (cp_build_qualified_type_real): Declare.
6241         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
6242         problem with template parameters and restrict-qualification.
6243         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
6244         * hash.h: Regenerated.
6245         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
6246         the enumeration.
6247         (NORID): Remove definition.
6248         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
6249         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
6250         (fn_type_unification): Check that the function type resulting from
6251         the deduction is legal.
6252         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
6253         (unify): Use cp_build_qualified_type_real.
6254         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
6255         (cp_build_qualified_type): Rename to ...
6256         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
6257         and modify appropriately.
6258         
6259         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
6260         reveal optimization opportunities.
6261
6262         * pt.c (tsubst): Don't issue error messages when we're not
6263         complaining, even if we see a qualified function type.
6264         (check_cv_quals_for_unify): Don't allow a qualified function
6265         type.
6266
6267 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
6268
6269         * class.c (instantiate_type): Downgrade errors for object-dependent
6270         memfn refs to pedwarn.
6271
6272 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
6273
6274         * decl.c (grokdeclarator): Don't treat [] as indicating a
6275         zero-sized array in a typedef.
6276
6277         * call.c (build_object_call): Don't look at DECL_NAME for a type.
6278         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
6279         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
6280
6281         * pt.c (for_each_template_parm): Rework to match documentation.
6282         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
6283
6284 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
6285
6286         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
6287
6288         * class.c (finish_base_struct): Allow non-COM bases for COM classes
6289         except at the leftmost position.
6290         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
6291         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
6292         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
6293
6294         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
6295         (build_cplus_new): Make sure that what we return is of the right type.
6296
6297 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
6298
6299         * cp-tree.h (make_ptrmem_cst): New function.
6300         * expr.c (cplus_expand_constant): Split out from ...
6301         (cplus_expand_expr): Here.  Use cplus_expand_constant.
6302         (init_cplus_expand): Set lang_expand_constant.
6303         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
6304
6305         * tree.c (make_ptrmem_cst): Define.
6306         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
6307         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
6308
6309 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
6310
6311         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
6312
6313         * decl2.c (start_static_storage_duration_function): Fix comment.
6314         (finish_file): Create static storage duration functions lazily.
6315
6316 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
6317
6318         Implement anonymous structs.
6319         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
6320         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
6321         * class.c (finish_struct_1): Remove redundant check for anon struct.
6322         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
6323         (check_tag_decl): Check for anonymous struct here.
6324         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
6325         * init.c (sort_member_init, emit_base_init): Handle getting fields
6326         as well as names in current_member_init_list.
6327         (perform_member_init): Handle getting an anon aggr.
6328         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
6329         (do_build_copy_constructor): Likewise.
6330
6331 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
6332
6333         * tree.c (cp_build_qualified_type): Don't allow qualified function
6334         types.
6335
6336 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
6337
6338         * gxxint.texi: Fix typo.
6339
6340 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
6341
6342         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
6343         * class.c (finish_struct_1): Use CLASS_TYPE_P.
6344         * ptree.c (print_lang_type): Likewise.
6345         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
6346         IS_AGGR_TYPE_CODE.
6347         * typeck2.c (digest_init): Likewise.
6348
6349 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
6350
6351         * call.c (joust): Compare the types of the conv ops, not the
6352         target types of the conversions.
6353
6354 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6355
6356         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
6357         was not given.
6358
6359 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
6360
6361         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
6362         * decl.c (grokfndecl): Don't allow inline declarations of friend
6363         template specializations, or friend template specializations with
6364         default arguments.
6365         * pt.c (tsubst): Handle substitution into array types that does
6366         not yield a fixed upper bound, even when not processing a
6367         template.
6368         (tsubst_copy): Deal with the fact that the second operand to a
6369         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
6370         * search.c (marked_pushdecls_p): Don't descend into
6371         TEMPLATE_TYPE_PARMs and the like.
6372         (unmarked_pushdecls_p): Likewise.
6373         
6374         * call.c (build_over_call): Don't throw away
6375         initializations/copies of empty classes; use MODIFY_EXPR and
6376         INIT_EXPR as for non-empty classes.
6377         * class.c (finish_struct_1): Put the padding byte for an empty
6378         class on the TYPE_NONCOPIED_PARTS list for the class.
6379
6380 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
6381
6382         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
6383         indicate a reference to a field that is a qualified name.
6384
6385 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
6386
6387         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
6388         ASM_OUTPUT_CONSTRUCTOR.
6389
6390         * friend.c (do_friend): Add attrlist arg.  Remove support for
6391         getting a non-decl as 'decl'.
6392         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
6393         rtl.
6394         (grokdeclarator): Adjust.
6395         * cp-tree.h: Adjust.
6396
6397 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
6398
6399         * cp-tree.h (permanent_p): New function.
6400         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
6401         possibly complex tree node.
6402         * tree.c (mapcar): Adjust comments, and follow coding standards in
6403         conditional.
6404         (permanent_p): New function.
6405
6406 1999-05-13  Per Bothner  <bothner@cygnus.com>
6407
6408         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
6409         primitive Java types, if we actually see `extern "Java"'.
6410
6411 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6412
6413         * lang-specs.h: Pass -$ to the preprocessor.
6414
6415 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
6416
6417         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
6418         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
6419         (resolve_offset_ref): Don't handle a raw baselink.
6420         * cvt.c (build_expr_type_conversion): Likewise.
6421         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
6422         convert_for_initialization): Likewise.
6423         * class.c (instantiate_type): Handle seeing a baselink under an
6424         OFFSET_REF.
6425         * error.c (dump_expr): Likewise.        
6426         * pt.c (for_each_template_parm): Likewise.
6427         (resolve_overloaded_unification): Likewise.
6428         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
6429         * typeck.c (expr_sizeof): Also complain about other permutations
6430         of overloaded functions.
6431
6432 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
6433
6434         * init.c (resolve_offset_ref): Don't return a raw method.
6435         Use BASELINK_P.
6436         * typeck.c (decay_conversion): Don't handle a raw method.
6437         Resolve all OFFSET_REFs.
6438         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
6439         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
6440         same_type_p for pmf bits.  Don't use build_binary_op to compare
6441         raw pointers to methods.
6442         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
6443         to decide when to call resolve_offset_ref.
6444         (build_c_cast, convert_for_initialization): Likewise.
6445         * cvt.c (build_expr_type_conversion): Likewise.
6446
6447 1999-05-06  Nathan Sidwell  <nathan@acm.org>
6448
6449         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
6450
6451 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
6452
6453         * decl2.c (start_objects): Don't let static constructors and
6454         destructors get inlined.
6455
6456         * parse.y (nested_name_specifier): Make sure ordinary types are
6457         complete, just like template types.
6458         * parse.c: Regenerated.
6459
6460         * pt.c (check_explicit_specialization): Improve error messages.
6461
6462 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6463
6464         * typeck.c (string_conv_p): Use same_type_p to check whether we
6465         try to convert between char and wchar_t.
6466
6467 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
6468
6469         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
6470         lookup to error_mark_node here.
6471         (lookup_member): Revise documentation.  Add comments.  Don't set
6472         the TREE_TYPE to error_mark_node here, and don't build up an extra
6473         TREE_LIST for ambiguous lookups.
6474         (setup_class_bindings): Adjust accordingly.
6475         (push_class_decls): Revise out-of-date comments.
6476         
6477         * typeck.c (build_const_cast): Tighten checks for legality.
6478
6479 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6480
6481         * init.c (build_member_call): Lookup names coming from
6482         namespace-scoped LOOKUP_EXPR.
6483
6484 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
6485
6486         * gxxint.texi: Add documentation for 'I'.
6487
6488 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6489
6490         * tinfo.cc (operator==): Qualify type_info with std::.
6491
6492 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
6493
6494         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
6495         (DECL_COMDAT): Remove definition.
6496
6497 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
6498
6499         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
6500         change.
6501
6502 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
6503
6504         * class.c (build_vtable): Use build_lang_decl when building
6505         vtables, not just build_decl.
6506         (prepare_fresh_vtable): Likewise.
6507         * decl.c (wrapup_globals_for_namespace): Mark vtables as
6508         DECL_EXTERNAL when calling wrapup_global_declarations.
6509         * decl2.c (priority_info_s): Add initializations_p and
6510         destructions_p members.
6511         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
6512         when deciding what vtables to write out.
6513         (ssdf_decls): New variable.
6514         (ssdf_decls_used): Likewise.
6515         (start_static_storage_duration_function): Deal with being called
6516         multiple times.  Avoid inlining this function.
6517         (generate_inits_for_priority): Deal with reuse of priority map.
6518         (get_priority_info): Clear initializations_p and destructions_p.
6519         (do_static_initialization): Tweak comment.
6520         (do_static_destruction): Likewise.  Fix condition on sentries for
6521         destruction.
6522         (generate_ctor_or_dtor_function): Call all of the static storage
6523         duration functions.
6524         (generate_ctor_or_dtor_function_for_priority): Check
6525         initializations_p and destructions_p to see what priorities need
6526         initialization functions.
6527         (finish_file): Rework to generate multiple static storage duration
6528         functions, rather than just one.
6529
6530         * typeck.c (build_const_cast): Tweak last change to handle
6531         templates correctly.
6532
6533         * typeck.c (build_const_cast): Disallow use of const_cast to
6534         anything but a pointer or reference type.
6535
6536 1999-04-30  Nathan Sidwell  <nathan@acm.org>
6537
6538         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
6539         signature type.
6540
6541 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
6542
6543         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
6544         (finish_file): Indent comments properly.
6545
6546 1999-04-29  Richard Henderson  <rth@cygnus.com>
6547
6548         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
6549         (do_static_destruction): Likewise.
6550
6551 1999-04-29  Nathan Sidwell  <nathan@acm.org>
6552
6553         * cp-tree.h (TYPE_NOTHROW_P): New macro.
6554         * decl2.c (delete_sanity): Warn on deleting void *.
6555         * init.c (build_new_1): Use TYPE_NOTHROW_P.
6556         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
6557         throwing operator new.
6558
6559 1999-04-28  Nathan Sidwell  <nathan@acm.org>
6560
6561         * cp-tree.h (build_component_addr): Remove prototype.
6562         * typeck.c (build_component_addr): Make static. Remove MSG
6563         argument.
6564         (build_component_addr): Remove MSG parameter, clean up
6565         comment.
6566         (build_x_function_call): Use cp_error.
6567         (build_unary_op): Adjust call of build_component_addr.
6568
6569 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
6570
6571         * pt.c (tsubst_friend_class): Check for NULL.
6572
6573 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
6574
6575         * search.c (binfo_for_vtable): Initialize bfvi.var.
6576
6577 1999-04-27  Nathan Sidwell  <nathan@acm.org>
6578
6579         * rtti.c (build_x_typeid): Check rtti is enabled.
6580
6581 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
6582
6583         * search.c (is_subobject_of_p): Make sure we're looking at the
6584         right baseclasses.
6585
6586 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
6587
6588         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
6589
6590 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
6591
6592         * decl2.c (finish_file): Tweak handling of extern inlines so that
6593         they are not unnecessarily put out.
6594
6595         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
6596         such as base classes.
6597
6598 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
6599
6600         * tree.c (build_exception_variant): Fix typo: use the chain of U,
6601         not trying V, while cycling through U.
6602
6603 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
6604
6605         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
6606         preserves_first_arg.  Enlarge dummy accordingly.
6607         (DECL_TINFO_FN_P): New macro.
6608         (SET_DECL_TINFO_FN_P): Likeiwse.
6609         (DECL_RETURNS_FIRST_ARG): Remove.
6610         (DECL_PRESERVES_THIS): Likewise.
6611         (DECL_INIT_PRIORITY): New macro.
6612         (finish_struct_1): Change prototype.
6613         (cat_namespace_levels): Remove prototype.
6614         (vtable_decl_p): New prototype.
6615         (vtype_decl_p): Likewise.
6616         (sigtable_decl_p): Likewise.
6617         (walk_globals_pred): New typedef.
6618         (walk_globals_fn): Likewise.
6619         (walk_globals): New prototype.
6620         (walk_namespaces_fn): New typedef.
6621         (walk_namespaces): New prototype.
6622         (wrapup_globals_for_namespace): Likewise.
6623         (walk_vtables): Remove prototype.
6624         (walk_sigtables): Likewise.
6625         (instantiate_pending_templates): New prototype.
6626         * class.c (finish_struct_1): Don't return a value.
6627         * decl.h (pending_statics): Remove declaration.
6628         * decl.c (walk_namespaces_r): New function.
6629         (walk_globals_r): Likewise.
6630         (vtable_decl_p): Likewise.
6631         (vtype_decl_p): Likewise.
6632         (sigtable_decl_p): Likewise.
6633         (walk_namespaces): Likewise.
6634         (walk_globals_data): New type.
6635         (walk_globals): New function.
6636         (wrapup_globals_for_namespace): Likewise.
6637         (expand_static_init): Remove assertion.  Remove redundancy in
6638         conditional.  Don't put static data members in static_aggregates
6639         Tidy.
6640         (finish_function): Remove redundancy in conditional.  Don't set
6641         DECL_RETURNS_FIRST_ARG.
6642         (cat_namespace_levels): Remove.
6643         * decl2.c: Include splay-tree.h and varray.h.
6644         (priority_info_s): New structure.
6645         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
6646         conventions.
6647         (prune_vtable_vardecl): Likewise.
6648         (finish_sigtable_vardecl): Likewise.
6649         (setup_initp): Remove.
6650         (do_dtors): Remove.
6651         (do_ctors): Remove.
6652         (start_static_storage_duration_function): New function.
6653         (generate_inits_for_priority): Likewise.
6654         (finish_static_storage_duration_function): Likewise.
6655         (get_priority_info): Likewise.
6656         (do_static_initialization): Likewise.
6657         (do_static_destruction): Likewise.
6658         (do_static_initialization_and_destruction): Likewise.
6659         (generate_ctor_or_dtor_function): Likewise.
6660         (generate_ctor_and_dtor_functions_for_priority): Likewise.
6661         (pending_statics): Make it a varray.
6662         (pending_statics_used): New variable.
6663         (saved_inlines): Make it a varray.
6664         (saved_inlines_used): New variable.
6665         (finish_static_data_member): Change method of updating
6666         pending_statics.
6667         (mark_inline_for_output): Remove #if 0'd code.  Change method of
6668         updating saved_inlines.
6669         (walk_vtables): Remove.
6670         (walk_sigtables): Likewise.
6671         (import_export_decl): Use DECL_TINFO_FN_P.
6672         (pending_templates): Remove declaration.
6673         (maybe_templates): Likewise.
6674         (static_aggregates_initp): Likewise.
6675         (setup_initp): Likewise.
6676         (finish_objects): Simplify.
6677         (INITIALIZE_P_IDENTIFIER): New macro.
6678         (PRIORITY_IDENTIFIER): New macro.
6679         (SSDF_IDENTIFIER): New macro.
6680         (initialize_p_decl): New variable.
6681         (priority_decl): Likewise.
6682         (ssdf_decl): Likewise.
6683         (priority_info_map): Likewise.
6684         (finish_file): Recode output of static intializers and other
6685         file-scope finalization tasks.
6686         * error.c (OB_END_TEMPLATE_ID): New macro.
6687         (dump_type_real): Use it.
6688         (dump_decl): Likewise.
6689         (dump_function_name): Likewise.
6690         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
6691         interface.
6692         (check_newline): Use walk_globals, not walk_vtables.
6693         * pt.c (pending_tempalte_expansions): Remove.
6694         (set_vardecl_interface_info): Likewise.
6695         (pending_templates): Make static.
6696         (maybe_templates): Likewise.
6697         (instantiate_class_template): Adjust call to finish_struct_1.
6698         (instantiate_pending_templates): New function.
6699         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
6700         * tree.c (static_aggregates_initp): Remove.
6701         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
6702         instead.
6703         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
6704
6705         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
6706         with the RTL code RETURN.
6707         * hash.h: Regenerated.
6708         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
6709         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
6710         * parse.c: Regenerated.
6711         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
6712         it.
6713         (inline_parm_levels): New variable.
6714         (inline_parm_levels_used): Likewise.
6715         (maybe_begin_member_template_processing): Update them.
6716         (maybe_end_member_template_processing): Use them, rather than
6717         guessing how many levels to pop.
6718
6719         * decl.c (make_typename_type): Tighten error-checking.
6720
6721 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
6722
6723         * cp-tree.h (build_binary_op): Remove unneeded parameter.
6724         * class.c (build_vrable_entry_ref): Adjust call to
6725         build_binary_op.
6726         * decl.c (expand_static_init): Likewise.
6727         (grokdeclarator): Likewise.
6728         (finish_function): Likewise.
6729         * decl2.c (delete_sanity): Likewise.
6730         (do_dtors): Likewise.
6731         (do_ctors): Likewise.
6732         * error.c (dump_type_suffix): Likewise.
6733         * expr.c (cplus_expand_expr): Likewise.
6734         * init.c (resolve_offset_ref): Likewise.
6735         (build_new): Likewise.
6736         (build_new_1): Likewise.
6737         (build_vec_delete_1): Likewise.
6738         (expand_vec_init_catch_clause): Likewise.
6739         (build_delete): Likewise.
6740         * pt.c (tsubst): Likewise.
6741         * rtti.c (synthesize_tinfo_fn): Likewise.
6742         * search.c (expand_upcast_fixups): Likewise.
6743         (expand_direct_vtbls_init): Likewise.
6744         * typeck.c (get_member_function_from_ptrfunc): Likewise.
6745         (build_binary_op_nodefault): Likewise.
6746         (point_int_sum): Likewise.
6747         (pointer_diff): Likewise.
6748         (build_unary_op): Likewise.
6749         (build_modify_expr): Likewise.
6750         (get_delta_difference): Likewise.
6751         (build_ptrmemfunc): Likewise.
6752         (expand_ptrmemfunc_cst): Likewise.
6753
6754 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
6755
6756         * decl.c (grokfndecl): Always call cplus_decl_attributes.
6757         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
6758
6759 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
6760
6761         * cp-tree.h (finish_static_data_member_decl): New function.
6762         * decl2.c (finish_static_data_member_decl): Split out from ...
6763         (grokfield): Here.
6764         * pt.c (instantiate_class_template): Use it here instead of
6765         trying to fake it.
6766         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
6767         finish_static_data_member_decl will do that.  Explicit set
6768         DECL_EXTERNAL to match non-template processing.
6769
6770 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
6771
6772         * cp-tree.h (finish_class_definition): Add parameter.
6773         * parse.y (structsp): Use it.  Don't call pop_scope here.
6774         * parse.c: Regenerated.
6775         * semantics.c (finish_class_definition): Pop it here.
6776
6777 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
6778
6779         * decl.c (xref_tag): Revise handling of nested template
6780         declarations.
6781         * pt.c (check_explicit_specialization): Tweak handling of friend
6782         templates in template classes.
6783         (tsubst_friend_class): Handle friend declarations for nested
6784         member template classes.
6785
6786 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
6787
6788         * class.c (finish_struct): Remove unused variable.
6789         (pushclass): Likewise.
6790         (invalidate_class_lookup_cache): Likewise.
6791         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
6792         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
6793         doesn't get obliterated.
6794         (make_typename_type): Handle template classes correctly.
6795
6796         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
6797         (storetags): Declare.
6798         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
6799         (pushclass): Likewise.  Use storetags to install tag declarations,
6800         not pushtag.
6801         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
6802         * decl.c (storetags): Make it global.
6803         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
6804         implicit typename declaration.
6805         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
6806         * method.c (hack_identifier): Likewise.
6807         * search.c (lookup_member): Likewise.
6808
6809         * decl.c (warn_about_implicit_typename_lookup): New function.
6810         (lookup_name_real): Use it.  Rework handling of implicit typename
6811         extension.
6812
6813 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
6814
6815         * cp-tree.h (lookup_nested_field): Remove.
6816         * class.c (push_nested_class): Handle UNION_TYPEs.
6817         (pop_nested_class): Likewise.
6818         * decl.c (lookup_name_real): Don't call lookup_nested_field.
6819         (start_decl): Use push_nested_class, not just pushclass.
6820         (cp_finish_decl): Use pop_nested_class, not just popclass.
6821         * search.c (lookup_nested_field): Remove.
6822
6823         * cp-tree.h (lang_type): Add documentation.
6824         * decl2.c (handle_class_head): Create template declarations here,
6825         as appropriate.
6826         * parse.y (class_head): Return whether or not we entered a new
6827         scope, as well as the type named.
6828         (named_class_head): Likewise.
6829         (named_complex_class_head_sans_basetype): Likewise.
6830         (structsp): Adjust accordingly.  Pop scope when required.
6831         * parse.c: Regenerated.
6832         * pt.c (check_default_tmpl_args): Robustify.
6833         (redeclare_class_template): Likewise.
6834         (instantiate_class_template): An instantiation of an
6835         anonymous union is itself an anonymous union.
6836         * semantics.c (begin_class_definition): Don't create template
6837         declarations here.
6838
6839 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
6840
6841         * parse.y (after_type_declarator_intern): New nonterminal.
6842         (after_type_declarator): Use it.
6843         (direct_after_type_declarator): Likewise.  Move above
6844         nonnested_type to fix reduce/reduce conflict resolution.
6845         (declmods): Reducing from just 'attributes' has EMPTY precedence.
6846         * Makefile.in (CONFLICTS): Update.
6847
6848         * decl.c (define_label): Downgrade error for jumping over a
6849         non-POD decl to pedwarn.
6850
6851 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
6852
6853         * cp-tree.h (popclass): Change declaration.
6854         (pop_nested_class): Likewise.
6855         (poplevel_class): Remove declaration.
6856         * call.c (convert_default_argument): Pass no arguments to
6857         popclass.
6858         * class.c (finish_struct_1): Likewise.
6859         (finish_struct): Likewise.
6860         (popclass): Remove argument.  Simplify code accordingly.
6861         (pop_nested_class): Likewise.
6862         * decl.c (poplevel_class): Declare it here, and make it static.
6863         (poplevel): Handle class scopes.
6864         (poplevel_class): Don't take an rgument.  Simplify.
6865         (pop_everything): Pass no arguments to pop_nested_class.
6866         (cp_finish_decl): Pass no arguments to popclass.
6867         (grokdeclarator): Pass no arguments to pop_nested_class.
6868         (finish_function): Likewise.
6869         * decl2.c (grokfield): Likewise.
6870         (pop_scope): Pass no arguments to popclass.
6871         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
6872         * pt.c (instantiate_class_template): Move call to pushclass, and
6873         document.  Pass no arguments to popclass.
6874         (regenerate_decl_from_template): Likewise.
6875
6876 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
6877
6878         * typeck.c (build_unary_op): Handle taking the address of a unique
6879         bound non-static member function.
6880
6881 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6882
6883         * lang-options.h (-Wdeprecated): New flag.
6884         * decl2.c (warn_deprecated): New flag.
6885         (lang_decode_option): Deprecated this-is-variable,
6886         external-templates, alt-external-templates.
6887         Support -Wdeprecated.
6888         * errfn.c (cp_deprecated): New function.
6889
6890 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
6891
6892         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
6893         of the decls themselves.
6894
6895         * pt.c (tsubst_function_type): Copy attributes over.
6896
6897         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
6898         and com_interface.
6899         * cp-tree.h: Add prototype.
6900         * decl.c (init_decl_processing): Set valid_lang_attribute.
6901
6902 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
6903
6904         * class.c (finish_struct_1): Look at the const-ness of the field's
6905         type, not the TREE_READONLY-ness of the declaration.
6906         * method.c (synthesize_method): Likewise.
6907         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
6908         creating new declarations.
6909
6910 1999-04-13  Mike Stump  <mrs@wrs.com>
6911
6912         * decl2.c (import_export_decl): Because vtables always reference
6913         virtual functions, even if they are inlined, don't allow
6914         -fno-implement-inlines to not emit them, instead, emit them with
6915         the vtable.
6916         * decl.c (start_function): Likewise.
6917
6918 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
6919
6920         * cp-tree.h (struct lang_type): Add com_interface.
6921         (CLASSTYPE_COM_INTERFACE): New macro.
6922         * class.c (set_rtti_entry): COM interface classes have no RTTI
6923         entries in their vtables; adjust.
6924         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
6925         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
6926         finish_struct_1): Likewise.
6927         * decl2.c (mark_vtable_entries): Likewise.
6928         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
6929         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
6930         expand_upcast_fixups): Likewise.
6931         * tree.c (debug_binfo): Likewise.
6932
6933         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
6934         * typeck.c (comptypes): If we get it, ignore attributes.
6935         * class.c (instantiate_type): Use BASELINK_P.  Change complain
6936         parameter to flags; 2 means ignore attributes.
6937         * call.c (build_op_delete_call): Pass it.
6938
6939         * decl.c (xref_tag): Only complain once about using a typedef-name
6940         with 'struct'.  Downgrade to pedwarn.
6941
6942         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
6943
6944         * parse.y (absdcl_intern): New nonterminal.
6945         (absdcl, direct_abstract_declarator): Use it.
6946
6947         * pt.c (lookup_template_class): Look through implict typename.
6948
6949 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
6950
6951         * friend.c (add_friend): Deal gracefully with error_mark_node.
6952         * method.c (build_overload_value): Handle pointers-to-members as
6953         template parameters.
6954
6955         * decl.c (push_binding): Fix typo in comment.
6956
6957 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
6958
6959         * error.c (dump_type_real): If a typename is a template-id, put
6960         out the template arguments.
6961         (dump_expr): Handle TEMPLATE_ID_EXPR.
6962         * pt.c (lookup_template_class): Now that full arguments are
6963         available everywhere, remove code that tried to guess them.
6964
6965 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
6966
6967         * decl.c (make_typename_type): Complain if we don't find a type
6968         when trying to make a typename type for a non-template type.
6969
6970 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
6971
6972         * decl.c (start_decl): Pass attributes to grokdeclarator.
6973         (grokdeclarator): Handle attributes on constructor-syntax
6974         initializers.
6975
6976 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
6977
6978         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
6979         don't have types.
6980
6981         * search.c (template_self_reference_p): Tweak.
6982
6983 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
6984
6985         * init.c (build_offset_ref): Don't build yet another weird data
6986         structure to describe overloaded functions.
6987
6988 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
6989
6990         * cp-tree.h (BASELINK_P): New macro.
6991         (SET_BASELINK_P): Likewise.
6992         * init.c (build_member_call): Remove needless assignment in if
6993         statement.
6994         * search.c (lookup_field_r): Fix handling when we are looking
6995         specifically for a type; these are not hidden by functions and
6996         variables.
6997         (lookup_member): Use SET_BASELINK_P.
6998         * tree.c (is_overloaded_fn): Use BASELINK_P.
6999         (really_overloaed_fn): Likewise.
7000         (get_first_fn): Likewise.
7001
7002 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
7003
7004         * decl.c (lookup_name_current_level): Tweak, and improve
7005         documentation.
7006
7007         * class.c (maybe_fixup_vptrs): Remove declaration.
7008         (build_class_init_list): Likewise.
7009         * decl.c (pushdecl_class_level): Call check_template_shadow here
7010         ...
7011         (push_class_level_binding): ... not here.
7012         * search.c (dfs_push_type_decls): Only avoid
7013         template-self-reference TYPE_DECLs if they are from base classes.
7014
7015 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
7016
7017         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
7018         nodes.  Tidy.
7019
7020 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
7021
7022         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
7023         (finish_struct_1): Don't call build_class_init_list.
7024
7025 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
7026
7027         * tinfo.h (__class_type_info): Fix illegal declaration.
7028
7029         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
7030         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
7031         (IDENTIFIER_CLASS_VALUE): Improve documentation.
7032         (is_properly_derived_from): Declare.
7033         (invalidate_class_lookup_cache): Likewise.
7034         (maybe_maybe_note_name_used_in_class): Likewise.
7035         (note_name_declared_in_class): Likewise.
7036         (push_using_decl): Remove duplicate declaration.
7037         (id_in_current_class): Remove declaration.
7038         (push_class_binding): Change prototype.
7039         (clear_identitifer_class_values): Declare.
7040         * call.c (is_properly_derived_from): Make it global.
7041         (build_new_function_call): Be careful about updating candidates.
7042         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
7043         asked to make illegal calls.
7044         * class.c: Include splay-tree.h.
7045         (class_stack_node): Add names_used slot.
7046         (check_member_decl_is_same_in_complete_scope): Remove.
7047         (add_method): Fix comment.  Push the declaration into class
7048         scope.
7049         (finish_struct_1): When popping the class, pop the bindings too.
7050         Remove check for data member/function member conflict.
7051         (finish_struct): Remove calls to
7052         check_member_decl_is_same_in_complete_scope.  Change calls to
7053         popclass.
7054         (pushclass): Clear names_used in the class stack entry.
7055         Use invalidate_class_lookup_cache to remove cached entries, rather
7056         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
7057         before entering a new class.  Remove dead code.  Don't mess with
7058         current_function_decl when pushing declarations.
7059         (invalidate_class_lookup_cache): New function, split out from ...
7060         (popclass): Here.  Clean up names_used on our way out.
7061         (instantiate_type): Adjust.
7062         (build_self_reference): Don't push the declaration here.
7063         (maybe_note_name_used_in_class): New function.
7064         (note_name_declared_in_class): Likewise.
7065         * decl.c (add_binding): Change prototype.
7066         (find_class_binding_level): New function.
7067         (innermost_nonclass_level): Likewise.
7068         (current_binding_level): Update documentation.
7069         (inner_binding_level): Remove.  Replace with current_binding_level
7070         throughout.
7071         (push_binding_level): Remove special handling of
7072         class_binding_level.
7073         (pop_binding_level): Likewise.  Use find_class_binding_level.
7074         (suspend_binding_level): Likewise.
7075         (global_bindings_p): Use innermost_nonclass_level.
7076         (toplevel_bindings_p): Likewise.
7077         (namespace_bindings_p): Likewise.
7078         (pseudo_global_level_p): Likewise.
7079         (push_binding): Clear INHERITED_VALUE_BINDING_P.
7080         (add_binding): Check for illegal multiple declarations.  Return a
7081         value indicating whether or not the new binding was legal.
7082         (push_local_binding): Skip over class binding levels.  Check
7083         return value from add_binding.
7084         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
7085         note_name_declared_in_class.
7086         (pushlevel_class): Remove "fake out the rest of the compiler"
7087         code.
7088         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
7089         (clear_identifier_class_values): New function.
7090         (pop_from_top_level): Use it.
7091         (pop_everything): Tweak.
7092         (maybe_process_template_type_declaration): Don't push the
7093         declaration for the template here.
7094         (pushtag): Don't push tag declarations into class scope here.
7095         (pushdecl): Apply DeMorgan's law for readability.
7096         (pushdecl_class_level): Remove special-case code for
7097         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
7098         (push_class_level_bindng): Deal with inherited bindings.
7099         (lookup_name_real): Remove special-case code for
7100         TYPE_BEING_DEFINED, and some implicit typename magic.
7101         (grokdeclarator): Handle COMPONENT_REF for a template function.
7102         (build_enumerator): Don't call pushdecl_class_level here.
7103         (id_in_current_class): Remove.
7104         * decl2.c (grokfield): Don't call pushdecl_class_level or
7105         check_template_shadow.
7106         * errfn.c (cp_file_of): Don't declare.
7107         (cp_line_of): Likewise.
7108         * error.c (dump_decl): Handle an OVERLOAD.
7109         (cp_file_of): Likewise.
7110         (cp_line_of): Likewise.
7111         * init.c (build_member_call): Handle a COMPONENT_REF.
7112         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
7113         pushdecl_class_level.
7114         * method.c (hack_identifier): Build COMPONENT_REFs for references
7115         to member templates as well as member functions.  Remove dead
7116         code.
7117         * parse.y (left_curly): Remove.
7118         (nonnested_type): Call maybe_note_name_used_in_class, not
7119         pushdecl_class_level.
7120         * parse.c: Regenerated.
7121         (nested_name_specifier_1): Likewise.
7122         * pt.c (check_explicit_specialization): Adjust, for robustness.
7123         (check_template_shadow): Handle OVERLOADs.
7124         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
7125         TEMPLATE_DECL, if appropriate.
7126         * search.c (envelope_add_decl): Remove.
7127         (dfs_pushdecls): Likewise.
7128         (dfs_compress_decls): Likewise.
7129         (dfs_push_decls): New function.
7130         (dfs_push_type_decls): Likewise.
7131         (setup_class_bindings): Likewise.
7132         (template_self_reference_p): Likewise.
7133         (lookup_field_r): Use it.
7134         (looup_member): Remove old comment.  Deal with ambiguity.
7135         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
7136         and remove envelope processing.
7137         * semantics.c (begin_class_definition): Let pushclass push
7138         declarations for base classes.
7139         (finish_member_declaration): Push declarations into class scope.
7140         * typeck.c (build_component_ref): Just put an OVERLOAD into the
7141         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
7142         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
7143         * Makefile.in (class.o): Depend on splay-tree.h.
7144
7145 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
7146
7147         * cvt.c (convert_pointer_to_real): Use same_type_p.
7148         * typeck.c (comp_target_types): Use same_type_p.
7149
7150 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
7151
7152         * semantics.c (begin_inline_definitions,
7153         finish_inline_definitions): Rename from finish_default_args and
7154         begin_inline_definitions, respectively, to something that isn't a
7155         total lie.  :)
7156         * parse.y (structsp): Adjust.
7157
7158         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
7159         (list_hash_lookup): Likewise.
7160         (hash_tree_chain): Adjust.
7161         * pt.c (tsubst): Adjust.
7162         (tsubst_arg_types): Use plain hash_tree_cons.
7163         * cp-tree.h (hash_tree_cons_simple): Lose.
7164         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
7165
7166 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7167
7168         * Makefile.in (hash.h): Generate using gperf language 'C', not
7169         'KR-C', so gperf uses the `const' keyword on strings.
7170
7171         * gxx.gperf (resword): Const-ify a char*.
7172
7173 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
7174
7175         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
7176         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
7177         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
7178         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
7179         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
7180         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
7181         tree.c: Adjust.
7182
7183 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
7184
7185         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
7186
7187 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
7188
7189         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
7190
7191 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
7192
7193         * cp-tree.h (add_friend): Declare.
7194         (add_friends): Likewise.
7195         * friend.c (add_friend): Make it global.  Don't add to
7196         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
7197         (add_friends): Make it global.
7198         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
7199         befriending class is a template.
7200         * parse.y (component_decl_1): Fix typo in comment.
7201         * parse.c: Regenerated.
7202         * pt.c (instantiate_class_template): Use add_friend and
7203         add_friends rather that duplicating some of their functionality
7204         here.
7205
7206 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
7207
7208         * call.c (build_field_call): Unify 'this' and non-'this' cases.
7209
7210         * typeck.c (build_indirect_ref): Check for 'this' sooner.
7211
7212 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7213
7214         * call.c (op_error): Const-ify a char*.
7215         (add_candidate, source_type, add_warning): Add static prototype.
7216         (print_z_candidates): Const-ify a char*.
7217
7218         * class.c (resolve_address_of_overloaded_function,
7219         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
7220         (get_vtable_name, finish_struct_1): Const-ify a char*.
7221
7222         * cvt.c (convert_to_reference): Likewise.
7223
7224         * decl.c (redeclaration_error_message, record_builtin_type,
7225         record_unknown_type, member_function_or_else, bad_specifiers):
7226         Likewise.
7227         (find_binding, select_decl, unqualified_namespace_lookup,
7228         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
7229         Add static prototype.
7230         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
7231         implicitly_declare, record_builtin_java_type, define_function,
7232         grok_op_properties, tag_name): Const-ify a char*.
7233
7234         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
7235         (define_function, finish_builtin_type): Const-ify a char*.
7236         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
7237         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
7238         (file_name_nondirectory): Const-ify a char*.
7239         (init_filename_times): Don't prototype.
7240         (compiler_error): Prototype.
7241         (yyerror, init_repo): Const-ify a char*.
7242         (build_srcloc): Don't prototype.
7243         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
7244         Const-ify a char*.
7245         (warn_for_assignment): Don't prototype.
7246         (convert_for_initialization, readonly_error, check_for_new_type,
7247         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
7248         Const-ify a char*.
7249
7250         * decl2.c (acceptable_java_type, output_vtable_inherit,
7251         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
7252         merge_functions, decl_namespace, validate_nonmember_using_decl,
7253         do_nonmember_using_decl): Add static prototype.
7254         (lang_f_options): Const-ify a char*.
7255         (finish_builtin_type): Likewise.
7256         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
7257         prototype.
7258
7259         * errfn.c: Include cp-tree.h.
7260         (cp_thing): Add static prototype.
7261         (compiler_error): Don't protoptype.
7262         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
7263         passing it to `cp_thing'.
7264
7265         * error.c (interesting_scope_p): Add static prototype.
7266
7267         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
7268         a char*.
7269
7270         * init.c (compiler_error): Don't prototype.
7271         (member_init_ok_or_else): Const-ify a char*.
7272         (build_java_class_ref): Add static prototype.
7273
7274         * lex.c (compiler_error): Don't prototype.
7275         (get_time_identifier, interface_strcmp, extend_token_buffer,
7276         handle_cp_pragma): Const-ify a char*.
7277         (is_global, init_filename_times): Add static prototype.
7278         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
7279         (compiler_error): Change from fixed args to variable args.
7280         (yyerror): Const-ify a char*.
7281
7282         * parse.y (cond_stmt_keyword): Const-ify a char*.
7283         (parse_decl): Add static prototype.
7284
7285         * pt.c (template_args_equal, print_template_context): Likewise.
7286         (print_candidates, check_default_tmpl_args): Const-ify a char*.
7287         (instantiate_class_template): Likewise.
7288
7289         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
7290
7291         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
7292         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
7293
7294         * search.c (lookup_field_info, lookup_member): Likewise.
7295         (lookup_member): Cast the first argument of `bzero' to a PTR.
7296
7297         * sig.c (compiler_error): Don't prototype.
7298         (build_signature_pointer_or_reference_nam): Const-ify a char*.
7299         (get_sigtable_name, build_member_function_pointer): Likewise.
7300
7301         * tree.c (compiler_error): Don't prototype.
7302         (no_linkage_helper, build_srcloc): Add static prototype.
7303         (build_vbase_pointer_fields): Const-ify a char*.
7304         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
7305
7306         * typeck.c (compiler_error): Don't prototype.
7307         (convert_for_assignment): Const-ify a char*.
7308         (comp_cv_target_types): Add static prototype.
7309         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
7310         build_component_addr, build_unary_op, convert_for_initialization):
7311         Const-ify a char*.
7312
7313         * typeck2.c (ack): Add static prototype and change from fixed args
7314         to variable args.
7315         (readonly_error, check_for_new_type): Const-ify a char*.
7316
7317         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
7318         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
7319         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
7320         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
7321         gen_assign, GNU_xref_member): Const-ify a char*.
7322
7323 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7324
7325         * gxxint.texi: Remove old discussion on copying virtual bases.
7326
7327 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
7328
7329         * Make-lang.in: Remove all references to g++.o/g++.c.
7330         Link g++ from gcc.o.
7331
7332 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
7333
7334         * decl2.c (comdat_linkage): Treat vtables like functions.
7335
7336 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
7337
7338         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
7339
7340 1999-03-25  Nathan Sidwell  <nathan@acm.org>
7341
7342         * decl.c (init_decl_processing): Add `signed' type as a synonym
7343         for `int'.
7344
7345 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
7346
7347         * typeck.c (common_type): Handle cv-qual unification for pointers
7348         to members.
7349
7350         * decl.c (unqualified_namespace_lookup): Return error_mark_node
7351         on error.
7352         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
7353         * lex.c (do_identifier): If we got error_mark_node, call
7354         lookup_name again.
7355
7356 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7357
7358         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
7359         classes.
7360
7361 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
7362
7363         * decl.c (lookup_name_real): Do nested field lookup regardless of
7364         TYPE_BEING_DEFINED.
7365
7366 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
7367
7368         * cp-tree.h (lang_type): Remove has_assignment and
7369         has_real_assignment.  Add befriending_classes.
7370         (TYPE_HAS_ASSIGNMENT): Remove.
7371         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
7372         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
7373         (lang_decl): Document.
7374         (DECL_BEFRIENDING_CLASSES): New macro.
7375         (FRIEND_NAME): Move declaration to more obvious location.
7376         (FRIEND_DECLS): Likewise.
7377         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
7378         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
7379         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
7380         (grok_op_properties): Likewise.
7381         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
7382         (add_friend): Likewise.  Don't do weird things with assignment
7383         operators.  Update DECL_BEFRIENDING_CLASSES.
7384         (add_friends): Don't do weird things with assignment operators.
7385         (make_friend_class): Likewise.  Update
7386         CLASSTYPE_BEFRIENDING_CLASSES.
7387         * pt.c (instantiate_class_template): Don't set
7388         TYPE_HAS_ASSIGNMENT.
7389         (tsubst_copy): Substitute the TREE_TYPE for more unary
7390         expressions.
7391         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
7392         * search.c (protected_accessible_p): New function.
7393         (friend_accessible_p): Likewise.
7394         (accessible_p): Use them.
7395
7396 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
7397
7398         * pt.c (convert_nontype_argument): Don't create things that aren't
7399         PTRMEM_CSTs when applying a qualification conversion to a
7400         PTRMEM_CST.
7401
7402 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
7403
7404         * Makefile.in (OBJS): Don't mention hash.o.
7405         (OBJDEPS): Likewise.
7406
7407 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
7408
7409         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
7410         * decl.c (expand_static_init): Make sure we don't add any after
7411         then.
7412
7413         * decl.c (cp_finish_decl): Move intelligence about handling
7414         DECL_COMDAT for variables from here...
7415         * decl2.c (comdat_linkage): ...to here.
7416         (maybe_make_one_only): Tweak.
7417         (import_export_decl): Call comdat_linkage for variables, too.
7418         (finish_file): Handle template statics properly.
7419
7420 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
7421
7422         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
7423         Document internals of pointer-to-member-functions.
7424         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
7425         (PFN_FROM_PTRMEMFUNC): Likewise.
7426         (build_type_conversion): Remove unused parameter.
7427         (build_ptrmemfunc1): Declare.
7428         (expand_ptrmemfunc_cst): New function.
7429         (delta2_from_ptrmemfunc): Likewise.
7430         (pfn_from_ptrmemfunc): Likewise.
7431         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
7432         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
7433         (convert_to_reference): Remove unused parameter to
7434         build_type_conversion.
7435         (ocp_convert): Likewise.
7436         (build_user_type_conversion): Likewise.
7437         * error.c (dump_expr): Handle NULL pointer-to-member functions.
7438         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
7439         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
7440         open when handling pointer-to-member functions.
7441         * pt.c (convert_nontype_argument): Clean up error messages.  Be
7442         more stringent with pointers-to-members.
7443         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
7444         (build_unary_op): Tidy ever-so-slightly.
7445         (build_conditional_expr): Remove extra parameter to
7446         build_type_conversion.
7447         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
7448         we're using.
7449         (expand_ptrmemfunc_cst): Define.
7450         (delta2_from_ptrmemfunc): Likewise.
7451         (pfn_from_ptrmemfunc): Likewise.
7452
7453 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
7454
7455         * init.c (build_member_call): Handle template-id expressions
7456         correctly.
7457         * typeck.c (build_x_function_call): Likewise.
7458
7459 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
7460
7461         * friend.c (make_friend_class): Avoid core dump when
7462         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
7463
7464 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
7465
7466         * decl.c (start_function): Suppress normal linkage heuristics
7467         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
7468
7469 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
7470
7471         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
7472         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
7473
7474 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7475
7476         * parse.y (named_complex_class_head_sans_basetype):
7477         Do not push a scope for error_mark_node.
7478         (maybe_base_class_list): Likewise.
7479
7480         * decl.c (start_decl): Check for error_mark_node as a type.
7481         Detected by g++.brendan/array-refs.C.
7482         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
7483         (maybe_build_cleanup_1): Likewise.  Detected by
7484         g++.jason/incomplete1.C.
7485
7486         * tree.c (build_dummy_object): Use void_zero_node instead of the
7487         error_mark_node.
7488         (is_dummy_object): Check for such a node.
7489         Detected by g++.bob/inherit1.C
7490
7491 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
7492
7493         * method.c (old_backref_index): Split out...
7494         (flush_repeats): From here.  Rename back from try_old_backref.
7495         (build_mangled_name): Put back some old-style repeat handling.
7496
7497 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7498
7499         * lex.c: Don't include setjmp.h.
7500         (parse_float): New static function.
7501         (pf_args): New struct.
7502         (real_yylex): Use them in call to `do_float_handler'.
7503
7504 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
7505
7506         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
7507         * tree.c (layout_basetypes): Not here.
7508         * search.c (dfs_search): Remove; no longer used.
7509
7510 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
7511
7512         * decl2.c (validate_nonmember_using_decl): Issue sensible
7513         error-messages on bogus qualifiers.
7514
7515 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
7516
7517         * call.c (add_function_candidate): Fix uninitialized variable.
7518
7519         * Makefile.in (search.o): Add dependency on varray.h.
7520
7521 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
7522
7523         * decl.c (duplicate_decls): Use same_type_p.
7524         * method.c (try_old_backref): Renamed from flush_repeats.  Use
7525         same_type_p.  Don't try to handle repeats.  Return success.
7526         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
7527         calls from old-style code, too.
7528         (check_ktype): Use same_type_p.
7529         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
7530         (build_qualified_name): Simplify logic.
7531         (process_overload_item): Strip typedefs and quals at the top.
7532         (build_mangled_name_for_type_with_Gcode): Remove call to
7533         type_canonical_variant.
7534         (build_mangled_name): Likewise.  Remove support for old-style
7535         repeats, which have been disabled since 2.7.2.  Don't mess with
7536         TREE_USED.
7537         (build_decl_overload_real): Don't mess with TREE_USED.
7538
7539 1999-03-13  Nathan Sidwell  <nathan@acm.org>
7540
7541         * error.c (cp_printers): Add 'F' escape character.
7542         (dump_type_real): Remove TREE_LIST (fnargs) printing.
7543         Functionality moved to dump_parameters.
7544         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
7545         (dump_function_decl): Extend meaning of V parameter.  Use
7546         dump_parameters and dump_exception_spec.
7547         (dump_parameters): New static function.
7548         (dump_exception_spec): New static function.
7549         (fndecl_as_string): Change argument semantics.  Use
7550         dump_function_decl directly.
7551
7552         * sig.c (build_signature_table_constructor): Use cp_error.
7553
7554 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7555
7556         * semantics.c (finish_switch_cond): Handle error cases gracefully.
7557         Detected by g++.law/enum5.C.
7558
7559         * typeck.c (build_modify_expr): Check for errors after resolving
7560         offsets.  Detected by g++.brendan/static1.C.
7561
7562         * decl.c (complete_array_type): Ignore initial_value if it is an
7563         error.  Detected by g++.benjamin/17930.C.
7564
7565         * typeck2.c (process_init_constructor): Return error if one argument
7566         is in error.  Detected by g++.benjamin/13478.C.
7567
7568 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7569
7570         * decl.c (select_decl): Allow class templates when we need types.
7571         * decl2.c (ambiguous_decl): Likewise.
7572
7573 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
7574
7575         * lex.c (do_identifier): Correct call to enforce_access.
7576         * search.c (accessible_p): Tweak comment.
7577
7578 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
7579
7580         * semantics.c (begin_class_definition): Call build_self_reference.
7581         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
7582
7583         * search.c (assert_canonical_unmarked): Fix typo in prototype.
7584
7585         * search.c (dfs_canonical_queue): New function.
7586         (dfs_assert_unmarked_p): Likewise.
7587         (assert_canonical_unmarked): Likewise.
7588         (access_in_type): Use it.
7589         (accessible_p): Likewise.  Walk the whole tree when umarking.
7590
7591         * sig.c (build_signature_table_constructor): Use accessible_p
7592         instead of compute_access.
7593
7594 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
7595
7596         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
7597
7598 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
7599
7600         * cp-tree.h (flag_access_control): Declare.
7601         (TREE_VIA_PPUBLIC): Document.
7602         (DECL_NONSTATIC_MEMBER_P): New macro.
7603         (enforce_access): Return an indication of whether or not access
7604         was permitted.
7605         (build_self_reference): Change prototype.
7606         (compute_access): Replace with ...
7607         (accessible_p): New function.
7608         (dfs_walk): Change prototype.
7609         (dfs_unmark): Likewise.
7610         (markedp): Likewise.
7611         * call.c (enforce_access): Use accessible_p.
7612         * class.c (build_self_reference): Insert the declaration into the
7613         list of members for this type, and make it public.
7614         * decl.c (xref_basetypes): Avoid ill-timed recursion.
7615         * init.c (build_offset_ref): Use lookup_member, not three separate
7616         name-lookups.  Call enforce_access rather than checking for
7617         illegal accesses here.
7618         (resolve_offset_ref): Likewise.
7619         * lex.c (do_identifier): Likewise.
7620         * method.c (hack_identifier): Likewise.
7621         * parse.y (self_reference): Remove.
7622         (opt_component_decl_list): Don't use it.
7623         * parse.c: Regenerated.
7624         * pt.c (print_candidates): Generalize to handle lists of
7625         overloaded functions.
7626         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
7627         not set.
7628         (get_template_base): Use new calling convention for dfs_walk.
7629         * search.c: Include varray.h.  Add prototypes.
7630         (dfs_walk): Accept a data pointer to pass to the work functions.
7631         All callers changed.  All work functions changed.
7632         (breadth_first_search): Rename to bfs_walk, and make consistent
7633         with dfs_walk.
7634         (dfs_walk_real): New function.
7635         (canonical_binfo): New function.
7636         (context_for_name_lookup): Likewise.
7637         (shared_marked_p): Likewise.
7638         (shared_unmarked_p): Likewise.
7639         (lokup_field_queue_p): Likewise.
7640         (lookup_field_r): Generalize to handle both functions and fields.
7641         (lookup_field): Just call lookup_member.
7642         (lookup_fnfields): Likewise.
7643         (lookup_member): Move body of lookup_field here and generalize.
7644         (dfs_accessible_queue_p): Likewise.
7645         (dfs_accessible_p): Likewise.
7646         (dfs_access_in_type): Likewise.
7647         (access_in_type): Likewise.
7648         (compute_access): Remove, and replace with ...
7649         (accessible_p): New function.
7650         (vbase_types): Remove.
7651         (vbase_decl_ptr_intermediate): Likewise.
7652         (vbase_decl_ptr): Likewise.
7653         (vbase_init_result): Likewise.
7654         (closed_envelopes): Likewise.
7655         (bvtable): Likewise.
7656
7657 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
7658
7659         * call.c (add_function_candidate): Check for proper number of args
7660         before checking the validity of those args.
7661
7662 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
7663
7664         * cp-tree.h (struct lang_type): Add anon_union field.
7665         (ANON_UNION_TYPE_P): Use it instead of examining type.
7666         (SET_ANON_UNION_TYPE_P): New macro.
7667         * decl.c (check_tag_decl): Use it.
7668
7669         * search.c (compute_access): Handle non-type contexts earlier, and
7670         handle NULL_TREE.
7671
7672         * tree.c (build_exception_variant): Use copy_to_permanent.
7673
7674         * decl2.c (setup_initp): Give statics with no priority the default
7675         priority here.
7676         (do_dtors, do_ctors, finish_file): Remove special handling of
7677         non-prioritized statics.
7678
7679 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
7680
7681         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
7682         * decl.c (make_typename_type): Don't issue an error if an
7683         immediate lookup fails; it migt be resolved later.
7684         * friend.c (is_friend): Add comment.
7685         * search.c (breadth_first_search): Add POSTFN and DATA
7686         parameters.  Tidy.  All callers changed.
7687         (lookup_field_queue_p): New function.
7688         (lookup_field_r): Likewise.
7689         (lookup_field_post): Likewise.
7690         (lookup_field): Use them, via breadth_first_search, instead of
7691         duplicating logic.
7692         (compute_access): Robustify.
7693         (lookup_fnfield_info): New structure.
7694
7695 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
7696
7697         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
7698
7699 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
7700
7701         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
7702         cc happy.
7703
7704         * decl2.c (import_export_class): Also return if
7705         CLASSTYPE_INTERFACE_ONLY is set.
7706
7707 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7708
7709         * decl.c (push_overloaded_decl): Only overwrite the old binding if
7710         there was one.
7711         * decl2.c (do_local_using_decl): Fix loop termination.
7712
7713 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
7714
7715         * cp-tree.h (determine_specialization): Don't declare.
7716         * pt.c (determine_specialization): Make it static.  Eliminate
7717         complain parameter.  Note that decl is always non-NULL now, and
7718         simplify accordingly.
7719
7720         * decl.c (maybe_push_to_top_level): Always call
7721         push_cp_function_context.
7722         (pop_from_top_level): Always call pop_cp_function_context.
7723
7724 1999-02-26  Nathan Sidwell  <nathan@acm.org>
7725
7726         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
7727         diagnostics.
7728         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
7729         * init.c (build_new_1): Extra arg to complete_type_or_else.
7730         (build_delete): Likewise.
7731         * typeck.c (require_complete_type): Likewise.
7732         (pointer_int_sum): Likewise.
7733         (pointer_diff): Likewise.
7734         (build_component_ref): Likewise.
7735
7736         * typeck2.c (incomplete_type_error): Always use cp_error.
7737         Show declaration of undefined type, if appropriate.
7738         Deal with UNKNOWN_TYPE nodes.
7739
7740         * typeck.c (require_complete_type): Use TYPE_SIZE as
7741         size_zero_node to mean incomplete type.
7742         (require_complete_type_in_void): New function.
7743         (build_compound_expr): Call complete_type_in_void for LHS.
7744         (build_c_cast): Call complete_type_in_void for void cast.
7745         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
7746         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
7747         require_complete_type_in_void.  Call it.
7748         * cp-tree.h (require_complete_type_in_void): Prototype new function.
7749
7750         * typeck.c (convert_arguments): Use alternative format for
7751         function decls.  Don't require_complete_type here.  Simplify
7752         diagnostic printing.
7753         (convert_for_initialization): Don't require_complete_type on RHS yet.
7754         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
7755
7756         * call.c (build_over_call): Cope with qualified void return type.
7757         * semantics.c (finish_call_expr): Likewise.
7758         * typeck.c (build_function_call_real): Likewise.
7759         (c_expand_return): Likewise.
7760         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
7761
7762         * call.c (print_z_candidates): Use alternate print format, to be
7763         consistent with (pt.c) print_candidates.
7764         * method.c (hack_identifier): List candidate members.
7765         * search.c (lookup_field): Build ambiguous list, and show it, if
7766         ambiguous.
7767
7768 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
7769
7770         * typeck.c (decay_conversion): Don't confuse constant array
7771         variables with their initializers.
7772
7773         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
7774         merging decls.
7775         * pt.c (regenerate_decl_from_template): Tweak for clarity.
7776         (instantiate_decl): Mark a decl instantiated before regenerating
7777         it to avoid recursion.
7778         * tree.c (mapcar): Don't call decl_constant_value unless we know
7779         something is TREE_READONLY_DECL_P.
7780
7781         * class.c (check_for_override): Don't stop checking when we find
7782         the first overridden function.  Delete #if 0'd code.
7783         * search.c (get_matching_virtual): Likewise.
7784
7785 1999-02-25  Richard Henderson  <rth@cygnus.com>
7786
7787         * lang-specs.h: Define __FAST_MATH__ when appropriate.
7788
7789 1999-02-24  Mike Stump  <mrs@wrs.com>
7790
7791         * typeck.c (convert_for_assignment): Allow boolean integral constant
7792         expressions to convert to null pointer.
7793
7794 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
7795
7796         * decl.c (lookup_namespace_name): Resolve namespace aliases.
7797
7798         * class.c (push_nested_class): Allow namespaces.
7799
7800         * decl2.c (set_decl_namespace): Add friendp parameter.
7801         * decl.c (grokfndecl): Pass it.
7802         (grokvardecl): Likewise.
7803         * cp-tree.h: Change declaration.
7804
7805 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
7806
7807         * pt.c (tsubst): Allow an array of explicit size zero.
7808
7809 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
7810
7811         * errfn.c: Change varargs code to look like toplev.c.
7812
7813         * method.c (process_modifiers): Don't prepend 'U' for char or
7814         wchar_t.
7815
7816 1999-02-20  Craig Burley  <craig@jcb-sc.com>
7817
7818         * Make-lang.in (cplib2.ready): Don't consider updating
7819         cplib2 stuff if the current directory isn't writable, as
7820         it won't work (such as during a `make install').
7821
7822 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
7823
7824         * decl2.c (start_objects): Make file scope constructors and
7825         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
7826         ASM_OUTPUT_DESTRUCTOR are defined.
7827
7828 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
7829
7830         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
7831         (fn_type_unification): Adjust prototype.
7832         (lookup_fnfields_1): Declare.
7833         * call.c (add_template_candidate_real): Adjust call to
7834         fn_type_unification.
7835         * class.c (add_method): Don't allow duplicate declarations of
7836         constructors or destructors.
7837         (resolve_address_of_overloaded_function): Remove unused variable.
7838         Adjust call to fn_type_unification.
7839         * decl.c (grokfndecl): Be more robust in the face of illegal
7840         specializations.
7841         * decl2.c (check_classfn): Remove hokey handling of member
7842         templates.
7843         * pt.c (determine_specialization): Improve comments.  Adjust to
7844         handle template argument deduction as per the standard.
7845         (check_explicit_specialization): Fix comment spacing.  Handle
7846         type-conversion operators correctly.  Improve error-recovery.
7847         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
7848         (get_bindings_real): Simplify handling of static members.
7849         * search.c (lookup_fnfields_1): Make it have external linkage.
7850         * typeck.c (compparms): Fix comment.
7851         (build_unary_op): Don't try to figure out which template
7852         specialization is being referred to when when the address-of
7853         operator is used with a template function.
7854
7855 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7856
7857         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
7858         keyword to match an analogous change at the top level.
7859
7860         * tree.c (lvalue_or_else): Likewise.
7861
7862 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
7863
7864         * decl.c (xref_basetypes): Comment.
7865         * pt.c (instantiate_class_template): Use xref_basetypes.
7866
7867 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
7868
7869         * cp-tree.h (tsubst): Change prototype.
7870         (tsubst_expr): Likewise.
7871         (tsubst_copy): Likewise.
7872         (type_unification): Remove prototype.
7873         * call.c (convert_default_arg): Adjust call to tsubst_expr.
7874         * class.c (resolve_address_of_overloaded_function): Just use
7875         fn_type_unification.
7876         * decl.c (grokdeclarator): Adjust call to tsubst.
7877         * method.c (build_template_parm_names): Likewise.
7878         * pt.c (GTB_VIA_VIRTUAL): New macro.
7879         (GTB_IGNORE_TYPE): Likewise.
7880         (resolve_overloaded_unification): Add `complain' parameter.
7881         (try_one_overload): Likewise.
7882         (tsubst_template_arg_vector): Likewise.
7883         (tsubst_template_parms): Likewise.
7884         (tsubst_aggr_type): Likewise.
7885         (tsubst_arg_types): Likewise.
7886         (tsubst_call_declarator_parms): Likewise.
7887         (unify): Remove explicit_mask.
7888         (type_unification_real): Likewise.
7889         (get_template_base_recursive): Likewise.
7890         (coerce_template_template_parms): Provide prototype.
7891         (tsubst_function_type): Likewise.
7892         (try_class_unification): New function.
7893         All callers changed to use new complain parameter.
7894         (get_template_base): Use try_class_unification.
7895         (unify): Adjust handling of classes derived from template types.
7896         (fn_type_unification): Substitute explicit arguments before
7897         unification.
7898
7899 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
7900
7901         * decl.c (pushdecl): Remove dead code.
7902
7903 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
7904
7905         * decl2.c (finish_objects): Fix code I missed in previous change.
7906
7907 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
7908
7909         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
7910         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
7911
7912         * pt.c (maybe_process_partial_specialization): Complain about
7913         'template <>' on non-specialization.
7914
7915 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
7916
7917         * decl.c (grokdeclarator): Catch wierd declarators.
7918         * decl2.c (finish_file): Don't abort because of namespace parsing
7919         failure.
7920         (check_decl_namespace): Remove.
7921
7922 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
7923
7924         * cp-tree.h (get_template_base): Don't declare.
7925         (dfs_walk): Declare.
7926         (dfs_unmark): Likewise.
7927         (markedp): Likewise.
7928         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
7929         targs to get_template_base.
7930         (get_template_base_recursive): Move here from search.c.  Check to
7931         see that the base found can be instantiated to form the desired
7932         type.
7933         (get_template_base): Likewise.
7934         (get_class_bindings): Simplify.
7935         * search.c (get_template_base_recursive): Move to pt.c.
7936         (get_template_base): Likewise.
7937         (markedp): Make it global.
7938         (dfs_walk): Likewise.
7939         (dfs_unmark): Likewise.
7940
7941 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
7942
7943         * pt.c (maybe_process_partial_specialization): Complain about
7944         specialization in wrong namespace.
7945         * tree.c (decl_namespace_context): New fn.
7946
7947 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
7948
7949         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
7950         * pt.c (coerce_template_template_parms): Handle nested
7951         template template parameters.
7952
7953 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
7954
7955         * typeck2.c: Update email addresses.
7956
7957 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
7958
7959         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
7960         turned off.
7961
7962 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
7963
7964         * lex.c (retrofit_lang_decl): Split out...
7965         (build_lang_decl): From here.
7966         * decl.c (pushdecl): Call it for functions generated by the middle
7967         end that don't have DECL_LANG_SPECIFIC.
7968         * cp-tree.h: Declare it.
7969
7970         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
7971         (start_objects, finish_objects): Only use special
7972         init_priority code if the user specified a priority.
7973         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
7974         objects.
7975
7976 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
7977
7978         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
7979         mkstemp.o.  Get them from libiberty now.
7980         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
7981
7982 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
7983
7984         * decl2.c (lang_decode_option): Use read_integral_parameter.
7985
7986 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
7987
7988         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
7989         before calling complete_type_or_else.
7990
7991 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7992
7993         * input.c (inline): Don't define, its handled by system.h.
7994
7995 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
7996
7997         * decl2.c: Don't define flag_no_ident here.  Don't process
7998         -f(no-)ident here.
7999         * cp-tree.h: Don't declare flag_no_ident here.
8000         * lang-specs.h: Map -Qn to -fno-ident.
8001
8002 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
8003
8004         * cp-tree.h (struct tree_binding): Replace scope field with a union.
8005         (BINDING_SCOPE): Adjust.
8006         * decl.c (BINDING_LEVEL): Adjust.
8007
8008 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
8009
8010         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
8011         member constants.
8012
8013         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
8014         a ctor initializer.
8015
8016         * tree.c (equal_functions): Fix name in prototype.
8017
8018         * decl.c (push_local_binding): Add FLAGS argument.
8019         (pushdecl, push_overloaded_decl): Pass it.
8020         * decl2.c (do_local_using_decl): Likewise.
8021         * cp-tree.h: Adjust prototype.
8022         * decl.c (poplevel): Fix logic.
8023
8024         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
8025         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
8026         (cat_namespace_levels): Don't loop forever.
8027
8028 1999-01-25  Richard Henderson  <rth@cygnus.com>
8029
8030         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
8031
8032 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
8033
8034         * class.c (resolve_address_of_overloaded_function): Mark the
8035         chosen function used.
8036
8037         * call.c (build_call): Make sure that a function coming in has
8038         been marked used already.
8039         * decl.c (expand_static_init): Call mark_used instead of
8040         assemble_external.
8041         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
8042         alloc_eh_object, expand_throw): Likewise.
8043         * init.c (build_builtin_delete_call): Likewise.
8044         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
8045         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
8046         expand_generic_desc): Likewise.
8047
8048 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8049
8050         * tree.c (equal_functions): New function.
8051         (ovl_member): Call it.
8052
8053 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
8054
8055         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
8056
8057 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
8058
8059         * decl.c (decls_match): Return 1 if old and new are identical.
8060         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
8061
8062 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
8063
8064         * decl.c (start_function): Make member functions one_only on windows.
8065         * decl2.c (import_export_decl): Likewise.
8066
8067         * decl.c (grokdeclarator): Don't complain about implicit int in
8068         a system header.  Change same-name field check to not complain in
8069         a system header instead of within extern "C".
8070
8071 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
8072
8073         * cp-tree.h (PUSH_GLOBAL): New macro.
8074         (PUSH_LOCAL): Likewise.
8075         (PUSH_USING): Likewise.
8076         (namespace_bindings_p): Declare.
8077         (push_overloaded_decl): Likewise.
8078         * decl.c (push_overloaded_decl): Don't make it static.  Check for
8079         illegal declarations after using declarations here.
8080         (namespace_bindings_p): Likewise.
8081         (duplicate_decls): Don't consider declarations from different
8082         namespaces to be the same.
8083         (pushdecl): Use symbolic PUSH_ constants in calls to
8084         push_overloaded_decl.
8085         (push_overloaded_decl_1): Likewise.
8086         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
8087         (do_nonmember_using_decl): Check for illegal using declarations
8088         after ordinary declarations here.
8089         (do_local_using_decl): Call pushdecl to insert declarations.
8090
8091 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
8092
8093         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
8094
8095 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
8096
8097         * tree.c (build_cplus_array_type_1): Don't call build_array_type
8098         for types involving template parameters.
8099
8100         * cp-tree.h (PARM_DECL_EXPR): Delete.
8101         (convert_default_arg): Change prototype.
8102         (check_default_argument): Declare.
8103         (search_tree): Likewise.
8104         * call.c (convert_default_arg): Take the function to which the
8105         default argument belongs as a parameter, and do any necessary
8106         instantiation here, instead of ...
8107         (build_over_call): Here.
8108         * decl.c (local_variable_p): New function.
8109         (check_default_argument): Likewise, split out and tidied from ...
8110         (grokparms): Here.
8111         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
8112         * pt.c (tsubst_call_declarator_parms): New function.
8113         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
8114         with CALL_EXPRs, rather than trying to be clever.
8115         (tsubst): Use tsubst_call_declarator_parms.
8116         * tree.c (search_tree): Don't make it static.
8117         * typeck.c (convert_arguments): Use new interface to
8118         convert_default_arg.
8119
8120 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
8121
8122         * error.c (dump_function_decl): Don't print the argument types for
8123         a function when the verbosity level is negative.
8124
8125         * call.c (build_over_call): Check format attributes at call-time.
8126
8127         * pt.c (tsubst_copy): Fix comment.
8128         (unify): Don't allow unification with variable-sized arrays.
8129
8130         * semantics.c (finish_stmt_expr): When processing a template make
8131         the BIND_EXPR long-lived.
8132
8133 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
8134
8135         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
8136         (import_export_vtable): Not here.
8137
8138 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
8139
8140         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
8141         non-static member function.
8142
8143 1999-01-18  Nathan Sidwell  <nathan@acm.org>
8144
8145         * class.c (instantiate_type): Only diagnose illegal address of member
8146         function if complaining.
8147
8148         * decl.c (lookup_name_real): Remove duplicate code.
8149
8150 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
8151
8152         * tree.c (copy_template_template_parm): Use permanent_obstack.
8153
8154 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8155
8156         * pt.c (unify): Remove restrictions on deduction of argument
8157         of template template parameters.
8158
8159 1999-01-18  Nathan Sidwell  <nathan@acm.org>
8160
8161         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
8162
8163         * class.c (resolve_address_of_overloaded_function): Show list of
8164         all candidates, when none of them match.
8165
8166 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
8167
8168         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
8169         definition of 'casting away const' in reinterpret_cast<>.
8170
8171 1999-01-18  Graham  <grahams@rcp.co.uk>
8172
8173         * cvt.c: Add include for decl.h, remove extern for
8174         static_aggregates which is now provided by decl.h.
8175
8176         * Makefile.in (cvt.o): Add dependency for decl.h and missing
8177         dependencies for convert.h and flags.h.
8178
8179 1999-01-18  Nathan Sidwell  <nathan@acm.org>
8180
8181         * decl2.c (do_dtors): Set current location to that of the
8182         decl, for sensible diagnostics and debugging.
8183         (check_classfn): Issue `incomplete type' error, if
8184         class is not defined.
8185
8186 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
8187
8188         * cp-tree.h: Add prototype for bound_pmf_p.
8189
8190 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
8191             Manfred Hollstein <manfred@s-direktnet.de>
8192
8193         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
8194         -Wreturn-type.
8195
8196 1999-01-16  Nathan Sidwell  <nathan@acm.org>
8197
8198         * cp-tree.h (struct lang_type): Added has_mutable flag.
8199         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
8200         (TYPE_HAS_MUTABLE_P): New macro to read it.
8201         (cp_has_mutable_p): Prototype for new function.
8202         * class.c (finish_struct_1): Set has_mutable from members.
8203         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
8204         it contains a mutable.
8205         * typeck.c (cp_has_mutable_p): New function.
8206
8207 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
8208
8209         * pt.c (process_template_parm): Ignore top-level qualifiers on
8210         non-type parameters.
8211
8212         * decl.c (start_function): Use current_function_parms in the call
8213         to require_complete_type_for_parms, not the probably empty
8214         DECL_ARGUMENTS.
8215
8216 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
8217
8218         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
8219
8220         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
8221         that we don't suppress the other copies.
8222         * lex.c (handle_cp_pragma): Likewise.
8223
8224 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
8225
8226         * decl.c (grokdeclarator): Undo 1998-12-14 change.
8227         * tree.c (build_cplus_array_type_1): Likewise.
8228         * pt.c (instantiate_class_template): Remove misleading comment.
8229         (tsubst_aggr_type): Substitute if there are template parameters,
8230         regardless of whether or not they use template arguments.
8231         (unify): Likewise, but for unification.
8232
8233 1999-01-12  Richard Henderson  <rth@cygnus.com>
8234
8235         * cp-tree.h (flag_permissive): Declare extern.
8236
8237 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
8238
8239         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
8240         here.
8241         (lang_type): Add is_partial_instantiation.  Decrease width of
8242         dummy.
8243         (PARTIAL_INSTANTIATION_P): New macro.
8244         (OPERATOR_TYPENAME_P): Remove.
8245         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
8246         OPERATOR_TYPENAME_P.
8247         (grok_op_properties): Likewise.
8248         * friend.c (do_friend): Handle friends that are member functions
8249         correctly.
8250         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
8251         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
8252         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
8253         any more partial instantiation than is absolutely necessary for
8254         implicit typename.  Set PARTIAL_INSTANTIATION_P.
8255         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
8256         * semantics.c (begin_class_definition): Handle partial
8257         specializations of a type that was previously partially
8258         instantiated.
8259
8260 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
8261
8262         * g++spec.c (LIBSTDCXX): Provide default definition.
8263         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
8264
8265 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8266
8267         * Make-lang.in (g++.o): Depend on prefix.h.
8268
8269 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
8270
8271         * tree.c (bound_pmf_p): New fn.
8272         * typeck.c (build_c_cast): Use it.
8273
8274         * decl.c (grok_op_properties): Use same_type_p.
8275
8276 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8277
8278         * Makefile.in (cvt.o): Depend on toplev.h.
8279
8280         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
8281
8282         * cvt.c: Include toplev.h.
8283
8284         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
8285         definitions.
8286
8287         * init.c (expand_vec_init): Initialize variable `itype'.
8288
8289         * lex.c (yyerror): Cast the argument passed to a ctype function to
8290         an unsigned char.
8291
8292         * method.c (build_mangled_C9x_name): Wrap prototype and definition
8293         in "HOST_BITS_PER_WIDE_INT >= 64".
8294
8295         * typeck.c (build_binary_op): Mark parameter `convert_p' with
8296         ATTRIBUTE_UNUSED.
8297
8298 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
8299
8300         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
8301         * tree.c (build_exception_variant): Don't crash on empty throw
8302         specs.
8303
8304 1998-12-18  DJ Delorie  <dj@cygnus.com>
8305
8306         * cvt.c (convert_to_reference): Check for both error_mark_node
8307         and NULL_NODE after call to convert_for_initialization.
8308
8309 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
8310
8311         * error.c (interesting_scope_p): New fn.
8312         (dump_simple_decl): Use it.
8313         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
8314         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
8315
8316 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
8317
8318         * class.c (resolve_address_of_overloaded_function): Do conversion
8319         to correct type here, rather than ...
8320         (instantiate_type): Here.
8321
8322         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
8323         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
8324         (decl_template_parm_p): Remove.
8325         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
8326         parameter.
8327         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
8328         * pt.c (push_inline_template_parms_recursive): Set it.
8329         (decl_template_parm_p): Remove.
8330         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
8331         (process_template_parm): Set it.
8332
8333 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
8334
8335         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
8336         if configured with cpplib.
8337
8338 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
8339
8340         * decl.c (poplevel): Make sure ns_binding is initialized.
8341
8342         * decl.c (finish_function): Undo inadvertent change in previous
8343         patch.
8344
8345 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
8346
8347         * class.c (pushclass): Tweak handling of class-level bindings.
8348         (resolve_address_of_overloaded_function): Update pointer-to-member
8349         handling.
8350         (instantiate_type): Likewise.
8351         * cvt.c (cp_convert_to_pointer): Likewise.
8352         * decl.c (pop_binding): Take the DECL to pop, not just the name.
8353         Deal with `struct stat' hack.
8354         (binding_level): Add to documentation.
8355         (push_binding): Clear BINDING_TYPE.
8356         (add_binding): New function.
8357         (push_local_binding): Use it.
8358         (push_class_binding): Likewise.
8359         (poplevel): Adjust calls to pop_binding.
8360         (poplevel_class): Likewise.
8361         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
8362         declarations to current binding level.
8363         (push_class_level_binding): Likewise.
8364         (push_overloaded_decl): Adjust handling of OVERLOADs in local
8365         bindings.
8366         (lookup_namespace_name): Don't crash when confronted with a
8367         TEMPLATE_DECL.
8368         (lookup_name_real): Do `struct stat' hack in local binding
8369         contexts.
8370         (build_ptrmemfunc_type): Adjust documentation.
8371         (grokdeclarator): Don't avoid building real array types when
8372         processing templates unless really necessary.
8373         (finish_method): Adjust calls to pop_binding.
8374         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
8375         not reparse_decl_as_expr.
8376         (build_expr_from_tree): Deal with a template-id as the function to
8377         call in a METHOD_CALL_EXPR.
8378         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
8379         (maybe_adjust_types_For_deduction): Don't do peculiar things with
8380         METHOD_TYPEs here.
8381         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
8382         pointer-to-member types where necessary.
8383         * tree.c (build_cplus_array_type_1): Don't avoid building real
8384         array types when processing templates unless really necessary.
8385         (build_exception_variant): Compare the exception lists correctly.
8386
8387 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
8388
8389         * cp-tree.def (CPLUS_BINDING): Update documentation.
8390         * cp-tree.h (LOCAL_BINDING_P): New macro.
8391         (lang_identifier): Rename local_value to bindings.
8392         (tree_binding): Make `scope' of type `void*', not `tree'.
8393         (BINDING_SCOPE): Update documentation.
8394         (IDENTIFIER_LOCAL_VALUE): Remove.
8395         (IDENTIFIER_CLASS_VALUE): Document.
8396         (IDENTIFIER_BINDING): New macro.
8397         (IDENTIFIER_VALUE): Likewise.
8398         (TIME_IDENTIFIER_TIME): Likewise.
8399         (TIME_IDENTIFIER_FILEINFO): Likewise.
8400         (IMPLICIT_TYPENAME_P): Likewise.
8401         (set_identifier_local_value): Remove.
8402         (push_local_binding): New function.
8403         (push_class_binding): Likewise.
8404         * class.c (pushclass): Update comments; use push_class_binding.
8405         * decl.c (set_identifier_local_value_with_scope): Remove.
8406         (set_identifier_local_value): Likewise.
8407         (push_binding): New function.
8408         (pop_binding): Likewise.
8409         (binding_level): Update documentation.  Remove shadowed.
8410         (BINDING_LEVEL): New macro.
8411         (free_binding_nodes): New variable.
8412         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
8413         BLOCK_VARs when doing for-scope extension.  Remove effectively
8414         dead code.
8415         (pushlevel_class): Tweak formatting.
8416         (poplevel_class): Adjust for new name-lookup scheme.
8417         (print_binding_level): Likewise.
8418         (store_bindings): Likewise.
8419         (pushdecl): Likewise.
8420         (pushdecl_class_level): Likewise.
8421         (push_class_level_binding): Likewise.
8422         (push_overloaded_decl): Update comments.  Adjust for new
8423         name-lookup scheme.
8424         (lookup_name_real): Likewise.
8425         (lookup_name_current_level): Likewise.
8426         (cp_finish_decl): Likewise.
8427         (require_complete_types_for_parms): Likewise.  Remove misleading
8428         #if 0'd code.
8429         (grok_parms): Likewise.  Don't call
8430         require_complete_types_for_parms here.
8431         (grok_ctor_properties): Don't treat templates as copy
8432         constructors.
8433         (grop_op_properties): Or as assignment operators.
8434         (start_function): Document.  Adjust for new name-lookup scheme.
8435         (finish_function): Likewise.
8436         * decl2.c (do_local_using_decl): Use push_local_binding.
8437         * lex.c (begin_definition_of_inclass_inline): New function, split
8438         out from ...
8439         (do_pending_inlines): Here, and ...
8440         (process_next_inline): Here.
8441         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
8442         (init_filename_times): Likewise.
8443         (extract_interface_info): Likewise.
8444         (ste_typedecl_interface_info): Likewise.
8445         (check_newline): Likewise.
8446         (dump_time_statistics): Likewise.
8447         (handle_cp_pragma): Likewise.
8448         (do_identifier): Adjust for new name-lookup scheme.
8449         * parse.y (function_try_block): Return ctor_initializer_opt value.
8450         (fndef): Use it.
8451         (fn.defpen): Pass appropriate values to start_function.
8452         (pending_inline): Use functor_try_block value, and pass
8453         appropriate values to finish_function.
8454         * pt.c (is_member_template): Update documentation; remove handling
8455         of FUNCTION_DECLs.  As per name, this function should deal only in
8456         TEMPLATE_DECLs.
8457         (decl_template_parm_p): Change name of olddecl parameter to decl.
8458         (check_template_shadow): Adjust for new name-lookup scheme.
8459         (lookup_template_class): Likewise.
8460         (tsubst_decl): Tweak so as not to confuse member templates with
8461         copy constructors and assignment operators.
8462         (unify): Handle UNION_TYPEs.
8463         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
8464         (lang_print_xnode): Adjust for new name-lookup scheme.
8465         * typeck.c (mark_addressable): Likewise.
8466         (c_expand_return): Likewise.
8467
8468 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
8469
8470         * decl.c (grokdeclarator): Allow field with same name as class
8471         in extern "C".
8472
8473         * decl.c (lookup_name_real): Don't limit field lookup to types.
8474         * class.c (check_member_decl_is_same_in_complete_scope): No error
8475         if icv and x are the same.
8476         * lex.c (do_identifier): Tweak error message.
8477
8478 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
8479
8480         * decl.c (start_enum): Use push_obstacks, not
8481         end_temporary_allocation.
8482         (finish_enum): Call pop_obstacks.
8483
8484 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
8485
8486         * class.c (instantiate_type): Return error_mark_node rather than
8487         junk.
8488
8489 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
8490
8491         * cp-tree.h (most_specialized_instantiation): New function.
8492         (print_candidates): Likewise.
8493         * class.c (validate_lhs): Remove.
8494         (resolve_address_of_overloaded_function): New function, split out
8495         and then substantially reworked, from ...
8496         (instantiate_type): Use it.  Simplify.
8497         * cvt.c (convert_to_reference): Complain when caller has indicated
8498         that's the right thing to do.  Don't crash if instantiate_type
8499         fails.
8500         * pt.c: Substitute `parameters' for `paramters' throughout.
8501         (print_candidates): Don't make it static.
8502         (most_specialized_instantiation): Split out from ...
8503         (most_specialized): Here.
8504
8505 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
8506
8507         * lex.c (lang_init_options): Initialize cpplib.
8508         * decl2.c (parse_options,cpp_initialized): Removed.
8509         (lang_decode_option): Move initialization of cpplib to
8510         lang_init_options.
8511
8512 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
8513
8514         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
8515         well as the TYPE_DECL, when a typedef name is assigned to a
8516         previously anonymous type.
8517
8518 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
8519
8520         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
8521         __cp_eh_info for getting the eh info pointer.  Add table_index to
8522         field list.
8523         (push_eh_cleanup): Don't increment 'handlers' data field.
8524         (process_start_catch_block): Don't set the 'caught' field.
8525
8526         * cp/exception.cc (CP_EH_INFO): New macro for getting the
8527         exception info pointer within library routines.
8528         (__cp_eh_info): Use CP_EH_INFO.
8529         (__start_cp_handler): Get exception info pointer, set caught field,
8530         and increment the handlers field.  Avoids this being done by handlers.
8531         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
8532         (uncaught_exception): Use CP_EH_INFO macro.
8533
8534 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
8535
8536         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
8537
8538 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
8539
8540         * lex.c (check_newline): Add support for \ as `natural'
8541         characters in file names in #line to be consistent with #include
8542         handling.  We support escape processing in the # 1 "..." version of
8543         the command.  See also support in cp/lex.c.
8544
8545 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
8546
8547         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
8548         structure.
8549
8550 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
8551
8552         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
8553
8554         * error.c (dump_simple_decl): Also print namespace context.
8555         (dump_function_decl): Likewise.
8556
8557         * decl2.c (ambiguous_decl): Don't print old value if it's
8558         error_mark_node.
8559
8560         * decl.c (lookup_name_real): Fix handling of local types shadowed
8561         by a non-type decl.  Remove obsolete code.
8562         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
8563
8564         * lang-options.h: Add -fpermissive.
8565         * decl2.c: Likewise.
8566         * cp-tree.h: Add flag_permissive.
8567         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
8568         were specified, set flag_pedantic_errors.
8569         * call.c (build_over_call): Turn dropped qualifier messages
8570         back into pedwarns.
8571         * cvt.c (convert_to_reference): Likewise.
8572         * typeck.c (convert_for_assignment): Likewise.
8573
8574 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
8575
8576         * decl2.c (coerce_new_type): Use same_type_p.
8577         (coerce_delete_type): Likewise.
8578
8579         * call.c (check_dtor_name): Return 1, not error_mark_node.
8580
8581 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
8582
8583         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
8584         if MULTIPLE_SYMBOL_SPACES.
8585
8586         * pt.c (check_template_shadow): New fn.
8587         * decl2.c (grokfield): Use it.
8588         * decl.c (pushdecl): Likewise.
8589         (pushdecl_class_level): Likewise.
8590         (start_method): Likewise.
8591         (xref_tag): Don't try to use 't' if we're defining.
8592
8593         * call.c (check_dtor_name): Just return an error_mark_node.
8594         * pt.c (lookup_template_class): Complain about using non-template here.
8595         * parse.y (apparent_template_type): Not here.
8596
8597         * pt.c (check_explicit_specialization): Complain about specialization
8598         with C linkage.
8599
8600         * lang-options.h: Add -f{no-,}implicit-inline-templates.
8601
8602         * pt.c (convert_nontype_argument): Don't assume that any integer
8603         argument is intended to be a constant-expression.
8604
8605 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
8606
8607         * class.c (handle_using_decl): Fix comment.  Don't lookup
8608         constructors in base classes.
8609         (validate_lhs): Fix typo in comment.
8610         * search.c (lookup_field_1): Don't return a USING_DECL.
8611
8612         * cp-tree.h (DECL_ACCESS): Improve documentation.
8613
8614         * decl.c (expand_static_init): Don't set the initialization-done
8615         flag until the initialization is done.
8616
8617 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
8618
8619         * decl2.c (validate_nonmember_using_decl): Complain about using
8620         declarations for class members.
8621
8622 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
8623
8624         * typeck2.c (process_init_constructor): Use same_type_p.
8625
8626         * decl.c (check_tag_decl): Don't warn about null decl inside a
8627         class.
8628
8629         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
8630         UNIFY_ALLOW_NONE.
8631         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
8632         (resolve_overloaded_unification): Strip baselinks.
8633
8634 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8635
8636         * g++spec.c: Don't prototype xmalloc.
8637
8638 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
8639
8640         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
8641
8642         * decl.c (check_tag_decl): Do complain about null friend decl at
8643         file scope.
8644
8645 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
8646
8647         * lex.c (make_lang_type): Clear the whole struct lang_type, not
8648         only the first multiple of sizeof (int).
8649
8650 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
8651
8652         * decl.c (start_decl): An explicit specialization of a static data
8653         member is only a definition if it has an initializer.
8654
8655         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
8656         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
8657         cp_finish_decl.
8658         * init.c (expand_default_init): Check for DIRECT_BIND instead of
8659         DECL_ARTIFICIAL.
8660
8661         * call.c (build_over_call): Use build_decl.
8662
8663         * except.c (expand_throw): Just use convert, not
8664         build_reinterpret_cast.
8665
8666         * lex.c (handle_generic_pragma): Use token_buffer.
8667
8668         * decl.c (check_tag_decl): Don't complain about null friend decl.
8669
8670 1998-11-24  Dave Pitts  <dpitts@cozx.com>
8671
8672         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
8673         first position.
8674         * lex.c (check_newline): Use ISALPHA.
8675         (readescape): Use ISGRAPH.
8676         (yyerror): Use ISGRAPH.
8677
8678 1998-11-24  Nathan Sidwell  <nathan@acm.org>
8679
8680         * search.c (get_abstract_virtuals): Do not use initial
8681         CLASSTYPE_ABSTRACT_VIRTUALS.
8682         * typeck2.c (abstract_virtuals_error): Show location of abstract
8683         declaration.
8684         * call.c (build_new_method_call): Use
8685         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
8686         * class.c (finish_struct_bits): Don't bother working out whether
8687         get_abstract_virtuals will do anything, just do it.
8688
8689 1998-11-24  Graham  <grahams@rcp.co.uk>
8690
8691         * typeck.c (build_component_ref): Remove unused statement.
8692
8693 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
8694
8695         * class.c (add_method): Catch invalid overloads.
8696
8697         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
8698         * search.c (lookup_conversions): Handle getting real OVERLOADs.
8699         (add_conversions): Likewise.  Revert last change.
8700         * call.c (add_conv_candidate): Pass totype to add_candidate instead
8701         of fn.  Don't add a new candidate if the last one was for the same
8702         type.
8703         (print_z_candidates): Handle getting a type as a function.
8704         (joust): If we got two conversion candidates to the same type,
8705         just pick one.
8706         (build_object_call): Lose 'templates'.
8707         (build_user_type_conversion_1): Handle getting real OVERLOADs.
8708
8709 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
8710
8711         * typeck2.c (process_init_constructor): If there are elements
8712         that don't have initializers and they need to have constructors
8713         run, supply them with initializers.
8714
8715         * class.c (finish_struct_1): A class with a 0-width bitfield is
8716         still empty.
8717
8718 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
8719
8720         * pt.c (instantiate_class_template): Don't try to figure out what
8721         specialization to use for a partial instantiation.  Correct
8722         typos in a couple of comments.  Avoid calling uses_template_parms
8723         multiple times.
8724
8725 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
8726
8727         * method.c (process_overload_item): Add call to
8728         build_mangled_C9x_name for intTI_type_nodes.
8729         (build_mangled_C9x_name): Add prototype, define.
8730         * decl.c (init_decl_processing): Add names for
8731         TImode_type_node.
8732
8733 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
8734
8735         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
8736
8737         * class.c (finish_struct_1): Set things up for 0-width bitfields
8738         like we do for others.
8739
8740         * decl.c (check_tag_decl): New fn.
8741         (shadow_tag): Split out from here.
8742         * decl2.c (grok_x_components): Call it.
8743
8744 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
8745
8746         * decl.c: Lose warn_about_return_type.
8747         (grokdeclarator): Always complain about implicit int, except for
8748         `main () { ... }'.
8749
8750         * decl.c (tag_name): New fn.
8751         (xref_tag): Complain about using typedef-name after class-key.
8752
8753         * init.c (expand_vec_init): Also keep going if from_array.
8754
8755         * tree.c (is_overloaded_fn): Also handle the output of
8756         build_offset_ref.
8757
8758         * decl.c (grokdeclarator): Use constructor_name when comparing
8759         field name against enclosing class.
8760         * class.c (finish_struct_anon): Likewise.
8761
8762 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
8763
8764         * decl.c (poplevel): Remove code to handle KEEP == 2.
8765         (finish_function): Don't confuse BLOCK-order when
8766         processing a destructor.
8767
8768 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
8769
8770         * decl.c (require_complete_types_for_parms): Call layout_decl
8771         after we've completed the type.
8772
8773 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8774
8775         * decl2.c (validate_nonmember_using_decl): Allow using templates
8776         from the global namespace.
8777
8778 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
8779
8780         Handle specifying template args to member function templates.
8781         * tree.c (build_overload): Always create an OVERLOAD for a template.
8782         * search.c (add_conversions): Handle finding an OVERLOAD.
8783         * decl2.c (check_classfn): Likewise.
8784         * lex.c (identifier_type): See through a baselink.
8785         * parse.y (do_id): Don't call do_identifier if we got a baselink.
8786         * class.c (instantiate_type, case TREE_LIST): Recurse.
8787
8788         * decl.c (grokdeclarator): Allow a boolean constant for array
8789         bounds, odd as that sounds.
8790
8791         * pt.c (unify): Be more strict about non-type parms, except for
8792         array bounds.
8793         (UNIFY_ALLOW_INTEGER): New macro.
8794
8795 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
8796
8797         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
8798
8799 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
8800
8801         * semantics.c (begin_class_definition): Call
8802         maybe_process_partial_specialization before push_template_decl.
8803         Don't call push_template_decl for a specialization.
8804         * search.c (lookup_field): Do return a member template class.
8805         * decl2.c (handle_class_head): Handle member template classes.
8806
8807         * decl.c (grokdeclarator): A parm type need not be complete.
8808
8809         * pt.c (convert_nontype_argument): Fix thinko.
8810
8811 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
8812
8813         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
8814         (global_delete_fndecl): New variable.
8815         * decl.c (global_delete_fndecl): Define it.
8816         (init_decl_processing): Set it.
8817         * init.c (build_builtin_delete_call): Use it.
8818         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
8819         nodes.
8820
8821 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
8822
8823         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
8824         type.
8825
8826         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
8827         * call.c (build_object_call): Also support references to functions.
8828         * typeck.c (convert_for_initialization): Don't decay a function
8829         if the target is a reference to function.
8830
8831         * search.c (add_conversions): Get all the overloads from a class.
8832
8833         * decl.c (grok_ctor_properties): Complain about any constructor
8834         that will take a single arg of the class type by value.
8835
8836         * typeck2.c (build_functional_cast): Can't create objects of
8837         abstract classes this way.
8838         * cvt.c (ocp_convert): Likewise.
8839
8840         * decl.c (grokfndecl): Member functions of local classes are not
8841         public.
8842
8843 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
8844
8845         * Make-lang.in (cc1plus): Add dependency on hash.o.
8846
8847 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
8848
8849         * search.c (get_abstract_virtuals): Complain about virtuals with
8850         no final overrider.
8851         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
8852         with no final overrider.
8853         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
8854         on virtuals with no final overrider.
8855
8856         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
8857
8858         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
8859         after layout_type.
8860
8861         * friend.c (do_friend): Don't set_mangled_name_for_decl.
8862
8863         * class.c (finish_struct_anon): Complain about non-fields.
8864         * decl2.c (build_anon_union_vars): Likewise.
8865
8866         * decl.c (grokdeclarator): Normal data members can't have the same
8867         name as the class, either.
8868         * class.c (finish_struct_anon): Neither can members of an
8869         anonymous union.
8870
8871 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
8872
8873         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
8874         (TYPE_BINFO): Likewise.
8875         (IS_AGGR_TYPE): Tweak.
8876         (SET_IS_AGGR_TYPE): New macro.
8877         (CLASS_TYPE_P): Tweak.
8878         (lang_type): Group mark bitfields together.  Remove linenum.
8879         (CLASSTYPE_SOURCE_LINE): Remove macro.
8880         (CLASSTYPE_MARKED_N): New macro.
8881         (SET_CLASSTYPE_MARKED_N): Likewise.
8882         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
8883         (CLASS_TYPE_MARKED_*): Use them.
8884         (SET_CLASSTYPE_MARKED_*): Likewise.
8885         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
8886         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
8887         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
8888         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
8889         * class.c (class_cache_obstack): New variable.
8890         (class_cache_firstobj): Likewise.
8891         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
8892         (pushclass): Free the cache, when appropriate.
8893         (popclass): Tidy.
8894         (maybe_push_cache_obstack): Use class_cache_obstack.
8895         * decl.c (include hash.h).
8896         (typename_hash): New function.
8897         (typename_compare): Likewise.
8898         (build_typename_type): Check the hash table to avoid creating
8899         duplicates.
8900         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
8901         (grokdeclarator): Use CLASS_TYPE_P.
8902         (xref_basetypes): Likewise.
8903         (start_function): Likewise.  Don't put current_class_ref on the
8904         permanent obstack.
8905         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
8906         and TYPE_TI_ARGS.
8907         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
8908         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
8909         fields for types other than class types.  Do clear TYPE_ALIAS_SET
8910         for types other than class types, though.
8911         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
8912         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8913         * pt.c (process_template_parm): Don't set
8914         CLASSTYPE_GOT_SEMICOLON.
8915         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8916         Coerce arguments on the momentary obstack.
8917         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8918         (instantiate_class_template): Calculate template arguments on the
8919         momentary obstack.  Tidy.
8920         (tsubst_template_arg_vector): Use make_temp_vec.
8921         (tsubst_aggr_type): Put template arguments on the momentary
8922         obstack.
8923         (tsubst_decl): Likewise.
8924         (tsubst): Copy the array bounds index to the permanent obstack
8925         before building index types.  Use new macros.
8926         (unify): Use new macros.
8927         (do_type_instantiation): Likewise.
8928         * search.c (lookup_fnfields_1): Use new macros.
8929         (dfs_pushdecls): Build envelopes on the cache obstack.
8930         (dfs_compress_decls): Use new macros.
8931         (push_class_decls): Build on the cache obstack.
8932         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
8933         * sign.c (build_signature_pointer_or_reference_type): Use
8934         SET_IS_AGGR_TYPE.
8935         * tree.c (make_binfo): Check CLASS_TYPE_P.
8936         (copy_template_template_parm): Adjust.
8937         (make_temp_vec): Use push_expression_obstack.
8938         * typeck.c (complete_type): Use new macros.
8939         (comptypes): Likewise.
8940
8941 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
8942
8943         * pt.c (tsubst): Add diagnostics for invalid array, reference
8944         and pointer to member types.
8945
8946 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
8947
8948         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
8949
8950         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
8951         Simplify.
8952
8953         * parse.y (structsp): Fix cut-and-paste error.
8954
8955         * init.c (build_new): Complain about non-integral size.
8956
8957         * parse.y (unary_expr): Complain about defining types in sizeof.
8958
8959         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
8960
8961         * rtti.c (build_x_typeid): Complain about typeid without
8962         including <typeinfo>.
8963         (get_typeid): Likewise.  Complain about typeid of incomplete type.
8964         (get_tinfo_fn_dynamic): Likewise.
8965         (get_typeid_1): Not static anymore.
8966         * except.c (build_eh_type_type): Use get_typeid_1.
8967
8968         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
8969         ambiguous or private bases.  Fix warning for reference cast.
8970
8971 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
8972
8973         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
8974         * decl.c (duplicate_decls): Remove special-case code to deal with
8975         template friends, and just do the obvious thing.
8976         * pt.c (register_specialization): Tweak for clarity, and also to
8977         clear DECL_INITIAL for an instantiation before it is merged with a
8978         specialization.
8979         (check_explicit_specialization): Fix indentation.
8980         (tsubst_friend_function): Handle both definitions in friend
8981         declaration and outside friend declarations.
8982         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
8983         (regenerate_decl_from_template): Tweak accordingly.
8984         (instantiate_decl): Likewise.
8985
8986 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
8987
8988         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
8989         member function reference to error.
8990         * cvt.c (ocp_convert): Complain about converting an overloaded
8991         function to void.
8992
8993         * init.c (build_offset_ref): Just return a lone static member
8994         function.
8995
8996         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
8997         not internal ones.
8998
8999         * typeck.c (build_binary_op_nodefault): Improve error handling.
9000
9001         * decl.c (grokfndecl): Complain about making 'main' a template.
9002
9003         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
9004
9005         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
9006         TYPE_DECL in a template.
9007
9008 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
9009
9010         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
9011
9012         * decl.c (struct cp_function): Add named_label_uses.
9013         (push_cp_function_context): Save it.
9014         (pop_cp_function_context): Restore it.
9015         (define_label): Also complain about jumping into the scope of
9016         non-POD objects that don't have constructors.
9017         * tree.c (pod_type_p): New fn.
9018
9019         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
9020         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
9021         (get_tinfo_fn): Not here.
9022         * repo.c (repo_get_id): Abort if we get called for an incomplete
9023         type.
9024
9025 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
9026
9027         * except.c (expand_throw): Make sure first argument to
9028         __cp_push_exception is of type `void*' to avoid spurious error
9029         messages.
9030
9031 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
9032
9033         * pt.c (try_one_overload): Take orig_targs again.  Only check for
9034         mismatches against them; we don't care what a previous call found.
9035         (resolve_overloaded_unification): Adjust.
9036
9037         * search.c (lookup_field): Don't return anything for a non-type
9038         field from a dependent type.
9039         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
9040         in an array declarator.
9041         (start_decl): Push into the class before looking for the field.
9042
9043 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
9044
9045         * method.c (build_overload_value): Handle REFERENCE_TYPE.
9046
9047 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9048
9049         * decl.c (grokdeclarator): Allow namespace-scoped members if they
9050         are friends.
9051
9052 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
9053
9054         * pt.c (tsubst_decl): Don't mess with the global value of an
9055         un-mangled DECL_ASSEMBLER_NAME.
9056
9057 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
9058
9059         * decl.c (init_decl_processing): Remove CYGWIN conditional
9060         since CYGWIN is now able to deal with trapping signals.
9061
9062 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9063
9064         * cp-tree.h: Don't include gansidecl.h.
9065         * exception.cc: Include gansidecl.h (since we don't include config.h)
9066         * g++spec.c: Don't include gansidecl.h.
9067
9068 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
9069
9070         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
9071         size of dummy.
9072         (DECL_DEFINED_IN_CLASS_P): New macro.
9073         (TEMPLATE_PARMS_FOR_INLINE): Document.
9074         (check_static_variable_definition): New function.
9075         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
9076         appropriate.
9077         (check_static_variable_definition): Split out from ...
9078         (grokdeclarator): Here.
9079         * pt.c (check_default_tmpl_args): New function, split out from ...
9080         (push_template_decl_real): Here.
9081         (instantiate_template): Fix comment.
9082
9083 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
9084
9085         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
9086         (CP_TYPE_VOLATILE_P): Likewise.
9087         (CP_TYPE_RESTRICT_P): Likewise.
9088
9089 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
9090
9091         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
9092
9093 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
9094
9095         * class.c (instantiate_type): Be more helpful.
9096
9097         * decl2.c (import_export_decl): Call import_export_class.
9098
9099         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
9100         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
9101         * pt.c (tsubst_copy): Likewise.
9102
9103 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
9104
9105         * init.c (expand_vec_init): Fix off-by-one error.
9106
9107 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
9108
9109         * parse.y (apparent_template_type): New type.
9110         (named_complex_class_head_sans_basetype): Use it.
9111         * Makefile.in (CONFLICTS): One new conflict.
9112         * parse.c: Regenerated.
9113
9114 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
9115
9116         * cp-tree.h (COMPARE_STRICT): New macro.
9117         (COMPARE_BASE): Likewise.
9118         (COMPARE_RELAXED): Likewise.
9119         (COMPARE_REDECLARATION): Likewise.
9120         (same_type_p): Likewise.
9121         (same_or_base_type_p): Likewise.
9122         * call.c (standard_conversion): Use them, in place of comptypes
9123         with numeric arguments.
9124         (reference_binding): Likewise.
9125         (convert_like): Likewise.
9126         (build_over_call): Likewise.
9127         (is_subseq): Likewise.
9128         (is_properly_derived_from): Likewise.
9129         (compare_ics): Likewise.
9130         (joust): Likewise.
9131         * class.c (delete_duplicate_fields_1): Likewise.
9132         (resolves_to_fixed_type_p): Likewise.
9133         (instantiate_type): Likewise.  Remove #if 0'd code.
9134         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
9135         (pushdecl): Likewise.
9136         (lookup_name_real): Likewise.
9137         (grokdeclarator): Likewise.  Check for illegal array declarations.
9138         (grokparms): Likewise.
9139         (grok_op_properties): Likewise.
9140         * decl2.c (check_classfn): Likewise.
9141         * friend.c (is_friend): Likewise.
9142         (make_friend_class): Likewise.
9143         * init.c (expand_aggr_init): Likewise.
9144         (expand_vec_init): Likewise.
9145         * pt.c (is_member_template_class): Remove declaration.
9146         (is_specialization_of): Use COMPARE_* and new macros.
9147         (comp_template_parms): Likewise.
9148         (convert_nontype_argument): Likewise.
9149         (coerce_template_template_parms): Likewise.
9150         (template_args_equal): Likewise.
9151         (lookup_template_class): Likewise.
9152         (type_unification_real): Likewise.
9153         (unify): Likewise.
9154         (get_bindings_real): Likewise.
9155         * search.c (covariant_return_p): Likewise.
9156         (get_matching_virtual): Likewise.
9157         * sig.c (match_method_types): Likewise.
9158         * tree.c (vec_binfo_member): Likewise.
9159         (cp_tree_equal): Likewise.
9160         * typeck.c (common_type): Likewise.
9161         (comp_array_types): Likewise.  Get issues involving unknown array
9162         bounds right.
9163         (comptypes): Update comments.  Use new flags.
9164         (comp_target_types): Use new macros.
9165         (compparms): Likewise.
9166         (comp_target_parms): Likewise.
9167         (string_conv_p): Likewise.
9168         (build_component_ref): Likewise.
9169         (build_indirect_ref): Likewise.
9170         (build_conditional_expr): Likewise.
9171         (build_static_cast): Likewise.
9172         (build_reinterpret_cast): Likewise.
9173         (build_const_cast): Likewise.
9174         (build_modify_expr): Likewise.
9175         (convert_for_assignment): Likewise.
9176         (comp_ptr_ttypes_real): Likewise.
9177         (ptr_reasonably_similar): Likewise.
9178         (comp_ptr_ttypes_const): Likewise.
9179
9180 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
9181
9182         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
9183
9184 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
9185
9186         * decl2.c (delete_sanity): Pass integer_zero_node, not
9187         integer_two_node, to build_vec_delete.
9188         * init.c (build_array_eh_cleanup): Remove.
9189         (expand_vec_init_try_block): New function.
9190         (expand_vec_init_catch_clause): Likewise.
9191         (build_vec_delete_1): Don't deal with case that auto_delete_vec
9192         might be integer_two_node anymore.
9193         (expand_vec_init): Rework for initialization-correctness and
9194         exception-correctness.
9195         * typeck2.c (process_init_constructor): Make mutual exclusivity
9196         of cases more obvious.
9197
9198 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
9199
9200         * decl.c (lookup_name_real): OK, only warn if not lexing.
9201         Simplify suggested fix.
9202
9203         * cp-tree.h (IDENTIFIER_MARKED): New macro.
9204         * search.c (lookup_conversions): Use breadth_first_search.
9205         (add_conversions): Avoid adding two conversions to the same type.
9206         (breadth_first_search): Work with base binfos, rather
9207         than binfos and base indices.
9208         (get_virtual_destructor): Adjust.
9209         (tree_has_any_destructor_p): Adjust.
9210         (get_matching_virtual): Adjust.
9211
9212         * pt.c (push_template_decl_real): Generalize check for incorrect
9213         number of template parms.
9214         (is_member_template_class): #if 0.
9215
9216 1998-10-29  Richard Henderson  <rth@cygnus.com>
9217
9218         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
9219         last.
9220
9221 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
9222
9223         * lex.c: Call check_newline from lang_init always.  After
9224         calling cpp_start_read, set yy_cur and yy_lim to read from the
9225         cpplib token buffer.
9226
9227 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
9228
9229         * class.c (instantiate_type): Don't consider templates for a normal
9230         match.
9231
9232         * class.c (finish_struct_1): Don't complain about non-copy
9233         assignment ops in union members.
9234
9235         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
9236         (prepare_fresh_vtable): Likewise.
9237         (finish_struct_1): Don't call import_export_class.
9238         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
9239         (finish_prevtable_vardecl): Lose.
9240         (finish_file): Don't call it.
9241         * pt.c (instantiate_class_template): Likewise.
9242         * cp-tree.h: Remove it.
9243
9244         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
9245         * decl.c (finish_function): Not here.
9246         (start_function): Do set DECL_INITIAL.
9247
9248         * pt.c (push_template_decl_real): Complain about default template
9249         args for enclosing classes.
9250
9251         * call.c (add_function_candidate): Treat conversion functions
9252         as coming from the argument's class.
9253         * cp-tree.h (DECL_CONV_FN_P): New fn.
9254         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
9255         * class.c (add_method): Use DECL_CONV_FN_P.
9256         * decl2.c (check_classfn): Likewise.
9257         * error.c (dump_function_name): Likewise.
9258         (dump_function_decl): Likewise.
9259         * pt.c (fn_type_unification): Likewise.
9260         * search.c (add_conversions): Likewise.
9261
9262 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
9263
9264         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
9265         * method.c (hack_identifier): Also check for using RESULT_DECL
9266         from outer context.
9267
9268 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
9269
9270         * decl.c (grokdeclarator): Use type_quals, rather than constp,
9271         consistently.
9272
9273 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
9274
9275         * call.c (standard_conversion): instantiate_type here.
9276         (reference_binding): And here.
9277         (implicit_conversion): Not here.
9278         (build_op_delete_call): No need to cons up an OVERLOAD.
9279         * cvt.c (cp_convert_to_pointer): instantiate_type here.
9280         (convert_to_reference): And here.
9281         * decl.c (grok_reference_init): Not here.
9282         (grokparms): Or here.
9283         * typeck2.c (digest_init): Or here.
9284         * typeck.c (decay_conversion): Take the address of overloaded
9285         functions, too.
9286         (require_instantiated_type): Lose.
9287         (convert_arguments): Don't handle unknown types here.
9288         (build_c_cast): Likewise.
9289         (build_binary_op): Gut.
9290         (build_conditional_expr): Don't require_instantiated_type.
9291         (build_modify_expr): Likewise.
9292         (build_static_cast): Don't instantiate_type.
9293         (build_reinterpret_cast): Likewise.
9294         (build_const_cast): Likewise.
9295         (convert_for_initialization): Likewise.
9296         (build_ptrmemfunc): Use type_unknown_p.
9297         (convert_for_assignment): Also do default_conversion on overloaded
9298         functions.  Hand them off to ocp_convert.
9299
9300 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
9301
9302         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
9303         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
9304
9305         * class.c (finish_struct_1): Use build_cplus_array_type to build
9306         array types.
9307         * decl.c (init_decl_processing): Likewise.
9308         * except.c (expand_end_eh_spec): Likewise.
9309         * search.c (expand_upcast_fixups): Simplify very slightly.
9310
9311 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
9312
9313         * decl.c (grokdeclarator): Complain about a variable using
9314         constructor syntax coming back null from start_decl.
9315
9316         * friend.c (make_friend_class): Complain about trying to make
9317         a non-class type a friend.
9318
9319         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
9320         (start_function): Not here.
9321
9322 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
9323
9324         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
9325
9326 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
9327
9328         * typeck2.c (process_init_constructor): Only skip anonymous fields
9329         if they are bitfields.
9330
9331         * cp-tree.def (TYPEOF_TYPE): New code.
9332         * error.c (dump_type_real): Handle it.
9333         * pt.c (tsubst): Likewise.
9334         * tree.c (search_tree): Likewise.
9335         * semantics.c (finish_typeof): New fn.
9336         * parse.y (typespec): Use it.
9337         * cp-tree.h: Declare it.
9338
9339 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
9340
9341         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
9342
9343 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
9344
9345         * typeck.c (convert_arguments): Don't handle pmf references
9346         specially.
9347
9348         * init.c (build_member_call): Don't try to convert to the base type
9349         if it's ambiguous or pedantic.
9350
9351         * typeck2.c (check_for_new_type): Only depend on pedantic for
9352         C-style casts.
9353
9354 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
9355
9356         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
9357         non-converting constructors.
9358
9359 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9360
9361         * gxxint.texi: Correct documentation for n, N, Q, and B.
9362
9363 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9364
9365         * parse.y (condition): Convert VAR_DECL from reference to indirect
9366         reference.
9367
9368 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
9369
9370         * exception.cc (__cp_pop_exception): Free the original exception
9371         value, not the potentially coerced one.
9372
9373 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
9374
9375         * Makefile.in (hash.h): Run gperf when necessary.
9376
9377         * cp-tree.h (CP_TYPE_READONLY): Remove.
9378         (CP_TYPE_VOLATILE): Likewise.
9379         (CP_TYPE_QUALS): New macro.
9380         (CP_TYPE_CONST_P): Likewise.
9381         (CP_TYPE_VOLATILE_P): Likewise.
9382         (CP_TYPE_RESTRICT_P): Likewise.
9383         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
9384         (cp_build_type_variant): Rename to ...
9385         (cp_build_qualified_type): New function.
9386         (c_apply_type_quals_to_decl): Declare.
9387         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
9388         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
9389         (cp_type_qual_from_rid): New function.
9390         (compparms): Remove unused parameter.  All callers changed.
9391         (cp_type_quals): New function.
9392         (at_least_as_qualified_p): Likewise.
9393         (more_qualified_p): Likewise.
9394
9395         * call.c (standard_conversion): Replace calls to
9396         cp_build_type_variant with cp_build_qualified_type.  Use
9397         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
9398         compare them.  Use CP_TYPE_* macros to check qualifiers.
9399         (reference_binding): Likewise.
9400         (implicit_conversion): Likewise.
9401         (add_builtin_candidates): Likewise.
9402         (build_over_call): Likewise.
9403         * class.c (overrides): Compare all qualifiers, not just `const',
9404         on method declarations.
9405         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
9406         (convert_pointer_to_real): Likewise.
9407         (type_promotes_to): Likewise.
9408         * decl.c (check_for_uninitialized_const_var): New function.
9409         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
9410         (cp_finish_decl): Use check_for_uninitialized_const_var.
9411         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
9412         handle `restrict'.
9413         (grok_ctor_properties): Likewise.
9414         (grok_op_properties): Likewise.
9415         (start_function): Likewise.
9416         (rever_static_member_fn): Likewise.
9417         * decl2.c (grok_method_quals): Likewise.
9418         (grokfield): Likewise.
9419         * error.c (dump_readonly_or_volatile): Rename to ...
9420         (dump_qualifiers): New function.  Handle `restrict'.
9421         (dump_type_real): Use it.
9422         (dump_aggr_type): Likewise.
9423         (dump_type_prefix): Likewise.
9424         (dump_type_suffix): Likewise.
9425         (dump_function_decl): Likewise.
9426         (cv_as_string): Likewise.
9427         * gxx.gperf: Add __restrict and __restrict__.
9428         * gxxint.texi: Document `u' as used for `__restrict', and a few
9429         other previously undocumented codes.
9430         * hash.h: Regenerated.
9431         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
9432         (build_member_call): Likewise.
9433         (build_new_1): Likewise.
9434         * lex.c (init_parse): Add entry for RID_RESTRICT.
9435         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
9436         (cp_type_qual_from_rid): Define.
9437         * lex.h (enum rid): Add RID_RESTRICT.
9438         * method.c (process_modifiers): Deal with `restrict'.
9439         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
9440         * parse.c: Regenerated.
9441         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
9442         (tsubst_aggr_type): Likewise.
9443         (tsubst): Likewise.
9444         (check_cv_quals_for_unify): Likewise.
9445         (unify): Likewise.
9446         * rtti.c (init_rtti_processing): Likewise.
9447         (build_headof): Likewise.
9448         (get_tinfo_var): Likewise.
9449         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
9450         (expand_class_desc): Likewise.
9451         (expand_attr_desc): Likewise.
9452         (synthesize_tinfo_fn): Likewise.
9453         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
9454         (get_matching_virtual): Likewise.
9455         (expand_upcast_fixups): Likewise.
9456         * sig.c (build_signature_pointer_or_reference_name): Take
9457         type_quals, not constp and volatilep.
9458         (build_signature_pointer_or_reference_type): Likewise.
9459         (match_method_types): More CP_TYPE_QUALS conversion, etc.
9460         (build_signature_pointer_constructor): Likewise.
9461         (build_signature_method_call): Likewise.
9462         * tree.c (build_cplus_array_type): Likewise.
9463         (cp_build_type_variant): Rename to ...
9464         (cp_build_qualified_type): New function.  Deal with `__restrict'.
9465         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
9466         (build_exception_variant): Likewise.
9467         (mapcar): Likewise.
9468         * typeck.c (qualif_type): Likewise.
9469         (common_type): Likewise.
9470         (comptypes): Likewise.
9471         (comp_cv_target_types): Likewise.
9472         (at_least_as_qualified_p): Define.
9473         (more_qualified_p): Likewise.
9474         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
9475         (compparms): Likewise.
9476         (inline_conversion): Likewise.
9477         (string_conv_p): Likewise.
9478         (build_component_ref): Likewise.
9479         (build_indirect_ref): Likewise.
9480         (build_array_ref): Likewise.
9481         (build_unary_op): Likewise.
9482         (build_conditional_expr): Likewise.
9483         (build_static_cast): Likewise.
9484         (build_c_cast): Likewise.
9485         (build_modify_expr): Likewise.
9486         (convert_For_assignment): Likewise.
9487         (comp_ptr_ttypes_real): Likewise.
9488         (cp_type_quals): New function.
9489
9490 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
9491
9492         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
9493         (CP_TYPE_VOLATILE): Likewise.
9494         * decl.c (grokdeclarator): Use them.
9495         * tree.c (canonical_type_variant): Likewise.
9496
9497 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9498
9499         * parse.y (named_class_head): Push into class while parsing the
9500         base class list.
9501         * decl2.c (push_scope, pop_scope): New functions.
9502         * cp-tree.h: Declare them.
9503         * init.c (build_new_1): Delay cleanup until end of full expression.
9504
9505 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
9506
9507         * typeck.c (build_component_ref): Use of a type here is an error.
9508
9509 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
9510
9511         Revamp references to member functions.
9512         * method.c (hack_identifier): Call build_component_ref for a
9513         reference to a member function.
9514         * typeck.c (build_component_ref): Only return a single function
9515         if it's static.  Otherwise, return a COMPONENT_REF.
9516         (build_x_function_call): Handle a COMPONENT_REF.
9517         (build_unary_op): Handle all unknown-type things.
9518         * decl2.c (arg_assoc): Handle COMPONENT_REF.
9519         * class.c (instantiate_type): Complain if the function we get is a
9520         nonstatic member function.  Remove code for finding "compatible"
9521         functions.
9522         * pt.c (tsubst_copy): Handle NOP_EXPR.
9523         * tree.c (build_dummy_object): New fn.
9524         (maybe_dummy_object): New fn.
9525         (is_dummy_object): New fn.
9526         * cp-tree.h: Declare them.
9527         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
9528         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
9529         * init.c (build_member_call): Use maybe_dummy_object and
9530         is_dummy_object.
9531         (build_offset_ref): Use maybe_dummy_object.
9532         (resolve_offset_ref): Use is_dummy_object.
9533         * typeck.c (build_x_function_call): Call build_dummy_object.
9534         (unary_complex_lvalue): Call is_dummy_object.
9535
9536         * typeck.c (build_component_addr): Make sure field is a field.
9537
9538         * call.c (build_new_op): Delete obsolete code.
9539
9540         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
9541
9542 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9543
9544         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
9545         std if std is ignored.
9546
9547 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
9548
9549         * decl.c (grokvardecl): Fix thinko.
9550
9551         * decl.c (grokdeclarator): Embedded attrs bind to the right,
9552         not the left.
9553
9554         * parse.y (fn.def2): Fix 'attrs' format.
9555
9556 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
9557
9558         * Makefile.in (CONFLICTS): Update.
9559         * parse.y (expr_or_declarator_intern): New rule.
9560         (expr_or_declarator, direct_notype_declarator, primary,
9561         functional_cast): Use it.
9562         (notype_declarator_intern): New rule.
9563         (notype_declarator, complex_notype_declarator): Use it.
9564
9565 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
9566
9567         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
9568         (grokvardecl): Likewise.
9569
9570 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9571
9572         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
9573         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
9574
9575         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
9576
9577         * pt.c (process_partial_specialization): Cast 1st argument of
9578         `bzero' to (PTR).
9579
9580         * tree.c (build_base_fields): Cast `base_align' to (int) when
9581         comparing against one.
9582
9583 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
9584
9585         * decl.c (lookup_name_real): Handle template parameters for member
9586         templates where said parameters have the same name as the
9587         surrounding class.
9588
9589         * decl.c (expand_static_init): Build cleanups before entering the
9590         anonymous function used to do them to avoid access-checking
9591         confusion.
9592
9593         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
9594         accidentally removed by previous change, and make DECL_RTL here.
9595         * class.c (add_method): Don't make DECL_RTL here.
9596
9597         * pt.c (for_each_template_parm): Don't examine uninstantiated
9598         default arguments.
9599
9600 1998-10-16  Dave Brolley  <brolley@cygnus.com>
9601
9602         * lex.c (real_yylex): Fix unaligned access of wchar_t.
9603
9604 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
9605
9606         * class.c (add_method): Fix documentation to reflect previous
9607         changes.  Check for duplicate method declarations here.
9608         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
9609         correctly; such things never match.
9610         (grokfndecl): Don't look for duplicate methods here.
9611         * decl2.c (check_classfn): Don't assume names are mangled.
9612         Don't add bogus member function declarations to a class before the
9613         class type is complete.
9614         (grokfield): Reformat error message.
9615         * method.c (set_mangled_name_for_decl): Don't mangle names while
9616         processing_template_decl.
9617
9618 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
9619
9620         * typeck.c (build_indirect_ref): Complain about a pointer to data
9621         member, too.
9622         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
9623         data member.
9624         * init.c (resolve_offset_ref): Don't undo the above.
9625
9626         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
9627         (struct lang_decl_flags): Add `bitfield'.
9628         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
9629         DECL_BIT_FIELD.
9630         * decl2.c (grokbitfield, grok_alignof): Likewise.
9631         * init.c (build_offset_ref): Likewise.
9632         * typeck.c (build_component_addr, expr_sizeof): Likewise.
9633         * cvt.c (build_up_reference): Don't crash if taking the address
9634         returns error_mark_node.
9635
9636         * decl.c (grokfndecl): Also check ctype when checking for ::main().
9637
9638 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
9639
9640         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
9641         Do mangling here.
9642         (grokdeclarator): Instead of here.
9643         * friend.c (do_friend): Lose special handling of ::main and
9644         __builtin_*.
9645         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
9646
9647         * spew.c (yylex): Clear looking_for_typename if we got
9648         'enum { ... };'.
9649
9650 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
9651
9652         * class.c (maybe_warn_about_overly_private_class): Improve error
9653         messages for class with only private constructors.
9654
9655         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
9656         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
9657         (build_typename_type): New function.
9658         * decl.c (build_typename_type): Broken out from ...
9659         (make_typename_type): Use it.
9660         * search.c (lookup_field): Likewise.
9661
9662 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
9663
9664         * pt.c (convert_nontype_argument): Check against type_referred_to.
9665         * decl.c (grokvardecl): Check for declarator name before building
9666         DECL_ASSEMBLER_NAME.
9667
9668 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
9669
9670         * pt.c (lookup_template_class): Add comment.
9671         (instantiate_class_template): Don't mark the _TYPE node for
9672         member class templates as an instantiation.
9673
9674 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
9675
9676         * decl.c (grokfndecl): Fix my thinko.
9677
9678 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
9679
9680         * tinfo2.cc (fast_compare): Remove.
9681         (before): Just use strcmp.
9682         * tinfo.cc (operator==): Just use strcmp.
9683
9684 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
9685
9686         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
9687         declarations.
9688
9689 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
9690
9691         * cp-tree.h (specializations_of_same_template_p): Remove.
9692         * search.c (get_template_base): Don't use it.
9693         (get_template_base_recursive): Likewise.
9694         * pt.c (specializations_of_same_template_p): Remove.
9695         (unify): Don't use it.
9696         (lookup_template_class): Find the correct parent when setting
9697         CLASSTYPE_TI_TEMPLATE.
9698
9699 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
9700
9701         * tinfo.cc (operator==): Always compare names.
9702
9703 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
9704
9705         * decl.c (start_function): Fix cut-and-paste error.
9706
9707 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
9708
9709         * inc/typeinfo: Add #pragma interface.
9710         (operator!=): Just call operator==.
9711         * tinfo.cc: Add #pragma implementation.
9712         (operator==): Move from inc/typeinfo and tinfo2.cc.
9713         Check __COMMON_UNRELIABLE instead of _WIN32.
9714
9715         * typeck2.c (my_friendly_abort): Add URL.
9716
9717 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
9718
9719         * decl.c (start_method): Added extra parameter for attributes.
9720         * cp-tree.h (start_method): Update prototype.
9721         * parse.y (fn.def2): Update start_method parameter list.
9722
9723 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
9724
9725         * cp-tree.h (specializations_of_same_template_p): Declare.
9726         * pt.c (specializations_of_same_template_p): New function.
9727         (unify): Use it.
9728         * search.c (get_template_base): Use it.
9729         (get_template_base_recursive): Likewise.
9730
9731 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
9732
9733         * decl2.c (start_objects): Add new variable `joiner' and
9734         initialize it properly.
9735
9736 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
9737
9738         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
9739         change to vtable types.
9740
9741         * cvt.c (ocp_convert): Avoid infinite recursion caused by
9742         1998-10-03 change.
9743
9744 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
9745
9746         * pt.c (resolve_overloaded_unification): New fn.
9747         (try_one_overload): Likewise.
9748         (unify): Don't fail on unknown type.
9749         (type_unification_real): Likewise.  Use resolve_overloaded_unification
9750         to handle an overloaded argument.
9751         (template_args_equal): Split out...
9752         (comp_template_args): From here.
9753         (determine_specialization): Also allow a template with more
9754         parms than were explicitly specified.
9755         * cp-tree.h: Add template_args_equal.
9756         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
9757
9758 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
9759
9760         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
9761         change.
9762
9763 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
9764
9765         * typeck.c (unsigned_type): Only return TItype nodes when
9766         HOST_BITS_PER_WIDE_INT is >= 64 bits.
9767         (signed_type): Likewise.
9768         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
9769         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
9770         (init_decl_processing): Only create TItype nodes when
9771         HOST_BITS_PER_WIDE_INT is >= 64 bits.
9772         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
9773         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
9774
9775 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9776
9777         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
9778         (gxx.gperf): Update comments describing invocation flags.
9779         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
9780
9781 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
9782
9783         * class.c (finish_struct_1): Add commentary on previous change.
9784
9785         * cp-tree.h (vtbl_ptr_type_node): New variable.
9786         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
9787         already of the right type.
9788         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
9789         Simplify code to grow vtable.
9790         * decl.c (vtbl_ptr_type_node): Define.
9791         (init_decl_processing): Initialize it.
9792
9793 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
9794
9795         * cp-tree.def (PTRMEM_CST): New tree node.
9796         * cp-tree.h (ptrmem_cst): New type.
9797         (lang_type): Remove local_typedecls.
9798         (dummy): Increase to 12 bits from 11.
9799         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
9800         (PTRMEM_CST_CLASS): New macro.
9801         (PTRMEM_CST_MEMBER): Likewise.
9802         (current_access_specifier): New variable.
9803         (current_class_type): Remove duplicate declaration.
9804         (finish_struct): Change prototype.
9805         (unreverse_member_declarations): New function.
9806         (pushdecl_class_level): Change prototype.
9807         (grok_enum_decls): Remove.
9808         (fixup_anonymous_union): New function.
9809         (grok_x_components): Change prototype.
9810         (tsubst_chain): Remove.
9811         (finish_member_template_decl): Likewise.
9812         (check_explicit_specialization): Fix indentation.
9813         (finish_class_definition): Change prototype.
9814         (finish_member_class_template): Likewise.
9815         (finish_member_declaration): New function.
9816         (check_multiple_declarators): Likewise.
9817         * class.c (class_stack_node_t): New type.
9818         (current_class_base): Remove.
9819         (current_class_stack): Change type.
9820         (current_access_specifier): New variable.
9821         (grow_method): Remove.
9822         (check_member_decl_is_same_in_complete_scope): Break out from
9823         finish_struct.
9824         (make_method_vec): New function.
9825         (free_method_vec): Likewise.
9826         (add_implicitly_declared_members): Break out from finish_struct_1.
9827         (free_method_vecs): New variable.
9828         (add_method): Rework for direct use from parser.
9829         (handle_using_decl): Watch for NULL_TREE while iterating through
9830         CLASSTYPE_METHOD_VEC.
9831         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
9832         just do some error-checking.
9833         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
9834         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
9835         (finish_struct): Change prototype.  Simplify; fields and methods
9836         are already set up at this point.
9837         (init_class_processing): Set up current_class_stack.
9838         (pushclass): Save current_access_specifier.
9839         (popclass): Restore it.
9840         (currently_open_class): Simplify.
9841         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
9842         * decl.c (saved_scope): Add access_specifier.
9843         (maybe_push_to_top_level): Save it.
9844         (pop_from_top_level): Restore it.
9845         (maybe_process_template_type_declaration): Use
9846         finish_member_declaration.
9847         (pushtag): Likewise.
9848         (pushdecl_class_level): Don't return a value.
9849         (fixup_anonymous_union): Break out from grok_x_components.
9850         (shadow_tag): Use it.
9851         (xref_tag): Complain about using an elaborated type specifier to
9852         reference a template type parameter or typedef name.
9853         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
9854         (current_local_enum): Remove.
9855         (build_enumerator): Call finish_member_declaration.
9856         (grok_enum_decls): Remove.
9857         * decl2.c (grok_x_components): Simplify.
9858         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
9859         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
9860         (merge_functions): Add to comment.
9861         (arg_assoc_type): Prototype.
9862         (arg_assoc): Pass as many arguments as there are parameters.
9863         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
9864         OFFSET_REF.
9865         * expr.c (cpls_expand_expr): Remove dead code.  Handle
9866         PTRMEM_CST.
9867         * friend.c (do_friend): Lookup friends when in nested classes.
9868         Change comments.
9869         * init.c (build_offset_ref): Do lookup even for classes that are
9870         only partially defined.
9871         (decl_constant_value): Remove dead code.
9872         * method.c (build_overload_value): Remove hack where by TYPE was
9873         not a TYPE.  Handle PTRMEM_CST.
9874         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
9875         should go.
9876         * parse.y (components, notype_components, component_decl,
9877         component_decl_1, component_declarator, component_declarator0):
9878         Now all are itype rather than ttype.  Rework to add members to
9879         classes on the fly.
9880         (typesqpecqual_reserved): Use check_multiple_declarators.
9881         (structsp): Update class to finish_class_definition.
9882         (do_xref_defn): Unsplit into named_class_head.
9883         (access_specifier): Set current_access_specifier.
9884         * pt.c (set_current_access_from_decl): New function.
9885         (finish_member_template_decl): Don't take the parameters.
9886         (comp_template_args): Make more robust.
9887         (lookup_template_class): Don't use current_local_enum.
9888         (for_each_template_parm): Handle PTRMEM_CST.
9889         (instantiate_class_template): Use set_current_access_from_decl,
9890         finish_member_declaration and unreverse_member_declarations.  Set
9891         lineno/input_filename before generating implicit member functions.
9892         (type_unification_real): Don't assume back-unification happens
9893         only for the last argument.
9894         (regenerate_decl_from_template): Call pushclass a bit earlier.
9895         (tsubst_chain): Remove.
9896         (tsubst_enum): Use set_current_access_from_decl.
9897         (set_mangled_name_for_template_decl): Fix indentation.
9898         * search.c (lookup_fnfields_1): Change iteration through
9899         CLASSTYPE_METHOD_VEC.
9900         (dfs_pushdecls): Likewise.
9901         (dfs_compress_decls): Likewise.
9902         (add_conversions): Likewise.
9903         * semantics.c (finish_class_definition): Don't take components.
9904         Change call to finish_struct.
9905         (finish_member_declaration): New function.
9906         (finish_member_class_template): Don't take template parameters.
9907         Change call to grok_x_components.  Call finish_member_template_decl.
9908         (check_multiple_declarators): New function.
9909         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
9910         a passed in fieldlist.
9911         * tree.c (search_tree): Handle PTRMEM_CST.
9912         (mapcar): Likewise.
9913         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
9914         INTEGER_CSTs, for pointer-to-data members.
9915
9916         * call.c (resolve_args): Resolve template specializations, if
9917         possible.
9918
9919 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9920
9921         * Makefile.in (spew.o): Depend on toplev.h.
9922
9923         * call.c (compare_ics): Initialize variables `deref_from_type2',
9924         `deref_to_type1' and `deref_to_type2'.
9925
9926         * except.c (get_eh_type): Hide prototype and definition.
9927         (process_start_catch_block_old): Remove unused static prototype.
9928
9929         * pt.c (tsubst_decl): Initialize variable `argvec'.
9930
9931         * spew.c: Include toplev.h.
9932
9933 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
9934
9935         * pt.c (instantiate_decl): Do save and restore file position.
9936
9937 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9938
9939         * method.c (build_decl_overload_real): Clear
9940         numeric_output_need_bar after __.
9941
9942 1998-10-05  Nathan Sidwell  <nathan@acm.org>
9943
9944         * call.c (build_new_method_call): Issue 'incomplete type' error,
9945         if class is not defined.
9946
9947 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9948
9949         * call.c (build_object_call): Move declaration of variable
9950         `fn' into the scope where it is used.  Don't access variable
9951         `fn' when it is uninitialized, instead use `fns'.
9952
9953 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
9954
9955         * errfn.c (cp_thing): Print buf as a string not as a printf format
9956         to avoid problems with the operator%.  Consequently, `%%' sequences
9957         in format are copied as `%' in buf.
9958
9959 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
9960
9961         * pt.c (pop_tinst_level): Call extract_interface_info.
9962         (instantiate_decl): Don't save and restore file position.
9963
9964         * decl.c (cp_finish_decl): Make statics in extern inlines and
9965         templates common, if possible and the target doesn't support weak
9966         symbols.
9967
9968         * decl.c (grokdeclarator): Remove redundant calls to
9969         build_type_variant and some duplicated code.
9970         * sig.c (build_signature_reference_type): Only take the type parm.
9971         (build_signature_pointer_type): Likewise.
9972         * tree.c (build_cplus_method_type): Adjust.
9973         * cp-tree.h: Update.
9974
9975 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
9976
9977         * call.c (build_over_call): Make pedwarns about dropped qualifiers
9978         into full-fledged errors.
9979         * cvt.c (convert_to_reference): Likewise.
9980         * typeck.c (convert_for_assignment): Likewise.
9981
9982         * search.c (expand_upcast_vtables): In addition to unsetting
9983         TREE_READONLY, remove top-level const type qualifier.
9984
9985 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
9986
9987         * class.c (current_class_ptr, current_class_ref): Clarify
9988         documentation.
9989         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
9990         NOP type conversions.
9991         * decl.c (decls_match): Use comptypes directly; ignore
9992         qualifiers on the DECL.
9993         (duplicate_decls): Remove qualifier checks on DECL.
9994         (grokdeclarator): Make the type built up include top-level
9995         qualifiers.
9996         * decl2.c (do_dtors): Fix spelling error.
9997         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
9998         when printing type information.
9999         * init.c (build_new_1): Add documentation.  Deal with the fact
10000         that type of allocated memory now contains qualifiers.
10001         * lex.c (is_global): Improve error-recovery.
10002         * sig.c (build_member_function_pointer): Don't cast away const
10003         on fields of sigtable_entry_type.
10004         * tree.c (lvalue_type): Don't look at top-level qualifiers on
10005         expressions.
10006         * typeck.c (decay_conversion): Likewise.
10007         (build_component_ref): Make sure the type of the COMPONENT_REF
10008         contains top-level qualifiers, as appropriate.  Improve
10009         error-handling.
10010         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
10011         (build_array_ref): Likewise.
10012         (build_unary_op): Improve error-recovery.
10013         (unary_complex_lvalue): Make taking the address a bound member
10014         function an error, not a sorry.
10015         (build_conditional_expr): Look at the type qualifiers, not the
10016         qualifiers on the expression itself.
10017
10018 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
10019
10020         * decl2.c (merge_functions): Remove duplicates.
10021
10022         * decl2.c: Add -f{no-,}implicit-inline-templates.
10023         (import_export_decl): Check it.
10024
10025         * decl.c (lookup_name_real): Template parms also take precedence
10026         over implicit typename.  Only warn if yylex.
10027
10028         * typeck.c (build_conditional_expr): Only fold if ifexp is an
10029         INTEGER_CST.
10030
10031         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
10032         instead of linkage.
10033
10034 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
10035
10036         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
10037         * class.c (build_vbase_pointer): Use it.
10038         * rtti.c (expand_class_desc): Likewise.
10039         * tree.c (build_vbase_pointer_fields): Likewise.
10040
10041 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
10042
10043         * decl.c (start_decl): Add invocation of
10044         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
10045         (start_function): Add invocation of
10046         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
10047
10048         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
10049         HANDLE_GENERIC_PRAGMAS.
10050
10051 1998-09-28  Anthony Green  <green@cygnus.com>
10052
10053         * semantics.c (finish_asm_stmt): Always permit volatile asms.
10054
10055 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
10056
10057         * decl.c (grokdeclarator): Tighten checks for invalid
10058         destructors.  Improve error-messages and error-recovery.
10059         * decl2.c (check_classfn): Don't assume that mangled destructor
10060         names contain type information.
10061
10062 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
10063
10064         * search.c (get_base_distance): Remove assert.
10065
10066         * decl2.c (build_anon_union_vars): Don't process a field with no
10067         name.
10068         (finish_anon_union): Also complain about local anon unions with no
10069         members.
10070
10071 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10072
10073         * decl.c (lookup_namespace_name): If the name is a namespace,
10074         return it immediately.
10075
10076 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10077
10078         * cp-tree.h (define_case_label): Remove unused parameter.
10079         (check_java_method): Likewise.
10080         (grokclassfn): Likewise.
10081         (expand_aggr_init): Likewise.
10082         (build_x_delete): Likewise.
10083         (maybe_end_member_template_processing): Likewise.
10084         (unshare_base_binfos): Add prototype.
10085         (string_conv_p): Likewise.
10086         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
10087
10088         * cvt.c (build_up_reference): Remove unused parameter
10089         `checkconst', all callers changed.
10090         (build_type_conversion): Mark parameter `code' with
10091         ATTRIBUTE_UNUSED.
10092         (build_expr_type_conversion): Initialize variable `conv'.
10093
10094         * decl.c (push_namespace): Initialize variable `d'.
10095         (define_case_label): Remove unused parameter `decl', all callers
10096         changed.
10097
10098         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
10099         `argc' with ATTRIBUTE_UNUSED.
10100         (grokclassfn): Remove unused parameter `cname', all callers
10101         changed.
10102         (check_java_method): Likewise for parameter `ctype'.
10103         (copy_assignment_arg_p): Mark parameter `virtualp' with
10104         ATTRIBUTE_UNUSED.
10105         (finish_prevtable_vardecl): Likewise for parameter `prev'.
10106
10107         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
10108
10109         * init.c (expand_aggr_init_1): Remove unused parameter
10110         `alias_this', all callers changed.
10111         (expand_aggr_init): Likewise.
10112         (expand_default_init): Likewise.
10113         (build_new_1): Initialize variable `susp'.
10114         (build_x_delete): Remove unused parameter `type', all callers
10115         changed.
10116
10117         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
10118         ATTRIBUTE_UNUSED.
10119         (readescape): Use (unsigned) value in shift.
10120         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
10121         comparing to a signed quantity.
10122
10123         * pt.c (maybe_end_member_template_processing): Remove unused
10124         parameter `decl', all callers changed.
10125         (check_explicit_specialization): Add braces around empty body in
10126         an else-statement.
10127         (current_template_args): Initialize variable `args'.
10128         (lookup_template_class): Likewise for variable `prev_local_enum'.
10129         (tsubst_decl): Likewise for variable `r'.
10130         (set_mangled_name_for_template_decl): Initialize variable
10131         `context'.
10132
10133         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
10134         Likewise for variable `i'.
10135         (yylex): Initialize variable `trrr'.
10136
10137         * typeck.c (compparms): Mark variable `strict' with
10138         ATTRIBUTE_UNUSED.
10139
10140         * xref.c (simplify_type): Cast argument of ctype function to
10141         `unsigned char'.
10142
10143 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
10144
10145         * cp-tree.h (language_lvalue_valid): Remove.
10146         * decl.c (grokdeclarator): Don't disallow references to functions.
10147         * tree.c (lvalue_p_1): New function, combining duplicated
10148         code from ...
10149         (lvalue_p): Use it.
10150         (real_lvalue_p): Likewise.
10151         * typeck.c (language_lvalue_valid): Remove.
10152         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
10153         they don't have TREE_READONLY set.
10154         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
10155
10156 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10157
10158         * spew.c (yylex): Give diagnostic.
10159         * hash.h (is_reserved_word): Add export.
10160         * gxx.gperf: Likewise.
10161         * lex.h (rid): Add RID_EXPORT.
10162         * lex.c (init_parse): Likewise.
10163
10164 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
10165
10166         * friend.c (do_friend): Make warning a full sentence.
10167
10168 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
10169
10170         * parse.y (component_decl_list): Improve error-recovery.
10171
10172 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10173
10174         * decl.c (make_typename_type): Move error to point where name
10175         variable can be used by dump_type.
10176
10177 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
10178
10179         * decl.c (grokfndecl): Improve error-recovery.
10180         * decl2.c (grokfield): Likewise.
10181         * pt.c (finish_member_template_decl): Likewise.
10182
10183 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10184
10185         * method.c (hack_identifier): Finding multiple members is always
10186         an error.
10187
10188 1998-09-21  Per Bothner  <bothner@cygnus.com>
10189
10190         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
10191
10192 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
10193
10194         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
10195
10196 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
10197
10198         * class.c (maybe_warn_about_overly_private_class): Reformat.
10199
10200 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
10201
10202         * exception.cc (__cplus_type_matcher): Realign some code.
10203
10204 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
10205
10206         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
10207         (tinfo2.o): Likewise.
10208         (exception.o): Likewise.
10209         (new.o): Likewise.
10210         (opnew.o): Likewise.
10211         (opnewnt.o): Likewise.
10212         (opvnew.o): Likewise.
10213         (opvnewnt.o): Likewise.
10214         (opdel.o): Likewise.
10215         (opdelnt.o): Likewise.
10216         (opvdel.o): Likewise.
10217         (opvdelnt.o): Likewise.
10218
10219 1998-09-16  Richard Henderson  <rth@cygnus.com>
10220
10221         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
10222
10223 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
10224
10225         * call.c (build_field_call): Handle static data members too.
10226
10227         * typeck.c (comptypes): When comparing pointer types, check
10228         whether referred types match even in strictest modes.
10229
10230 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
10231
10232         * cp-tree.h: Revert previous change.
10233         (finish_struct_methods): Remove declaration.
10234         * class.c: Revert previous change.
10235         (maybe_warn_about_overly_private_class): New function.
10236         (finish_struct_methods): Declare here, and make static.  Remove
10237         unnecessary parameters.  Tidy slightly.  Use
10238         maybe_warn_about_overly_private_class.
10239         (finish_struct_1): Adjust.  Remove check for private constructors,
10240         now done elsewhere.
10241         (finish_struct): Adjust.
10242
10243 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
10244
10245         * except.c (expand_start_catch_block): No need to check for new
10246         exception model.
10247         (process_start_catch_block_old): Deleted.
10248         (process_start_catch_block): Add call to start_decl_1().
10249         (expand_end_catch_block): Add call to end_catch_handler().
10250         * exception.cc (__cplus_type_matcher): Only check the exception
10251         language if there is an exception table.
10252
10253 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
10254
10255         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
10256         as used to prevent conflicts with virtual function tables.
10257
10258 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
10259
10260         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
10261         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
10262         * class.c (maybe_class_too_private_p): New function.
10263         (finish_struct_methods): Use it.
10264         (finish_struct_1): Likewise.
10265         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
10266         appropriate.
10267
10268         * pt.c (check_specialization_scope): Fix spelling error.
10269         (check_explicit_specialization): Remove code to handle explicit
10270         specializations in class scope; they are now correctly diagnosed
10271         as errors.
10272
10273 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
10274
10275         * decl.c (pushdecl): Don't copy types if the
10276         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
10277         type.
10278
10279 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
10280
10281         * class.c (get_enclosing_class): New function.
10282         (is_base_of_enclosing_class): Likewise.
10283         * cp-tree.h (get_enclosing_class): Declare.
10284         (is_base_of_enclosing_class): Likewise.
10285         * pt.c (coerce_template_parms): Use them.
10286
10287 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
10288
10289         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
10290         null to decide whether to use it.
10291
10292         * error.c (dump_type_real): Handle NAMESPACE_DECL.
10293         * parse.y (base_class.1): Avoid crash on error.
10294
10295 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10296
10297         * decl.c (make_typename_type): If context is a namespace, the code
10298         is in error.
10299
10300 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
10301
10302         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
10303
10304 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
10305
10306         * cp-tree.h (anonymous_namespace_name): Declare.
10307         * decl.c: Define it.
10308         (push_namespace): Use anonymous_namespace_name, rather than local
10309         static anon_name.
10310         * error.c (dump_decl): If a namespace is named
10311         anonymous_namespace_name, call it {anonymous}.
10312
10313         * decl.c (grokparms): Distinguish between references and pointers
10314         in error message.
10315
10316 1998-09-08  Richard Henderson  <rth@cygnus.com>
10317             Mark Mitchell  <mark@markmitchell.com>
10318
10319         * pt.c (process_partial_specialization): Consistently allocate
10320         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
10321         tpd.parms, where appropriate.
10322
10323 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
10324
10325         * Makefile.in (INCLUDES): Update after recent toplevel gcc
10326         reorganizations.
10327
10328 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
10329
10330         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
10331         * class.c (finish_struct): Remove hackery to deal with explicit
10332         specializations in class scope.
10333         * decl.c (grokfndecl): Improve error-recovery.
10334         * decl2.c (grokfield): Likewise.
10335         * pt.c (check_specialization_scope): New function.
10336         (begin_specialization): Call it.
10337         (process_partial_specialization): New function, split out from
10338         push_template_decl.  Check partial specializations more
10339         stringently.
10340         (push_template_decl): Call it.
10341         (check_explicit_specialization): Don't attempt to handle explicit
10342         specializations in class scope.
10343         (template_parm_data): Document.  Add current_arg and
10344         arg_uses_template_parms.
10345         (mark_template_parm): Set it.
10346         (tsubst_arg_types): Remove unused variable.
10347         * semantics.c (begin_class_definition): Tweak.
10348
10349 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
10350
10351         * inc/typeinfo (type_info::type_info(const char*)): Make
10352         `explicit'.
10353
10354         * cp-tree.h (hash_tree_cons_simple): New macro.
10355         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
10356         (coerce_template_parms): Use make_temp_vec, instead of
10357         make_tree_vec.  Document this behavior.
10358         (lookup_template_class): Likewise.
10359         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
10360         Remove dead code (and add assertion to check its deadness).  Fix
10361         bug w.r.t. exception specifications.
10362
10363 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
10364
10365         * decl2.c (import_export_vtable): Always make artificials comdat.
10366         (import_export_decl): Likewise.
10367         * pt.c (mark_decl_instantiated): Likewise.
10368
10369 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
10370
10371         * cp-tree.h (finish_globally_qualified_member_call_expr):
10372         Rename to ...
10373         (finish_qualified_call_expr).
10374         * semantics.c: Likewise.
10375         * parse.y (primary): Use it.
10376         * method.c (hack_identifier): Remove redundant code.
10377
10378         * init.c (resolve_offset_ref): Call convert_from_reference to
10379         handle members of reference type.  Improve error recovery.
10380
10381 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
10382
10383         * cp-tree.h: Declare warn_nontemplate_friend.
10384         * decl2.c (lang_decode_option): Set.
10385         * lang-options.h: Add -Wnon-template-friend.
10386         * friend.c (do_friend): Use to toggle non-template function warning.
10387
10388 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
10389
10390         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
10391         corresponding INTEGER_CSTs when processing_template_decl.
10392         * pt.c (tsubst_enum): Tweak accordingly.
10393
10394 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10395
10396         * decl.c (pushdecl_class_level): Add warning here.
10397         (pushdecl): Tweak.
10398
10399 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
10400
10401         * cvt.c (convert_pointer_to_real): Tidy.
10402         * search.c (get_base_distance_recursive): Simplify.
10403         (get_base_distance): Likewise.
10404
10405         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
10406         parms.
10407
10408 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
10409
10410         * lex.c (check_newline):  Call HANDLE_PRAGMA before
10411         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
10412         if unknown pragmas are encountered.
10413         (handle_sysv_pragma): Interpret return code from
10414         handle_pragma_token ().  Return success/failure indication rather
10415         than next unprocessed character.
10416         (pragma_getc): New function: retrieves characters from the
10417         input stream.  Defined when HANDLE_PRAGMA is defined.
10418         (pragma_ungetc): New function: replaces characters back into the
10419         input stream.  Defined when HANDLE_PRAGMA is defined.
10420
10421 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
10422
10423         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
10424         * class.c (build_vtable_entry_ref): Likewise.
10425
10426 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
10427
10428         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
10429         * decl2.c (import_export_decl): Likewise.
10430         * pt.c (instantiate_decl): Use it.
10431
10432 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
10433
10434         * decl.c (lookup_name_real): Also do implicit typename thing for
10435         artificial TYPE_DECLs.
10436         * search.c (lookup_field): Likewise.
10437         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
10438         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
10439         (enter_scope_of): Extract type from implicit typename.
10440         (begin_class_definition): Likewise.
10441         * lex.c (identifier_type): Handle implicit typename when checking
10442         for SELFNAME.
10443
10444         * cp-tree.h: Declare flag_strict_prototype.
10445         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
10446         -fstrict-prototype.
10447         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
10448         specified, set it to the value of pedantic.
10449
10450 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
10451
10452         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
10453
10454 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
10455
10456         * decl.c (finish_enum): Handle member enums of classes declared in
10457         template functions.
10458
10459         * decl2.c (grok_x_components): Strip attributes before calling
10460         groktypename.
10461
10462 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
10463
10464         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
10465         -fenum-int-equivalence and -fno-nonnull-objects.
10466         * class.c (check_for_override): Remove support for -fall-virtual.
10467         (finish_struct_1): Likewise.
10468         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
10469         * typeck.c (build_binary_op_nodefault): Likewise.
10470         * cvt.c (ocp_convert): Likewise.
10471         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
10472         * class.c (build_vbase_path): Likewise.
10473
10474 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
10475
10476         * Makefile.in (INTERFACE): New, set to 1.
10477
10478 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
10479
10480         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
10481         comparing with global_namespace.
10482         (dump_aggr_type): Likewise.
10483
10484         * decl.c (grokfndecl): Issue error on declaration of friend
10485         templates with explicit template arguments.
10486
10487         * pt.c (convert_template_argument): New function, split out
10488         from...
10489         (coerce_template_parms): Here.
10490         (tsubst): Attempt better error-recovery.
10491
10492 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10493
10494         * pt.c (decl_template_parm_p): Add checks for
10495         TEMPLATE_TEMPLATE_PARM.
10496
10497 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
10498
10499         * lex.c (do_identifier): Fix thinko in previous change.
10500
10501 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
10502
10503         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
10504         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
10505
10506 1998-08-28  Richard Henderson  <rth@cygnus.com>
10507
10508         Add support for discarding unused virtual functions.
10509         * lang-options.h: Add -fvtable-gc.
10510         * cp-tree.h: Add flag_vtable_gc.
10511         * decl2.c (output_vtable_inherit): New fn.
10512         (finish_vtable_vardecl): Call it.
10513         * class.c (build_vtable_entry_ref): New fn.
10514         (build_vtbl_ref): Call it.
10515
10516 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
10517
10518         * cp-tree.h (build_enumerator): Take the enumeration type as a
10519         parameter.
10520         * decl.c (finish_enum): Don't set the TREE_TYPE for the
10521         enumeration constant values if we're processing_template_decls.
10522         Don't set the type for the CONST_DECLs either; that's done in
10523         build_enumerator.
10524         (build_enumerator): Take the enumeration type as a
10525         parameter.
10526         * lex.c (do_identifier): Don't resolve enumeration constants while
10527         processing template declarations, even if they happen to be
10528         TEMPLATE_PARM_INDEXs.
10529
10530         * parse.y (current_enum_type): New variable.
10531         (primary): Don't allow statement-expression in local classes just
10532         as we don't in global classes.
10533         (structsp): Use current_enum_type.
10534         (enum_list): Likewise.
10535         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
10536         finish_enum; they no longer occur.
10537
10538         * cp-tree.h (finish_base_specifier): New function.
10539         * parse.y (base_class): Use it.
10540         * semantics.c (finish_base_specifier): Define it.
10541
10542         * parse.y (structsp): Warn on use of typename outside of template
10543         declarations.
10544
10545 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
10546
10547         * lex.c (handle_cp_pragma): Remove #pragma vtable.
10548         * lang-options.h: Remove +e options.
10549         * decl2.c (lang_decode_option): Likewise.
10550         (import_export_vtable): Don't check write_virtuals.
10551         (finish_vtable_vardecl, finish_file): Likewise.
10552         * search.c (dfs_debug_mark): Likewise.
10553         * semantics.c (begin_class_definition): Likewise.
10554         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
10555
10556         * call.c (build_over_call): Check flag_elide_constructors.
10557         * decl2.c: flag_elide_constructors defaults to 1.
10558         * typeck.c (convert_arguments): Remove return_loc parm.
10559         (build_function_call_real): Adjust.
10560
10561         * search.c: Tear out all mi_matrix and memoize code.
10562         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
10563         * lang-options.h: Remove documentation for -fhandle-exceptions,
10564         -fmemoize-lookups and -fsave-memoized.
10565         * cp-tree.h: Lose mi_matrix and memoize support.
10566         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
10567         * class.c: Lose struct class_level.
10568         (pushclass, popclass): Lose memoize support.
10569         * init.c (build_offset_ref): Likewise.
10570
10571         Never change BINFO_INHERITANCE_CHAIN.
10572         * init.c (emit_base_init): Change modification of
10573         BINFO_INHERITANCE_CHAIN to an assert.
10574         * search.c (get_base_distance_recursive): Likewise.
10575         (get_base_distance): Likewise.
10576         (lookup_member): Likewise.
10577         (convert_pointer_to_single_level): Likewise.
10578         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
10579         (lookup_fnfields): Likewise.
10580         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
10581         (unshare_base_binfos): Don't call propagate_binfo_offsets.
10582         (layout_basetypes): Call propagate_binfo_offsets instead of
10583         unshare_base_binfos.
10584         * decl.c (xref_basetypes): Call unshare_base_binfos.
10585         * pt.c (instantiate_class_template): Likewise.
10586         * tree.c (reverse_path): Remove 'copy' parm; always make a
10587         temporary copy.
10588         * class.c (build_vbase_path): Just call it.
10589         * search.c (compute_access): Likewise.  Don't re-reverse.
10590
10591 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
10592
10593         * class.c (build_vbase_path): Use reverse_path.
10594         (finish_base_struct): Move warnings for inaccessible bases to
10595         layout_basetypes.
10596         (modify_one_vtable): Remove check of TREE_USED (binfo).
10597         (fixup_vtable_deltas1): Likewise.
10598         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
10599         (xref_tag): Remove binfos parameter.
10600         (make_binfo): Remove chain parameter.
10601         (reverse_path): Add copy parameter.
10602         * decl.c (init_decl_processing): Change calls to xref_tag.
10603         (xref_tag): Remove binfos parameter.
10604         (xref_basetypes): Change calls to make_binfo.
10605         * decl2.c (grok_x_components): Change calls to xref_tag.
10606         (handle_class_head): Likewise.
10607         * friend.c (do_friend): Likewise.
10608         * lex.c (make_lang_type): Change calls to make_binfo.
10609         * parse.y (structsp): Change calls to xref_tag.
10610         (named_complex_class_head_sans_basetype): Likewise.
10611         (named_class_head): Likewise.
10612         * rtti.c (init_rtti_processing): Likewise.
10613         * search.c (compute_access): Change calls to reverse_path.
10614         (dfs_get_vbase_types): Change calls to make_binfo.
10615         (get_vbase_types): Remove dead code.
10616         * tree.c (unshare_base_binfos): Change calls to make_binfo.
10617         (layout_basetypes): Warn here about inaccessible bases.
10618         (make_binfo): Remove chain parameter.
10619         (reverse_path): Add copy parameter.
10620
10621 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
10622
10623         * class.c: #if 0 complete_type_p.
10624         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
10625         * method.c (process_overload_item): Likewise.
10626         * typeck.c (comp_target_types): Likewise.
10627
10628         Stop sharing binfos for indirect virtual bases.
10629         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
10630         (layout_basetypes): Likewise.
10631         (unshare_base_binfos): Copy vbases, too.
10632         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
10633         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
10634         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
10635         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
10636         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
10637         reference to BINFO_VIA_PUBLIC.
10638         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
10639         (push_class_decls): Use them.
10640         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
10641         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
10642
10643 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
10644
10645         * decl.c (build_enumerator): Set DECL_CONTEXT for the
10646         CONST_DECLs.
10647
10648 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
10649
10650         * cp-tree.h (finish_enum): Change prototype.
10651         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
10652         VALUES parameter.  Don't try to compute mins/maxs if
10653         processing_template_decl.
10654         * parse.y (structsp): Use new calling sequence for finish_enum.
10655         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
10656         (lookup_template_class): Remove unused variables.  Tweak.
10657         Register enums on instantiation list before substituting
10658         enumeration constants.
10659         (tsubst_decl): Remove unused variables.
10660         (regenerate_decl_from_template): Likewise.
10661
10662         * decl.c (duplicate_decls): Don't obliterate the
10663         DECL_TEMPLATE_INFO for a template if we're not replacing it with
10664         anything.
10665
10666         * lex.c (do_identifier): Fix typo in comment.
10667
10668 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10669
10670         * errfn.c: Remove stdarg.h/varargs.h.
10671         * tree.c: Likewise.
10672
10673 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
10674
10675         * pt.c (tsubst_copy): Only do typename overloading on an
10676         IDENTIFIER_NODE that happens to look like a typename if it actually
10677         has a type for us to use.
10678
10679 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
10680
10681         * typeck.c (comp_cv_target_types): Split out...
10682         (comp_target_types): From here.  Don't allow cv-qual changes under
10683         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
10684         (build_ptrmemfunc): Pass 1 to nptrs.
10685         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
10686
10687 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
10688
10689         * search.c (dependent_base_p): Don't compare a binfo to
10690         current_class_type; use the TREE_TYPE of the binfo instead.
10691
10692         * cp-tree.h (CLASS_TYPE_P): Revise definition.
10693
10694 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
10695
10696         * decl.c (duplicate_decls): Don't complain about different
10697         exceptions from an internal decl even if pedantic.
10698
10699         * typeck.c (convert_for_assignment): Converting from pm of vbase
10700         to derived is an error, not a sorry.
10701
10702         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
10703         * class.c (fixed_type_or_null): Rename from
10704         resolves_to_fixed_type_p.  Return the dynamic type of the
10705         expression, if fixed, or null.
10706         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
10707         does not match the static type.
10708         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
10709         resolves_to_fixed_type_p again.
10710
10711 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
10712
10713         * pt.c (tsubst_decl): Move special case code for dealing with
10714         tricky friend templates here from ...
10715         (regenerate_decl_from_template): Here.
10716
10717 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
10718
10719         * decl.c (start_decl): Remove redundant linkage check.
10720
10721 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
10722
10723         * typeck.c (c_expand_return): Handle the case that valtype
10724         is wider than the functions return type.
10725
10726 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
10727
10728         * cp-tree.h (CLASS_TYPE_P): New macro.
10729         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
10730         * pt.c (process_template_parm): Undo previous change.
10731
10732 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
10733
10734         * cp-tree.h: Declare.
10735         * pt.c (decl_template_parm_p): New function.
10736         * decl.c (pushdecl): Check decls for redeclaring template parms.
10737         (xref_tag): Make redeclaration an error, print decl.
10738         * decl2.c (grokfield): Check field_decls for redeclaration as well.
10739
10740 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
10741
10742         * parse.y (primary): Fix up the type of string constants.
10743
10744 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
10745
10746         * typeck.c (convert_for_initialization): Move check for odd uses
10747         of NULL to avoid duplicate warnings.
10748
10749 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
10750
10751         * tree.c (lvalue_type): Fix for arrays.
10752         * typeck.c (string_conv_p): New fn.
10753         (convert_for_assignment): Use it.
10754         (build_unary_op): Use lvalue_type.
10755         * call.c (standard_conversion, convert_like): Use string_conv_p.
10756         (add_function_candidate): Use lvalue_type.
10757         * cvt.c (convert_to_reference): Likewise.
10758         * decl2.c (lang_decode_option): Ignore -traditional.
10759         * decl.c (init_decl_processing): flag_writable_strings inhibits
10760         flag_const_strings.
10761
10762 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
10763
10764         * lang-options.h (lang_options): Add fconst-strings to the list
10765         of valid options.
10766         * decl2.c (lang_f_options, lang_decode_option): Likewise.
10767
10768 1998-08-24  Nathan Sidwell  <nathan@acm.org>
10769
10770         * lex.c (real_yylex): Don't warn about long long constants if
10771         we're allowing long long.
10772
10773 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10774
10775         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
10776         accessing bindings directly.
10777
10778         * search.c (my_tree_cons): Reimplement.
10779
10780         * lang-specs.h: Remove __HONOR_STD.
10781         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
10782
10783 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
10784
10785         * decl.c (grokdeclarator): Complain about in-class initialization
10786         of aggregates and/or references.
10787         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
10788         TEMPLATE_TYPE_PARMs.
10789
10790         * decl2.c (grok_array_decl): Add comment.
10791         (mark_used): Don't instantiate an explicit instantiation.
10792         * friend.c (make_friend_class): Remove bogus comment.  Fix check
10793         for partial specializations.
10794         * pt.c (check_explicit_specialization): Don't
10795         SET_DECL_EXPLICIT_INSTANTIATION here.
10796         (mark_decl_instantiated): Or here.
10797         (do_decl_instantiation): Do it here, instead.  Add checks for
10798         duplicate explicit instantiations, etc.  Tidy.
10799         (do_type_instantiation): Likewise.
10800         (instantiate_decl): Improve comments.  Complain about explicit
10801         instantiations where no definition is available.
10802
10803         * cp-tree.h (ansi_null_node): Remove.
10804         * call.c (build_over_call): Warn about converting NULL to an
10805         arithmetic type.
10806         * cvt.c (build_expr_type_conversion): Likewise.  Use
10807         null_ptr_cst_p instead of expanding it inline.
10808         * decl.c (ansi_null_node): Remove.
10809         (init_decl_processing): Make null_node always have integral type.
10810         * except.c (build_throw): Warn about converting NULL to an
10811         arithmetic type.
10812         * lex.c (init_parse): Remove handling of ansi_null_node.
10813         * pt.c (type_unification_real): Don't convert NULL to void* type.
10814         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
10815         (convert_for_assignment): Warn about converting NULL to an
10816         arithmetic type.
10817         (convert_for_initialization): Likewise.
10818
10819 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
10820
10821         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
10822         * pt.c (coerce_template_parms): Use no_linkage_check.
10823         * decl.c (grokvardecl): Likewise.
10824         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
10825
10826         * method.c (process_overload_item): Remove useless code.
10827
10828 1998-08-20  Per Bothner  <bothner@cygnus.com>
10829
10830         Handle new'ing of Java classes.
10831         * init.c (build_class_classref):  New function.
10832         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
10833         constructor does not return this;  don't need to exception-protect.
10834
10835         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
10836         * decl2.c (acceptable_java_type):  Handle template-derived types.
10837
10838 1998-08-20  Per Bothner  <bothner@cygnus.com>
10839
10840         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
10841
10842 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
10843
10844         * decl.c (duplicate_decls): Always merge the old and new patterns
10845         for templates, regardless of whether or not the new one has
10846         DECL_INITIAL.  Don't throw away specializations.  Merge
10847         DECL_SAVED_TREE.
10848         * pt.c (tsubst_decl): Use the right pattern when calculating the
10849         complete args for a new template instance.
10850         (do_decl_instantiation): Fix typo in comment.
10851         (regenerate_decl_from_template): Deal with tricky friend template
10852         case.
10853         (instantiate_decl): Likewise.
10854
10855 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
10856
10857         * init.c (build_builtin_delete_call): Add missing assemble_external
10858         call.
10859
10860 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
10861
10862         * parse.y (notype_unqualified_id): Also accept ~A<int>.
10863
10864 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
10865
10866         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
10867         arithmetic.
10868         * except.c (build_throw): Warn when NULL is thrown, even with
10869         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
10870         thrown expression.
10871
10872         * cp-tree.h (ansi_null_node): New variable.
10873         * decl.c (ansi_null_node): New variable.
10874         (init_decl_processing): Initialize its type.
10875         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
10876         for null_node in non-ANSI mode.
10877         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
10878         place of null_node to avoid spurious errors.
10879
10880 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
10881
10882         * cp-tree.h (enter_scope_of): New function.
10883         * parse.y (complex_direct_notype_declarator): Use it.
10884         * semantics.c (enter_scope_of): New function.
10885
10886 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
10887
10888         * decl.c (grokparms): No, here.
10889
10890         * decl.c (grokdeclarator): Catch parm with pointer to array of
10891         unknown bound here...
10892         * method.c (process_overload_item): ...not here.
10893
10894         * gxxint.texi: Remove obsolete documentation of overloading code.
10895
10896         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
10897         * class.c (finish_struct_bits): Likewise.
10898
10899         * tree.c (lvalue_type): Fix for arrays.
10900         * typeck.c (build_unary_op): Use lvalue_type.
10901         * call.c (add_function_candidate): Likewise.
10902         * cvt.c (convert_to_reference): Likewise.
10903
10904         * decl2.c (lang_decode_option): Ignore -traditional.
10905
10906         * init.c (build_offset_ref): Don't mess with error_mark_node.
10907         * lex.c (do_scoped_id): Use cp_error.
10908
10909         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
10910
10911 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10912
10913         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
10914
10915 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
10916
10917         * cp-tree.h (set_identifier_local_value): Provide prototype.
10918
10919         * decl2.c (do_namespace_alias): Remove unused variables `binding'
10920         and `old'.
10921
10922 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
10923
10924         * Makefile.in: Rename BBISON to BISON so that it can be properly
10925         inherited from the parent makefile.
10926
10927 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
10928
10929         * lang-options.h: Add -finit-priority.
10930         * decl2.c: Likewise.  Check flag_init_priority instead of
10931         USE_INIT_PRIORITY.
10932
10933         * decl2.c (setup_initp): New fn.
10934         (start_objects, finish_objects, do_ctors): Handle init_priority.
10935         (do_dtors, finish_file): Likewise.
10936
10937 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
10938
10939         * pt.c (tsubst_copy): Hush warning.
10940
10941         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
10942
10943 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
10944
10945         * pt.c (print_template_context): Don't abort when instantiating a
10946         synthesized method.
10947
10948         * decl.c (grokdeclarator): Issue errors on namespace qualified
10949         declarators in parameter lists or in class scope.
10950
10951 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
10952
10953         * pt.c (check_explicit_specialization): Don't abort on bogus
10954         explicit instantiations.
10955
10956 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
10957
10958         * typeck.c (require_complete_type): Use complete_type_or_else.
10959         (complete_type_or_else): Always return NULL_TREE on failure, as
10960         documented.
10961
10962         * pt.c (tsubst_aggr_type): Prototype.
10963         (tsubst_decl): New function, split out from tsubst.  Set
10964         input_filename and lineno as appropriate.
10965         (pop_tinst_level): Restore the file and line number saved in
10966         push_tinst_level.
10967         (instantiate_class_template): Set input_filename and lineno as
10968         appropriate.
10969         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
10970         context for a TYPENAME_TYPE is complete.
10971
10972         * decl2.c (grokbitfield): Issue errors on bitfields declared with
10973         function type.
10974         (do_dtors): As in do_ctors, pretend to be a member of the same
10975         class as a static data member while generating a call to its
10976         destructor.
10977
10978         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
10979         conversions, even in complex virtual base class hierarchies.
10980
10981 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
10982
10983         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
10984         (TYPE_TEMPLATE_INFO): Likewise.
10985         (SET_TYPE_TEMPLATE_INFO): Likewise.
10986         (ENUM_TI_TEMPLATE): Likewise.
10987         (ENUM_TI_ARGS): Likewise.
10988         (lookup_nested_type_by_name): Remove.
10989         * decl.c (maybe_process_template_type_declaration): Handle enums.
10990         (start_enum): Don't check for primary-template enum declarations
10991         here.
10992         (finish_enum): Clean up, document.  Make sure template enum
10993         constants get the correct type.
10994         (build_enumerator): Copy initializers for template enumerations,
10995         too.
10996         (grok_enum_decls): Document.
10997         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
10998         better.  Build LOOKUP_EXPRs for local variables, even if they are
10999         TREE_PERMANENT.
11000         * pt.c (tsubst_enum): Remove field_chain parameter.
11001         (template_class_depth): Include the depth of surrounding function
11002         contexts.
11003         (push_template_decl): Check for primary-template enum declarations
11004         here.  Deal with enumeration templates.
11005         (lookup_template_class): Likewise.
11006         (for_each_template_parm): Likewise.
11007         (instantiate_class_template): Don't call tsubst_enum directly,
11008         call tsubst instead, to instantiate enums.  Deal with all
11009         field_chain issues here, not in tsubst_enum.
11010         (lookup_nested_type_by_name): Remove.
11011         (tsubst_aggr_type): Revise handling of enumeration types.
11012         (tsubst): Likewise.
11013         (tsubst_copy): Likewise.
11014         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
11015
11016 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
11017
11018         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
11019         uses template parameters.
11020         * method.c (build_template_parm_names): Use the full set of
11021         template arguments for tsubst'ing.
11022         (build_overload_identifier): Pass the full set of template
11023         arguments to build_template_parm_names, not just the
11024         innermost_args.
11025         * pt.c (TMPL_ARGS_DEPTH): Define using
11026         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
11027         (NUM_TMPL_ARGS): New macro.
11028         (add_outermost_template_args): Deal with the case where the outer
11029         args will be completely discarded.
11030         (coerce_template_parms): Use the full set of template arguments
11031         for tsubst'ing.  Simplify.  Add some asserts.  Improve
11032         error messages.
11033         (lookup_template_class): Pass the full set of template arguments
11034         to coerce_template_parms.
11035         (tsubst): Add assertion.
11036         (do_type_instantiation): Don't instantiate member template
11037         classes.
11038
11039         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
11040         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
11041
11042 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
11043
11044         * method.c (set_mangled_name_for_decl): Change return type to void.
11045
11046         * decl.c (lookup_name_real): A namespace-level decl takes priority
11047         over implicit typename.  Avoid doing the same lookup twice.
11048
11049         * search.c (dependent_base_p): New fn.
11050         (dfs_pushdecls, dfs_compress_decls): Use it.
11051
11052         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
11053         virtual functions if the type doesn't have any.
11054
11055 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
11056
11057         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
11058         uses template parameters.
11059
11060 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
11061
11062         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
11063         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
11064         * lex.c (do_identifier): Don't use a second argument, or a type,
11065         when building LOOKUP_EXPRs.
11066         (do_identifier): Likewise.
11067         (do_scoped_id): Likewise.
11068         * method.c (hack_identifier): Improve error message.
11069         * pt.c (lookup_template_function): Don't needlessly call
11070         copy_to_permanent or build_min.
11071         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
11072         necessary.
11073         (do_decl_instantiation): Improve error message.
11074         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
11075         (build_min): Copy the type to the permanent obstack, too.
11076
11077 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
11078
11079         * init.c (init_init_processing): Remove BI* handling.
11080         (build_builtin_call): Remove.
11081         (build_builtin_delete_call): New fn.
11082         (build_delete): Use it.
11083
11084 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
11085
11086         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
11087         (maybe_check_template_type): New function.
11088         * decl.c (maybe_process_template_type_declaration): New function,
11089         split out from pushtag  Call maybe_check_template_type.
11090         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
11091         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
11092         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
11093         * pt.c (template_class_depth_real): Generalization of ...
11094         (template_class_depth): Use it.
11095         (register_specialization): Use duplicate_decls for duplicate
11096         declarations of specializations.
11097         (maybe_check_template_type): New function.
11098         (push_template_decl_real): Fix comment.
11099         (convert_nontype_argument): Likewise.
11100         (lookup_template_class): Likewise.  Avoid an infinite loop on
11101         erroneous code.
11102         (tsubst_friend_function): Fix comment.
11103         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
11104         an IDENTIFIER_NODE.
11105         * semantics.c (begin_function_definition): Use
11106         reset_specialization to note that template headers don't apply
11107         directly to declarations after the opening curly for a function.
11108
11109 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
11110
11111         * decl.c (push_overloaded_decl): Use current_namespace instead of
11112         DECL_CONTEXT (decl) to determine where we go.
11113
11114         * decl.c (lookup_name_real): Fix typo.
11115
11116 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
11117
11118         * friend.c (is_friend): Be lenient with member functions to deal
11119         with nested friends.
11120
11121 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
11122
11123         * class.c (finish_struct_1): Convert integer_zero_node to
11124         ssizetype before passing it to set_rtti_entry.
11125         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
11126         of any size to a pointer.
11127
11128 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
11129
11130         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
11131         (build_template_decl_overload): Remove.
11132         (set_mangled_name_for_decl): New function.
11133         (innermost_args): Remove is_spec parameter.
11134         (most_specialized, most_specialized_class): Remove declarations.
11135         (lookup_template_class): Add entering_scope parameter.
11136         (maybe_process_partial_specialization): New function.
11137         (finish_template_decl): Likewise.
11138         (finish_template_type): Likewise.
11139         * class.c (finish_struct): Clean up processing of member template
11140         specializations.
11141         * decl.c (pushtag): Fix formatting.
11142         (lookup_tag): Improve handling of pseudo-global levels.
11143         (make_typename_type): Adjust call to lookup_template_class.
11144         (shadow_tag): Use maybe_process_partial_specialization.
11145         (xref_tag): Improve handling of member friends.
11146         (start_function): Call push_nested_class before
11147         push_template_decl.  Don't call push_template_decl for
11148         specializations.
11149         * decl2.c (grok_x_components): Don't call xref_tag for
11150         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
11151         (grokclassfn): Use set_mangled_name_for_decl.
11152         (arg_assoc_class): Adjust call to innermost_args.
11153         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
11154         * error.c (dump_function_name): Improve printing of template
11155         function names.
11156         * friend.c (is_friend): Don't compare types of decls to determine
11157         friendship, unless flag_guiding_decls.
11158         (make_friend_class): Partial specializations cannot be friends.
11159         (do_friend): Use set_mangled_name_for_decl.  Call
11160         push_template_decl_real instead of push_template_decl.
11161         * method.c (build_decl_overload_real): Remove prototype.  Give it
11162         external linkage.
11163         (build_overload_identififer): Adjust call to innermost_args.
11164         (build_template_decl_overload): Remove.
11165         (set_mangled_name_for_decl): New function.
11166         * parse.y (.finish_template_type): New non-terminal.
11167         (template_def): Use finish_template_decl.  Use template_extdef
11168         instead of extdef.
11169         (template_extdef, template_datadef): New non-terminals, containing
11170         only those rules for things which can be templates.
11171         (datadef): Tidy.
11172         (template_type, self_template_type): Use .finish_template_type.
11173         (named_class_head): Use maybe_process_partial_specialization.
11174         * pt.c (mangle_class_name_for_template): Remove context parameter.
11175         (get_class_bindings): Remove outer_args parameter.
11176         (complete_template_args): Remove.
11177         (add_outermost_template_args): New function.
11178         (register_specialization): Return the specialization.
11179         (unregister_specialization): New function.
11180         (tsubst_template_parms): Likewise.
11181         (most_specialized, most_specialized_class): Prototype here as
11182         static.
11183         (original_template): Rename to most_general_template.
11184         (tsubst_template_parms): New function.
11185         (set_mangled_name_for_template_decl): Likewise.
11186         (TMPL_ARGS_DEPTH): New macro.
11187         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
11188         (TMPL_ARGS_LEVEL): New macro.
11189         (SET_TMPL_ARGS_LEVEL): Likewise.
11190         (TMPL_ARG): Likewise.
11191         (SET_TMPL_ARG): Likewise.
11192         (TMPL_ARGS_DEPTH): Likewise.
11193         (finish_member_template_decl): Use finish_template_decl.
11194         (maybe_process_partial_specialization): New function, split out
11195         from tsubst.
11196         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
11197         (maybe_begin_member_template_processing): Use new macros.
11198         (is_member_template): Likewise.
11199         (is_member_template_class): Likewise.
11200         (add_to_template_args): Likewise.  Deal with multiple levels of
11201         args.
11202         (maybe_process_partial_specialization): New function.
11203         (retrieve_specialization): Add consistency check.
11204         (determine_specialization): Return full argument list.
11205         (check_explicit_specialization): Tweak friend handling.  Use full
11206         argument lists.  Simplify.
11207         (current_template_args): Use new macros.
11208         (push_template_decl_real): Change ill-named mainargs to specargs.
11209         Check that a partial specialization actually specializes at least
11210         one parameter.   Improve friend handling.  Modify for full
11211         template arguments.
11212         (classtype_mangled_name): Don't mangle the names of
11213         specializations.
11214         (lookup_template_class): Add entering_scope parameter.  Use it to
11215         avoid finding a template type when an instantiation is required.
11216         Simplify.  Use full template arguments.
11217         (tsubst_friend_function): Use unregister_specialization.  Use new
11218         macros.  Use full template arguments.
11219         (tsubst_friend_class): Substitute, using tsubst_template_parms,
11220         into the template parameters before passing them to
11221         redeclare_class_template.
11222         (instantiate_class_template): Simplify.  Use full template
11223         arguments.  Adjust calls to get_class_bindings.  Use
11224         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
11225         (innermost_args): Use new macros.
11226         (tsubst_aggr_type): New function, split out from tsubst.
11227         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
11228         conventions for lookup_template_class.  Refine handling of partial
11229         instantiations.   Remove calls to complete_template_args.
11230         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
11231         and set_mangled_name_for_template_decl.
11232         (tsubst_copy): Use tsubst_aggr_type.
11233         (instantiate_template): Use full template arguments.
11234         (more_specialized): Improve formatting.
11235         (more_specialized_class): Adjust calls to get_class_bindings.
11236         (get_bindings_real): Don't call complete_template_args.
11237         (most_specialized): Don't overwrite input; create a new list.
11238         (most_specialized_class): Use most_general_template.
11239         (regenerate_decl_from_template): Use unregister_specialization.
11240         Use full template arguments.
11241         (instantiate_decl): Use full template arguments.
11242         (set_mangled_name_for_template_decl): New function.
11243         * semantics.c (begin_class_definition): Use
11244         maybe_process_partial_specialization.
11245         (finish_member_class_template): New function.
11246         (finish_template_decl): Likewise.
11247         (finish_template_type): Likewise.
11248         (typeck.c): Don't crash after issuing a compiler_error.
11249         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
11250
11251 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
11252
11253         * typeck2.c (build_functional_cast): Handle default-initialization.
11254
11255         * call.c (build_over_call): Pass 1 to popclass.
11256
11257         * parse.y (direct_notype_declarator): Add precedence declaration
11258         to notype_unqualified_id case.
11259         * Makefile.in (EXPECT): Adjust.
11260
11261         * tree.c (ovl_member): Fix for single function in OVL.
11262
11263 1998-07-27  Dave Brolley  <brolley@cygnus.com>
11264
11265         * c-lex.c (yylex): Fix boundary conditions in character literal and
11266         string literal loops.
11267
11268 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
11269
11270         * decl.c (lookup_name_real): OK, do return the from_obj value
11271         unless got_object depends on template parms.
11272
11273         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
11274
11275         * pt.c (coerce_template_parms): Also complain about local enums.
11276
11277         * cp-tree.h: Add prototype for set_identifier_local_value.
11278         * decl.c (set_identifier_local_value_with_scope): Make static,
11279         prototype.
11280         * search.c (covariant_return_p): Likewise.
11281         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
11282
11283         * call.c (build_method_call): Only pull out the type of a destructor
11284         if it's a template type parm.
11285         * decl.c (lookup_name_real): Never return the from_obj value.
11286
11287 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
11288
11289         * except.c (process_start_catch_block_old): Call start_decl_1 for
11290         catch parm.
11291         * decl.c (start_decl_1): Avoid duplicate error.
11292
11293         * init.c (expand_default_init): Only perform the initialization if
11294         it will do something.
11295
11296 1998-07-23  H.J. Lu  (hjl@gnu.org)
11297
11298         * parse.y (base_class): Check for invalid base class.
11299
11300 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
11301
11302         * decl2.c (import_export_template): Fold in...
11303         (import_export_class): ...to here.  Handle dllimport/export.
11304
11305         * class.c (build_vtable): Pass at_eof to import_export_vtable.
11306         (prepare_fresh_vtable): Likewise.
11307         * decl2.c (import_export_class): Split out...
11308         (finish_prevtable_vardecl): From here.
11309         * class.c (finish_struct_1): Call import_export_class if at_eof.
11310
11311         * decl.c (start_function): #if 0 mysterious code I wrote and have
11312         forgotten why.
11313         * rtti.c (get_tinfo_fn): If this is for a class type, set
11314         DECL_CONTEXT.
11315
11316 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
11317
11318         * inc/exception: Change terminate and unexpected to ().
11319
11320         * parse.y (named_class_head_sans_basetype_defn): A
11321         named_class_head_sans_basetype followed by '{' or ':' is a defn.
11322
11323 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
11324
11325         * tree.c (canonical_type_variant): New fn to handle arrays.
11326         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
11327         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
11328         * method.c (process_overload_item): Use build_overload_value for
11329         arrays.
11330
11331 1998-07-20  Dave Brolley  <brolley@cygnus.com>
11332
11333         * lex.c (mbchar.h): #include it.
11334         (GET_ENVIRONMENT): New macro.
11335         (init_parse): Set character set based on LANG environment variable.
11336         (real_yylex): Handle multibyte characters in character literals.
11337         (real_yylex): Handle multibyte characters in string literals.
11338
11339 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
11340
11341         * lex.c (do_identifier): Look for class value even if we don't
11342         have a global value.  Do implicit declaration if parsing is 2.
11343         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
11344         lookup.
11345
11346 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
11347
11348         * decl.c (pushtag): Revert previous change.
11349         * pt.c (lookup_template_class): Don't put out debugging
11350         information for types that use template parameters.
11351
11352         * decl.c (pushtag): Don't put out debugging information for
11353         compiler-generated typedefs.
11354
11355         * error.c (dump_type_real): Don't crash when presented with
11356         intQI_type_node or the like.
11357
11358         * semantics.c (finish_translation_unit): Fix spelling error in
11359         comment.
11360
11361 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
11362
11363         * decl.c (lookup_name_real): Pull out single function here.
11364         (select_decl): Not here.
11365         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
11366
11367         * decl.c (qualify_lookup): Tweak again.
11368
11369         * pt.c (lookup_template_class): Don't mess with the context of the
11370         instantiation.
11371         * decl2.c (current_decl_namespace): Remove special handling for
11372         templates.
11373
11374         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
11375         a member template specialization.
11376
11377         * tree.c (ovl_member): Use decls_match to compare functions.
11378         * decl.c (decls_match): Check the context of a function.
11379
11380         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
11381         in Koenig lookup support rules.
11382         * semantics.c (finish_call_expr): Handle the new cases.
11383
11384         * typeck.c (build_x_function_call): Handle overloaded methods.
11385
11386         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
11387
11388 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
11389
11390         * semantics.c (finish_object_call_expr): Revert previous change.
11391         * call.c (build_new_method_call): Likewise.  Instead, convert
11392         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
11393
11394 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
11395
11396         * decl.c (qualify_lookup): Handle templates.
11397
11398         * decl2.c (do_using_directive): Don't pass ancestor.
11399         * decl.c (push_using_directive): Calculate ancestor.
11400
11401         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
11402         * decl.c (pushdecl): Move type shadowing handling from here...
11403         (duplicate_decls): ...to here.
11404         * decl.c (set_identifier_local_value_with_scope): New fn.
11405         (pushdecl): Use it.
11406         (set_identifier_local_value, lookup_type_current_level): New fns.
11407         * decl2.c (do_local_using_decl): Handle types and binding level
11408         stuff properly.
11409
11410         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
11411         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
11412         (lookup_namespace_name): Likewise.
11413         * typeck.c (build_unary_op): Not here anymore.
11414
11415         * decl2.c (do_class_using_decl): Make sure we get an identifier.
11416         * class.c (handle_using_decl): Ignore TYPE_DECLs.
11417
11418         * decl.c (qualify_lookup): New fn.
11419         (lookup_name_real): Use it.
11420
11421 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
11422
11423         * decl2.c (add_using_namespace): When directly using a namespace
11424         that was indirect before, promote it.
11425
11426         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
11427         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
11428         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
11429         * decl.c (select_decl): Replace two flag parameters by one.
11430         (unqualified_namespace_lookup): Likewise, pass flag.
11431         (lookup_flags): New function.
11432         (lookup_name_real): Compute flags, pass them.
11433         (lookup_namespace_name): Call with zero-flag.
11434         * decl2.c (ambiguous_decl): Add flag parameter, complain only
11435         according to flags.
11436         (lookup_using_namespace, qualified_lookup_using_namespace):
11437         Add flag parameter, pass them through.
11438         * lex.c (do_scoped_id): Call with zero-flag.
11439
11440 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
11441
11442         * typeck.c (convert_for_assignment): Use comptypes.
11443
11444 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
11445
11446         * semantics.c (finish_object_call_expr): Move test for the
11447         function called being a TYPE_DECL to ...
11448         * call.c (build_new_method_call): Here.
11449
11450 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
11451
11452         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
11453         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
11454
11455         * lex.c (looking_for_typename): Don't initialize.
11456
11457         * decl2.c (ambiguous_decl): Clarify error message.
11458
11459         * decl.c (push_using_directive): Iterate over namespaces used
11460         indirectly.
11461
11462 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11463
11464         * decl2.c (add_using_namespace): Iterate over namespaces used
11465         indirectly.
11466
11467         * decl.c (lookup_name_real): Accept namespace aliases as locals.
11468         (cat_namespace_levels): Ignore aliases.
11469         (duplicate_decls): Ignore duplicate aliases.
11470         * decl2.c (do_namespace_alias): Process block level namespace
11471         aliases.  Store alias with pushdecl.  Remove odr errors.
11472         * parse.y (namespace_alias): New non-terminal.
11473         (extdef): Use it.
11474
11475 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
11476
11477         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
11478         Handle TEMPLATE_TYPE_PARM.
11479         (arg_assoc): Rewrite.
11480
11481         * pt.c (complete_template_args): Don't look at the context unless
11482         we have to.
11483
11484         * method.c (build_decl_overload_real): Fix namespace handling.
11485
11486         * typeck.c (build_unary_op): Extract a lone function from an
11487         OVERLOAD.
11488
11489         * call.c (build_scoped_method_call): Handle getting a namespace
11490         for basetype in a destructor call.
11491         (check_dtor_name): Handle enums.
11492
11493         * parse.y (using_directive): New nonterminal.
11494         (extdef, simple_stmt): Use it.
11495
11496 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11497
11498         * decl2.c (add_function): Move error message ...
11499         (arg_assoc_namespace): ... from here.
11500
11501 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
11502
11503         * parse.y (namespace_qualifier): Fix multiple level handling.
11504         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
11505         (arg_assoc): Don't skip the first argument of a function.
11506
11507 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
11508
11509         * search.c (my_tree_cons): Clean up.
11510
11511 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
11512
11513         * call.c (joust): Don't warn about "confusing" conversions to the
11514         same type.
11515
11516 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11517
11518         * class.c (push_nested_class): Complain about namespaces.
11519         * decl.c (start_decl): Enter the object's namespace.
11520         (cp_finish_decl): Leave it.
11521         (grokdeclarator): Likewise.
11522         * decl2.c (check_decl_namespace): New function.
11523         (finish_file): Call it.
11524         * parse.y (complex_direct_notype_declarator): Set complexity
11525         of namespace-qualified ids to -1, enter the namespace.
11526
11527         * method.c (build_template_decl_overload): Expect _DECL as first
11528         parameter.  Put context temporarily into current_namespace.
11529         * pt.c (check_explicit_specialization): Change caller.
11530         (tsubst): Likewise.
11531
11532         * init.c (build_offset_ref): Call mark_used and
11533         convert_from_reference for namespace members.
11534
11535 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11536
11537         * search.c (my_tree_cons): The bitfield is at index 2.
11538
11539 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
11540
11541         * lang-options.h: Format changed to work with new --help support
11542         in gcc/toplev.c
11543
11544 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
11545
11546         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
11547         Do Koenig lookup in CALL_EXPR.
11548         (arg_assoc): Handle error_mark.
11549         * lex.c (is_global): New function.
11550         (do_identifier): Expect arguments for Koenig lookup.
11551         * parse.y (primary): Add rules for calls of unqualified function calls.
11552         (do_id): Change call of do_identifier.
11553         * pt.c (finish_stmt_expr): Likewise.
11554         * semantics.c (finish_id_expr): Likewise.
11555         (finish_call_expr): Add integer parameter to indicate
11556         argument-dependent lookup.
11557
11558         * decl.c (struct binding_level): New field using_directives.
11559         (push_using_decl): Not sorry anymore.
11560         (push_using_directive): New function.
11561         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
11562         (unqualified_namespace_lookup): New function, code from ...
11563         (lookup_name_real): ... here.
11564         * decl2.c (lookup_using_namespace): Pass using list instead of
11565         initial scope.
11566         (validate_nonmember_using_decl): New function.
11567         (do_nonmember_using_decl): New function.
11568         (do_toplevel_using_decl): Use them.
11569         (do_local_using_decl): New function.
11570         (do_using_directive): Support block-level directives.
11571         * parse.y (simple_stmt): Support using declarations and
11572         directives.
11573         (namespace_qualifier, namespace_using_decl): New non-terminals.
11574
11575         * xref.c (classname): New function.
11576         (GNU_xref_hier): Change class and base parameters to tree.
11577         * decl.c (xref_baseypes): Change caller.
11578         * friend.c (make_friend_class): Likewise.
11579
11580 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
11581
11582         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
11583         comparison.
11584
11585         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
11586         template template parameter, record its use.
11587         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
11588         its template arguments if exists.
11589
11590         * pt.c (coerce_template_template_parms): New function equivalent
11591         to coerce_template_parms when IS_TMPL_PARM is true.
11592         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
11593         all callers changed.
11594
11595         (coerce_template_parms): Access ARGLIST properly when creating a
11596         new vector.  Only accept implicit TYPE_DECL as valid argument for
11597         a template template parameter when it is a base class of
11598         current_class_type.  Don't display error message when COMPLAIN is
11599         false.
11600
11601 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
11602
11603         * repo.c (get_base_filename): Use file_name_nondirectory.
11604         (open_repo_file): Likewise.
11605         * cp-tree.h (file_name_nondirectory): Add prototype.
11606
11607 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
11608
11609         * friend.c (do_friend): Pull the identifier out of declarator.
11610         Use cp_error and friends.
11611         * decl2.c (qualified_lookup_using_namespace): Fix call to
11612         purpose_member.
11613         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
11614         (grokvardecl): Use DECL_CLASS_SCOPE_P.
11615         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
11616         * class.c (warn_hidden): Fix for OVERLOAD.
11617         From grahams@rcp.co.uk:
11618         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
11619         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
11620
11621 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
11622
11623         * g++.1 (-traditional): Remove duplicated documentation.
11624
11625 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
11626
11627         * method.c (flush_repeats): Add nrepeats parameter.
11628         (issue_nrepeats): Likewise.
11629         (is_back_referenceable_type): New function.  Don't back-reference
11630         TEMPLATE_TYPE_PARMs as well as simple types like integers.
11631         (build_mangled_name_for_type): Likewise.
11632         (build_mangled_name_for_type_with_Gcode): Likewise.
11633         (lasttype): Remove.
11634         (nrepeats): Likewise.
11635         (Nrepeats): Likewise.
11636         (start_squangling): Don't clear the variables removed above.
11637         (end_squangling): Likewise.
11638         (flush_repeats): Tidy.  Use nrepeats parameter rather than
11639         Nrepeats global.
11640         (issue_nrepeats): Likewise, but with nrepeats global.  Use
11641         is_backreferenceable_type.
11642         (build_overload_nested_name): Tidy.  Add comment.  Use
11643         build_mangled_name_for_type.
11644         (build_underscore_int): Comment.
11645         (build_overload_scope_ref): Use build_mangled_name_for_type.
11646         (build_overload_int): Likewise.
11647         (build_template_template_parm_names): Tidy.
11648         (build_template_parm_names): Use build_mangled_name_for_type.
11649         (build_overload_identifier): Add comments.
11650         (build_mangled_name_for_type_with_Gcode): Split out from
11651         build_mangled_name.
11652         (build_mangled_name_for_type): Use it.
11653         (build_mangled_name): Rework to use build_mangled_name_for_type
11654         and to not use global nrepeats/Nrepeats.  Tidy.
11655         (process_modifiers): Tidy.
11656         (check_btype): Use is_backreferenceable_type.  Add comment.
11657         Rename `node' to `type'.
11658         (process_overload_item): Set numeric_output_need_bar here.
11659         Use build_mangled_name_for_type.  Tidy.
11660         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
11661         build_mangled_name_for_type.
11662
11663         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
11664         for TYPE_DECLs.
11665
11666 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
11667
11668         * cp-tree.h (warn_long_long): Define.
11669         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
11670         warning "ANSI C++ does not support `long long'".
11671         * decl2.c (warn_long_long): Define.
11672         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
11673
11674 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
11675
11676         * decl.c (xref_tag): Handle attributes between 'class' and name.
11677         * parse.y (aggr): Likewise.
11678         * semantics.c (finish_class_definition): Likewise.
11679         * Makefile.in (EXPECTED): Adjust.
11680
11681         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
11682         * decl2.c: Define them.
11683         (lang_decode_option): Handle them.
11684         * lang-options.h: Add -foptional-diags.
11685         * class.c (finish_struct): Don't complain about multiple meanings of
11686         name if -fno-optional-diags.
11687         * decl.c (pushdecl_class_level): Likewise.
11688         * lex.c (real_yylex): Check warn_multichar.
11689
11690 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
11691
11692         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
11693
11694         * tree.c (make_binfo): Fix length.
11695
11696 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
11697
11698         * decl2.c (lang_decode_option): Remove warn_template_debugging.
11699         * lang-options.h: Likewise.
11700
11701 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11702
11703         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
11704         (process_start_catch_block): Likewise for variables
11705         `false_label_rtx', `call_rtx' and `return_value_rtx'.
11706
11707 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
11708
11709         * tree.c (build_srcloc): Make sure we allocate this node on the
11710         permanent obstack.
11711
11712 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
11713
11714         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
11715         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
11716         (lang_specific_driver): Only add -lm automatically if need_math is
11717         nonzero.
11718
11719 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
11720
11721         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
11722
11723 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11724
11725         * Makefile.in (EXPR_H): New dependency variable.
11726         (decl2.o): Depend on $(EXPR_H).
11727         (typeck.o): Likewise.
11728         (init.o): Likewise.
11729         (expr.o): Likewise.
11730
11731 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
11732
11733         * decl.c (start_enum): Put local enums on permanent_obstack.
11734
11735 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
11736
11737         * cp-tree.h (c_get_alias_set): Declare.
11738         * decl.c (init_decl_processing): Set lang_get_alias_set.
11739
11740 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
11741
11742         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
11743         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
11744         flag for all function decls which are in the exception table.
11745         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
11746         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
11747         code is emitted for any referenced rtti function.
11748
11749 1998-06-25  Dave Brolley  <brolley@cygnus.com>
11750
11751         * lang-specs.h: Use new | syntax to eliminate
11752         string concatenation.
11753
11754 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
11755
11756         * cp-tree.h (CP_DECL_CONTEXT): New macro.
11757         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
11758         * method.c (build_overload_nested_name): Likewise.
11759         * sig.c (build_signature_pointer_or_reference_type): Don't set
11760         DECL_CONTEXT.
11761
11762 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11763
11764         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
11765         * cp-tree.h (FROB_CONTEXT): New macro.
11766         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
11767         * decl.c (namespace_binding): Replace NULL_TREE with
11768         global_namespace.
11769         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
11770         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
11771         Likewise.
11772         * decl.c (pushtag): Use FROB_CONTEXT.
11773         (pushdecl, make_typename_type, define_function, grokdeclarator):
11774         Likewise.
11775         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
11776         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
11777         Likewise.
11778         * decl2.c (decl_namespace): Return global_namespace if no context.
11779         * method.c (build_overload_nested_name): Expect null as context.
11780         * pt.c (mangle_class_name_for_template): Do nothing for null
11781         contexts.
11782         (lookup_template_class): Allow for null id_context.
11783
11784 1998-06-25  Richard Henderson  <rth@cygnus.com>
11785
11786         * method.c (emit_thunk): Set current_function_is_thunk for the
11787         ASM_OUTPUT_MI_THUNK case as well.
11788
11789 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
11790
11791         * exception.cc (__cplus_type_matcher): Get a match_info pointer
11792         instead of an exception table entry as a parameter.
11793
11794 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
11795
11796         * parse.y (function_try_block): Don't call start_catch_handler.
11797         * except.c (call_eh_info): Remove coerced field from declaration.
11798         (build_eh_type_type_ref): New function to create an address of a
11799         rtti function for the new style exception tables.
11800         (expand_start_catch_block): Split function, this contains the
11801         common part.
11802         (process_start_catch_block_old): New function to perform the rest
11803         of expand_start_catch_block under old style exceptions.
11804         (process_start_catch_block_old): New function to perform the rest
11805         of expand_start_catch_block under new style exceptions.
11806         (expand_end_catch_block): Only pop the false label off the stack under
11807         the old style of exceptions.
11808         * semantics.c (finish_try_block): Don't call start_catch_handler.
11809         * exception.cc (struct cp_eh_info): Add original_value field.
11810         (__cplus_type_matcher): Perform type matching on the original exception
11811         value, and if we have a match, set the current value.
11812         (__cp_push_exception): Set the original exception value.
11813
11814 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
11815
11816         * call.c (joust): Fix confusing conversion warning.
11817
11818         * call.c (build_op_delete_call): Add placement parm.  Check
11819         LOOKUP_SPECULATIVELY.
11820         * cp-tree.h, decl2.c, init.c: Adjust.
11821         * decl.c (finish_function): Use it.
11822
11823         * pt.c (tsubst): Diagnose creating void fields or variables.
11824
11825 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11826
11827         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
11828
11829         * cp-tree.h (check_dtor_name): Add prototype.
11830
11831         * init.c (expand_member_init): Remove unused variables
11832         `ptr_type_node', `parm' and `rval'.
11833
11834         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
11835         in call to fprintf.
11836         (lang_print_xnode): Likewise.
11837
11838         * typeck2.c (enum_name_string): Cast argument to sprintf to long
11839         and use %ld specifier.
11840
11841         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
11842         specifier in call to fprintf.
11843         (GNU_xref_member): Cast argument to sprintf to int.
11844
11845 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
11846
11847         * typeck2.c (pop_init_level): Warn about implicit zero initialization
11848         of struct members.
11849
11850 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11851
11852         * cp-tree.h: Prototype function `check_java_method'.
11853
11854 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
11855
11856         * class.c (finish_struct): Make conflicting use of id a pedwarn.
11857         * decl.c (pushdecl_class_level): Likewise.
11858
11859 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
11860
11861         * pt.c (convert_nontype_argument): Issue an error when presented
11862         with an integer (real) constant that cannot be simplified to an
11863         INT_CST (REAL_CST).
11864
11865         * cp-tree.h (c_get_alias_set): Remove declaration added in
11866         1998-06-13 change that should never have been checked in.
11867
11868 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
11869
11870         * typeck.c (build_binary_op_nodefault): Change % in format strings
11871         to %%.
11872
11873         * decl.c (grokvardecl): Don't build_static_name for decls that
11874         aren't at namespace scope.
11875
11876         * init.c (perform_member_init): Catch default-initialization of
11877         references.
11878
11879 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
11880
11881         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
11882
11883 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
11884
11885         * method.c (hack_identifier): Complain about getting a namespace
11886         or class template.
11887         * typeck.c (decay_conversion): Remove check for namespaces.
11888         * typeck2.c (incomplete_type_error): Likewise.
11889         * parse.y (template_arg): Add PTYPENAME expansion.
11890
11891 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
11892
11893         * decl.c (grokvardecl): Don't build external assembler names for
11894         TYPENAMEs in other namespaces as there is no declarator.
11895         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
11896         info from DECL_CONTEXT if it is NULL.
11897
11898 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
11899
11900         * call.c (check_dtor_name): Split out.
11901         (build_scoped_method_call): Use it.
11902         (build_method_call): Use it.
11903         * init.c (build_offset_ref): Use it.
11904
11905         * typeck.c (build_static_cast): Fix handling of pointers to members.
11906
11907         * decl.c (finish_function): Just return nothing from a constructor.
11908         * typeck.c (c_expand_return): Complain about returning a void
11909         expression from a destructor.
11910
11911 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
11912
11913         * class.c (alter_access): Accept a BINFO explaining how to get
11914         from the entity whose accessed is being altered to the type doing
11915         the altering.
11916         (handle_using_decl): New function containing code split out from ...
11917         (finish_struct_1): Here.
11918
11919         * cp-tree.h (complete_type_or_else): Declare.
11920         * init.c (build_new_1, build_delete): Use it.
11921         * typeck.c (require_complete_type): Use complete_type, rather than
11922         expanding it inline.
11923         (complete_type_or_else): New function.
11924         (build_component_ref): Use it.
11925         (pointer_int_sum): Make sure the type pointed to is complete.
11926         (pointer_diff): Likewise.
11927
11928         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
11929         types.
11930
11931         * search.c (get_matching_virtual): Note that member templates
11932         cannot override virtual functions.
11933
11934 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
11935
11936         * pt.c (check_explicit_specialization): If DECLARATOR turned into
11937         an error_mark_node from lookup_template_function, return the same.
11938         (determine_specialization): Also make sure TEMPLATE_ID isn't an
11939         error_mark_node, before we try to read its operands.
11940         * decl.c (grokdeclarator): If we got an error_mark_node from
11941         check_explicit_specialization, just return it right back.
11942
11943 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
11944
11945         * class.c (instantiate_type): Don't treat template-ids that don't
11946         specify any template arguments as equivalent to ordinary
11947         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
11948         pointer-to-members for member templates.  Tidy slightly.
11949         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
11950         * init.c (build_offset_ref): Handle template-ids like ordinary
11951         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
11952         offset part of the OFFSET_REF.
11953         * typeck.c (build_unary_op): Change check for unknown types to
11954         look for OFFSET_REFs, not SCOPE_REFs.
11955
11956 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
11957
11958         * pt.c (is_member_template_class): New function.
11959         (push_template_decl_real): Use it.
11960
11961 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
11962
11963         * friend.c (do_friend): Add support for nested classes using
11964         member functions of the enclosing class as friends.
11965
11966 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
11967
11968         * call.c (convert_default_arg): Make global, not static.
11969         (convert_arg_for_ellipsis): Split out from ...
11970         (build_over_call): Here.
11971         * cp-tree.h (convert_default_arg); Declare.
11972         (convert_arg_to_ellipsis): Likewise.
11973         (do_member_init): Remove.
11974         * init.c (do_member_init): Remove; this code is dead.
11975         (expand_member_init): Remove much of this code; it is dead.
11976         * typeck.c (convert_arguments): Use convert_default_arg and
11977         convert_arg_for_ellipsis, rather than duplicating here.
11978
11979         * call.c (convert_like): Don't fail silently if
11980         build_user_type_conversion fails.  Always return error_mark_node
11981         for failure.
11982
11983 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
11984
11985         * search.c (covariant_return_p): Complain about ambiguous base.
11986
11987         * typeck.c (build_component_ref): Diagnose ref to nested type.
11988
11989 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
11990
11991         * decl.c (grokparms): Check that INIT isn't an error_mark_node
11992         before giving error about invalid type for default arg.
11993
11994 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
11995
11996         * call.c (build_method_call): Fix thinko.
11997
11998 1998-06-10  Dave Brolley  <brolley@cygnus.com>
11999
12000         * decl2.c (lang_decode_option): New argc/argv interface.
12001         * cp-tree.h (lang_decode_option): New argc/argv interface.
12002         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
12003         specified for cpplib-enabled compilers.
12004         * lex.c (lang_init): Don't check_newline for cpplib.
12005         (init_parse): Don't initialize cpplib here.
12006
12007 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
12008
12009         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
12010         piece before checking DECL_MUTABLE_P.
12011
12012 1998-06-10  John Carr  <jfc@mit.edu>
12013
12014         * tree.c (debug_binfo): Make printf format match arguments.
12015
12016         * error.c (OB_PUTI): Make printf format match arguments.
12017
12018 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
12019
12020         * init.c (perform_member_init): Handle default-initialization.
12021
12022         * except.c (build_throw): Handle throwing NULL.
12023
12024         * typeck.c (build_x_function_call): Use resolve_offset_ref.
12025
12026         * search.c (compute_access): Only strip an anonymous union
12027         for a FIELD_DECL.
12028
12029         * call.c (add_builtin_candidates): Tweak.
12030
12031         * cvt.c (build_expr_type_conversion): Restore code for conversion
12032         from class types.
12033         * decl2.c (delete_sanity): Use it.  Clean up.
12034
12035         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
12036
12037 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
12038
12039         * typeck.c (c_expand_return): Don't warn about void expressions on
12040         return statements in functions returning void.
12041
12042 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
12043
12044         * pt.c (fn_type_unification): Revise documentation.  Tidy.
12045         (type_unification): Likewise.
12046
12047 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
12048
12049         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
12050         expand_end_catch.
12051         * parse.y (function_try_block): Rename expand_start_catch, and delete
12052         expand_end_catch.
12053         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
12054         expand_end_catch.
12055
12056 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
12057
12058         * search.c (lookup_member): New fn.
12059         * class.c (finish_struct_1): Use it.
12060         * decl.c (lookup_name_real): Use it.
12061
12062 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12063
12064         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
12065
12066         * cp-tree.h: Add prototype for `maybe_print_template_context' and
12067         `maybe_make_one_only'.
12068
12069         * decl.c (auto_function): Remove unused variable `decl'.
12070
12071         * decl2.c: Include dwarf2out.h and dwarfout.h.
12072
12073         * lex.c: Remove redundant declarations of `set_float_handler' and
12074         `asm_out_file'.
12075
12076 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
12077
12078         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
12079         time flag.  Call __cp_eh_info instead of __cp_exception_info.
12080         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
12081         (__cp_exception_info): Return offset into cp_eh_info structure to
12082         match what use to be the start of this structure.
12083         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
12084         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
12085         compile time flag.
12086         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
12087         __cp_eh_info instead of __cp_exception_info.
12088
12089 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
12090
12091         * decl.c (cp_finish_decl): Disable inlining of extern inlines
12092         with static variables.
12093
12094 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
12095
12096         * init.c (build_offset_ref): Correct previous change to use build,
12097         not build_min.
12098
12099 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
12100
12101         * class.c (instantiate_type): Handle pointer-to-members where the
12102         member is a template.
12103         * init.c (build_offset_ref): Likewise.
12104         * typeck.c (build_unary_op): Likewise.
12105
12106 1998-06-07  Richard Henderson  <rth@cygnus.com>
12107
12108         * lex.c (lang_init_options): New function.
12109         (lang_init): Remove flag_exceptions == 2 hack.
12110
12111 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
12112
12113         * search.c (envelope_add_decl): Tweak for implicit typename.
12114
12115         * call.c (joust): Also warn about confusing conversion op/constructor
12116         overload resolution.
12117
12118         * spew.c (yylex): Also return the TYPE_DECL if got_object.
12119         Don't clear got_object after '~'.
12120         * call.c (build_scoped_method_call): Tweak destructor handling.
12121         (build_method_call): Likewise.
12122         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
12123         TYPE_MAIN_VARIANT for destructors.
12124         * semantics.c (finish_object_call_expr): Complain about calling a
12125         TYPE_DECL.
12126
12127 1998-06-05  Per Bothner  <bothner@cygnus.com>
12128
12129         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
12130         Define - update needed by gcc.c change.
12131
12132 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
12133
12134         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
12135
12136 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12137
12138         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
12139         * decl.c (lookup_name_real): Add namespaces_only parameter.
12140         If set, return only NAMESPACE_DECLs.
12141         (select_decl): Likewise.
12142         (identifier_type_value): Give additional parameter.
12143         (lookup_name_nonclass): Likewise.
12144         (lookup_name): Likewise.
12145         (find_binding): Skip namespace aliases.
12146         (binding_for_name): Likewise.
12147         (push_namespace): Check for namespace aliases.
12148         (lookup_name_namespace_only): New function.
12149         (begin_only_namespace_names, end_only_namespace_names): New functions.
12150         * decl2.c (set_decl_namespace): Skip namespace aliases.
12151         (do_using_directive): Likewise.
12152         (do_namespace_alias): Produce namespace aliases, fix alias
12153         redeclaration.
12154         * error.c (dump_decl): Support SCOPE_REF.
12155         * parse.y (extdef): Wrap lookup with namespace_only for namespace
12156         aliases and using declarations.
12157
12158 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
12159
12160         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
12161
12162         * error.c (dump_expr): Clean up NEW_EXPR case.
12163
12164 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12165
12166         Suggested by Brendan Kehoe
12167         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
12168         treat it as using ::decl.
12169
12170         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
12171
12172         * tree.c (mapcar): Support NEW_EXPR.
12173
12174         * error.c (dump_expr): Support NEW_EXPR.
12175
12176 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
12177
12178         * method.c (make_thunk): Use overload machinery to make name.
12179         * search.c (covariant_return_p): New fn.
12180         (get_matching_virtual): Use it.
12181
12182         * init.c (build_new_1): Fix check for void.
12183
12184 1998-06-01  Per Bothner  <bothner@cygnus.com>
12185
12186         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
12187         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
12188         java_int_type_node, java_long_type_node, java_float_type_node,
12189         java_double_type_node, java_char_type_node, java_boolean_type_node):
12190         New "primitive" types, with predefined names __java_byte etc.
12191         (record_builtin_java_type):  New function.
12192         (init_decl_processing):  Make Java types with record_builtin_java_type.
12193         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
12194         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
12195         (grokfndecl):  Call check_java_method for Java classes.
12196         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
12197         (process_overload_item):  Match types against specific
12198         java_XX_type_node types, rather than using is_java_type.
12199         * class.c (finish_struct_1):  Don't add default copy constructor
12200         or operator= if TYPE_FOR_JAVA.
12201         (pop_lang_conext):  Restore strict_prototyp proper if Java.
12202         * decl2.c (acceptable_java_type, check_java_method):  New functions.
12203         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
12204         (tsubst):  Move common statement after if statement.
12205         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
12206
12207 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
12208
12209         * pt.c (for_each_template_parm): Use first_rtl_op.
12210
12211         * tree.c (build_cplus_array_type_1): Also check index_type for
12212         template parms.
12213
12214 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
12215
12216         * pt.c (tsubst): Always copy BINFO_BASETYPES.
12217
12218 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
12219
12220         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
12221         TYPE_SIZE_UNIT too.
12222
12223 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
12224
12225         * decl.c (grokdeclarator): Don't complain about in-class
12226         initialization of static consts if we don't really know the type
12227         of the variable.
12228
12229 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
12230
12231         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
12232         * method.c (build_destructor_name): New fn.
12233         * decl2.c (maybe_retrofit_in_chrg): Split out...
12234         (grokclassfn): From here.  Reorganize.
12235         * decl.c (grok_ctor_properties): Make sure ctors for types with
12236         vbases have the in_chrg parm.
12237         * pt.c (instantiate_class_template): Update
12238         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
12239         grok_*_properties.
12240         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
12241
12242 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
12243
12244         * pt.c (instantiate_decl): Make test for whether or not static
12245         variables should be instantiated early match its comment.
12246
12247 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
12248
12249         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
12250         a member.
12251         (start_function): Call check_default_args.
12252         * decl2.c (grokfield): Don't call check_default_args.
12253         (check_default_args): Use cp_error_at.
12254         * lex.c (do_pending_defargs): Call check_default_args.
12255
12256 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
12257
12258         * call.c (build_method_call): Make sure get_type_value returns
12259         something before we try to use its TYPE_MAIN_VARIANT.
12260         (build_scoped_method_call): Likewise.
12261
12262 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
12263
12264         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
12265         initialize an array.
12266
12267         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
12268         DECL_VIRTUAL_P.
12269
12270         * friend.c (do_friend): Clarify template warning.
12271
12272 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
12273
12274         * decl.c (shadow_label): Don't treat decls as identifiers.
12275         (maybe_push_to_top_level): Clear shadowed_labels.
12276
12277         * pt.c (instantiate_decl): Reset lineno and filename after calling
12278         regenerate_decl_from_template.
12279
12280         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
12281         error_mark_node.
12282
12283 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
12284
12285         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
12286
12287 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12288
12289         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
12290         (convert_nontype_argument): Handle cases when nontype template
12291         parameters become classes after substitution.
12292
12293 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
12294
12295         * friend.c (is_friend): Use comptypes, rather than == to compare
12296         types.  Modify for new representation of template friends.
12297         (make_friend_class): Likewise.
12298         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
12299         (instantiate_class_template): Deal with template friends.
12300
12301         * decl.c (store_parm_decls): Remove redundant call to
12302         expand_main_function.
12303
12304 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
12305
12306         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
12307         DECL_USE_TEMPLATE.
12308
12309 1998-05-26  Per Bothner  <bothner@cygnus.com>
12310
12311         * language_as_string:  Handle lang_java.
12312
12313 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
12314
12315         * decl.c (pushdecl): Don't copy the type_decl.
12316
12317 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12318
12319         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
12320         current_class_type.
12321         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
12322
12323         * parse.y (complex_direct_notype_declarator): Use $1 to access
12324         scope of notype_qualified_id.
12325
12326 1998-05-26  Dave Brolley  <brolley@cygnus.com>
12327
12328         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
12329         (init_parse): Initialize cpplib interface.
12330
12331         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
12332         empty continuation.
12333
12334 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
12335
12336         * decl.c (pushtag): Avoid crashing on erroneous input.
12337
12338 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12339
12340         * decl.c (push_namespace): Only produce one unique name for
12341         anonymous namespaces.
12342         (get_unique_name): Remove.
12343
12344 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
12345
12346         * call.c (tourney): Don't do any extra comparisons.
12347
12348         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
12349
12350         * cp-tree.h (processing_template_parmlist): Declare.
12351         * decl.c (pushtag): Don't call push_template_decl when we
12352         shouldn't.
12353         * pt.c (processing_template_parmlist): New variable.
12354         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
12355         (complete_template_args): Use it.
12356         (add_to_template_args): Likewise.
12357         (innermost_args): Likewise.
12358         (tsubst): Likewise.
12359         (begin_template_parm_list): Use processing_template_parmlist.
12360         (end_template_parm_list): Likewise.
12361
12362         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
12363         * decl.c (grokdeclarator): Use it.
12364         * decl2.c (grok_x_components): Likewise.
12365         * init.c (initializing_context): Likewise.
12366         * method.c (do_build_copy_constructor): Likewise.
12367         (do_build_assign_ref): Likewise.
12368         * search.c (compute_access): Likewise.
12369         * typeck.c (build_component_ref): Likewise.
12370
12371         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
12372         unnamed type a typedef name "for linkage purposes".
12373
12374         * pt.c (lookup_template_class): Don't look at
12375         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
12376
12377         * method.c (build_overload_int): Handle error cases gracefully.
12378
12379         * pt.c (instantiate_decl): Handle static member variables
12380         correctly.
12381
12382         * pt.c (tsubst): Use the tsubst'd type when producing new
12383         TEMPLATE_PARM_INDEX nodes.
12384
12385 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
12386
12387         * tree.c (cp_tree_equal): Handle pointers to member functions.
12388
12389         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
12390         sure the type of the REF_BIND is a reference type.
12391         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
12392         target_type for clarity.
12393
12394         * parse.y (xcond): Move call to condition_conversion ...
12395         * semantics.c (finish_for_cond): Here.
12396         * parse.c: Regenerated.
12397
12398 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
12399
12400         * decl.c (push_namespace): Namespaces have type void.
12401         * typeck2.c (incomplete_type_error): Complain about namespace
12402         used as expression.
12403         * typeck.c (decay_conversion): Likewise.
12404
12405 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
12406
12407         * error.c (dump_expr): Support namespaces.
12408
12409 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
12410
12411         * cp-tree.def: Add SRCLOC.
12412         * cp-tree.h: Add struct tree_srcloc and accessor macros.
12413         * tree.c (build_srcloc, build_srcloc_here): New fns.
12414         * pt.c (add_pending_template): Use build_srcloc_here.
12415         (push_tinst_level): Update last_template_error_tick before erroring.
12416         (instantiate_decl): Restore lineno and input_filename before
12417         calling add_pending_template.
12418         * decl2.c (finish_file): Set up lineno and input_filename for
12419         pending templates.
12420
12421 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
12422
12423         * decl.c (lang_print_error_function): New fn.
12424         (init_decl_processing): Set print_error_function to use it.
12425         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
12426
12427         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
12428         ICS_BAD_FLAG.
12429
12430         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
12431         copy-initialization.
12432
12433         * class.c (build_vtable_entry): Use int_fits_type_p.
12434         (build_vtable): Pass a signed offset to build_vtable_entry.
12435         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
12436         set_rtti_entry): Likewise.
12437
12438 1998-05-22  Per Bothner  <bothner@cygnus.com>
12439
12440         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
12441         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
12442
12443 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
12444
12445         * pt.c (print_template_context): Use fprintf instead of cp_error.
12446
12447         * pt.c (determine_specialization): Just return an error_mark_node.
12448         Also print the decl we want in error messages.  If we complain,
12449         return error_mark_node.
12450         (tsubst_friend_function): Set lineno and input_filename so
12451         error messages will be useful.
12452         (instantiate_template): Just return an error_mark_node.
12453         (check_explicit_specialization): Don't mess with a returned
12454         error_mark_node.
12455
12456         * pt.c (print_template_context): Add new argument.
12457         (maybe_print_template_context): New fn.
12458         (push_tinst_level): Increment tinst_level_tick.
12459         (pop_tinst_level): Likewise.
12460         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
12461         xrealloc instead of xmalloc.
12462
12463         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
12464
12465 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
12466
12467         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
12468         if the template we looked up is the same as the one we already
12469         have.
12470
12471 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
12472
12473         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
12474         (cpp_reader,parse_in): Add for cpplib.
12475         (check_newline): Call handle_sysv_pragma with new interface.
12476         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
12477
12478         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
12479         (sub_getch): Call GETC for cpplib.
12480
12481         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
12482         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
12483
12484         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
12485
12486 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
12487
12488         * decl2.c (maybe_make_one_only): New fn.
12489         (import_export_vtable): Use it.
12490         (import_export_decl): Likewise.
12491         * pt.c (mark_decl_instantiated): Likewise.
12492
12493 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
12494
12495         * decl2.c (find_representative_member): Rename to ...
12496         (build_anon_union_vars): New function.
12497         (finish_anon_union): Fix stupidity of previous change.
12498
12499 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
12500
12501         * decl.c (grokfndecl): Handle definition of specialization in
12502         friend declaration.
12503
12504         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
12505
12506 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
12507
12508         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
12509         to look for type declarations.
12510         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
12511         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
12512         (finish_member_class_template): Declare.
12513         * decl.c (pushtag): Put member class templates on the
12514         CLASSTYPE_TAGS list, just as for ordinary member classes.
12515         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
12516         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
12517         IDENTIFIER_NAMESPACE_VALUEs.
12518         * parse.y (component_decl): Move code to ...
12519         * semantics.c (finish_member_class_template): New function.
12520         Don't put member class templates on the list of components for a
12521         class.
12522         * parse.c: Regenerated.
12523         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
12524         In fact, don't use DECL_CONTEXT at all here.
12525
12526 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12527
12528         * decl.c (record_unknown_type): New function.
12529         (init_decl_processing): Call it for the unknown and global type
12530         nodes.
12531
12532 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
12533
12534         * decl2.c (find_representative_member): New function.
12535         (finish_anon_union): Use it.
12536
12537         * cp-tree.h (MAIN_NAME_P): New macro.
12538         (DECL_MAIN_P): Likwise.
12539         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
12540         (grokfndecl): Use the new macros.
12541         (grokdeclarator): Likewise.
12542         (start_function): Likewise.
12543         (store_parm_decls): Likewise.
12544         (finsh_function): Likewise.
12545         * friend.c (do_friend): Likewise.
12546         * typeck.c (build_function_call_real): Likewise.
12547         (build_unary_op): Likewise.
12548
12549 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
12550
12551         * decl2.c (start_objects, finish_objects, do_dtors,
12552         do_ctors): Split out from...
12553         (finish_file): ...here.
12554
12555 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
12556
12557         * tree.c (is_overloaded_fn): Don't abort on placeholders from
12558         push_class_decls.
12559
12560 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
12561
12562         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
12563
12564         * error.c (dump_expr): Handle an ARROW_EXPR.
12565
12566 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
12567
12568         * decl.c (saveable_obstack): Declare.
12569         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
12570         declare, if necessary.
12571
12572 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
12573
12574         * call.c (compare_qual): Remove.
12575         (is_subseq): Tweak.
12576         (is_properly_derived_from): New function.
12577         (maybe_handle_ref_bind): Likewise.
12578         (maybe_handle_implicit_object): Likewise.
12579         (compare_ics): Modify substantially to bring into conformance with
12580         the standard.
12581         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
12582         (comp_cv_qualification): Declare.
12583         (comp_cv_qual_signature): Likewise.
12584         * typeck.c (comp_cv_qualification): Likewise.
12585         (comp_cv_qual_signature): Likewise.
12586
12587 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12588
12589         * Makefile.in (parse.o): Depend on toplev.h.
12590
12591         * class.c (typecode_p): Remove prototype and definition.
12592
12593         * cp-tree.h (currently_open_class, is_empty_class, member_p):
12594         Add prototype.
12595
12596         * decl.c (push_overloaded_decl_top_level): Remove prototype and
12597         definition.
12598
12599         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
12600         in call to `cp_thing'.
12601         (cp_warning): Likewise for function pointer `warning'.
12602
12603         * except.c (do_function_call): Remove prototype and definition.
12604         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
12605
12606         * method.c (is_java_type): Add prototype and make it static.
12607
12608         * parse.y: Include toplev.h.
12609
12610         * pt.c (type_unification): Remove unused variable `arg'.
12611         (instantiate_decl): Likewise for `save_ti'.
12612
12613         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
12614
12615 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
12616
12617         * init.c (build_member_call): Handle template_ids.
12618         * parse.y (primary): Add global_scope template_id.
12619
12620 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
12621
12622         * decl2.c (get_sentry): Use end_temporary_allocation.
12623         Don't declare permanent_obstack.
12624
12625 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
12626
12627         * parse.y (.finish_new_placement): New non-terminal.
12628         (unary_expr, new_type_id): Use it.
12629         * parse.c: Regenerated.
12630
12631 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
12632
12633         * pt.c (redeclare_class_template): Say where the original definition
12634         of the template-parameter's default argument appeared.
12635
12636 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
12637
12638         * call.c (build_over_call): Tweak empty class handling.
12639
12640         * decl.c (make_typename_type): Use currently_open_class.
12641
12642         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
12643
12644 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12645
12646         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
12647         for a type unless it is one.
12648
12649         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
12650
12651 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
12652
12653         * Makefile.in (program_transform_name, objdir): Define.
12654
12655         * Makefile.in (BISON): Use bison from the build tree if it exists.
12656         (FLEX): Likewise.
12657
12658 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12659
12660         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
12661
12662         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
12663
12664 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
12665
12666         * call.c (build_scoped_method_call): Likewise.
12667
12668 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
12669
12670         * init.c (build_new_1): Call suspend_momentary around the creation
12671         of values that must be saved for exception handling.
12672         * parse.y (.build_new_placement): New non-terminal.
12673         (unary_expr, new_placement): Use it.
12674         * parse.c: Regenerated.
12675
12676 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
12677
12678         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
12679         old and new types.
12680
12681         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
12682         canonical type.
12683
12684         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
12685
12686 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
12687
12688         * decl.c (start_decl): Revert problem change.
12689
12690         * Makefile.in (CONFLICTS): Fix.
12691
12692 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12693
12694         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
12695
12696 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
12697
12698         * class.c (finish_struct_1): Use BINFO_SIZE.
12699
12700         * decl.c (start_decl): Use 'tem'.
12701
12702 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
12703
12704         * exception.cc: Include eh-common.h.
12705         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
12706         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
12707         (__cp_push_exception): Initialize eh_info struct as well.
12708         * except.c: Remove local structs and include eh-common.h.
12709         (init_exception_processing): Set language and version codes.
12710         (call_eh_info): Add presence of eh_info to runtime description of
12711         struct cp_eh_info.
12712         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
12713         * semantics.c (finish_try_block): Call start_catch_block() and
12714         end_catch_block().
12715         * parse.y (function_try_block): Call start_catch_block() and
12716         end_catch_block().
12717
12718 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
12719
12720         * typeck.c (original_type): New function.
12721         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
12722         to see if they're actually the same.
12723         * cp-tree.h (original_type): Declare.
12724
12725 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12726
12727         * Makefile.in (lex.o): Depend on output.h.
12728
12729         * call.c (add_function_candidate): Remove unused variable `cand'.
12730         (add_conv_candidate): Likewise.
12731         (build_builtin_candidate): Likewise.
12732
12733         * cp-tree.h: Add prototype for `types_overlap_p'.
12734
12735         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
12736
12737         * decl2.c (merge_functions): Remove unused variables `tmp' and
12738         `tempn'.
12739
12740         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
12741         (code_as_string): Likewise.
12742         (language_as_string): Likewise.
12743         (parm_as_string): Likewise.
12744         (op_as_string): Likewise.
12745         (assop_as_string): Likewise.
12746         (cv_as_string): Likewise.
12747
12748         * lex.c: Include output.h.
12749
12750         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
12751
12752         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
12753         ATTRIBUTE_UNUSED.
12754
12755         * tinfo.cc (__class_type_info::dcast): Change the type of variable
12756         `i' from int to size_t.
12757
12758         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
12759         ATTRIBUTE_UNUSED.
12760
12761 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
12762
12763         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
12764         DECL_NAMESPACE_SCOPE_P.
12765         (lang_decl_name): Likewise.
12766         * pt.c (tsubst_friend_function, tsubst): Likewise.
12767         * decl.c (pushdecl, redeclaration_error_message, start_decl,
12768         cp_finish_decl, start_function): Likewise.
12769         * class.c (finish_struct_1): Likewise.
12770         * call.c (build_over_call): Likewise.
12771         (compare_ics): Use DERIVED_FROM_P.
12772
12773 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
12774
12775         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
12776         * method.c (build_mangled_name): Use it.
12777         (build_decl_overload_real): Likewise.
12778
12779         * error.c (dump_simple_decl): New function, broken out from ...
12780         (dump_decl): Use it.
12781
12782 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
12783
12784         * ptree.c (lang_print_xnode): Add missing `break'.
12785
12786         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
12787
12788         * call.c (add_template_candidate): Adjust for changes to
12789         fn_type_unification.
12790         (add_template_candidate_real): Likewise.
12791         (add_template_conv_candidate): Likewise.
12792         (build_user_type_conversion_1): Likewise.
12793         (build_new_function_call): Likewise.
12794         (build_object_call): Likewise.
12795         (build_new_op): Likewise.
12796         (build_new_method_call): Likewise.
12797         * class.c (instantiate_type): Likewise.
12798         * cp-tree.h (unification_kind_t): New type.
12799         (fn_type_unification): Adjust prototype.
12800         (type_unificaiton): Likewise.
12801         * pt.c (UNIFY_ALLOW_NONE): New macro.
12802         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
12803         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
12804         (UNIFY_ALLOW_DERIVED): Likewise.
12805         (unify): Change prototype.
12806         (maybe_adjust_types_for_deduction): New function.
12807         (check_cv_quals_for_unify): Likewise.
12808         (determine_specialization): Adjust.
12809         (fn_type_unification): Likewise.
12810         (type_unification): Likewise.
12811         (type_unification_real): Likewise.  Use
12812         maybe_adjust_types_for_deduction.  Fix mishandling of
12813         back-unification of template functions passed as arguments.  Pass
12814         appropriate combination of UNIFY_ALLOW_* to unify.
12815         (unify): Remove unused NTPARMS parameter.  Use
12816         check_cv_quals_for_unify.  Remove bogus code that allowed
12817         too-generous unification in order to adhere more closely to standard.
12818         (get_bindings_real): Adjust.
12819         (get_class_bindings): Likewise.
12820
12821         * method.c (build_overload_identifier): Only use the innermost
12822         template arguments when mangling.
12823         * pt.c (tsubst_template_argument_vector): New function.
12824         (complete_template_args): Deal with the situation where the
12825         extra_args contain more than one level of arguments.
12826         (lookup_template_class): Deal with member template classes, which
12827         may have more than one level of arguments.
12828         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
12829         Improve handling of member template classes.  Use
12830         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
12831         tsubst_template_argument_vector where appropriate.
12832         (regenerate_decl_from_template): Break out from ...
12833         (instantiate_decl): Here.
12834
12835         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
12836         * parse.h: Regenerated.
12837         * parse.c: Really regenerated.
12838
12839         * cp-tree.h (finish_unary_op_expr): New function.
12840         (finish_id_expr): Likewise.
12841         (begin_new_placement): Likewise.
12842         (finish_new_placement): Likewise.
12843         (finish_declarator): Likewise.
12844         (finish_translation_unit): Likewise.
12845         (finish_parmlist): Likewise.
12846         (begin_class_definition): Likewise.
12847         (finish_class_definition): Likewise.
12848         (finish_default_args): Likewise.
12849         (finish_inline_definitions): Likewise.
12850         * parse.y (GCC_ASM_KEYWORD): Remove.
12851         (TYPENAME_ELLIPSIS): Likewise.
12852         * parse.c: Regenerated.
12853         Use new functions in semantics.c in the actions for many rules.
12854         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
12855         * hash.h: Regenerated.
12856         * semantics.c (finish_expr_stmt): Allow NULL expr.
12857         (finish_unary_op_expr): New function, containing
12858         code previously in parse.y.
12859         (finish_id_expr): Likewise.
12860         (begin_new_placement): Likewise.
12861         (finish_new_placement): Likewise.
12862         (finish_declarator): Likewise.
12863         (finish_translation_unit): Likewise.
12864         (finish_parmlist): Likewise.
12865         (begin_class_definition): Likewise.
12866         (finish_class_definition): Likewise.
12867         (finish_default_args): Likewise.
12868         (finish_inline_definitions): Likewise.
12869
12870 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
12871
12872         * typeck.c (build_c_cast): Don't decay arrays and functions to
12873         pointer type when converting to a class type.
12874
12875 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
12876
12877         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
12878         (DECL_CLASS_SCOPE_P): Likewise.
12879
12880 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
12881
12882         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
12883         * decl2.c (constructor_name_full): Likewise.
12884
12885 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
12886
12887         * tree.c (mapcar): Add OVERLOAD support.
12888
12889         * init.c (resolve_offset_ref): We must use basetype_path before we
12890         destroy it with a call to convert_pointer_to.
12891
12892 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
12893
12894         * class.c (currently_open_class): New fn.
12895         * decl.c (lookup_name_real): Use it.
12896         * search.c (lookup_field): Likewise.
12897
12898 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12899
12900         * cp-tree.def (OVERLOAD): New node.
12901         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
12902         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
12903         (NAMESPACE_BINDING): Remove.
12904         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
12905         namespace_binding.
12906         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
12907         Define.
12908         (tree_overload): New struct.
12909         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
12910         (REAL_IDENTIFIER_TYPE_VALUE): Define.
12911         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
12912         (lang_decl_flags): Remove in_namespace.
12913         (lang_decl): Remove chain.
12914         (DECL_CHAIN, DECL_NAMESPACE): Remove.
12915         (flag_honor_std): Declare extern.
12916         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
12917         namespace_binding, set_namespace_binding,
12918         lookup_function_nonclass, cat_namespace_levels,
12919         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
12920         scratch_ovl_cons, ovl_member, build_overload): Declare.
12921         (decl_list_length, get_namespace_id, current_namespace_id,
12922         overloaded_globals_p): Remove.
12923         (lookup_using_namespace, qualified_lookup_using_namespace): Change
12924         return type.
12925         (push_scratch_obstack): New macro.
12926         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
12927         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
12928         convs, fns.
12929         (build_new_function_call): Iterate using OVL_CHAIN.
12930         Print DECL_NAME in when reporting ambiguities.
12931         (build_object_call): Iterate using OVL_NEXT for fns, convs.
12932         (build_new_op): Call lookup_function_nonclass.
12933         Iterate using OVL_NEXT.
12934         (build_op_delete_call): Change detection of members.
12935         Do not wrap TREE_LIST around fields and single global functions.
12936         (build_over_call): Don't push a class level if the context is a
12937         namespace.
12938         (build_new_method_call): Iterate using OVL_NEXT.
12939         * class.c (add_method): Chain overloaded members using
12940         build_overload.  Remove copying of method.
12941         (grow_method): When iterating through the obstack, expect OVERLOAD
12942         nodes.  Chain overload members.
12943         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
12944         nodes in call to get_baselinks.
12945         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
12946         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
12947         fdecls that are OVERLOAD nodes.
12948         (validate_lhs): New function.
12949         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
12950         code.  Use DECL_NAME in error messages.  Split code between global
12951         and member function processing.
12952         * decl.c (global_type_node): New static variable.
12953         (in_std): New global.
12954         (struct binding_level): New field usings.
12955         (resume_binding_level): Assert that we are not in a class.
12956         (toplevel_bindings_p): Just check for namespace_p or
12957         pseudo_global.
12958         (resume_level): Remove.
12959         (find_binding): New function.
12960         (binding_for_name): Call it.
12961         (namespace_binding, set_namespace_binding): New functions.
12962         (push_namespace): Associate binding level with new namespace,
12963         resume_binding_level for existing namespace.  Remove old code.
12964         Fake std by counting.
12965         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
12966         (maybe_push_to_top_level): Save current namespace.
12967         (pop_from_top_level): Restore saved namespace.
12968         (pop_namespace): Call suspend_binding_level.  Remove old code.
12969         (cat_namespace_levels): New function.
12970         (set_identifier_type_value_with_scope): For namespace bindings,
12971         set BINDING_TYPE, and use global_type_node.
12972         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
12973         (identifier_type_value): New function.
12974         (pushtag): If no context, use current_namespace.
12975         (duplicate_decls): Don't process DECL_CHAIN.
12976         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
12977         already set.  Never reset it to NULL_TREE.  Lookup global variables
12978         in their namespace.  Push overloaded templates if they are on
12979         namespace level.
12980         (pushdecl_namespace_level): New function.
12981         (pushdecl_top_level): Implement using pushdecl_namespace_level.
12982         (pushdecl_using_decl): New function.
12983         (overloaded_globals_p): Remove.
12984         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
12985         them.  Use namespace_binding and set_namespace_value.
12986         (redeclaration_error_message): Complain if the declarations come
12987         from different namespaces.
12988         (lookup_tag): On namespace level, look in the BINDING_TYPE.
12989         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
12990         old code.
12991         (select_decl): New function.
12992         (lookup_name_real): Call it for qualified and unqualified lookup.
12993         Pass tree_bindings from the stack.
12994         If prefer_type is 1, also accept namespaces.
12995         (lookup_function_nonclass): New function.
12996         (init_decl_processing): Set the binding level of the global
12997         namespace to global_binding_level.
12998         Build a proper type list for __builtin_apply.
12999         Initialize std_node to "fake std" if flag_honor_std is set.
13000         Initialize global_type_node.
13001         Allocated bad_alloc in namespace std if flag_honor_std.
13002         (define_function): Set the DECL_CONTEXT to the current_namespace.
13003         (start_decl): A namespace is not considered as a context here.  If
13004         the DECL_CONTEXT is a namespace, push the decl.
13005         (cp_finish_decl): Check for namespaces used as initializers.
13006         (grokfndecl): Add namespace parameter.  Remove processing of
13007         DECL_CHAIN.
13008         (grokvardecl): Add namespace parameter.
13009         (grokdeclarator): Process SCOPEs that are namespaces.  For
13010         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
13011         (start_function): Check for contexts that are namespaces.
13012         Set context for declarations that have not been pushed.
13013         (store_parm_decls): Check for ::main only.
13014         (finish_function): Likewise.
13015         (start_method): Check for contexts that are namespaces.
13016         (start_method): Remove DECL_CHAIN processing.
13017         * decl2.c (flag_honor_std): Declare.
13018         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
13019         (decl_namespace_list): New static global.
13020         (grok_x_components): Ignore namespaces as type contexts.
13021         (check_classfn): Expect OVERLOAD nodes.
13022         (grokfield): Remove DECL_CHAIN processing.
13023         (finish_file): Call cat_namespace_levels.
13024         (merge_functions): New function.
13025         (ambiguous_decl): Rewrite.
13026         (lookup_using_namespace): Produce tree_bindings.
13027         (qualified_lookup_using_namespace): Likewise.
13028         (set_decl_namespace, decl_namespace, current_decl_namespace,
13029         push_decl_namespace, pop_decl_namespace): New functions.
13030         (arg_lookup): New struct.
13031         (add_function, arg_assoc_namespace, arg_assoc_class,
13032         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
13033         New functions.
13034         (get_namespace_id, current_namespace_id): Remove.
13035         (do_toplevel_using_decl): Rewrite.
13036         (do_class_using_decl): Complain about namespace qualifiers.
13037         (do_using_directive): Sorry if not on namespace level.  Complain
13038         about unknown namespaces.
13039         * error.c (dump_aggr_type): Check for namespace contexts.
13040         * except.c (init_exception_processing): Push terminate into std.
13041         * friend.c (is_friend): A namespace is not a context, here.
13042         * init.c (expand_member_init): Remove DECL_CHAIN processing.
13043         (build_offset_ref): Process OVERLOAD nodes.
13044         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
13045         * lex.c (identifier_type): Loop using OVL_CHAIN.
13046         (see_typename): Set looking_for_typename to 2.
13047         (real_yylex): Likewise.
13048         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
13049         (do_scoped_id): Expect OVERLOAD nodes.
13050         Change calling convention for qualified_lookup_using_namespace.
13051         (build_lang_decl): Don't set in_namespace anymore.
13052         * method.c (typevec_size): New global.
13053         (build_overload_nested_name): Return if global_namespace.
13054         Otherwise, always expect a declaration context.
13055         (build_qualified_name): Likewise.
13056         Make sure we don't write beyond typevec_size.
13057         (build_decl_overload_real): Likewise.
13058         Allocate one extra slot for the namespace.
13059         (hack_identifier): Mark code dead.
13060         Process OVERLOAD and NAMESPACE_DECL nodes.
13061         * parse.y (program): Pop namespaces until in global namespace.
13062         (extdef): In a using-declaration, don't discard the identifier if
13063         there is no declaration.
13064         (left_curly): Ignore type contexts which are namespaces.
13065         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
13066         used as scope.
13067         * pt.c (template_class_depth): Expect types to be namespaces.
13068         (determine_specialization): Simplify by expecting OVERLOAD nodes.
13069         (push_template_decl): Push into namespace level.
13070         Reset ctx if it is a namespace.
13071         Set DECL_CONTEXT to current_namespace if not set already.
13072         Ignore real contexts that are namespaces.
13073         (mangle_class_name_for_template): Skip global_namespace.
13074         Mangle other namespaces as declarations.
13075         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
13076         (lookup_template_class): Push into namespace of context.
13077         If the context is a namespace, set it to global_namespace.
13078         Use id_context for mangling.
13079         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
13080         (tsubst_friend_function): Ignore namespace contexts.
13081         Push into namespace level.
13082         (tsubst): Handle NAMESPACE_DECL nodes.
13083         Remove DECL_CHAIN processing.
13084         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
13085         * ptree.c (print_lang_identifier): Print bindings.
13086         (lang_print_xnode): Print OVERLOAD nodes.
13087         * rtti.c (init_rtti_processing): Push type_info into std.
13088         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
13089         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
13090         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
13091         lookup_fnfields_here): Likewise.
13092         Process all nodes, instead of going through TREE_CHAIN.
13093         * sig.c (build_signature_pointer_or_reference_type): Set context
13094         to global_namespace.
13095         (build_signature_table_constructor): Expect OVERLOAD nodes.
13096         * spew.c (yylex): Save old setting of looking_for_typename.
13097         * tree.c (decl_list_length): Remove.
13098         (binding_init): New function.
13099         (count_functions): Rewrite.
13100         (is_overloaded_fn): Expect OVERLOAD nodes.
13101         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
13102         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
13103         ovl_member): New functions.
13104         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
13105         (type_unknown_p): Likewise.
13106         (require_instantiated_type): Likewise.
13107         (build_component_ref): Declare code dead.
13108         (build_x_function_call): Create and expect OVERLOAD nodes.
13109         (build_function_call_real): Check for ::main only.
13110         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
13111         (convert_for_assignment): Check for TREE_LIST before accessing
13112         TREE_VALUE.
13113         * decl.c (duplicate_decls): Check for namespace bindings instead
13114         of global bindings.
13115         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
13116         lookup_name_current_level, start_decl, xref_tag,
13117         finish_enum): Likewise.
13118         * init.c (build_offset_ref): Likewise.
13119         * search.c (lookup_field): Likewise.
13120         (lookup_fnfields): Likewise.
13121         (dfs_debug_mark): Likewise.
13122         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
13123         (poplevel_class, pop_from_top_level): Likewise.
13124         * decl2.c (finish_method): Likewise.
13125         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
13126         * decl.c (record_builtin_type): Likewise.
13127         (init_decl_processing, grokfndecl): Likewise.
13128         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
13129         (make_lang_type): Likewise.
13130         * parse.y (make_thunk): Likewise.
13131         * pt.c (tsubst): Likewise.
13132         * tree.c (debug_binfo): Likewise.
13133         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
13134         tinfo2.cc, inc/new.h: Add std qualifications.
13135         * inc/new: Wrap with namespace std if __HONOR_STD.
13136         * inc/typeinfo: Likewise.
13137
13138 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
13139
13140         * call.c (build_user_type_conversion_1): Handle second_conv
13141         properly for templates.
13142
13143 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
13144
13145         * method.c (build_decl_overload_real): Set TREE_USED flag to
13146         zero for build_type_variants nodes as well.
13147
13148 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
13149
13150         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
13151
13152 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
13153
13154         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
13155         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
13156         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
13157         xref.o): Add toplev.h dependencies.
13158
13159 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
13160
13161         * errfn.c (cp_error, cp_warning): Remove declarations for
13162         error and warning respectively.
13163
13164 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13165
13166         * error.c: Convert to using ctype macros defined in system.h.
13167         * method.c: Likewise.
13168         * xref.c: Likewise.
13169         * lex.c: Likewise.  Also remove redundant system header stuff.
13170
13171 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
13172
13173         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
13174         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
13175         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
13176         xref.c: Add include of toplev.h.
13177
13178 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
13179
13180         * tree.c (perm_manip): Also regenerate the RTL of an extern.
13181         (copy_to_permanent): Use end_temporary_allocation.
13182
13183 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
13184
13185         * init.c (expand_vec_init): The initialization of each array
13186         element is a full-expression.
13187
13188 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
13189
13190         * method.c (build_mangled_name): Add a call to build_type_variant
13191         to get the right type.
13192
13193 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
13194
13195         * Makefile.in: Add .SUFFIXES.
13196
13197         * cp-tree.def: Remove NAMESPACE_DECL.
13198
13199 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
13200
13201         * call.c (build_over_call): Do evaluate arg even if it has empty
13202         class type.
13203         * decl.c (start_function): Don't push a member function.
13204
13205 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
13206
13207         * Makefile.in (g++FAQ.info): Put -o option before input file.
13208
13209 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
13210
13211         * gxxint.texi: Add info for squangling codes K and B.
13212
13213 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
13214
13215         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
13216         the expression in templates.
13217         (finish_stmt_expr): Likewise.
13218
13219 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
13220
13221         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
13222
13223 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
13224
13225         * decl.c (maybe_push_to_top_level): Always clear
13226         current_template_parms and processing_template_decl.
13227         (pushtag): Remove check of current_class_type and some comments,
13228         since maybe_push_to_top_level no longer creates confusion.
13229
13230 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
13231
13232         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
13233         (DECL_CLASS_TEMPLATE_P): Likewise.
13234         (DECL_PRIMARY_TEMPLATE): Likewise.
13235         (PRIMARY_TEMPLATE_P): Use it.
13236         (push_template_decl_real): New function.
13237         (redeclare_class_template): Take new template parameters as
13238         input.
13239         (is_specialization_of): New function.
13240         (comp_template_args): Declare.
13241         * decl.c (pushtag): Handle friend template classes.
13242         (xref_tag): Likewise.  Use new calling convention for
13243         redeclare_class_template.
13244         * decl2.c (grok_x_components): Handle friend templates.
13245         * friend.c (is_friend): Use is_specialization_of where
13246         appropriate.  Deal with friend class templates.
13247         (make_friend_class): Let a class template be friends with itself.
13248         * pt.c (comp_template_args): Remove declaration.
13249         (tsubst_friend_class): New function.
13250         (push_template_decl_real): New function.
13251         (push_template_decl): Use it.
13252         (redeclare_class_template): Adjust for new calling convention.
13253         (comp_template_args): Give it external linkage.
13254         (instantiate_class_type): Use tsubst_friend_class to deal
13255         with friend templates.
13256         * typeck.c (comptypes): Use comp_template_args, rather than
13257         expanding it inline.
13258         * parse.y (component_decl): Handle a nested template type
13259         like other component type declarations.
13260
13261         * pt.c (check_explicit_specialization): Handle overloaded
13262         constructors correctly.
13263
13264         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
13265         (lookup_template_class): Use it.
13266
13267 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
13268
13269         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
13270         * cp-tree.h: Add WRAPPER support.
13271         * call.c (add_candidate): Split out from add_*_candidate fns.
13272         (build_over_call): Take the candidate instead of function and args.
13273         Enforce access control here.  Emit overload warnings here.
13274         (add_warning): New fn.
13275         (joust): Add WARN parm.  If not set, call add_warning instead of
13276         printing a warning.  Re-enable some warnings.
13277         (tourney): Pass it.
13278         (convert_like): Adjust.
13279         (build_new_op): Adjust.
13280         (build_new_function_call): Adjust.
13281         (build_user_type_conversion_1): Adjust.
13282         (USER_CONV_FN): Adjust.
13283         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
13284         build_int_wrapper): New fns.
13285
13286 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
13287
13288         * pt.c (unify): Fix typo in previous change.
13289
13290 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
13291
13292         * error.c (dump_type_real): Declare canonical_name.
13293
13294         * typeck.c (comp_target_types): Fix PMFs.
13295
13296 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
13297
13298         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
13299         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
13300         TEMPLATE_DECL.
13301
13302         * pt.c (tsubst): Decrease the template-level of
13303         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
13304         TEMPLATE_PARM_INDEX.
13305         (template_decl_level): New function.
13306         (unify): Make sure to record unifications for template
13307         parameters, even when the parameters exactly match the arguments.
13308         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
13309         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
13310         aren't from the level we're currently working on.
13311
13312 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
13313
13314         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
13315
13316         * decl2.c (check_member_template): Set DECL_IGNORED for member
13317         class templates, too.
13318
13319         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
13320
13321 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13322
13323         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
13324
13325 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
13326
13327         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
13328         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
13329         (init_decl_processing): Handle TI types.
13330         * typeck.c (unsigned_type, signed_type): Handle TI types.
13331
13332 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
13333
13334         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
13335         New local added_libraries.  Increment count when add library to
13336         arglist.
13337
13338 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
13339
13340         * cp-tree.h (type_as_string_real): New function.
13341         * pt.c (mangle_class_name_for_template): Use it.
13342         * error.c (dump_aggr_type): Change prototype.
13343         (dump_type_prefix): Likewise.
13344         (dump_type_suffix): Likewise.
13345         (dump_type_real): Convert from dump_type.  If desired, the
13346         "canonica" name of a typedef, i.e., the name of the underlying
13347         type, can be printed.
13348         (dump_type): Call dump_type_real.
13349
13350 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
13351
13352         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
13353
13354         * typeck.c (comp_target_types): Tweak pedantic case.
13355         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
13356         Return -1 or 1 instead of 1 or 2.
13357         (compparms): Remove STRICT handling.
13358         (convert_for_assignment): Fix handling of pmfs.
13359
13360 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
13361
13362         * typeck.c (comp_target_types): Handle references like pointers.
13363         (comp_target_parms): Note that return code from comp_target_types
13364         can be negative to indicate failure.
13365
13366 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13367
13368         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
13369         which requires a working target compiler to build.
13370
13371 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
13372
13373         * tree.c (avoid_overlap): Add prototype.
13374
13375         * spew.c (num_tokens): Add prototype.
13376         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
13377
13378         * search.c (dfs_check_overlap): Add prototype.
13379         (dfs_no_overlap_yet): Likewise.
13380
13381         * pt.c (original_template): Add prototype.
13382         (inline_needs_template_parms): Likewise.
13383         (push_inline_template_parms_recursive): Likewise.
13384         (retrieve_specialization, register_specialization): Likewise.
13385         (print_candidates, reduce_template_parm_level): Likewise.
13386         (build_template_decl, mark_template_parm): Likewise.
13387         (tsubst_friend_function, get_bindings_real): Likewise.
13388
13389         * method.c (start_squangling): Add prototype.
13390         (end_squangling, check_ktype, issue_ktype): Likewise.
13391         (build_overloaded_scope_ref, check_btype): Likewise.
13392         (build_mangled_template_parm_index): Likewise.
13393
13394         * lex.c (init_cpp_parse): Add prototype.
13395         (handle_cp_pragma, handle_sysv_pragma): Likewise.
13396         (reduce_cmp, token_cmp): Likewise.
13397
13398         * except.c (call_eh_info): Add prototype.
13399         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
13400         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
13401
13402         * decl2.c (is_namespace_ancestor): Add prototype.
13403         (namespace_ancestor, add_using_namespace): Likewise.
13404         (ambiguous_decl): Likewise.
13405
13406         * decl.c (indent): Add prototype.
13407
13408         * call.c (add_template_candidate_real): Add prototype.
13409
13410 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
13411
13412         * decl2.c (build_expr_from_tree): Just return a PMF.
13413
13414 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
13415
13416         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
13417         when doing initializations.
13418
13419         * pt.c (unify): Use comptypes to compare type args.
13420
13421 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
13422
13423         * decl.c (duplicate_decls): Fix check for when it's safe to free
13424         the new decl.
13425
13426         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
13427         to type_as_string.
13428
13429 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
13430
13431         * pt.c (build_template_parm_index): Add prototype.
13432
13433         * search.c (my_tree_cons): Don't clear words outside the
13434         newly allocated node.
13435
13436 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
13437
13438         * lex.c (init_parse): Now returns char* containing the filename.
13439
13440 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
13441                           Jeff Law   <law@cygnus.com>
13442
13443         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
13444         than a pointer.
13445
13446 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13447
13448         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
13449
13450 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
13451
13452         * decl.c (duplicate_decls): Don't warn for redundant decls if
13453         friend: let add_friend take care of it.
13454
13455 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
13456
13457         * sig.c (build_signature_pointer_constructor): Don't set
13458         TREE_HAS_CONSTRUCTOR for a signature pointer.
13459         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
13460         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
13461         here, too.
13462         * typeck.c (build_unary_op): Only allow taking the address of a
13463         real constructor.
13464         * typeck2.c (digest_init): Simplify.
13465         (store_init_value): Don't pedwarn about using { } for pmfs.
13466
13467 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
13468
13469         * cp-tree.h (start_decl):  Update prototype.
13470         * decl.c (start_decl):  Like the C version, new parameters
13471         for the attributes.  Call cplus_decl_attributes here,
13472         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
13473         (grokdeclarator):  Pass NULL for new start_decl arguments.
13474         * pt.c (tsubst_expr):  Likewise.
13475         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
13476         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
13477         * lex.c (build_lang_decl): Add lang_name_java.
13478         * class.c (push_lang_context): Add lang_name_java.
13479         * method.c (build_mangled_name): Check for is_java_type.
13480
13481 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
13482
13483         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
13484         * call.c (build_scoped_method_call): Check for TREE_CODE for
13485         VOID_TYPE instead of type ==  void_type_node.
13486         (build_method_call): Likewise.
13487         * decl.c (lookup_name_real): Likewise.
13488         (grokdeclarator): Likewise.
13489         (start_decl): Likewise.
13490         (grokparms): Likewise.
13491         (start_function): Likewise.
13492         (finish_function): Likewise.
13493         (start_method): Likewise.
13494
13495 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
13496
13497         * lex.c (finput): New variable.
13498         (init_cpp_parse):  Renamed from init_parse.
13499         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
13500         (finish_parse): New function.
13501         * cp-tree.h (init_lex, init_parse): Remove declarations.
13502
13503 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
13504
13505         * call.c (build_call): Still evaluate the actual argument.
13506         * class.c (is_empty_class): Update for -fnew-abi.
13507
13508         * decl2.c: -fnew-abi implies -fsquangle.
13509
13510         * method.c (do_build_assign_ref): Don't do anything to copy
13511         an empty class.
13512         (do_build_copy_constructor): Likewise.
13513         * call.c (build_over_call): Likewise.
13514
13515 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
13516
13517         * tree.c (avoid_overlap): Return a value.
13518
13519 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
13520
13521         * method.c (check_btype): Add missing argument to xrealloc.
13522         (check_ktype): Likewise.
13523
13524 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
13525
13526         Implement empty base optimization.
13527         * class.c (finish_struct_1): Add vbase fields earlier.  Set
13528         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
13529         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
13530         (types_overlap_p): New fn.
13531         * tree.c (avoid_overlap): New fn.
13532         (build_base_fields): Use it to avoid overlapping empty bases.
13533         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
13534
13535         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
13536
13537         Re-implement allocation of base class subobjects.
13538         * tree.c (unshare_base_binfos): New fn.
13539         (layout_basetypes): Use it.  Now handles offsets of both virtual and
13540         non-virtual bases, after layout_type.
13541         (layout_vbasetypes): Remove.
13542         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
13543         (build_vbase_pointer_fields): Split out from old layout_basetypes.
13544         * class.c (finish_base_struct): Lose offset handling code.
13545         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
13546         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
13547         * cp-tree.h: Adjust.
13548
13549 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
13550
13551         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
13552         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
13553         * class.c (duplicate_tag_error): Likewise.
13554         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
13555         * tree.c (layout_vbasetypes): Update from layout_record, remove
13556         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
13557         (layout_basetypes): Likewise.
13558
13559 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
13560
13561         * class.c, Make sure system.h is included just after config.h.
13562         Delete lingering stdio and errno references too.
13563         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
13564
13565 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
13566
13567         * friend.c (is_friend): Fix access control for local classes.
13568
13569         * class.c (is_empty_class): New fn.
13570         * call.c (build_call): Don't pass empty class objects to a function.
13571
13572 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
13573
13574         * call.c (build_over_call): Do name resolution for default
13575         arguments of function templates in the scope of the templates.
13576
13577 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
13578
13579         * call.c: Include system.h.  Remove includes, declarations and
13580         defines provided by system.h.
13581         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
13582         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
13583         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
13584         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
13585         * typeck2.c, xref.c: Likewise.
13586         * Makefile.in: Dependencies updated as appropriate.
13587         * Make-lang.in: Likewise.
13588
13589 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
13590
13591         * pt.c (fn_type_unification): Allow incomplete unification without
13592         an immediate error message.
13593
13594 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
13595
13596         * tree.c (member_p): New fn.
13597         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
13598         initializing class members.
13599
13600         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
13601         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
13602
13603         * call.c (build_method_call): Handle non-scoped destructors, too.
13604         * pt.c (tsubst_copy): Likewise.
13605
13606         * pt.c (print_template_context): Split out...
13607         (push_tinst_level): ...from here.
13608
13609         * friend.c (is_friend): Don't pass a type to decl_function_context.
13610
13611         * typeck.c (convert_for_initialization): Always hand off
13612         conversions to class type.
13613
13614 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
13615
13616         * friend.c (is_friend): Local classes have the same access as the
13617         enclosing function.
13618
13619 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
13620
13621         * typeck.c (expand_target_expr): Delete dead function.
13622
13623         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
13624
13625         * repo.c (save_string): Delete dead function.
13626
13627         * method.c (thunk_printable_name): Delete dead function.
13628
13629         * lex.c (yynextch): Delete dead function.
13630
13631         * expr.c (tree_extract_aggr_init): #if 0 out.
13632
13633         * except.c (do_unwind): Delete dead function.
13634         (easy_expand_asm): Likewise.
13635
13636         * cvt.c (build_conversion_type_1): Delete dead function.
13637
13638         * cp-tree.h (push_expression_obstack): Declare.
13639
13640         * call.c (source_type): #if 0 out.
13641
13642         * class.c (alter_access): Remove unused label.  Add braces
13643         around empty else clause.
13644
13645         * lex.c (yyprint): Fix argument to printf.
13646
13647 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
13648
13649         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
13650
13651         * pt.c (instantiate_class_template): Make sure template
13652         arguments are permanent.
13653         * init.c (resolve_offset_ref): Don't go looking around in
13654         template types.
13655
13656         * semantics.c: Add routines to handle expressions, and some
13657         declaration processing.
13658         * parse.y: Use them.
13659         (current_class_depth): Move declaration to cp-tree.h.
13660         * parse.c: Regenerated.
13661         * cp-tree.h: Use them.
13662         (current_class_depth): Declare.
13663         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
13664
13665 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
13666
13667         * error.c (dump_decl): Be a bit more explicit with template
13668         type arguments, when verbose.
13669
13670 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
13671
13672         * inc/exception: Reorder closing braces.
13673
13674 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
13675
13676         * pt.c (redeclare_class_template): New function.
13677         * cp_tree.h (redeclare_class_template): Declare it.
13678         * decl.c (xref_tag): Use it.
13679
13680 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
13681
13682         * call.c (build_over_call): Check IS_AGGR_TYPE, not
13683         TYPE_LANG_SPECIFIC.
13684         * typeck.c (convert_arguments): Likewise.
13685
13686         * decl.c (grokdeclarator): Remove const and volatile from type after
13687         setting constp and volatilep.
13688
13689         * class.c (finish_struct_1): Don't warn about bool bitfield larger
13690         than one bit.
13691
13692 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
13693
13694         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
13695
13696 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
13697
13698         * call.c (build_object_call): Complain about ambiguous operator(),
13699         rather that crashing.
13700         (build_new_op): Likewise.
13701         (build_op_delete_call): Likewise.
13702
13703 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
13704
13705         * cvt.c (perform_qualification_conversions): Use comp_target_types
13706         instead of comp_ptr_ttypes.
13707
13708 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
13709
13710         * cp-tree.h (enforce_access): Declare.
13711         * call.c (enforce_access): Make it extern, not static.
13712         * class.c (alter_access): Use enforce_access; modify code for ISO
13713         compliance, rather than ARM rules.
13714
13715 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13716
13717         * cp-tree.h: Fix typo.
13718
13719 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
13720
13721         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
13722         if (aggregate_value_p (type)).
13723
13724         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
13725
13726 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
13727
13728         * tree.c (mapcar): When dealing with a DECL, use it's constant
13729         value, if any.
13730         * pt.c (lookup_template_class): Don't mangle the names of template
13731         classes whose arguments are unknown.
13732
13733         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
13734
13735 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
13736
13737         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
13738
13739 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
13740
13741         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
13742         boolean_type_node to 1.
13743
13744 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
13745
13746         * error.c (dump_expr): Remove unused variable `l'.
13747
13748         * pt.c (for_each_template_parm): New function, created by
13749         converting uses_template_parms.
13750         (tree_fn_t): New typedef.
13751         (uses_template_parms): Use it.
13752         (mark_template_parm): New function.
13753         (push_template_decl): Check that the argument list of a partial
13754         specialization uses all the template parameters.
13755
13756         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
13757         with it; we might want it for debugging.
13758         * cp-tree.h (type_unification): Change interface.
13759         * class.c (finish_struct_1): Skip nested template types, just like
13760         ordinary nested types.
13761         (instantiate_type): Use new interface to type_unification.
13762         * lex.c (init_lex): Add __sz as opname for sizeof.
13763         * method.c (build_overload_scope_ref): New function.
13764         (build_overload_int): Handle complex expressions.  Set
13765         numeric_output_need_bar if necessary.
13766         (build_overload_value): Handle non-PARM_DECL nodes; this
13767         routine is now used by build_overload_int.  Remove some
13768         assignments to numeric_output_need_bar.  Use
13769         build_overload_scope_ref.
13770         (build_qualified_name): Note that some template mangled names end
13771         with digits, and set numeric_output_need_bar appropriately.  Use
13772         build_underscore_int.
13773         * pt.c (unify): Change interface.
13774         (type_unification_real): Likewise.
13775         (determine_specialization): Use new interfaces.
13776         (tsubst): Deal gracefully with situations in which the argument
13777         vector is not fully filled.
13778         (fn_type_unification): Use new interfaces.
13779         (type_unification): Likewise.  Remove NOP_EXPR hack.
13780         (type_unification_real): Likewise.
13781         (unify): Likewise.  Deal with unification of complex expressions.
13782
13783 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
13784
13785         * pt.c (complete_template_args): Initialize skip properly.
13786
13787         * decl.c (make_typename_type): Revert.
13788         (make_implicit_typename): Remove.
13789         (lookup_name_real): Don't call it.  Call lookup_field if we see a
13790         TYPE_DECL from a template base.
13791         * search.c (lookup_field): Do implicit typename stuff.
13792
13793 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
13794                           Geoff Noer    <noer@cygnus.com>
13795
13796         * Makefile.in: Various fixes for building cygwin32 native toolchains.
13797         * Make-lang.in: Likewise.
13798
13799 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13800
13801         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
13802
13803 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
13804
13805         * decl.c (make_implicit_typename): Rewrite removed code.
13806         (make_typename_type): Call it if the type we look up comes from
13807         a base that uses template parms.
13808
13809         * pt.c (complete_template_args): Rewrite.
13810         (tsubst, FUNCTION_DECL): Use it.
13811
13812 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
13813
13814         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
13815         c_expand_asm_operands () if output_operands, input_operands or
13816         clobbers is not NULL_TREE.
13817
13818 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13819
13820         * pt.c (complete_template_args): New function.
13821         (get_bindings): Deal with specializations of function templates
13822         with return type containing parameters from outer class
13823         templates.
13824         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
13825         substitute arguments and compose a new type.
13826
13827 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
13828
13829         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
13830         FUNCTION_DECLs.
13831
13832 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
13833
13834         * decl.c (make_implicit_typename): Lose useless code.
13835
13836         * call.c (standard_conversion): Handle A* -> const A* properly.
13837
13838         * pt.c (get_bindings_real): Rename from get_bindings.  Add
13839         check_rettype parm.
13840         (get_bindings): Pass 1.
13841         (get_bindings_overload): Pass 0.
13842
13843 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
13844
13845         * pt.c (check_explicit_specialization): When reverting a static
13846         member function, also remove the `this' parameter from
13847         last_function_parms.
13848
13849 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
13850
13851         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
13852         a function context.
13853
13854         * decl.c (store_bindings): Use free_binding_vecs.
13855         (pop_from_top_level): Likewise.
13856
13857 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
13858
13859         * decl.c (make_implicit_typename): Only change the type of a
13860         TYPENAME_TYPE.
13861
13862 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
13863
13864         * semantics.c: New file, containing routines to perform the
13865         semantic phase of parsing.
13866         * parse.y: Use it.
13867         * pt.c (tsubst_expr): Likewise.
13868         * cp-tree.h: Declare the various functions in semantics.c.
13869         Provide macros to access _STMT tree nodes.
13870         * cp-tree.def: Add ASM_STMT tree node.
13871         * Makefile.in, Make-lang.in: Add dependencies on and for
13872         semantics.c.
13873
13874 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
13875
13876         * pt.c (push_template_decl): Only check primary templates.
13877
13878         * pt.c (check_explicit_specialization): Complain about default args
13879         in explicit specialization.
13880
13881         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
13882         constructor_declarator.
13883
13884 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
13885
13886         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
13887         has no overloaded operator ->.
13888
13889         * call.c (build_field_call): Don't crash when presented with a
13890         field that is actually a nested type.
13891
13892         * decl.c (pushtag): Deal with friend class injection in local
13893         classes.
13894
13895         * call.c (build_object_call): Don't crash if OBJ is a
13896         pointer-to-member-function.
13897
13898 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
13899
13900         * pt.c (push_template_decl): Complain about template with C linkage,
13901         anonymous template class.
13902
13903 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
13904
13905         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
13906         * search.c: Likewise.
13907
13908         * lex.c (do_pending_defargs): Only call
13909         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
13910
13911         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
13912
13913 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
13914
13915         * parse.y: Deal with CONSTRUCTORS in new_initializers.
13916
13917 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
13918
13919         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
13920         closely mimics the behavior in parse.y.
13921         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
13922         into a compound statement.
13923
13924 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
13925
13926         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
13927         * pt.c (inline_needs_template_parms): New fn.
13928         (original_template): New fn.
13929         (push_inline_template_parms_recursive): New fn.
13930         (maybe_begin_member_template_processing): Use them.
13931         (maybe_end_member_template_processing): Likewise.
13932         (is_member_or_friend_template): Rename to is_member_template.
13933         Member functions of local classes are never member templates.
13934
13935 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13936
13937         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
13938         added in the class scope to catch redefinition error.
13939
13940         * pt.c (reduce_template_parm_level): Also copy
13941         the DECL_TEMPLATE_PARMS field.
13942
13943 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
13944
13945         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
13946         reduced-level template type parameter.
13947
13948 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
13949
13950         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
13951         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
13952         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
13953         * decl.c (duplicate_decls): Propagate it.
13954         * typeck2.c (abstract_virtuals_error): Use two loops to emit
13955         abstract virtual functions and virtual functions which need a
13956         final overrider separately.
13957
13958 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
13959
13960         * lang-specs.h: Properly put brackets around array elements in
13961         initializer.
13962
13963         * typeck.c (build_binary_op_nodefault): Correctly place parens around
13964         && and || in expression.
13965
13966 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
13967
13968         * call.c (default_parm_conversions): Remove prototype definition.
13969         (build_method_call): Remove unused variable result.
13970
13971         * cvt.c (ocp_convert): Remove unused variable conversion.
13972
13973         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
13974
13975         * except.c (do_unwind): #if 0 definition of unused variables fcall
13976         and next_pc.
13977
13978         * expr.c (extract_scalar_init): #if 0 prototype and function
13979         definition.
13980
13981         * init.c (expand_aggr_init_1): Remove unused variable init_type.
13982         (build_new_1): Remove unused variable t.
13983
13984         * pt.c (instantiate_class_template): Remove unused variable newtag;
13985         cast called function return value to void.
13986         (do_decl_instantiation): Remove unused variables name and fn.
13987
13988         * tree.c (get_type_decl): Add default return to shut up compiler from
13989         complaining control reaches end of non-void function.
13990
13991         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
13992
13993 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
13994
13995         * call.c (default_parm_conversions): Remove prototype definition.
13996         (build_method_call): Remove unused variable result.
13997         (build_over_call): Add default case in enumeration switch.
13998
13999 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14000
14001         * decl2.c (lang_decode_option): Change j's type to size_t.
14002
14003         * tree.c (layout_vbasetypes): record_align and desired_align are of
14004         type unsigned int; const_size and nonvirtual_const_size likewise.
14005
14006 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
14007
14008         * parse.y (new_initializer): Make sure all initializers are
14009         lists.
14010
14011 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
14012
14013         * decl2.c (import_export_decl): Mark tinfo functions for
14014         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
14015
14016 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
14017
14018         * method.c: Fix typo.
14019
14020 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14021
14022         * method.c: Include "system.h" to get stdlib.h, stdio.h,
14023         ctype.h, string.h, etc.
14024         (issue_nrepeats): Add default case in enumeration switch.
14025         (check_btype): Likewise.
14026         (process_overload_item): Likewise.
14027
14028         * Makefile.in (method.o): Depend on system.h.
14029
14030 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14031
14032         * lex.c (do_scoped_id): Fix parenthesizing.
14033
14034 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
14035
14036         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
14037         FLAG_RTTI is unset, initialize type info machinery and continue
14038         with FLAG_RTTI enabled.
14039         (get_typeid): Likewise.
14040
14041 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
14042
14043         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
14044         from B.
14045
14046 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
14047
14048         * pt.c (finish_member_template_decl): Deal more gracefully with
14049         invalid declarations.
14050
14051 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
14052
14053         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
14054         cp-tree.h: Clean up more old overloading code, old RTTI code, and
14055         some formatting quirks.
14056
14057         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
14058         method.c, pt.c, ptree.c, typeck.c: Remove support for
14059         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
14060         * class.h: Remove.
14061         * Makefile.in: Adjust.
14062
14063         * pt.c (unify): Don't allow reduced cv-quals when strict.
14064
14065         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
14066         *type_unification* and unify.
14067
14068 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
14069
14070         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
14071         (nested_name_specifier): And add it before this use.
14072         (typename_sub0): And this use.  Also add use without the keyword.
14073         (typename_sub1): Likewise.
14074         * pt.c (instantiate_class_template): Don't actually instantiate
14075         anything if our type uses template parms.
14076
14077 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
14078
14079         * decl.c (start_function): Don't call temporary_allocation for a
14080         nested function.
14081
14082 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
14083
14084         * pt.c (instantiate_class_template): Don't mess with friends if
14085         our type uses template parms.
14086
14087 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
14088
14089         * parse.y (nested_name_specifier): Use explicit_template_type.
14090         (typename_sub): Allow a template_type, an explicit_template_type,
14091         or an implicit template type at the end.
14092         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
14093         * decl.c (make_typename_type): Handle template-id where the name
14094         is a TEMPLATE_DECL.
14095         * call.c (build_scoped_method_call): Handle member template
14096         destructor call.
14097         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
14098         destructor is represented by the type.
14099
14100         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
14101         * parse.y (nested_name_specifier): Add 'template' case.
14102         (explicit_template_type): New rule.
14103         (typename_sub): Use it.
14104         * decl.c (make_typename_type): Handle getting a template-id for NAME.
14105         * pt.c (tsubst): Likewise.
14106
14107 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
14108
14109         * pt.c (add_to_template_args): Fix thinko.
14110         (instantiate_class_template): Call it later.
14111
14112         * pt.c (get_class_bindings): Add outer_args parm.
14113         (most_specialized_class): Likewise.
14114         (instantiate_class_template): Pass it.
14115         (more_specialized_class): Likewise.
14116         (lookup_template_class): Get context from template if none
14117         was specified.
14118         (finish_member_template_decl): Don't do anything with a
14119         partial specialization.
14120         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
14121         AGGREGATE_TYPE_P.
14122         * class.c (finish_struct): Member class templates have already been
14123         checked for name clashes.
14124         * decl.c (pushdecl_with_scope): Handle pushing at class level.
14125
14126 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
14127
14128         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
14129         (tsubst, *_PARM): Support multiple levels of template classes.
14130         (instantiate_class_template): Look up the pattern from the
14131         original template.
14132         (lookup_template_class): Handle getting a template for d1.
14133         (push_template_decl): Correct setting of 'primary'.
14134         (reduce_template_parm_level): Add 'levels' parm.
14135         (finish_member_template_decl): Support member class templates.
14136         (template_class_depth): Handle multiple levels.
14137         * parse.y (component_decl_1, fn.def2): Remove member template case.
14138         (component_decl): Add member template cases.
14139         * decl2.c (check_member_template): We now handle member template
14140         classes.
14141         * decl.c (pushtag): Handle member templates.
14142         * method.c (do_inline_function_hair): Don't touch
14143         IDENTIFIER_GLOBAL_VALUE.
14144         * init.c (build_offset_ref): If name isn't an identifier, just
14145         return it.
14146         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
14147
14148         * typeck.c (get_delta_difference): Do adjust for conversions to
14149         and from virtual base.
14150
14151 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
14152
14153         * typeck.c (get_delta_difference): Give hard error for conversion
14154         from virtual base.
14155
14156         * cp-tree.h: Tweak formatting.
14157
14158 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
14159
14160         * decl.c (push_namespace): Handle redeclaration error.
14161
14162         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
14163         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
14164         (NAMESPACE_BINDING): New macro.
14165         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
14166         * *.c: Use them.
14167
14168         * pt.c (push_template_decl): Use innermost_args.
14169
14170         * decl.c (get_unique_name): Tweak from earlier in the name.
14171
14172 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
14173
14174         * cp-tree.def: Add CPLUS_BINDING node.
14175         * cp-tree.h (tree_binding): New struct.
14176         (BINDING_SCOPE, BINDING_VALUE): New macros.
14177         (current_namespace, global_namespace): Declare extern.
14178         (struct lang_decl_flags): New field in_namespace.
14179         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
14180         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
14181         (TREE_INDIRECT_USING): New macro.
14182         * decl2.c (current_namespace, global_namespace): Declare.  The
14183         value is a NAMESPACE_DECL now, not a TREE_LIST.
14184         (is_namespace_ancestor, namespace_ancestor): New static functions.
14185         (add_using_namespace, ambiguous_decl): Likewise.
14186         (lookup_using_namespace): New support function for lookup_name.
14187         (qualified_lookup_using_namespace): New support function for
14188         do_scoped_id and lookup_namespace_name.
14189         (get_namespace_id): Mark as obsolete.
14190         (current_namespace_id): Likewise.
14191         (do_namespace_alias): Implement.
14192         (do_using_directive): Implement as call to add_using_namespace.
14193         * decl.c (binding_for_name): New function.
14194         (push_namespace, pop_namespace): Implement.
14195         (push_decl): Don't install a FUNCTION_DECL in the global branch.
14196         (lookup_namespace_name): Implement using qualified lookup.
14197         (lookup_name_real): For global scoping, lookup in
14198         global_namespace.  For namespace scoping, lookup in given
14199         namespace.  For unscoped lookup, iterate over namespace,
14200         considering using directives.
14201         (init_decl_processing): Initialize global_namespace.
14202         (grokvardecl): Build assembler name as static name for globals.
14203         (grokdeclarator): Remove old namespace mangling.
14204         (xref_tag): When installing a global binding for the
14205         tag, make sure we have an identifier.
14206         * method.c (build_overload_nested_name): Mangle namespaces.
14207         (build_qualified_name): Likewise.
14208         (build_decl_overload_real): Likewise.
14209         * lex.c (build_lang_decl): Set namespace for new declaration to
14210         current_namespace.
14211         (do_scoped_id): Find global names in global or current
14212         namespace, or using qualified namespace lookup, depending on
14213         context.
14214         * init.c (build_member_call): When scope is namespace, use
14215         build_x_function_call instead.
14216         (build_offset_ref): When scope is namespace, collapse processing
14217         to lookup_namespace_name instead.
14218         * error.c (dump_decl): Support NAMESPACE_DECL.
14219         * decl.c (pushdecl): Bind globals to current namespace.
14220         (push_overloaded_decl): Likewise.
14221         (lookup_tag): Likewise.
14222         (lookup_name_current_level): Likewise.
14223         (xref_tag): Likewise.
14224         (start_function): Likewise.
14225         * lex.c (do_identifier): Likewise.
14226         (identifier_typedecl_value): Likewise.
14227         (real_yylex): Likewise.
14228         * method.c (do_inline_function_hair): Likewise.
14229         * parse.y (unscoped): Likewise.
14230         * pt.c (check_explicit_specialization): Likewise.
14231         (lookup_template_class): Likewise.
14232         * rtti.c (call_void_fn): Likewise.
14233         * sig.c (build_sigtable): Likewise.
14234         * ptree.c (lang_print_xnode): New function.
14235
14236 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
14237
14238         * pt.c (instantiate_class_template): Don't instantiate if pedantic
14239         and the args use template parms.
14240
14241         * pt.c (push_tinst_level): If the instantiation uses template parms,
14242         fail silently.
14243         * decl.c (xref_basetypes): Do call complete_type for basetypes
14244         that involve template parameters.
14245
14246 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
14247
14248         * typeck2.c (process_init_constructor): Fix labeled init check.
14249
14250 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
14251
14252         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
14253         argument to tsubst and friends.
14254
14255         * pt.c (tsubst, FUNCTION_DECL): Tidy.
14256
14257         * typeck.c (build_x_function_call): Handle static member function
14258         templates like non-templates.  Handle friend templates like normal
14259         function templates.
14260         * pt.c (tsubst, *_PARM): Don't use orig_level.
14261         (get_bindings): Don't call add_to_template_args.
14262         (instantiate_template): Likewise.
14263         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
14264         * ptree.c (print_lang_type): Print index/level for template parms.
14265
14266 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
14267
14268         * Make-lang.in (cc1plus): Note that cc1plus depends on
14269         cp/cp-tree.h and cp/cp-tree.def.
14270
14271         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
14272         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
14273         position in a template parameter list.
14274         * cp-tree.h (template_parm_index): New structure, used as the tree
14275         structure for a TEMPLATE_PARM_INDEX.
14276         (TEMPLATE_PARM_IDX): New macro.
14277         (TEMPLATE_PARM_LEVEL): Likewise.
14278         (TEMPLATE_PARM_DESCENDANTS): Likewise.
14279         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
14280         (TEMPLATE_PARM_DECL): Likewise.
14281         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
14282         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
14283         (TEMPLATE_TYPE_DECL): Likewise.
14284         (TEMPLATE_CONST_IDX): Remove.
14285         (TEMPLATE_CONST_LEVEL): Likewise.
14286         (TEMPLATE_CONST_SET_INFO): Likewise.
14287         (TEMPLATE_TYPE_SET_INFO): Likewise.
14288         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
14289         node.
14290         (TEMPLATE_TYPE_LEVEL): Likewise.
14291         * decl.c (decls_match): Call comp_template_parms, rather than
14292         expanding it inline.
14293         (duplicate_decls): If two template declarations are being merged,
14294         then their TEMPLATE_INFOs should be merged as well.
14295         (grokfndecl): Save template-id information when declaring a friend
14296         with explicit template arguments.  Pass arguments to
14297         check_explicit_specialization via correct convention; at some
14298         point check_explicit_specialization changed, but these call-sites
14299         did not.
14300         (grokdeclarator): Tidy up slightly.
14301         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
14302         two template functions with the same DECL_ASSEMBLER_NAME the same,
14303         since the names are not yet mangled.
14304         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
14305         TEMPLATE_CONST_PARM.
14306         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
14307         decl for a non-type parameter, rather than printing `<tparm ...>'.
14308         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
14309         (do_friend): Deal with template friends.
14310         * lex.c (do_pending_inlines): Call
14311         maybe_begin_member_template_processing, rather than
14312         conditionally calling begin_member_template_processing.
14313         (process_next_inline): Likewise.  Call
14314         maybe_end_member_template_processing, rather than
14315         conditionally calling end_member_template_processing.
14316         (do_pending_defargs): Likewise.
14317         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
14318         TEMPLATE_CONST_PARM.
14319         * method.c (build_mangled_template_parm_index): New function.
14320         (build_overload_value): Use it.
14321         (build_overload_name): Likewise.
14322         * pt.c (finish_member_template_decl): Allow friend declarations.
14323         (template_class_depth): New function.
14324         (is_member_template): Rename, and modify, to become...
14325         (is_member_or_friend_template): New function.
14326         (end_member_template_processing): Rename, and modify, to become...
14327         (maybe_end_member_template_processing).
14328         (build_template_parm_index): New function.
14329         (reduce_template_parm_level): New function.
14330         (process_template_parm): Modify to use build_template_parm_index.
14331         (push_template_decl): Deal with friend templates.
14332         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
14333         TEMPLATE_CONST_PARM.
14334         (tsubst_friend_function): New function.
14335         (instantiate_class_template): Generate the DECL_FRIENDLIST
14336         for a new instantiation by using tsubst_friend_function rather
14337         than just tsubst.
14338         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
14339         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
14340         appropriate new macros.  Use reduce_template_parm_level to
14341         generate lower-level template parameters.  Handle tsubst'ing into
14342         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
14343         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
14344         templates.  Similarly for the template parameters for a new
14345         template.
14346         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
14347         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
14348         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
14349         (get_bindings): Call add_to_template_args if necessary.
14350         (instantiate_decl): Handle instantiations of friend templates.
14351         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
14352         TEMPLATE_TYPE_PARM as a list of fields; it's not!
14353         * spew.c (yylex): Do a little manual constant propagation to
14354         clarify the code.
14355
14356 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
14357
14358         * error.c: Include sys/types.h.
14359
14360 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
14361
14362         * method.c (build_mangled_name): Start CPP directives in column zero.
14363
14364 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
14365
14366         * typeck2.c (process_init_constructor): Sorry about non-trivial
14367         labeled initializers.
14368         * parse.y (initlist): Re-enable labeled initializers.
14369
14370 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14371
14372         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
14373         all callers changed.  Rely on the new parameter instead of arg
14374         being a TREE_LIST when determine whether we are working inside
14375         template template parameter.  Clean up is_type test.
14376
14377 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
14378
14379         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
14380         * typeck2.c (initializer_constant_valid_p): Allow conversions
14381         between pointers and references.
14382
14383 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
14384
14385         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
14386         if pedantic || warn_pointer_arith.
14387
14388 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14389
14390         * pt.c (unify): Handle TEMPLATE_DECL.
14391
14392 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
14393
14394         * cp-tree.h (strip_attrs): Remove decl.
14395
14396 1998-02-18  Doug Evans  <devans@cygnus.com>
14397
14398         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
14399         Update olddecl's attributes too.
14400         (strip_attrs): Remove function.
14401         * typeck.c (common_type): Call merge_machine_type_attributes.
14402
14403 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
14404
14405         * parse.y (initdcl0_innards): New grammar symbol.
14406         (nomods_initdecls, nomods_initdcl0): Change type from itype to
14407         none, since the resulting value is never used.
14408         (parse_decl): New function.
14409         (datadef): Remove redundant actions.
14410         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
14411         * parse.c: Regenerated.
14412
14413 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
14414
14415         * parse.y (simple_stmt): Use getdecls() to check for decl.
14416
14417 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
14418
14419         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
14420         macros.
14421         (c++.install-common): Install c++filt properly as native or as cross
14422         variant.
14423         (c++.uninstall): Add c++filt.
14424
14425 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
14426
14427         * call.c (standard_conversion): Fix multi-level ptr conversions.
14428
14429 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
14430
14431         * init.c (build_new): Propagate error_mark_node up.
14432
14433 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
14434
14435         * parse.y (simple_stmt): If the condition isn't a declaration,
14436         start the controlled block after the test.
14437
14438 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14439
14440         * call.c (build_over_call): Convert builtin abs, labs and fabs to
14441         tree-codes.
14442         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
14443         builtins.
14444
14445 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
14446
14447         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
14448
14449 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
14450
14451         * cp-tree.h: Add access_protected_virtual_node.
14452         * class.c (init_class_processing): Initialize it.
14453         * decl.c (xref_basetypes): Use it.
14454         * parse.y (base_class_access_list): Likewise.
14455
14456         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
14457         (c++.install-common): Install c++filt.
14458
14459 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14460
14461         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
14462
14463 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
14464
14465         * call.c (reference_binding): Use comptypes when comparing
14466         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
14467
14468 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
14469
14470         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
14471         (really_overloaded_fn): Move check here from is_overloaded_fn.
14472         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
14473
14474 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
14475
14476         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
14477         conversions.
14478
14479 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
14480
14481         * cp-tree.h (push_template_decl): Return the decl passed in, or an
14482         equivalent duplicate.
14483         * decl.c (pushtag): Use the return value from push_template_decl.
14484         (duplicate_decls): When duplicating a template declaration, merge
14485         the DECL_TEMPLATE_RESULTs as well.
14486         (make_implicit_typename): Don't try to dive into typename types to
14487         find a context for making a new implicit typename.
14488         (start_decl): Use the return value from push_template_decl.
14489         (grokdeclarator): Complain about declarations list `const operator
14490         int'.  Since we don't correctly handle in-class initializations of
14491         non-static data members, complain about this (now illegal)
14492         practice.  Issue an error for initializations of non-const statics
14493         since that is illegal as well, and since we don't handle that case
14494         correctly either.
14495         (start_function): Use the return value from push_template_decl.
14496         (start_method): Likewise.
14497         * decl2.c (grokfield): Likewise.  Since the change to
14498         grokdeclarator ensures that all initialized fields are in fact
14499         static, remove a redundant test for TREE_PUBLIC.
14500         * parse.y (initlist): Disable labeled initializers since they do
14501         not work as per the documentation, and since they do not use the
14502         same syntax as the C front end.
14503         * pt.c (push_template_decl): Return the decl passed in, or an
14504         equivalent duplicate.
14505         (lookup_template_class): When searching in a nested context,
14506         use the right arguments.
14507         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
14508         * typeck.c (build_component_ref): Assign the correct type to the
14509         result of build_vfn_ref.
14510
14511 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
14512
14513         * pt.c (convert_nontype_argument): Fix typo.
14514         (check_explicit_specialization): Allow old-style specialization
14515         of class template members.
14516
14517 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
14518                           Manfred Hollstein  <manfred@s-direktnet.de>
14519
14520         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
14521         when deciding to override DECL_ASSEMBLER_NAME.
14522
14523 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
14524
14525         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
14526         * cp-tree.h (flag_do_squangling): Add declaration.
14527         * lang-options.h: Add -fsquangle and -fno-squangle.
14528         * method.c: Add macros and static variables for squangling.
14529         (build_overload_name): Rename to build_mangled_name, add logic for B
14530         compression, and split into process_modifiers and
14531         process_overload_item.
14532         (process_modifiers): New function, to handle constant, reference,
14533         and pointer types.
14534         (process_overload_item): New function, handles issue of type codes.
14535         (build_overload_name): New function, start squangling and call
14536         build_mangled_name.
14537         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
14538         (start_squangling): New function to initialize squangling structs.
14539         (end_squangling): New function to destroy squangling structs.
14540         (nrepeats): Rename variable to Nrepeats.
14541         (issue_nrepeats): New function for issuing 'n' type repeats.
14542         (check_ktype): New function to check for type K name compression.
14543         (build_overload_nested_name): Add a check for K name compression.
14544         (build_qualified_name): Add a check for K name compression and don't
14545         use DECL_ASSEMBLER_NAME when squangling is on.
14546         (check_btype): New function, checks for B type compression.
14547         (build_static_name, build_decl_overload_real): Initiate squangling.
14548         (build_typename_overload, build_overload_with_type): Initiate
14549         squangling
14550
14551 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
14552
14553         * method.c (make_thunk): Avoid name buffer overflow.
14554
14555 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
14556
14557         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
14558         don't define them yet.
14559
14560         * parse.y (nomods_initdcl0): Add constructor_declarator case.
14561
14562 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14563
14564         * config-lang.in (diff_excludes): Use basename only.
14565
14566 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
14567
14568         * tinfo2.cc: Add tinfo for signed char.
14569
14570 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
14571
14572         * search.c (compute_access): Handle protected constructors in derived
14573         classes as accessible.
14574
14575 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
14576
14577         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
14578         Call convert_from_reference sooner.
14579
14580 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
14581
14582         * cvt.c (ocp_convert): Obtain the constant values from constant
14583         decls even if the destination type is the same as the type of the
14584         decl.
14585
14586         * decl2.c (finish_file): Make sure that static inlines with
14587         definitions are not marked DECL_EXTERNAL before returning.
14588
14589 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
14590
14591         * decl.c: Lose arg_looking_for_template.
14592         (lookup_name_real): Likewise.
14593         * parse.y: Lose processing_template_arg, template_arg1.
14594         (primary): Likewise.
14595         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
14596
14597 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14598
14599         * error.c (dump_decl): Fix type of default arguments for template
14600         template parameters and nontype template parameters.
14601         * parse.y (template_parm): Handle invalid default template
14602         template arguments here.
14603
14604         * parse.y (template_parm): Use template_arg instead of PTYPENAME
14605         for default template template argument.
14606         * pt.c (coerce_template_parms): Merge default template argument
14607         codes.  Can treat RECORD_TYPE as template name if it is implicitly
14608         created.  Fix argument index in error message.
14609         * typeck.c (comptypes): Merge template argument comparison codes in
14610         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
14611
14612 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
14613
14614         * lex.c (file_name_nondirectory): Also check for '/'.
14615
14616 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
14617
14618         * parse.y (primary): Deal with statement-expressions in
14619         templates.
14620         * pt.c (tsubst_copy): Handle BIND_EXPR.
14621         * tree.c (mapcar): Likewise.
14622
14623         * call.c (add_template_candidate_real): Pass extra parameter to
14624         fn_type_unification.
14625         * cp-tree.h (fn_type_unification): Add parameter.
14626         * pt.c (fn_type_unification): Add additional parameter to deal with
14627         static member functions.
14628         (get_bindings): Deal with static member functions.
14629
14630         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
14631         (revert_static_member_fn): Declare.
14632         * decl.c (revert_static_member_fn): Remove declaration.  Change
14633         linkage from internal to external.
14634         (cp_finish_decl): Deal with virtual functions in classes local to
14635         template functions.
14636         * decl2.c (finish_file): Don't forget to emit increment/decrement
14637         expressions in initializers for file-scope variables.
14638         * parse.y (typename_sub2): If the typename doesn't names a
14639         template, rather than a type, issue an error message.
14640         * pt.c (check_explicit_specialization): Handle specializations of
14641         static member functions.
14642         (coerce_template_parms): Handle offset references to lists of
14643         member functions.
14644         * search.c (note_debug_info_needed): Don't crash when handed a
14645         type which is being defined.
14646         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
14647         that can happen with some illegal code.
14648
14649 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14650
14651         * call.c (user_harshness): Initialize `code' to 0.
14652         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
14653         (null_ptr_cst_p): Add parentheses around && within ||.
14654         (standard_conversion): Likewise.
14655         (z_candidate): Likewise.
14656         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
14657         (build_object_call): Likewise for `mem_args'.
14658         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
14659         default case in enumeration switch.
14660
14661         * class.c (build_vtable_entry): Add explicit braces to avoid
14662         ambiguous `else'.
14663         (build_class_init_list): Likewise.
14664         (finish_struct_1): Initialize `width' to 0.
14665         (instantiate_type): Initialize `name' to NULL_TREE.  Add
14666         explicit braces to avoid ambiguous `else'.
14667
14668         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
14669         `else'.
14670
14671         * decl.c (grok_reference_init): Eliminate unused parameter, all
14672         callers changed.
14673         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
14674         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
14675         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
14676         (grokdeclarator): Add parentheses around && within ||.  Add
14677         explicit braces to avoid ambiguous `else'.
14678         (grokparms): Initialize `type' to NULL_TREE.
14679         (xref_tag): Remove unused label `just_return'.
14680         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
14681         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
14682         (hack_incomplete_structures): Add parentheses around assignment
14683         used as truth value.
14684
14685         * decl2.c (coerce_delete_type): Hide definition of `e3'.
14686
14687         * error.c: Include <stdlib.h>.
14688         (dump_expr): Change the type of `i' to size_t.  Remove unused
14689         label `error'.
14690
14691         * except.c (init_exception_processing): Remove unused variable `d'.
14692         (expand_throw): Likewise for `label'.
14693
14694         * friend.c (add_friends): Add explicit braces to avoid ambiguous
14695         `else'.
14696
14697         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
14698         (sort_base_init): Likewise for `binfo'.
14699         (expand_member_init): Likewise for `rval'.
14700         (build_member_call): Add parentheses around assignment used as
14701         truth value.
14702         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
14703         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
14704         `old_immediate_size_expand' to 0.
14705         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
14706         (build_vec_delete_1): Remove unused variable `block'.
14707         (expand_vec_init): Initialize `itype' to NULL_TREE.
14708
14709         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
14710         declaration of `index' and `rindex' with autoconf macros.
14711         (reinit_parse_for_expr): Remove unused variables
14712         `look_for_semicolon' and `look_for_lbrac'.
14713         (cons_up_default_function): Initialize `args' to NULL_TREE.
14714         (readescape): Initialize `firstdig' to 0.
14715         (real_yylex): Add parentheses around assignment used as truth value.
14716
14717         * method.c: Include <strings.h> if we don't have <string.h>.
14718         Protect declaration of `index' with autoconf macro.
14719
14720         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
14721         Initialize `type' to NULL_TREE.
14722         (structsp): Remove unused variable `id'.
14723
14724         * pt.c (coerce_template_parms): Add explicit braces to avoid
14725         ambiguous `else'.
14726         (lookup_template_class): Initialize `template' to NULL_TREE.
14727         (instantiate_class_template): Remove unused variable `name' and `e'.
14728         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
14729         (do_poplevel): Initialize `saved_warn_unused' to 0.
14730         (type_unification): Remove unused varable `parm'.
14731         (unify): Likewise for `j'.
14732
14733         * repo.c (init_repo): Add parentheses around assignment used as
14734         truth value.
14735         (finish_repo): Remove unused varable `p'.
14736
14737         * search.c (get_binfo): Initialize `type' to NULL_TREE.
14738         (get_base_distance): Likewise.
14739         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
14740         and `new_v' to NULL_TREE.
14741         (lookup_fnfields): Likewise for `rval_binfo_h'.
14742         (breadth_first_search): Add parentheses around assignment used as
14743         truth value.
14744         (get_template_base): Initialize `type' to NULL_TREE.
14745
14746         * sig.c (append_signature_fields): Initialize `last_mfptr' to
14747         NULL_TREE.
14748         (build_signature_table_constructor): Likewise for
14749         `last_rhs_field', `pfn' and `vt_off'.
14750         (build_sigtable): Likewise for `init'.
14751
14752         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
14753         (propagate_binfo_offsets): Likewise for `delta'.
14754         (hash_tree_cons): Initialize hashcode to 0.
14755         (can_free): Likewise for `size'.
14756         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
14757
14758         * typeck.c (convert_sequence): Hide prototype.
14759         (common_type): Add explicit braces to avoid ambiguous `else'.
14760         (comp_target_types): Likewise.
14761         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
14762         (build_function_call_real): Add explicit braces to avoid ambiguous
14763         `else'.
14764         (convert_arguments): Initialize `called_thing' to 0.
14765         (convert_for_initialization): Initialize `savew' and `savee' to 0.
14766
14767         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
14768         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
14769         (build_x_arrow): Likewise for `last_rval'.
14770
14771         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
14772
14773 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
14774
14775         * decl.c (init_decl_processing): Use set_sizetype.
14776         * decl2.c (sizetype): Don't declare.
14777         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
14778         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
14779         (build_component_addr, unary_complex_lvalue): Likewise.
14780         * rtti.c (expand_class_desc): Likewise.
14781         * class.c (get_vfield_offset): Likewise.
14782
14783 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
14784
14785         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
14786         early to avoid bogus error.  Handle overloaded function
14787         names provided as template arguments correctly.
14788         (coerce_template_parms): Don't mishandle overloaded functions when
14789         dealing with template template parameters.
14790         (lookup_template_class): Issue an error message, rather than
14791         crashing, when the TYPE_DECL provided is not a template type.
14792
14793 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
14794
14795         * class.c (instantiate_type): Don't just return a known type if
14796         it's wrong.
14797
14798 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
14799
14800         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
14801         since that code could never be reached.
14802
14803         * error.c (dump_decl): Avoid aborting in the midst of printing an
14804         error message about an illegal template declaration.
14805
14806         * parse.y (structsp): Print an error message, rather than crashing,
14807         when a class-head does not name a class.
14808
14809         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
14810         template arguments as a g++ extension.
14811
14812         * cp-tree.def (ALIGNOF_EXPR): New tree code.
14813         * decl2.c (grok_alignof): If processing_template_decl, just store
14814         the expression.
14815         * typeck.c (c_alignof): Likewise.
14816         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
14817         * error.c (dump_expr): Likewise.
14818         * pt.c (tsubst_copy): Likewise.
14819         * tree.c (cp_tree_equal): Likewise.
14820         * pt.c (uses_template_parms): Correctly determine whether or not a
14821         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
14822         folding can be done.
14823
14824         * cp-tree.h (grok_enum_decls): Remove type parameter.
14825         * decl.c (grok_enum_decls): Likewise.
14826         * decl2.c (grok_x_components): Call grok_enum_decls
14827         unconditionally, since it will do nothing if there is no
14828         current_local_enum.  Use the new calling sequence.
14829         * pt.c (tsubst_enum): Use the new calling sequence for
14830         grok_enum_decls.
14831
14832         * decl.c (start_function): Make member functions of local classes
14833         in extern inline functions have comdat linkage here...
14834         (grokdeclarator): Rather than here.
14835
14836 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
14837
14838         * pt.c (convert_nontype_argument): Use decl_constant_value.
14839
14840 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
14841
14842         * call.c (add_template_candidate_real): New function.
14843         (add_template_candidate): Use it.
14844         (add_template_conv_candidate): Likewise.
14845         (joust): Pass extra argument to more_specialized.
14846         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
14847         (is_local_class): Remove.
14848         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
14849         * cp-tree.h (is_local_class): Remove.
14850         (perform_array_to_pointer_conversion): Likewise.
14851         (finish_member_template_decl): Add.
14852         (check_explicit_specialization): Return a tree, not an int.
14853         (more_specialized): Take additional argument.
14854         (get_bindings): Likewise.
14855         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
14856         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
14857         (perform_array_to_pointer_conversion): Remove.
14858         * decl.c (saved_scope): Add processing_specialization,
14859         processing_explicit_instantiation fields.
14860         (maybe_push_to_top_level): Save them.
14861         (pop_from_top_level): Restore them.
14862         (grokfndecl): Use new return value from
14863         check_explicit_specialization.
14864         (start_decl): Don't check flag_guiding_decls before pushing
14865         decls.
14866         (cp_finish_decl): Remove previous (bogus) change.
14867         (grok_declarator): Use decl_function_context rather than
14868         is_local_class.
14869         * decl2.c (finish_file): Pass extra argument to get_bindings.
14870         (build_expr_from_tree): Let build_x_component_ref check
14871         validity of arguments rather than doing it here.
14872         * lex.c (cons_up_default_function): Remove code fooling with
14873         processing_specialization, processing_explicit_instantiation
14874         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
14875         * method.c (build_overload_identifier): Mangle local classes in
14876         template functions correctly.
14877         * parse.y (finish_member_template_decl): Move to pt.c.
14878         * pt.c (finish_member_template_decl): Moved here from parse.y.
14879         (print_candidates): New function.
14880         (determine_specialization): Change interface.  Properly look for
14881         most specialized versions of template candidates.
14882         (check_explicit_specialization): Fully process explicit
14883         instantiations.
14884         (push_template_decl): Avoid looking at CLASSTYPE fields in
14885         FUNCTION_DECLS.
14886         (determine_overloaded_function): Remove.
14887         (convert_nontype_argument): Change name from
14888         convert_nontype_parameter.  Use determine_overloaded_function
14889         instead of instantiate_type.
14890         (mangle_class_name_for_template): Handle type contexts as well as
14891         function contexts.
14892         (classtype_mangled_name): Likewise.
14893         (lookup_template_class): Likewise.
14894         (tsubst): Likewise.
14895         (more_specialized): Take explict template arguments as a
14896         parameter.
14897         (most_specialized): Likewise.
14898         (get_bindings): Likewise.  Check that return types match before
14899         proclaiming a function a match.
14900         (do_decl_instantiation): Remove code searching for function to
14901         instantiate; that is now done in check_explicit_specialization.
14902         (add_maybe_template): Pass extra argument to get_bindings.
14903         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
14904         implementation.
14905         * typeck.c (build_component_ref): Check for invalid arguments.
14906
14907 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
14908
14909         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
14910         return_target and call_target are equivalent.
14911
14912         * pt.c (type_unification_real): Just accept function parms that
14913         don't use any template parms.
14914
14915 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
14916
14917         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
14918         unset DECL_NOT_REALLY_EXTERN.
14919
14920         * parse.y (typename_sub*): Fix std::.
14921
14922 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
14923
14924         * error.c (dump_decl): Fix type default template args.
14925         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
14926
14927 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
14928
14929         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
14930         (file_name_nondirectory): Use.
14931
14932 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
14933
14934         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
14935         that are not really present.  Substitute default arguments in
14936         template template arguments.  Correctly convert TEMPLATE_DECL to
14937         TEMPLATE_TEMPLATE_PARM.
14938         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
14939         are no longer treated specially here.
14940         * parse.y (template_template_parm): Fix copy error.
14941         * decl.c (grokdeclarator): Warn about missing `typename' for nested
14942         type created from template template parameters.
14943         * parse.y (bad_parm): Likewise
14944
14945         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
14946         (push_nested_class): Likewise.
14947         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
14948         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
14949         (copy_template_template_parm): Declare.
14950         * decl.c (arg_looking_for_template): New variable.
14951         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
14952         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
14953         node if arg_looking_for_template is nonzero.
14954         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
14955         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
14956         (grokdeclarator): Handle TEMPLATE_DECL.
14957         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
14958         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
14959         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
14960         (dump_decl): Handle unnamed template type parameters.
14961         Handle template template parameters.
14962         (dump_function_name): Handle template template parameters.
14963         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
14964         Handle TEMPLATE_TEMPLATE_PARM.
14965         * method.c (build_template_template_parm_names): New function.
14966         (build_template_parm_names): Handle TEMPLATE_DECL.
14967         (build_overload_nested_name, build_overload_name):
14968         Handle TEMPLATE_TEMPLATE_PARM.
14969         * parse.y (maybe_identifier): New nonterminal.
14970         (template_type_parm): Use it.
14971         (template_template_parm, template_arg1): New nonterminal.
14972         (template_parm): Add template_template_parm rules.
14973         (template_arg): Set processing_template_arg.
14974         (template_arg1): Rules moved from template_arg.
14975         (primary, nonnested_type): Set arg_looking_for_template if we are
14976         processing template arguments.
14977         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
14978         (process_template_parm): Handle template template parameters.
14979         (coerce_template_parms, comp_template_args): Likewise.
14980         (mangle_class_name_for_template, lookup_template_class): Likewise.
14981         (uses_template_parms): Handle TEMPLATE_DECL and
14982         TEMPLATE_TEMPLATE_PARM.
14983         (current_template_args): Handle TEMPLATE_DECL.
14984         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
14985         * search.c (dfs_walk, dfs_record_inheritance):
14986         Handle TEMPLATE_TEMPLATE_PARM.
14987         * tree.c (copy_template_template_parm): New function.
14988         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
14989         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
14990
14991 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
14992
14993         * decl.c (start_decl): Don't allow duplicate definitions of static
14994         data members.
14995
14996         * call.c (build_user_type_conversion_1): Handle user-defined
14997         template conversion operators correctly.
14998
14999         * decl2.c (build_expr_from_tree): Issue an error message if the
15000         object in a COMPONENT_REF is a TEMPLATE_DECL.
15001
15002         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
15003
15004         * class.c (is_local_class): New function.
15005         * cp-tree.h (is_local_class): Declare it.
15006         (last_tree): Likewise.
15007         (begin_tree): Likewise.
15008         (end_tree): Likewise.
15009         (lookup_template_class): Change prototype.
15010         * decl.c (cp_finish_decl): Check for NULL where necessary.
15011         Consider FUNCTION_DECLS to declare objects with top-level binding,
15012         when calling make_decl_rtl.
15013         (grokdeclarator): Give members of local classes internal linkage.
15014         (start_function): Remove declaration of last_tree.
15015         (finish_function): Set flag_keep_inline_functions around call to
15016         rest_of_compilation if we are processing a member function in a
15017         local class.
15018         (start_method): Call push_template_decl for member functions of
15019         local classes in template functions.
15020         * decl2.c (import_export_decl): Don't give external linkage to
15021         instantiations of templates with internal linkage.
15022         * parse.y (last_tree): Remove declaration.
15023         (template_type): Pass extra parameter to lookup_template_class.
15024         (self_template_type): Likewise.
15025         (structsp): Move call to reset_specialization into left_curly.
15026         (left_curly): Call reset_specialization, and begin_tree.
15027         * pt.c (saved_trees): New variable.
15028         (mangle_class_name_for_template): Change prototype.  Use
15029         additional function context to name local classes in templates
15030         correctly.
15031         (classtype_mangled_name): Pass the context.
15032         (push_template_decl): Handle local classes and templates, and
15033         member functions for such classes.
15034         (convert_nontype_parameter): Fix handling of pointer-to-member
15035         constants.
15036         (lookup_template_class): Handle local classes in templates.
15037         (tsubst): Likewise.  Don't assume that template instantiations
15038         have external linkage; pay attention to the template declaration.
15039         (mark_decl_instantiated): Likewise.
15040         (begin_tree): New function.
15041         (end_tree): Likewise.
15042
15043         * decl.c (xref_basetypes): Don't call complete_type for basetypes
15044         that involve template parameters; that can lead to infinite
15045         recursion unnecessarily.
15046
15047         * pt.c (register_specialization): Do not register specializations
15048         that aren't ready to be registered yet.
15049         (check_explicit_specialization): Handle explicit specialization of
15050         constructors and destructors.
15051         (build_template_decl): New function.
15052         (push_template_delc): Handle out-of-class specializations of
15053         member templates.
15054
15055         * pt.c (check_explicit_specialization): Set up the template
15056         information before registering the specialization.
15057         (coerce_template_parms): Fix thinko.
15058         (tsubst): Handle specializations of member templates correctly.
15059
15060         * class.c (finish_struct_methods): Remove calls to
15061         check_explicit_specialization from here.
15062         (finish_struct): And insert them here.
15063         * cp-tree.h (perform_qualification_conversions): New function.
15064         (perform_array_to_pointer_conversion): Likewise.
15065         (begin_explicit_instantiation): Likewise.
15066         (end_explicit_instantiation): Likewise.
15067         (determine_specialization): Renamed from
15068         determine_explicit_specialization.
15069         (comp_template_parms): New function.
15070         (processing_explicit_instantiation): New variable.
15071         * cvt.c (perform_qualification_conversions): New function.
15072         (perform_array_to_pointer_conversion): Likewise.
15073         * decl.c (duplicate_decls): Don't consider template functions
15074         alike unless they have the same parameters.  Refine handling of
15075         instantiation/specialization mismatches.
15076         (start_decl): Don't call pushdecl for template specializations,
15077         since they don't affect overloading.
15078         (start_function): Likewise.
15079         (grokfndecl): Call check_explicit_specialization a little later.
15080         Don't call duplicate_decls for memberm template specializations.
15081         (grokdeclarator): Don't update template_count for classes that are
15082         themselves specializations.  Remove use of `2' as parameter to
15083         grokfndecl since that value isn't used.
15084         * lex.c (cons_up_default_function): Save and restore
15085         processing_explicit_instantiation around calls to grokfield.
15086         * parse.y (finish_member_template_decl): New function.
15087         (component_decl_1): Use it.
15088         (fn.def2): Likewise.
15089         (template_arg_list_opt): New nonterminal.
15090         (template_type): Use it.
15091         (self_template_type): Likewise.
15092         (template_id): Likewise.
15093         (object_template_id): Likewise.
15094         (notype_template_declarator): Likwise.
15095         (begin_explicit_instantiation): Likewise.
15096         (end_explicit_instantiation): Likewise.
15097         (explicit_instantiation): Use them.
15098         * pt.c (coerce_template_parms): Add parameters.
15099         (processing_explicit_instantiation): New variable.
15100         (convert_nontype_parameter): New function.
15101         (determine_overloaded_function): Likewise.
15102         (begin_explicit_instantiation): Likewise.
15103         (end_explicit_instantiation): Likewise.
15104         (retrieve_specialization): Likewise.
15105         (register_specialization): Likewise.
15106         (processing_explicit_specialization): Removed.
15107         (determine_specialization): Handle specializations of member
15108         functions of template class instantiations.
15109         (check_explicit_specialization): Refine to conform to standard.
15110         (comp_template_parms): New function.
15111         (coerce_template_parms): Call convert_nontype_parameter.
15112         (tsubst): Refine handling of member templates.  Use
15113         register_specialization.
15114         (instantiate_template): Use retrieve_specialization.
15115         (do_decl_instantiation): Likewise.
15116         (instantiate_decl): Likewise.
15117         (type_unification): Improve handling of explict template
15118         arguments.
15119         * tree.c (mapcar): Return error_mark_node, rather than aborting,
15120         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
15121         * typeck.c (build_unary_op): Call determine_specialization, rather
15122         than determine_explicit_specialization.
15123
15124 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
15125
15126         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
15127
15128 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
15129
15130         * error.c (dump_decl): For enum tags, output the tag, not its value.
15131
15132 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
15133
15134         * decl.c (init_decl_processing): Only call init_rtti_processing
15135         FLAG_RTTI is set.
15136
15137 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
15138
15139         * init.c (build_new_1): Split out from build_new.
15140         (build_new): Just return a NEW_EXPR.
15141         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
15142
15143         * decl2.c (get_temp_regvar): Tweak.
15144
15145         * cp-tree.h (TREE_CALLS_NEW): Comment out.
15146         * class.c (resolves_to_fixed_type_p): Remove use.
15147         * method.c (build_opfncall): Likewise.
15148         * call.c (build_new_op): Likewise.
15149
15150 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
15151
15152         * exception.cc (__eh_alloc, __eh_free): New fns.
15153         (__cp_push_exception, __cp_pop_exception): Use them.
15154         (__uncatch_exception): Call terminate here if no exception.
15155         * except.c (build_terminate_handler): New fn.
15156         (expand_start_catch_block): Use it.
15157         (expand_exception_blocks): Likewise.
15158         (alloc_eh_object): New fn.
15159         (expand_throw): Use it.  Protect exception init with terminate.
15160         * typeck.c (build_modify_expr): Remove code that ignores trivial
15161         methods.
15162
15163 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15164
15165         * call.c (add_builtin_candidate): Add default case in enumeration
15166         switch.
15167         (build_new_op): Likewise.
15168         (convert_like): Likewise.
15169         * cvt.c (build_expr_type_conversion): Likewise.
15170         * tree.c (real_lvalue_p): Likewise.
15171         (lvalue_p): Likewise.
15172         (cp_tree_equal): Likewise.
15173         * typeck.c (comptypes): Likewise.
15174         (build_component_ref): Likewise.
15175         (build_function_call_real): Likewise.
15176         (build_binary_op_nodefault): Likewise.
15177         (build_unary_op): Likewise.
15178         (build_modify_expr): Likewise.
15179         * typeck2.c (initializer_constant_valid_p): Likewise.
15180
15181 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
15182
15183         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
15184
15185 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
15186
15187         * pt.c (coerce_template_parms): Make sure to digest_init if
15188         possible.
15189
15190         * decl.c (duplicate_decls): Make the newdecl virtual if the
15191         olddecl was, just as is done with other attributes of olddecl.
15192
15193 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
15194
15195         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
15196         address of an OFFSET_REF.
15197
15198         * cp-tree.def: Add AGGR_INIT_EXPR.
15199         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
15200         AGGR_INIT_EXPR where appropriate.
15201         * expr.c (cplus_expand_expr): Likewise.  Simplify.
15202
15203         * decl2.c (finish_file): Remove call to register_exception_table.
15204
15205 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15206
15207         * pt.c (instantiate_class_template): Don't do injection when
15208         processing_template_decl is true, as pollutes current_binding_level
15209         for base classes.
15210
15211 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
15212
15213         * pt.c (maybe_fold_nontype_arg): Add prototype.
15214
15215 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
15216
15217         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
15218         * error.c (dump_expr): Likewise.
15219
15220 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
15221
15222         * typeck.c (build_function_call_real): Remove "inline called before
15223         definition" pedwarn.
15224
15225         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
15226
15227 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
15228
15229         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
15230
15231         * pt.c (type_unification_real): Change __null to type void* with
15232         a warning.
15233
15234 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
15235
15236         * call.c (implicit_conversion): Don't call
15237         build_user_type_conversion_1 with a NULL expr, since it will
15238         crash.
15239
15240         * pt.c (unify): Don't try to unify array bounds if either array is
15241         unbounded.
15242
15243 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
15244
15245         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
15246         Replace extern decls with casts.
15247
15248         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
15249         Update last_parm_cleanup_insn.
15250         (store_after_parms): Remove.
15251         * cp-tree.h: Adjust.
15252
15253 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
15254
15255         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
15256         (finish_file): Check DECL_COMDAT instead of weak|one_only.
15257         (import_export_vtable): Use make_decl_one_only instead of
15258         comdat_linkage for win32 tweak.
15259         (import_export_decl): Likewise.
15260         * pt.c (mark_decl_instantiated): Likewise.
15261
15262         * decl2.c (finish_file): Lose handling of templates in pending_statics.
15263
15264 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
15265
15266         * decl2.c (finish_file): Lose call to expand_builtin_throw.
15267         * except.c (expand_builtin_throw): Remove.
15268         * cp-tree.h: Remove ptr_ptr_type_node.
15269         * decl.c: Likewise.
15270
15271 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
15272
15273         * decl.c (ptr_ptr_type_node): Define.
15274         (init_decl_processing): Initialize it.
15275         * cp-tree.h: Declare it.
15276         * exception.cc (__cp_exception_info): Use __get_eh_info.
15277         (__cp_push_exception): Likewise.
15278         (__cp_pop_exception): Likewise.
15279
15280         From Scott Snyder <snyder@d0sgif.fnal.gov>:
15281         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
15282         saved_pc.
15283         (init_exception_processing): Removed saved_pc initialization.
15284
15285 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
15286
15287         * pt.c (instantiate_decl): Defer all templates but inline functions.
15288
15289 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
15290
15291         * init.c (expand_vec_init): Don't fold a list of parameters.
15292
15293         * decl.c (copy_args_p): Handle copy elision for types with virtual
15294         bases.
15295         * call.c (build_over_call): Likewise.
15296
15297 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
15298
15299         * pt.c (lookup_template_function): Copy the template arguments,
15300         not just the list containing them, to the permanent obstack.
15301
15302 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
15303
15304         * except.c (expand_start_catch_block): suspend_momentary for the
15305         terminate handler.
15306
15307         * error.c (dump_decl): Handle LOOKUP_EXPR.
15308
15309 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
15310
15311         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
15312         permanent obstack if we are processing a template decl.
15313         * typeck.c (build_static_cast): Likewise.
15314         (build_const_cast): Likewise.
15315         (build_reinterpret_cast): Likewise.
15316
15317         * pt.c (coerce_template_parms): Coerce some expressions, even
15318         when processing_template_decl.
15319
15320 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
15321
15322         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
15323         handling of pointer difference expressions.
15324
15325         * typeck.c (comp_target_types): Comparison of function/method types
15326         is independent of nptrs.
15327
15328 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
15329
15330         * pt.c (tsubst): Avoid creating pointer to reference and
15331         reference to reference types.
15332
15333 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
15334
15335         * parse.y (do_id): New nonterminal.
15336         (template_id): Use it.
15337
15338 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
15339
15340         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
15341         * spew.c (yylex): Don't do_identifier here.
15342         * decl2.c (build_expr_from_tree): Revert last change.
15343
15344         * decl2.c (build_expr_from_tree): Expand the name for a method call.
15345         * parse.y (object_template_id): Don't try to take the DECL_NAME.
15346
15347 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
15348
15349         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
15350         alloc_expr.
15351         * call.c (build_op_delete_call): Adjust.
15352
15353         * except.c (expand_end_catch_block): Lose rethrow region.
15354         (expand_start_catch_block): Likewise.
15355         (expand_end_catch_block): Don't expand_leftover_cleanups.
15356
15357 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15358
15359         * pt.c (tsubst): Remove tree_cons call (places redundant info into
15360         DECL_TEMPLATE_INSTANTIATION).
15361
15362 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
15363
15364         * tree.c (is_overloaded_fn): Handle getting a fn template.
15365         (really_overloaded_fn): Likewise.
15366         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
15367         * pt.c (check_explicit_specialization): Tweak.
15368         (determine_explicit_specialization): Tweak.
15369
15370         * tree.c, cp-tree.h (get_target_expr): New fn.
15371
15372 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
15373
15374         * pt.c (check_explicit_specialization): Fix misspelling in
15375         diagnostic: `preceeded'.
15376         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
15377         `conversiona'.
15378
15379 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
15380
15381         * pt.c (determine_explicit_specialization): Avoid an internal
15382         error for bad specializations.
15383
15384         * method.c (build_overload_value): Handle SCOPE_REF.
15385
15386 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
15387
15388         * class.c (prepare_fresh_vtable): Enable even more complex MI
15389         vtable names.
15390
15391 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
15392
15393         * exception.cc (__check_eh_spec): Optimize a bit.
15394
15395         * exception.cc (__cp_pop_exception): Lose handler arg.
15396         * except.c (do_pop_exception): Likewise.
15397         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
15398         (expand_end_catch_block): Likewise.
15399
15400 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
15401
15402         * pt.c (check_explicit_specialization): Complain about using a
15403         template-id for a non-specialization.
15404
15405 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
15406
15407         * repo.c: Prototype rindex only if needed.
15408         * xref.c: Likewise.
15409
15410 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
15411
15412         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
15413
15414 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
15415
15416         * typeck.c (build_const_cast): Handle references here instead of
15417         handing off to convert_to_reference.
15418
15419         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
15420         TerminateFunctionCall.
15421         (init_exception_processing): Likewise.  Terminate et al are now
15422         the fns, not ADDR_EXPRs.
15423         (various): Lose redundant assemble_external calls.
15424         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
15425
15426         * cp-tree.h (struct lang_decl_flags): Add comdat.
15427         (DECL_COMDAT): New macro.
15428         * decl.c (duplicate_decls): Propagate it.
15429         (cp_finish_decl): Handle it.
15430         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
15431
15432         * class.c: Remove static pending_hard_virtuals.
15433         (add_virtual_function): Take pointers to pending_virtuals
15434         and pending_hard_virtuals.
15435         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
15436
15437 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
15438
15439         * decl2.c (import_export_vtable): If we support one_only but not
15440         weak symbols, mark instantiated template vtables one_only.
15441         (import_export_decl): Likewise for tinfo functions.
15442         (finish_vtable_vardecl): Also write out vtables from explicitly
15443         instantiated template classes.
15444         * pt.c (mark_class_instantiated): Revert last change.
15445
15446         * except.c (expand_throw): Call mark_used on the destructor.
15447
15448 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
15449
15450         * lex.c (lang_init): Enable flag_exceptions by default if no
15451         command line switch was specified.
15452
15453 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
15454
15455         * pt.c (unify): Handle `void' template parameters in
15456         specializations.
15457
15458 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
15459
15460         * rtti.c (build_dynamic_cast): Handle template case here.
15461         (build_dynamic_cast_1): Not here.
15462
15463         * typeck2.c (digest_init): Make copies where appropriate.
15464
15465         * decl2.c (delete_sanity): resolve_offset_ref.
15466
15467         * except.c: Call terminate without caching so many bits.
15468
15469         * except.c (expand_start_catch_block): Fix catching a reference
15470         to pointer.
15471
15472 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
15473
15474         * init.c (build_new): Copy size to the saveable obstack.
15475
15476         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
15477         TRY_CATCH_EXPR for now.
15478
15479 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
15480
15481         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
15482         has DECL_LANG_SPECIFIC.
15483
15484         * exception.cc (struct cp_eh_info): Add handlers field.
15485         (__cp_push_exception): Initialize it.
15486         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
15487         (__throw_bad_exception): Remove.
15488         * except.c (call_eh_info): Add handlers field.
15489         (get_eh_handlers): New fn.
15490         (push_eh_cleanup): Increment handlers.
15491
15492 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
15493
15494         * except.c (expand_start_eh_spec): Use the try/catch code.
15495         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
15496         doing everything inline.
15497         (init_exception_processing): throw_type_match now takes
15498         const void pointers.
15499         * exception.cc (__check_eh_spec): New fn.
15500         * inc/exception: Neither terminate nor unexpected return.
15501         * decl.c: Make const_ptr_type_node public.
15502         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
15503
15504         * except.c (expand_start_catch_block): We only need the rethrow
15505         region for non-sjlj exceptions.
15506         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
15507
15508 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
15509
15510         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
15511         (various.o): Likewise.
15512         * inc/new: Add placement deletes.  Add throw specs for default new.
15513         * new.cc (set_new_handler): Move here from libgcc2.
15514         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
15515         (new): Move from libgcc2.  Throw bad_alloc.
15516         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
15517         * decl.c (init_decl_processing): Update exception specs on new and
15518         delete.
15519
15520         * method.c (build_decl_overload_real): Don't mess with global
15521         placement delete.
15522
15523         * init.c (build_new): Check for null throw spec, not nothrow_t.
15524
15525         * decl.c (duplicate_decls): Don't complain about different exceptions
15526         from an internal declaration.
15527
15528         * call.c (build_op_delete_call): Fix check for member fns again.
15529
15530         * decl2.c (import_export_decl): Interface hackery affects
15531         virtual synthesized methods.
15532
15533 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
15534
15535         * decl.c (start_decl): Don't just complain about a mismatched
15536         scope, fix it.
15537
15538         * decl.c (make_implicit_typename): Handle case where t is not
15539         actually from context.
15540         * tree.c (get_type_decl): Lose identifier case.
15541         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
15542         * parse.y (nonnested_type): Just use lookup_name.
15543         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
15544
15545 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
15546
15547         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
15548         T was built in C language context (for example, by
15549         output_func_start_profiler).
15550
15551 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
15552
15553         * decl.c (make_implicit_typename): New fn.
15554         (lookup_name_real): Use it.  Use current_class_type as the context.
15555
15556 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
15557
15558         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
15559
15560 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
15561
15562         * friend.c (do_friend): Warn about non-template friends in templates.
15563
15564         * call.c (build_op_delete_call): Fix handling of inherited delete.
15565
15566         * search.c (dfs_record_inheritance): Ignore template type parms.
15567
15568 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
15569
15570         * call.c (build_new_op): Fix copy error.
15571         (build_op_new_call): New fn.
15572         (build_op_delete_call): New fn.
15573         * cp-tree.h: Declare them.
15574         * init.c (build_new): Use them.  Support placement delete.
15575         (build_x_delete): Use build_op_delete_call.
15576         (build_delete): Likewise.
15577         * decl2.c (delete_sanity): Likewise.
15578         (coerce_delete_type): Don't complain about placement delete.
15579
15580 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
15581
15582         * call.c (build_new_function_call): Remove unused 'obj' parm.
15583         * cp-tree.h, typeck.c: Adjust.
15584
15585         * init.c (build_new): Make the cleanup last longer.
15586         (expand_vec_init): Call do_pending_stack_adjust.
15587
15588 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
15589
15590         * pt.c (do_type_instantiation): Fix typo.
15591         (mark_class_instantiated): If we support one_only but not weak
15592         symbols, don't mark this as known.
15593
15594         * init.c (build_new): Handle vec delete in EH cleanup.
15595
15596 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15597
15598         * call.c (build_method_call): Call complete_type before checking
15599         for destructor.
15600
15601 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
15602
15603         * decl.c (add_block_current_level): Delete.
15604         * init.c (build_vec_delete_1): Delete build_block and
15605         add_block_current_level calls.
15606
15607 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
15608
15609         * init.c (build_new): Handle freeing allocated memory when the
15610         constructor throws.
15611
15612         * call.c (build_new_method_call): Fix flags arg.
15613
15614         * pt.c (do_type_instantiation): Don't try to instantiate
15615         member templates.
15616         (mark_decl_instantiated): If we support one_only but not
15617         weak symbols, mark this one_only.
15618         * decl2.c (import_export_vtable): Don't defer handling of vtables
15619         if MULTIPLE_SYMBOL_SPACES.
15620
15621 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
15622
15623         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
15624
15625 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
15626
15627         * except.c (do_pop_exception): Return a value.
15628
15629 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
15630
15631         * call.c (build_new_method_call): Handle getting a
15632         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
15633         if we got template parms.
15634         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
15635         not just the args.
15636         * decl2.c (build_expr_from_tree): Tweak last change.
15637         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
15638         (maybe_fold_nontype_arg): Split out from tsubst_copy.
15639         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
15640
15641 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
15642
15643         * pt.c (tsubst_copy): Handle explicit template arguments in
15644         function calls.
15645         * typeck.c (build_x_function_call): Likewise.
15646         * decl2.c (build_expr_from_tree): Lookup function name if it
15647         hasn't been done.
15648
15649         * pt.c (tsubst): Instantiate template functions properly when
15650         template parameter does not appear in function arguments and return
15651         type.
15652         (comp_template_args): Handle member templates required by tsubst.
15653
15654 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
15655
15656         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
15657         previous change.
15658
15659 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
15660
15661         * pt.c (coerce_template_parms): Tweak error message.
15662
15663         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
15664         return type defaults to `int', even if there are storage-class
15665         specifiers.
15666
15667 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
15668
15669         Complete nested exception support.
15670         * except.c (do_pop_exception): Split out...
15671         (push_eh_cleanup): From here.  Handle the EH region by hand.
15672         (expand_start_catch_block): Add a new level for the catch parm.
15673         Move the rethrow region outside the two cleanup regions.
15674         Protect the initializer for the catch parm with terminate.
15675         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
15676         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
15677         popping off the middle of the stack.
15678         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
15679         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
15680         (build_cplus_new): Only wrap CALL_EXPRs.
15681         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
15682         the constructor call.
15683
15684 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15685
15686         * Make-lang.in (c++.distdir): Make inc subdirectory.
15687
15688 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
15689
15690         * decl2.c (finish_file): Put back some code.
15691
15692 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
15693
15694         * decl2.c (finish_file): Remove redundant code.
15695         * method.c (emit_thunk): Don't let the backend defer generic thunks.
15696
15697 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
15698
15699         * except.c (call_eh_info): Split out...
15700         (push_eh_info): From here.
15701         (expand_builtin_throw): Use it.
15702         (expand_start_catch_block): Move region start back.
15703
15704 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
15705
15706         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
15707         (real_yylex): Record wide strings using target endianness, not host.
15708
15709 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
15710
15711         * repo.c (rindex): Add decl unconditionally.
15712         (get_base_filename, open_repo_file): Don't cast rindex.
15713         * xref.c (rindex): Add decl unconditionally.
15714         (index): Remove unused decl.
15715         (open_xref_file): Don't cast rindex.
15716
15717 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
15718
15719         * class.c (build_vbase_path): Propagate the result type properly.
15720
15721 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
15722
15723         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
15724         remaining use of saved_throw_type with a call to get_eh_type.
15725
15726 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
15727
15728         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
15729         (file_name_nondirectory): New function, doing the same as the macro.
15730         (set_typedecl_interface_info): Use it instead of the macro.
15731         (check_newline): Likewise.
15732         (handle_cp_pragma): Likewise.
15733
15734         * repo.c (get_base_filename): Cast result of rindex to char*.
15735         (open_repo_file): Likewise.
15736         * xref.c (open_xref_file): Likewise.
15737         * error.c (dump_char): Make its arg int, not char.
15738
15739         * except.c (push_eh_info): Pass the number of fields - 1 down, not
15740         the exact number of fields.
15741
15742 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
15743
15744         Support for nested exceptions.
15745         * tinfo2.cc (__is_pointer): New fn.
15746         * exception.cc (struct cp_eh_info): Define.
15747         (__cp_exception_info, __uncatch_exception): New fns.
15748         (__cp_push_exception, __cp_pop_exception): New fns.
15749         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
15750         Lose empty_fndecl.
15751         (init_exception_processing): Likewise.  __eh_pc is now external.
15752         (push_eh_info): New fn.
15753         (get_eh_{info,value,type,caught}): New fns.
15754         (push_eh_cleanup): Just call __cp_pop_exception.
15755         (expand_start_catch_block): Use push_eh_info.  Start the eh region
15756         sooner.
15757         (expand_end_eh_spec): Use push_eh_info.
15758         (expand_throw): Call __cp_push_exception to set up the exception info.
15759         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
15760         when we rethrow.
15761         (expand_builtin_throw): Don't refer to empty_fndecl.
15762
15763 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
15764
15765         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
15766
15767 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
15768
15769         * method.c (build_template_parm_names, build_decl_overload_real):
15770         Add static to definitions.
15771         * pt.c (add_to_template_args, note_template_header,
15772         processing_explicit_specialization, type_unification_real): Likewise.
15773         ({determine,check}_explicit_specialization): Use a single string for
15774         error messages.
15775
15776 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
15777
15778         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
15779         (expand_end_catch_block): Likewise.
15780         (expand_end_eh_spec): Likewise.
15781
15782 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
15783
15784         * decl.c (duplicate_decls): Handle template specializations
15785         correctly.
15786         * error.c (dump_function_name): Fix printing of specializations of
15787         member functions that are not member templates.
15788         * cp-tree.h (processing_specialization): Make global.
15789         * pt.c (processing_specialization): Likewise.
15790         * lex.c (cons_up_default_function): Save and restore
15791         processing_specialization to avoid confusion.
15792
15793 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
15794
15795         * decl.c (init_decl_processing): Give null_node unknown* type.
15796         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
15797         (common_type): Likewise.
15798         * error.c (args_as_string): Recognize null_node.
15799
15800 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15801
15802         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
15803         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
15804
15805         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
15806
15807         * Make-lang.in (g++): Include prefix.o.
15808
15809 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
15810
15811         * pt.c (determine_explicit_specialization): Initialize "dummy"
15812         to keep Purify quiet.
15813
15814 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
15815
15816         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
15817         (build_overload_int): Not here.
15818
15819 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
15820
15821         * class.c (build_type_pathname): Remove.
15822         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
15823
15824 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
15825
15826         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
15827         &&label GNU extension.
15828
15829 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
15830
15831         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
15832         so as to avoid incorrect manglings.
15833         * method.c (build_decl_overload_real): Don't mangle return types
15834         for constructors.
15835
15836 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
15837
15838         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
15839         scratch_tree_cons): Define as macros for now.
15840         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
15841         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
15842         typeck2.c: Use them and the expression_obstack variants.
15843
15844 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15845
15846         * decl.c (store_return_init): Allow classes with explicit ctors to
15847         be used with the named return values extension.
15848
15849 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
15850
15851         * pt.c (instantiate_decl): Fix previous change.
15852
15853 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
15854
15855         * pt.c (tsubst): Fix thinko.
15856         (instantiate_decl): Really use the original template.
15857
15858         * call.c (build_new_method_call): Use simple constructor_name for
15859         error messages.
15860
15861 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
15862
15863         * method.c (build_underscore_int): Don't use ANSI specific
15864         features.
15865
15866 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
15867
15868         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
15869         for our key method; it might have been inlined by -O3.
15870
15871 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
15872
15873         * decl.c (make_typename_type): Do not try to call lookup_field for
15874         non-aggregate types.
15875
15876 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
15877
15878         * typeck.c (build_reinterpret_cast): Tweak.
15879
15880 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
15881
15882         * typeck.c (build_reinterpret_cast): Converting a void pointer
15883         to function pointer with a reinterpret_cast produces a warning
15884         if -pedantic is issued.
15885
15886 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
15887
15888         * typeck.c (c_expand_return): Don't warn about returning a
15889         reference-type variable as a reference.
15890
15891 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
15892
15893         * method.c (build_static_name): Fix typo.
15894
15895 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
15896
15897         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
15898         OLDDECL before we try to do DECL_USE_TEMPLATE.
15899
15900 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
15901
15902         * decl.c (duplicate_decls): Don't warn about template instances.
15903
15904         * typeck.c (mark_addressable): Lose ancient code that unsets
15905         DECL_EXTERNAL.
15906
15907         * pt.c (do_decl_instantiation): Lose support for instantiating
15908         non-templates.
15909
15910         * call.c (build_new_function_call): Fix handling of null explicit
15911         template args.
15912         (build_new_method_call): Likewise.
15913
15914 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
15915
15916         * method.c (build_underscore_int): Fix typo.
15917
15918 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
15919
15920         * tree.c (print_lang_statistics): #if 0 call to
15921         print_inline_obstack_statistics until its definition is checked in.
15922
15923 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
15924
15925         * decl2.c (finish_file): Move dump_tree_statistics to end.
15926
15927         * pt.c (instantiate_decl): Look for the original template.
15928         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
15929         of member templates.
15930
15931 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
15932
15933         * Makefile.in (g++FAQ.*): New rules.
15934         (CONFLICTS): Update.
15935         * g++FAQ.texi: Moved from libg++.
15936
15937         * parse.y (PFUNCNAME): Only specify the type once.
15938
15939 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
15940
15941         * lex.c (real_yylex): Clean up the code to fully behave the way
15942         the c-lex.c parser does for complex and real numbers.
15943
15944 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
15945
15946         * method.c (build_decl_overload_real): Reformat.
15947
15948 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
15949
15950         * method.c (synthesize_method): If at_eof, determine our linkage.
15951
15952 1997-09-29  Paul Eggert  <eggert@twinsun.com>
15953
15954         * lex.c (real_yylex): Treat `$' just like `_', except issue a
15955         diagnostic if !dollars_in_ident or if pedantic.
15956
15957         * lang-specs.h (@c++): -ansi no longer implies -$.
15958
15959         * decl2.c (lang_decode_option):
15960         -traditional and -ansi now do not mess with
15961         dollars_in_ident.
15962
15963 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
15964
15965         * Makefile.in (parse.o, decl.o): Also depend on
15966         $(srcdir)/../except.h $(srcdir)/../output.h.
15967         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
15968         $(srcdir)/../except.h $(srcdir)/../output.h.
15969         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
15970         ../insn-codes.h.
15971
15972         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
15973
15974         * expr.c (cplus_expand_expr): Make it static.
15975
15976         * decl2.c, init.c, typeck.c: Include "expr.h".
15977         (expand_expr): Use proper values when calling the function.
15978
15979 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
15980
15981         * lang-options.h: New -Wold-style-cast flag.
15982         * cp-tree.h (warn_old_style_cast): New variable.
15983         * decl2.c (warn_old_style_cast): Likewise.
15984         (lang_decode_option): Support -Wold-style-cast.
15985         (reparse_absdcl_as_casts): Produce old-style-cast warning.
15986
15987 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15988
15989         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
15990         TREE_USED, reset value based on already_used.
15991
15992         * init.c (expand_member_init): Revert change.
15993
15994 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
15995
15996         * cp-tree.h, decl.c, decl2.c, pt.c:
15997         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
15998
15999         * decl2.c (lang_decode_option): Add missing ;.
16000
16001 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
16002
16003         * friend.c (do_friend): Disable injection for all template-derived
16004         decls.
16005         * decl2.c (lang_decode_option): Handle -fguiding-decls.
16006         * parse.y (notype_template_declarator): New nonterminal.
16007         (direct_notype_declarator): Use it.
16008         (complex_direct_notype_declarator): Likewise.
16009         (object_template_id): Accept any kind of identifier after TEMPLATE.
16010         (notype_qualified_id): Don't add template declarators here.
16011
16012 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
16013
16014         * call.c (add_template_candidate): Add explicit_targs parameter.
16015         (build_scoped_method_call): Use it.
16016         (build_overload_call_real): Likewise.
16017         (build_user_type_conversion_1): Likewise.
16018         (build_new_function_call): Likewise.
16019         (build_object_call): Likewise.
16020         (build_new_op): Likewise.
16021         (build_new_method_call): Likewise.
16022         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
16023         (build_new_method_call): Likewise.
16024
16025         * class.c (finish_struct_methods): Add specialization pass to
16026         determine which methods were specializing which other methods.
16027         (instantiate_type): Handle TEMPLATE_ID_EXPR.
16028
16029         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
16030
16031         * cp-tree.h (name_mangling_version): New variable.
16032         (flag_guiding_decls): Likewise.
16033         (build_template_decl_overload): New function.
16034         (begin_specialization): Likewise.
16035         (reset_specialization): Likewise.
16036         (end_specialization): Likewise.
16037         (determine_explicit_specialization): Likewise.
16038         (check_explicit_specialization): Likewise.
16039         (lookup_template_function): Likewise.
16040         (fn_type_unification): Add explicit_targs parameter.
16041         (type_unification): Likewise.
16042
16043         * decl.c (duplicate_decls): Add smarts for explicit
16044         specializations.
16045         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
16046         specializations.
16047         (grokfndecl): Call check_explicit_specialization.
16048
16049         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
16050         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
16051         (check_classfn): Handle specializations.
16052
16053         * error.c (dump_function_name): Print specialization arguments.
16054
16055         * friend.c (do_friend): Don't call pushdecl for template
16056         instantiations.
16057
16058         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
16059
16060         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
16061         and -fno-guiding-decls.
16062
16063         * lex.c (identifier_type): Return PFUNCNAME for template function
16064         names.
16065
16066         * method.c (build_decl_overload_real): New function.
16067         (build_template_parm_names): New function.
16068         (build_overload_identifier): Use it.
16069         (build_underscore_int): New function.
16070         (build_overload_int): Use it.  Add levels for template
16071         parameters.
16072         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
16073         (build_overload_nested_names): Handle template type parameters.
16074         (build_template_decl_overload): New function.
16075
16076         * parse.y (YYSTYPE): New ntype member.
16077         (nested_name_specifier): Use it.
16078         (nested_name_specifier_1): Likewise.
16079         (PFUNCNAME): New token.
16080         (template_id, object_template_id): New non-terminals.
16081         (template_parm_list): Note specializations.
16082         (template_def): Likewise.
16083         (structsp): Likewise.
16084         (fn.def2): Handle member template specializations.
16085         (component_decl_1): Likewise.
16086         (direct_notype_declarator): Handle template-ids.
16087         (component_decl_1): Likewise.
16088         (direct_notype_declarator): Handle template-ids.
16089         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
16090
16091         * pt.c (processing_specializations): New variable.
16092         (template_header_count): Likewise.
16093         (type_unification_real): New function.
16094         (processing_explicit_specialization): Likewise.
16095         (note_template_header): Likewise.
16096         (is_member_template): Handle specializations.
16097         (end_template_decl): Call reset_specialization.
16098         (push_template_decl): Handle member template specializations.
16099         (tsubst): Likewise.
16100         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
16101         (instantiate_template): Handle specializations.
16102         (instantiate_decl): Likewise.
16103         (fn_type_unification): Handle explicit_targs.
16104         (type_unification): Likewise.  Allow incomplete unification
16105         without an error message, if allow_incomplete.
16106         (get_bindings): Use new calling sequence for fn_type_unification.
16107
16108         * spew.c (yylex): Handle PFUNCNAME.
16109
16110         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
16111         (really_overloaded_fn): Likewise.
16112         (get_first_fn): Handle function templates.
16113
16114         * typeck.c (build_x_function_call): Use really_overloaded_fn.
16115         Handle TEMPLATE_ID_EXPR.
16116         (build_x_unary_op): Likewise.
16117         (build_unary_op): Likewise.
16118         (mark_addressable): Templates whose address is taken are marked
16119         as used.
16120
16121 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
16122
16123         * decl.c (init_decl_processing): Declare __builtin_constant_p as
16124         accepting any kind of type, not only int.
16125
16126 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
16127
16128         * search.c (get_matching_virtual): Notice virtual bases when sorrying
16129         about covariant returns.
16130
16131         * parse.y (member_init): Also imply typename here.  Remove ancient
16132         extension for initializing base members.
16133
16134 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
16135
16136         Handle multi-level typenames and implicit typename in base list.
16137         * parse.y (typename_sub{,[0-2]}): New rules.
16138         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
16139         (nonnested_type): New rule.
16140         (complete_type_name): Use it.
16141         (base_class.1): Use typename_sub and nonnested_type.
16142         (nested_name_specifier): Don't elide std:: here.
16143         * decl.c (make_typename_type): Handle getting a type for NAME.
16144         (lookup_name_real): Turn std:: into :: here.
16145
16146         Rvalue conversions were removed in London.
16147         * call.c (is_subseq): Don't consider lvalue transformations.
16148         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
16149         (joust): Re-enable ?: kludge.
16150
16151 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
16152
16153         * decl.c (start_function): Up warning of no return type to be a
16154         pedwarn.
16155
16156 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16157
16158         * init.c (expand_member_init): Don't set TREE_USED.
16159         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
16160         set,don't clear TREE_USED wholesale.
16161
16162 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
16163
16164         * call.c (build_over_call): Do require_complete_type before
16165         build_cplus_new.
16166
16167 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
16168
16169         * search.c (lookup_field): Call complete_type in all cases.
16170
16171         * decl.c (finish_function): Just warn about flowing off the end.
16172
16173 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
16174
16175         * decl.c (grokparms): Don't bash a permanent list node if we're
16176         in a function.
16177
16178 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
16179
16180         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
16181
16182 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
16183
16184         * call.c (build_new_op): Give better error for syntactically
16185         correct, but semantically invalid, use of undeclared template.
16186
16187         * call.c (compare_qual): Handle pmfs.
16188
16189         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
16190         after the exception spec.
16191
16192 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
16193
16194         * call.c (null_ptr_cst_p): Integer type, not integral type.
16195
16196         * call.c (joust): Disable warnings until they can be moved to the
16197         right place.
16198
16199 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
16200
16201         * Makefile.in, config-lang.in:  Convert to autoconf.
16202
16203 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
16204
16205         * decl.c (lookup_name_real): Add implicit 'typename' to types from
16206         base classes.
16207
16208         * pt.c (most_specialized_class): Fix typo.
16209         (tsubst): Move constant folding to TREE_VEC case.
16210
16211 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
16212
16213         * pt.c (do_poplevel): Don't warn about unused local variables
16214         while processing_template_decl since we don't always know whether
16215         or not they will need constructing/destructing.
16216
16217         * pt.c (uses_template_parms): Check the values of an enumeration
16218         type to make sure they don't depend on template parms.
16219
16220         * decl.c (make_typename_type): Don't lookup the field if the
16221         context uses template parms, even if we're not
16222         processing_template_decl at the moment.
16223
16224         * pt.c (coerce_template_parms): Avoid looking at the
16225         TYPE_LANG_DECL portion of a typename type, since there won't be
16226         one.
16227         (tsubst): Do constant folding as necessary to make sure that
16228         arguments passed to lookup_template_class really are constants.
16229
16230 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
16231
16232         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
16233         * decl2.c (finish_file): Only register exception tables if we
16234         need to.
16235
16236         * decl.c (init_decl_processing): Add __builtin_[fs]p.
16237
16238 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
16239
16240         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
16241
16242 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
16243
16244         * error.c (dump_decl): Avoid crashing when presented with a
16245         uninitialized constant, as can occur with a template parameter.
16246         (dump_expr): Make sure that there are enough levels of
16247         current_template_parms before we start diving through them.
16248
16249 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
16250
16251         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
16252         c-typeck.c.
16253
16254 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16255
16256         * except.c (expand_throw): Call build_delete for all
16257         exception types, not just objects with destructors.
16258
16259 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
16260
16261         * decl.c (current_local_enum): Remove static.
16262         * pt.c (tsubst_enum): Save and restore value of current_local_enum
16263         in case template is expanded in enum decl.
16264         (instantiate_class_template): Use new tsubst_enum signature.
16265         (tsubst_expr): Likewise.
16266
16267 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
16268
16269         * pt.c (begin_member_template_processing): Take a function as
16270         argument, not a set of template arguments.  Use the template
16271         parameters, rather than the arguments.  Handle non-type parameters
16272         correctly.  Push a binding level for the parameters so that multiple
16273         member templates using the same parameter names can be declared.
16274         (end_member_template_processing): Pop the binding level.
16275         (push_template_decl): Mark member templates as static when
16276         appropriate.
16277
16278         * lex.c (do_pending_inlines): Pass the function, not its template
16279         arguments, to begin_member_template_processing.
16280         (process_next_inline): Likewise.
16281         (do_pending_defargs): Likewise.
16282
16283         * error.c (dump_expr): Obtain the correct declaration for a
16284         TEMPLATE_CONST_PARM.
16285
16286         * call.c (add_template_conv_candidate): New function.
16287         (build_object_call): Handle member templates, as done in the other
16288         build_ functions.
16289
16290 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
16291
16292         * decl.c (replace_defag): Undo previous change.
16293         * lex.c (do_pending_defargs): Deal with member templates.
16294
16295         * pt.c (is_member_template): Avoid crashing when passed a
16296         non-function argument.
16297
16298 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
16299
16300         * class.c (grow_method): Remove check for redeclaration.
16301
16302 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
16303
16304         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
16305         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
16306         (PRIMARY_TEMPLATE_P): Use it.
16307         * call.c (build_overload_call_real): Use it.
16308         * class.c (instantiate_type): Likewise.
16309         * decl.c (decls_match): Likewise.
16310         * method.c (build_overload_identifier): Likewise.
16311         * pt.c (push_template_decl): Likewise.
16312         (classtype_mangled_name): Likewise.
16313         (lookup_template_class): Likewise.
16314
16315         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
16316         DECL_NTPARMS to conform to usage elsewhere.
16317         * call.c (add_template_candidate): Likewise.
16318         * class.c (instantiate_type): Likewise.
16319         * pt.c (instantiate_template): Likewise.
16320         (get_bindings): Likewise.
16321
16322         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
16323         is_member_template.
16324
16325         * pt.c (unify): Undo changes to allow multiple levels of template
16326         parameters.
16327         (type_unification): Likewise.
16328         (fn_type_unification): Likewise.
16329         (get_class_bindings): Likewise.
16330         * cp-tree.h (Likewise).
16331
16332         * decl.c (replace_defarg): Check that the type of the default
16333         parameter does not invlove a template type before complaining
16334         about the initialization.
16335
16336         * error.c (dump_expr): Deal with template constant parameters in
16337         member templates correctly.
16338
16339         * pt.c (is_member_template): Deal with class specializations
16340         correctly.
16341         (tsubst): Handle "partial instantiation" of member templates
16342         correctly.
16343
16344 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
16345
16346         * pt.c (type_unification): Change calling sequence to allow for
16347         multiple levels of template parameters.
16348         (tsubst_expr): Likewise.
16349         (tsubst): Likewise.
16350         (tsubst_copy): Likewise.
16351         (instantiate_template): Likewise.
16352         (unify): Likewise.
16353         * call.c (build_overload_call_real): Use it.
16354         (add_builtin_candidate): Use it.
16355         (build_new_method_call): Use it.
16356         * class.c (instantiate_type): Use it.
16357         * decl.c (grokdeclarator): Use it.
16358         * decl2.c (finish_file): Use it.
16359         * method.c (build_overload_identifier): Use it.
16360
16361         * call.c (add_template_candidate):  Add additional parameter for
16362         the function return type.  Call fn_type_unification istead of
16363         type_unification.
16364         (build_user_type_conversion_1): Handle member templates.
16365         (build_new_function_call): Likewise.
16366         (build_new_op): Likewise.
16367         (build_new_method_call): Likewise.
16368
16369         * class.c (grow_method): Don't give an error message indicating
16370         that two member templates with the same name are ambiguous.
16371         (finish_struct): Treat member template functions just like member
16372         functions.
16373
16374         * cp-tree.h (check_member_template): Add declaration.
16375         (begin_member_template_processing): Likewise.
16376         (end_member_template_processing): Likewise.
16377         (fn_type_unification): Likewise.
16378         (is_member_template): Likewise.
16379         (tsubst): Change prototype.
16380         (tsubst_expr): Likewise.
16381         (tsubst_copy): Likewise.
16382         (instantiate_template): Likewise.
16383         (get_bindings): Likewise.
16384
16385         * decl.c (decls_match): Handle multiple levels of template
16386         parameters.
16387         (pushdecl): Handle template type params just like other type
16388         declarations.
16389         (push_class_level_binding): Return immediately if the
16390         class_binding_level is NULL.
16391         (grokfndecl): If check_classfn() returns a member_template, use
16392         the result of the template, not the template itself.
16393
16394         * decl2.c (check_member_template): New function.  Check to see
16395         that the entity declared to be a member template can be one.
16396         (check_classfn): Allow redeclaration of member template functions
16397         with different types; the new functions can be specializations or
16398         explicit instantiations.
16399
16400         * error.c (dump_decl): Handle multiple levels of template
16401         parameters.
16402         (dump_function_decl): Update to handle function templates.
16403
16404         * lex.c (do_pending_inlines): Set up template parameter context
16405         for member templates.
16406         (process_next_inline): Likewise.
16407
16408         * method.c (build_overload_identifier): Adjust for multiple levels
16409         of template parameters.
16410
16411         * parse.y (fn.def2): Add member templates.
16412         (component_decl_1): Likewise.
16413
16414         * pt.c (begin_member_template_processing): New function.
16415         (end_member_template_processing): Likewise.
16416         (is_member_template): Likewise.
16417         (fn_type_unification): Likewise.
16418         (current_template_parms): Return a vector of all the template
16419         parms, not just the innermost level of parms.
16420         (push_template_decl): Deal with the possibility of member
16421         templates.
16422         (lookup_template_class): Likewise.
16423         (uses_template_parms): Likewise.
16424         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
16425         TEMPLATE_CONST_PARM to deal with multiple levels of template
16426         arguments.   Add processing of TEMPLATE_DECL to produce new
16427         TEMPLATE_DECLs from old ones.
16428         (do_decl_instantiation): Handle member templates.
16429
16430         * search.c (lookup_fnfields_1): Handle member template conversion
16431         operators.
16432
16433         * tree.c (cp_tree_equal): Check the levels, as well as the
16434         indices, of TEMPLATE_CONST_PARMs.
16435
16436         * typeck.c (comptypes): Check the levels, as well as the indices,
16437         fo TEMPLATE_TYPE_PARMs.
16438         (build_x_function_call): Treat member templates like member
16439         functions.
16440
16441 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
16442
16443         * typeck.c (c_expand_return): Always convert_for_initialization
16444         before checking for returning a pointer to local.
16445
16446         * pt.c (type_unification): If strict and the function parm doesn't
16447         use template parms, just compare types.
16448
16449 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
16450
16451         * method.c (build_overloaded_value): Replace direct call
16452         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
16453
16454 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
16455
16456         * typeck.c (convert_arguments): Don't arbitrarily choose the first
16457         of a set of overloaded functions.
16458
16459 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
16460
16461         * lex.c (real_yylex): Don't elide __FUNCTION__.
16462
16463         * method.c (build_overload_value): Add in_template parm.
16464         (build_overload_int): Likewise.
16465         (build_overload_identifier): Pass it.
16466
16467         * decl.c (duplicate_decls): Don't bash a previous template
16468         definition with a redeclaration.
16469
16470         * pt.c (unify): float doesn't match double.
16471
16472         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
16473         TYPE_DECL.  Handle getting non-template types.
16474         * parse.y (explicit_instantiation): Use typespec instead of
16475         aggr template_type.
16476
16477 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
16478
16479         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
16480
16481 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
16482
16483         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
16484         (compare_ics): Likewise.
16485
16486 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
16487
16488         * call.c (joust): Warn about choosing one conversion op over
16489         another because of 'this' argument when the other return type is
16490         better.
16491         (source_type): New fn.
16492
16493         * call.c (build_new_op): Strip leading REF_BIND from first operand
16494         to builtin operator.
16495
16496         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
16497         use its RTL.
16498
16499 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
16500
16501         * call.c (null_ptr_cst_p): Remove support for (void*)0.
16502
16503 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
16504
16505         * typeck.c (expand_target_expr): Make definition match declaration.
16506
16507         * class.c (get_basefndecls): Make definition match declaration.
16508
16509 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
16510
16511         * input.c (sub_getch): Eventually give up and release the input file.
16512
16513         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
16514         right place.
16515
16516         * call.c (joust): Tweak message.
16517
16518 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
16519
16520         * error.c (type_as_string): Put const/volatile on template type
16521         parameters where appropriate.
16522
16523 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
16524
16525         * call.c (strictly_better): Make arguments unsigned ints.
16526
16527 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
16528
16529         * lex.c (real_yylex): Refer to __complex instead of complex.
16530
16531 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
16532
16533         * lex.c (real_yylex): Don't use getc directly.
16534
16535 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
16536
16537         * call.c (is_subseq): Don't try to be clever.
16538
16539 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
16540
16541         * parse.y, pt.c: Include "except.h".
16542         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
16543         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
16544         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
16545         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
16546         prototyping.
16547
16548 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
16549
16550         * decl2.c (mark_vtable_entries): Instead of replacing pure
16551         virtuals with a reference to __pure_virtual, copy the decl and
16552         change the RTL.
16553
16554 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
16555
16556         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
16557
16558         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
16559
16560         * pt.c (instantiate_class_template): Call repo_template_used
16561         before finish_prevtable_vardecl.
16562
16563         * call.c (is_subseq): New fn.
16564         (compare_ics): Use it.
16565
16566         * repo.c (finish_repo): Don't crash on no args.
16567
16568         * parse.y (named_complex_class_head_sans_basetype): Handle
16569         explicit global scope.
16570         * decl2.c (handle_class_head): New fn.
16571
16572         * pt.c (unify): Add CONST_DECL case.
16573
16574 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16575
16576         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
16577
16578         * cp-tree.h (report_type_mismatch): Add prototype.
16579         * call.c (build_overload_call_real): Remove erroneous fourth
16580         argument to report_type_mismatch.
16581         (build_user_type_conversion_1): Remove erroneous second arg to
16582         tourney.
16583         (build_new_function_call): Likewise.
16584         (build_object_call): Likewise.
16585         (build_new_op): Likewise.
16586         (build_new_method_call): Likewise.
16587
16588 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
16589
16590         * error.c (dump_decl): Don't bother processing a function with no
16591         DECL_LANG_SPECIFIC.
16592
16593         * method.c (emit_thunk): Call init_function_start in the macro case.
16594
16595 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
16596
16597         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
16598         defined and used to set flag_vtable_thunks.
16599
16600 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
16601
16602         * parse.y: Don't clear the inlines from their obstack until they've
16603         all been processed.
16604
16605         * decl.c (duplicate_decls): Don't complain about exception
16606         specification mismatch if flag_exceptions is off.
16607
16608 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
16609
16610         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
16611
16612 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
16613
16614         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
16615         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
16616         Include <stdio.h> before include files that formerly used STDIO_PROTO.
16617
16618         * decl.c, g++spec.c, lex.c, method.c, repo.c:
16619         Include "config.h" first, as per autoconf manual.
16620
16621 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
16622
16623         * decl.c (duplicate_decls): Tweak wording.
16624         * lex.c (do_pending_defargs): Don't die if we see a default arg
16625         that isn't a DEFAULT_ARG.
16626         * error.c (dump_expr): Handle DEFAULT_ARG.
16627
16628         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
16629         * lang-options.h: Add -fhandle-exceptions.
16630
16631         * class.c (build_vtable): Vtables are artificial.
16632         (prepare_fresh_vtable): Likewise.
16633
16634 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
16635
16636         * cvt.c (ocp_convert): After converting to the target type, set
16637         LOOKUP_NO_CONVERSION.
16638
16639         * call.c (joust): Warn about potentially confusing promotion rules
16640         with -Wsign-promo.
16641         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
16642
16643 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
16644
16645         * exception.cc: Declare __terminate_func with noreturn attribute.
16646
16647 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
16648
16649         * parse.y: Break out eat_saved_input, handle errors.
16650         (function_try_block): Use compstmt instead of compstmt_or_error.
16651
16652 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
16653
16654         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
16655
16656 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
16657
16658         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
16659         existence of cc1plus check whether $(LANGUAGES) contains C++.
16660
16661 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
16662
16663         * method.c (do_build_copy_constructor): When copying an anonymous
16664         union member loop around to handle nested anonymous unions.  Use
16665         the offset of the member relative to the outer structure, not the
16666         union.
16667
16668 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
16669
16670         * call.c (resolve_args): New fn.
16671         (build_new_function_call): Use it.
16672         (build_object_call): Likewise.
16673         (build_new_method_call): Likewise.
16674
16675 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
16676
16677         * call.c (build_over_call): tsubst all default parms from templates.
16678
16679 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
16680
16681         * decl.c (struct cp_function): Add static_labelno.
16682         (push_cp_function_context): Save it.
16683         (pop_cp_function_context): Restore it.
16684
16685 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
16686
16687         * typeck.c (build_component_ref_1): Convert from reference.
16688
16689 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16690
16691         * parse.y (current_declspecs, prefix_attributes): Initialize to
16692         NULL_TREE.
16693
16694         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
16695         before we try to force it to be a TREE_LIST.
16696         (decl): Make sure $1.t is non-nil.
16697
16698 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
16699
16700         * pt.c (uses_template_parms): Handle template first-parse codes.
16701
16702         * decl.c (cp_finish_decl): Only warn about user-defined statics.
16703
16704 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
16705
16706         * pt.c (unify): Handle BOOLEAN_TYPE.
16707
16708         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
16709         * pt.c (tsubst): Don't set it.
16710         * call.c (build_over_call): Use uses_template_parms.
16711
16712 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
16713
16714         * method.c (build_overload_nested_name): Use static_labelno
16715         instead of var_labelno.
16716         (build_qualified_name): New fn.
16717         (build_overload_name): Split out from here.
16718         (build_static_name): Use build_qualified_name.
16719         * decl.c (cp_finish_decl): Statics in extern inline functions
16720         have comdat linkage.
16721         (start_function): Initialize static_labelno.
16722
16723 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
16724
16725         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
16726         before "all member functions in class [] are private".
16727
16728 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
16729
16730         * lex.c (do_scoped_id): convert_from_reference.
16731         * init.c (build_offset_ref): Likewise.
16732
16733 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
16734
16735         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
16736
16737 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
16738
16739         * typeck.c (get_member_function_from_ptrfunc): Promote index
16740         before saving it.
16741
16742 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
16743
16744         * tree.c (layout_basetypes): Move non-virtual destructor warning.
16745         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
16746
16747 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
16748
16749         * decl.c (grokdeclarator): Call add_defarg_fn for the function
16750         type, too.
16751         * lex.c (add_defarg_fn): Adjust.
16752         (do_pending_defargs): Adjust.  Don't skip the first parm.
16753
16754 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
16755
16756         * decl.c (build_enumerator): Global enumerators are also readonly.
16757
16758         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
16759         (build_dynamic_cast): Call it and convert_from_reference.
16760
16761         * lex.c (add_defarg_fn): New fn.
16762         (snarf_defarg): Don't add to defarg_types.
16763         (do_pending_defargs): Lose defarg_types.  All fns we process now
16764         have defargs.
16765         * decl.c (grokfndecl): Call add_defarg_fn.
16766
16767         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
16768         * cp-tree.def: Add DEFAULT_ARG.
16769         * spew.c (yylex): Call snarf_defarg as appropriate.
16770         * parse.y: New tokens DEFARG and DEFARG_MARKER.
16771         (defarg_again, pending_defargs, defarg, defarg1): New rules.
16772         (structsp): Use pending_defargs.
16773         (parms, full_parm): Use defarg.
16774         * lex.c (init_lex): Initialize inline_text_firstobj.
16775         (do_pending_inlines): Never pass the obstack to feed_input.
16776         (process_next_inline): Call end_input instead of restore_pending_input.
16777         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
16778         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
16779         * input.c (end_input): New fn.
16780         (sub_getch): At the end of some fed input, just keep returning EOF
16781         until someone calls end_input.
16782         Remove 'obstack' field from struct input_source.
16783         * decl.c (grokparms): Handle DEFAULT_ARG.
16784         (replace_defarg): New fn.
16785         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
16786
16787 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
16788
16789         * call.c (implicit_conversion): If nothing else works, try binding
16790         an rvalue to a reference.
16791
16792 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
16793
16794         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
16795         ifndef for Cygwin32 to include SIGSEGV.
16796
16797 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
16798
16799         * class.c (finish_struct_1): Only complain about pointers without
16800         copy stuff if there are any constructors.
16801
16802         * rtti.c (build_dynamic_cast): Call complete_type on the types.
16803
16804         * decl.c (grokfndecl): If the function we chose doesn't actually
16805         match, die.
16806
16807         * decl2.c (grokclassfn): Don't specify 'const int' for the
16808         artificial destructor parm.
16809
16810         * pt.c (type_unification): If we are called recursively, nothing
16811         decays.
16812
16813 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
16814
16815         * decl.c (init_decl_processing): Stop trying to catch signals
16816         other than SIGABRT since the Cygwin32 library doesn't support
16817         them correctly yet.  This fixes a situation in which g++ causes
16818         a hang on SIGSEGVs and other such signals in our Win32-hosted
16819         tools.
16820
16821 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
16822
16823         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
16824
16825 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
16826
16827         * typeck2.c (store_init_value): Always return the value if our
16828         type needs constructing.
16829
16830         * method.c (hack_identifier): Convert class statics from
16831         reference, too.
16832
16833 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
16834
16835         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
16836
16837 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
16838
16839         * typeck.c (c_expand_return): Make sure we clean up temporaries at
16840         the end of return x;
16841
16842 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16843
16844         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
16845
16846 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
16847
16848         * except.c (expand_builtin_throw): Add support
16849         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
16850
16851 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
16852
16853         * repo.c (extract_string): Null-terminate.
16854
16855         * cp-tree.h (TI_SPEC_INFO): New macro.
16856         (CLASSTYPE_TI_SPEC_INFO): New macro.
16857         * pt.c (push_template_decl): Correctly determine # of template parms
16858         for partial specs.
16859
16860         * call.c (compare_ics): Really fix 'this' conversions.
16861
16862         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
16863         non-template fn.
16864
16865         * pt.c (push_template_decl): Complain about mismatch in # of
16866         template parms between a class template and a member template.
16867
16868 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
16869
16870         * method.c (synthesize_method): You can't call
16871         function_cannot_inline_p after finish_function.
16872         * decl.c (finish_function): Turn on flag_inline_functions and turn
16873         off DECL_INLINE before handing a synthesized method to the
16874         backend.
16875
16876 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
16877
16878         * method.c (synthesize_method): Remove July 30 change to never set
16879         DECL_INLINE if at_eof.
16880
16881 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
16882
16883         * xref.c (GNU_xref_member): Ensure that the node has a
16884         decl_lang_specific part before checking DECL_FRIEND_P.
16885
16886 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
16887
16888         * pt.c (instantiate_class_template): Diagnose non-class types used
16889         as bases.
16890
16891 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
16892
16893         * typeck.c (build_conditional_expr): Use convert_for_initialization
16894         instead of convert_and_check.
16895
16896 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16897
16898         * parse.y (typespec): Don't pedwarn for typeof.
16899
16900 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
16901
16902         * repo.c (finish_repo): Only check changes if we would write a
16903         repo file.
16904
16905         * call.c (compare_ics): Fix handling of 'this' conversions.
16906
16907         * pt.c (do_decl_instantiation): Support static data too.  Rename
16908         from do_function_instantiation.
16909         * cp-tree.h: Adjust.
16910         * parse.y: Adjust.
16911
16912         * repo.c (extract_string): New fn.
16913         (get_base_filename): Use it.
16914         (init_repo): Compare old args with current args.
16915
16916 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
16917
16918         * Makefile.in, Make-lang.in: Protect C-ls with a comment
16919         character, idea from Paul Eggert <eggert@twinsun.com>.
16920
16921 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
16922
16923         * typeck.c (c_expand_return): Be more persistent in looking for
16924         returned temps.
16925
16926         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
16927         pointer to reference.
16928
16929         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
16930
16931 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
16932
16933         * init.c (build_member_call, build_offset_ref):
16934         Use do_scoped_id instead of do_identifier.
16935
16936         * cvt.c (convert): Remove bogosity.
16937
16938 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16939
16940         * cvt.c (build_up_reference): Do checks of ARGTYPE and
16941         TARGET_TYPE before trying to use get_binfo.
16942
16943 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
16944
16945         * cvt.c (build_up_reference): Call get_binfo to get access control.
16946
16947         * decl2.c (import_export_decl): If we don't support weaks, leave
16948         statics undefined.
16949
16950 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
16951
16952         * except.c (expand_builtin_throw): Add support for machines that
16953         cannot access globals after throw's epilogue when
16954         -fno-sjlj-exceptions is used.
16955
16956 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
16957
16958         * parse.y: 'std::' becomes '::'.
16959         * lex.c (real_yylex): Remove 'namespace' warning.
16960         * init.c (build_member_call): Ignore 'std::'.
16961         (build_offset_ref): Likewise.
16962         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
16963         (do_toplevel_using_decl): Ignore 'using std::whatever'.
16964         * decl.c (push_namespace): Just sorry.
16965         (pop_namespace): Nop.
16966         (init_decl_processing): Declare std namespace.
16967
16968 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
16969
16970         * search.c (push_class_decls): A name which ambiguously refers to
16971         several instantiations of the same template just refers to the
16972         template.
16973
16974 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
16975
16976         * decl.c (build_enumerator): Fix problem with unsigned long
16977         enumerated values being smashed to ints, causing overflow
16978         when computing next enumerated value (for enum values around
16979         MAX_VAL).
16980
16981 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
16982
16983         * typeck.c (build_component_ref): Only call mark_used on a decl.
16984
16985 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16986
16987         * typeck.c (build_c_cast): Make the check for a ptr to function
16988         more specific before possible default_conversion call.
16989
16990 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
16991
16992         * except.c (expand_exception_blocks): Simplify and fix and make
16993         sure we don't end a region in a sequence, as expand_end_bindings
16994         doesn't like it.
16995
16996 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
16997
16998         * except.c (init_exception_processing): Mark terminate as not
16999         returning so that the optimizer can optimize better.
17000
17001 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
17002
17003         * cvt.c (convert): Don't do any extra work, if we can avoid it
17004         easily.
17005
17006 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
17007
17008         * *.[chy]: Change cp_convert to ocp_convert, change convert to
17009         cp_convert.  convert is now reserved for the backend, and doesn't
17010         have the semantics a frontend person should ever want.
17011
17012 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
17013
17014         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
17015         Lose -traditional support.
17016
17017 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
17018
17019         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
17020
17021         * parse.y (self_reference): Do it for templates, too.
17022         * class.c (pushclass): Don't overload_template_name; the alias
17023         generated by build_self_reference serves the same purpose.
17024
17025         * tree.c (list_hash): Make static, take more args.
17026         (list_hash_lookup): Likewise.
17027         (list_hash_add): Make static.
17028         (list_hash_canon): Lose.
17029         (hash_tree_cons): Only build a new node if one isn't already in the
17030         hashtable.
17031         (hash_tree_chain): Use hash_tree_cons.
17032         * cp-tree.h: Adjust.
17033         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
17034         of calling lookup_name.
17035
17036 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
17037
17038         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
17039         doesn't refer to the CONST_DECLs.
17040
17041 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
17042
17043         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
17044         is bigger.
17045         (expand_class_desc): Convert the last argument to a sizetype.
17046
17047 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17048
17049         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
17050         __real__): Add reswords.
17051         * hash.h: Regenerate.
17052         * lex.h (rid): Add RID_COMPLEX.
17053         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
17054         * lex.c (init_lex): Add building of RID_COMPLEX.
17055         (real_yylex): General cleanup in line with what c-lex.c also has,
17056         sans the cruft for traditional; add handling of SPEC_IMAG, complex
17057         types, and imaginary numeric constants.
17058         * parse.y (REALPART, IMAGPART): Add tokens.
17059         (unary_expr): Add REALPART and IMAGPART rules.
17060         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
17061         * decl.c (complex_{integer,float,double,long}_type_node): Define
17062         types.
17063         (init_decl_processing): Set up the types.
17064         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
17065         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
17066         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
17067         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
17068         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
17069         COMPLEX_TYPE case.
17070         * method.c (build_overload_name): Add handling of the different
17071         COMPLEX_TYPEs, prefixing them with `J'.
17072         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
17073         as a template parm.
17074         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
17075         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
17076         (mapcar): Handle COMPLEX_CST.
17077         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
17078         (common_type): Add code for complex types.
17079         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
17080         (convert_for_assignment): Likewise.
17081         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
17082
17083 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
17084
17085         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
17086         tsubst_expr, as it might try to do overload resolution.
17087
17088 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
17089
17090         * pt.c (instantiate_class_template): Oops.
17091
17092 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
17093
17094         * cp-tree.def: Add TAG_DEFN.
17095         * pt.c (tsubst_enum): New fn.
17096         (instantiate_class_template): Use it.
17097         (tsubst_expr): Support TAG_DEFN.
17098         (tsubst): Support local enums.
17099         (tsubst_copy): Likewise.
17100         * decl.c (finish_enum): Likewise.
17101         (start_enum): If this is a local enum, switch to permanent_obstack.
17102
17103 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
17104
17105         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
17106         (finish_function): Put the base init code for constructors just
17107         after the parm cleanup insns.
17108         (struct cp_function): Add last_parm_cleanup_insn.
17109         (push_cp_function_context): Likewise.
17110         (pop_cp_function_context): Likewise.
17111
17112 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
17113
17114         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
17115
17116 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17117
17118         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
17119         for THUNK_FNDECL before we switch to temporary allocation.
17120
17121 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
17122
17123         * call.c (build_new_op): Handle null arg2 for ?:.
17124
17125 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
17126
17127         * except.c (expand_exception_blocks): Ensure that we flow through
17128         the end of the exception region for the exception specification.
17129         Move exception region for the exception specification in, so that
17130         it doesn't protect the parm cleanup.  Remove some obsolete code.
17131         * decl.c (store_parm_decls): Likewise.
17132         (finish_function): Likewise.
17133
17134 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
17135
17136         * init.c (build_new): Fix nothrow handling.
17137
17138 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17139
17140         * init.c (emit_base_init): Don't warn about the initialization
17141         list for an artificial member.
17142
17143 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17144
17145         * expr.c (do_case): Handle !START case for the error msg.
17146
17147 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
17148
17149         * decl2.c, lang-options.h: New option -Weffc++.
17150         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
17151         to -Weffc++.
17152
17153         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
17154         to MULTIPLE_SYMBOL_SPACES.
17155
17156 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
17157
17158         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
17159
17160         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
17161
17162         * typeck.c (c_expand_return): Don't complain about returning void
17163         to void in an artificial function.
17164         * method.c (make_thunk): Change settings of READONLY/VOLATILE,
17165         don't set DECL_RESULT, set DECL_ARTIFICIAL.
17166         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
17167
17168 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
17169
17170         * init.c (init_decl_processing): Add support for setjmp/longjmp based
17171         exception handling.
17172         * except.c (init_exception_processing): Likewise.
17173         (expand_end_catch_block): Likewise.
17174         (expand_exception_blocks): Likewise.
17175         (expand_throw): Likewise.
17176         * exception.cc (__default_terminate): Likewise.
17177
17178         * init.c (perform_member_init): Use new method of expr level
17179         cleanups, instead of cleanups_this_call and friends.
17180         (emit_base_init): Likewise.
17181         (expand_aggr_vbase_init_1): Likewise.
17182         (expand_vec_init): Likewise.
17183         * decl.c (cp_finish_decl): Likewise.
17184         (expand_static_init): Likewise.
17185         (store_parm_decls): Likewise.
17186         (cplus_expand_expr_stmt): Likewise.
17187         * decl2.c (finish_file): Likewise.
17188
17189         * Make-lang.in (exception.o): Ok to compile with -O now.
17190
17191         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
17192         we know it will be done later by the backend.
17193
17194         * decl2.c (lang_f_options): Remove support for short temps.
17195         * lang-options.h: Likewise.
17196
17197 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
17198
17199         * tree.c (varargs_function_p): New fn.
17200         * method.c (emit_thunk): Replace broken generic code with code to
17201         generate a heavyweight thunk function.
17202
17203 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
17204
17205         * pt.c (process_template_parm): pedwarn about floating-point parms.
17206
17207         * decl.c (grokdeclarator): inline no longer implies static.
17208
17209         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
17210
17211 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
17212
17213         * class.c (check_for_override): The signature of an overriding
17214         function is not changed.
17215
17216         * call.c (build_over_call): Move setting of conv into the loop.
17217         Note: this change, along with the related changes of the 18th thru
17218         the 20th of April, fix an infinite loop problem in conversions.
17219
17220 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
17221
17222         * call.c (build_user_type_conversion_1): Really ignore rvalue
17223         conversions when looking for a REFERENCE_TYPE.
17224
17225         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
17226         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
17227         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
17228         (build_unary_op): Likewise.
17229         * call.c (build_over_call): See through a CONVERT_EXPR around the
17230         ADDR_EXPR for on a temporary.
17231         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
17232         the ADDR_EXPR for a local variable.
17233
17234 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
17235
17236         * call.c (build_user_type_conversion_1): If we're trying to
17237         convert to a REFERENCE_TYPE, only consider lvalue conversions.
17238         (build_new_function_call): Print candidates.
17239         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
17240         (reference_binding): Binding a temporary of a reference-related type
17241         is BAD.
17242
17243 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17244
17245         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
17246         * tinfo2.cc (type_info::before): Likewise.
17247
17248 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
17249
17250         * call.c (implicit_conversion): Oops.
17251
17252 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
17253
17254         * call.c (implicit_conversion): Try to find a reference conversion
17255         before binding a const reference to a temporary.
17256
17257 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
17258
17259         * exception.cc (__default_unexpected): Call terminate by default,
17260         so that if the user overrides terminate, the correct function will
17261         be called.
17262
17263 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
17264
17265         * parse.y (left_curly): Avoid trying to use any fields of
17266         error_mark_node, as there aren't any.
17267
17268 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
17269
17270         * lex.c (do_identifier): Avoid breaking on overloaded methods
17271         as default arguments.
17272
17273 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
17274
17275         * call.c (add_template_candidate): Initialize the variable "dummy".
17276
17277 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
17278
17279         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
17280         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
17281
17282 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17283
17284         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
17285         (debug_binfo): Delete decl, not needed.
17286
17287         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
17288         promotes_to_aggr_type): Delete fns.
17289         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
17290         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
17291         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
17292
17293         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
17294
17295         * friend.c (is_friend_type): Delete fn.
17296         * cp-tree.h (is_friend_type): Delete decl.
17297
17298         * decl.c (original_result_rtx, double_ftype_double,
17299         double_ftype_double_double, int_ftype_int, long_ftype_long,
17300         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
17301         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
17302
17303         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
17304         fwd decls.
17305         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
17306
17307         * decl.c (pushdecl_nonclass_level): #if 0, unused.
17308         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
17309
17310         * lex.c (reinit_lang_specific): #if 0, unused.
17311         * cp-tree.h (reinit_lang_specific): #if 0 decl.
17312
17313         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
17314         * cp-tree.h (revert_static_member_fn): Delete decl.
17315
17316         * class.c (root_lang_context_p): Delete fn.
17317         * cp-tree.h (root_lang_context_p): Delete decl.
17318
17319         * decl.c (set_current_level_tags_transparency): #if 0, unused.
17320         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
17321
17322         * lex.c (set_vardecl_interface_info): Make static.
17323         * cp-tree.h (set_vardecl_interface_info): Delete decl.
17324
17325         * call.c (find_scoped_type): Make static.
17326         * cp-tree.h (find_scoped_type): Delete decl.
17327
17328         * search.c (convert_pointer_to_vbase): Make static.
17329         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
17330
17331         * decl.c (const_ptr_type_node): Likewise.
17332         * cp-tree.h (const_ptr_type_node): Delete decl.
17333
17334         * typeck.c (common_base_type): Make static.
17335         * cp-tree.h (common_base_types): Delete erroneous decl.
17336
17337         * pt.c (classtype_mangled_name): Make static.
17338         * cp-tree.h (classtype_mangled_name): Delete decl.
17339
17340         * lex.c (check_newline): Make static.
17341         * cp-tree.h (check_newline): Delete decl.
17342
17343         * typeck.c (build_x_array_ref): Delete fn, same idea as
17344         grok_array_decl.
17345         * cp-tree.h (build_x_array_ref): Delete decl.
17346
17347         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
17348         copy_lang_decl.
17349         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
17350
17351         * class.c (build_vtable_entry): Make static.
17352         * cp-tree.h (build_vtable_entry): Delete decl.
17353
17354         * class.c (build_vbase_pointer): Make static.
17355         * cp-tree.h (build_vbase_pointer): Delete decl.
17356
17357         * sig.c (build_sptr_ref): Add forward decl and make static.
17358         * cp-tree.h (build_sptr_ref): Delete decl.
17359
17360         * call.c (build_new_method_call): Add forward decl and make static.
17361         * cp-tree.h (build_new_method_call): Delete decl.
17362
17363         * call.c (build_object_call): Make static.
17364         * class.c (check_for_override, complete_type_p, mark_overriders):
17365         Likewise.
17366         * decl.c (cp_function_chain): Likewise.
17367         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
17368         Likewise.
17369         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
17370         Likewise.
17371         * tree.c (build_cplus_array_type_1): Likewise.
17372         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
17373         (comp_target_parms): Likewise.
17374
17375         * init.c (build_builtin_call): Make static.
17376         * cp-tree.h (build_builtin_call): Delete decl.
17377
17378         * typeck.c (binary_op_error): Delete decl.
17379         * cp-tree.h (binary_op_error): Likewise.
17380
17381 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17382
17383         * call.c (build_method_call): Compare against error_mark_node
17384         directly, rather than the ERROR_MARK tree code.
17385         * cvt.c (cp_convert): Likewise.
17386         * decl.c (print_binding_level): Likewise.
17387         (duplicate_decls): Likewise.
17388         (grokdeclarator): Likewise.
17389         (grokdeclarator): Likewise.
17390         * init.c (expand_aggr_init_1): Likewise.
17391         (decl_constant_value): Likewise.
17392         * method.c (build_opfncall): Likewise.
17393         (hack_identifier): Likewise.
17394         * typeck.c (build_modify_expr): Likewise.
17395
17396         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
17397
17398 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
17399
17400         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
17401
17402         * pt.c (coerce_template_parms): Add new error message.
17403
17404         * method.c (build_overload_value): Implement name mangling for
17405         floating-point template arguments.
17406
17407         * method.c (build_overload_int, icat, dicat): Fix mangling of template
17408         arguments whose absolute value doesn't fit in a signed word.
17409
17410 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17411
17412         * friend.c: New file; put all of the friend stuff in here.
17413         * init.c: Instead of here.
17414         * Makefile.in (CXX_OBJS): Add friend.o.
17415         (friend.o): Add dependencies.
17416         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
17417
17418 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
17419
17420         * call.c (build_scoped_method_call): Complain if the scope isn't a
17421         base.
17422
17423 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
17424
17425         * parse.y (left_curly): Don't crash on erroneous type.
17426
17427         * init.c (build_delete): Fix type of ref.
17428
17429 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
17430
17431         * search.c (get_vbase_1): Renamed from get_vbase.
17432         (get_vbase): Wrapper, now non-static.
17433         (convert_pointer_to_vbase): Now static.
17434
17435         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
17436         * init.c (build_delete): Pass one.
17437         (build_partial_cleanup_for): Use build_scoped_method_call.
17438         * decl.c (finish_function): Pass a binfo.
17439
17440 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
17441
17442         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
17443
17444         * typeck.c (build_c_cast): Lose other reference to flag.
17445
17446         * call.c (build_field_call): Don't look for [cd]tor_identifier.
17447         * decl2.c (delete_sanity): Remove meaningless use of
17448         LOOKUP_HAS_IN_CHARGE.
17449         * decl.c (finish_function): Use build_scoped_method_call instead
17450         of build_delete for running vbase dtors.
17451         * init.c (build_delete): Call overload resolution code instead of
17452         duplicating it badly.
17453
17454 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
17455
17456         * call.c (build_over_call): Call mark_used before trying to elide
17457         the call.
17458
17459         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
17460
17461 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17462
17463         * typeck.c (build_modify_expr): Always pedwarn for a cast to
17464         non-reference used as an lvalue.
17465
17466 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
17467
17468         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
17469
17470 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
17471
17472         * parse.y (handler): Fix template typo.
17473
17474 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
17475
17476         * error.c (lang_decl_name): New fn.
17477         * tree.c (lang_printable_name): Use it.
17478
17479 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
17480
17481         * g++spec.c: Include config.h so that we can catch bzero #defines
17482         from the config file.
17483
17484 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
17485
17486         * new1.cc: Include a declaration for malloc, to avoid warning, and
17487         avoid lossing on systems that require one (ones that define malloc
17488         in xm.h).
17489
17490 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
17491
17492         * decl2.c (max_tinst_depth): New variable.
17493         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
17494         option.
17495         * pt.c (max_tinst_depth): Variable moved.
17496         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
17497         as legal.
17498
17499 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
17500
17501         * decl.c (xref_basetypes): Allow a base class that depends on
17502         template parms to be incomplete.
17503
17504         * decl2.c (build_expr_from_tree): Support typeid(type).
17505         * rtti.c (get_typeid): Support templates.
17506         (expand_si_desc, expand_class_desc): Fix string length.
17507         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
17508
17509 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
17510
17511         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
17512
17513         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
17514
17515 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
17516
17517         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
17518         smashes together template and non-template decls of the same
17519         signature.
17520
17521 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
17522
17523         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
17524
17525 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17526
17527         * decl.c (duplicate_decls): Next route, pedwarn about different
17528         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
17529
17530 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17531
17532         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
17533         (struct lang_type): Delete has_default_implementation member.
17534         Increase dummy to 21.
17535         * decl.c (start_method): Delete usage.
17536
17537         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
17538         store_after_parms, start_decl_1, auto_function): Add decls.
17539         (get_arglist_len_in_bytes, declare_implicit_exception,
17540         have_exceptions_p, make_type_decl, typedecl_for_tag,
17541         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
17542         build_component_type_expr, cplus_exception_name,
17543         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
17544         * call.c (build_this): Make static.
17545         (is_complete): Likewise.
17546         (implicit_conversion): Likewise.
17547         (reference_binding): Likewise.
17548         (standard_conversion): Likewise.
17549         (strip_top_quals): Likewise.
17550         (non_reference): Likewise.
17551         (build_conv): Likewise.
17552         (user_harshness): Likewise.
17553         (rank_for_ideal): Likewise.
17554         * decl.c (start_decl_1): Delete forward decl.
17555         (push_decl_level): Make static.
17556         (resume_binding_level): Make static.
17557         (namespace_bindings_p): Make static.
17558         (declare_namespace_level): Make static.
17559         (lookup_name_real): Make static.
17560         (duplicate_decls): Make static.  Take register off NEWDECL and
17561         OLDDECL parm decls.
17562         * decl2.c (get_sentry): Make static.
17563         (temp_name_p): Delete fn.
17564         * except.c (auto_function): Delete decl.
17565         * lex.c (handle_{cp,sysv}_pragma): Make static.
17566         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
17567         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
17568         * pt.c (tsubst_expr_values): Make static.
17569         * rtti.c (combine_strings): Delete decl.
17570
17571 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
17572
17573         * pt.c (push_template_decl): Handle getting a typedef.
17574
17575         * call.c (build_new_function_call): Complain about void arg.
17576
17577 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17578
17579         * decl.c (duplicate_decls): Give pedwarn of different exceptions
17580         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
17581
17582 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
17583
17584         * except.c (expand_throw): Don't expand the cleanup tree here,
17585         since we are not going to write the rtl out.  Fixes problem with
17586         -g -O on SPARC.
17587
17588 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
17589
17590         * Make-lang.in: Add $(exeext) as necessary.
17591
17592 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
17593
17594         * parse.y (handler_seq): Must have at least one catch clause.
17595
17596 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
17597
17598         * call.c (add_builtin_candidate): Restore ?: hack.
17599
17600         * decl.c (grok_op_properties): More warnings.
17601
17602 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17603
17604         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
17605         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
17606
17607         * decl.c (duplicate_decls): Scale back to a warning, and only do
17608         'em if -pedantic.
17609
17610 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
17611
17612         * decl.c (duplicate_decls): pedwarn mismatched exception
17613         specifications.
17614
17615 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
17616
17617         * call.c (build_new_method_call): Don't display the invisible
17618         argument for controlling virtual bases.
17619
17620 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
17621
17622         * new: Add nothrow new and delete, bad_alloc and throw specifications
17623         for delete.
17624         * decl.c (init_decl_processing): Add throw specification for delete.
17625         * new.cc (nothrow): Define.
17626         * lex.c (real_yylex): Removing warning that throw and friends are
17627         keywords.
17628         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
17629         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
17630         * Make-lang.in: Add new{1,2}.{cc,o}.
17631
17632 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
17633
17634         * lex.c (cons_up_default_function): Fix return type of synth op=.
17635
17636         * init.c (emit_base_init): Add warnings for uninitialized members
17637         and bases.
17638
17639         * decl.c (xref_basetypes): Add warning for non-polymorphic type
17640         with destructor used as base type.
17641
17642         * decl.c (grok_op_properties): Add warning for op= returning void.
17643         * typeck.c (c_expand_return): Add warning for op= returning anything
17644         other than *this.
17645
17646         * class.c (finish_struct_1): Add warning for class with pointers
17647         but not copy ctor or copy op=.
17648
17649         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
17650         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
17651         (instantiate_template): If -fexternal-templates, add this
17652         instantiation to pending_templates.
17653
17654         * decl2.c (copy_assignment_arg_p): Disable old hack to support
17655         Booch components.
17656
17657 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
17658
17659         * cvt.c (cp_convert): pedwarn enum to pointer conversions.
17660
17661 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
17662
17663         * call.c (standard_conversion): Handle getting references.  Tack
17664         on RVALUE_CONV here.  Do it for non-class types, too.
17665         (reference_binding): Pass references to standard_conversion.
17666         (implicit_conversion): Likewise.
17667         (add_builtin_candidate): Disable one ?: kludge.
17668         (convert_like): Handle RVALUE_CONVs for non-class types.
17669         (joust): Disable the other ?: kludge.
17670
17671 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17672
17673         * decl.c (init_decl_processing): Add code to build up common
17674         function types beforehand, to avoid creation then removal of
17675         things already in the hash table.
17676
17677 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
17678
17679         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
17680         the arguments.
17681
17682         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
17683         current_template_parms.
17684
17685 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
17686
17687         * search.c (lookup_field): Don't return a function, check want_type.
17688
17689 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17690
17691         * init.c (build_new): Make sure PLACEMENT has a type.
17692
17693 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
17694
17695         * init.c (build_new): Support new (nothrow).
17696
17697 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
17698
17699         * pt.c (instantiate_decl): Also do push_to_top_level before setting
17700         up DECL_INITIAL.
17701
17702         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
17703         * pt.c (tsubst): Defer instantiation of default args.
17704         * call.c (build_over_call): Until here.
17705
17706 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17707
17708         * search.c (lookup_field): Make sure we have an
17709         IDENTIFIER_CLASS_VALUE before we try to return it.
17710
17711 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
17712
17713         * call.c (build_method_call): Delete unused var PARM.
17714         (build_overload_call_real): Likewise.
17715         (build_object_call): Delete unused var P.
17716         (build_new_op): Likewise.
17717         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
17718         var definitions, which are never used.
17719         (shadow_tag): Delete unused var FN.
17720         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
17721         * init.c (build_new): Delete unused var ALLOC_TEMP.
17722         * method.c (hack_identifier): Delete unused var CONTEXT.
17723         (do_build_copy_constructor): Delete unused var NAME.
17724         (synthesize_method): Delete unused var BASE.
17725         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
17726         * rtti.c (build_headof): Delete unused var VPTR.
17727         (get_typeid): Delete unused var T.
17728         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
17729         and ORIG_OP2.
17730         (build_ptrmemfunc): Delete unused vars U and NINDEX.
17731         * typeck2.c (build_functional_cast): Delete unused var BINFO.
17732
17733 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
17734
17735         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
17736         things in a type being defined.
17737         * decl.c (finish_enum): Reverse the values so that they are in
17738         the correct order.
17739
17740         * pt.c (instantiate_class_template): Don't initialize
17741         BINFO_BASETYPES until the vector is filled out.
17742         (unify): Don't abort on conflicting bindings, just fail.
17743         (instantiate_decl): Do push_tinst_level before any tsubsting.
17744
17745         * method.c (build_overload_value): Handle getting a
17746         TEMPLATE_CONST_PARM for a pointer.
17747
17748 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
17749
17750         * init.c (expand_member_init): Don't give 'not a base' error for
17751         templates.
17752
17753         * pt.c (instantiate_decl): Call import_export_decl later.
17754
17755         * pt.c (instantiate_class_template): Return a value.
17756
17757         * parse.y (extension): New rule for __extension__.
17758         (extdef, unary_expr, decl, component_decl): Use it.
17759
17760 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
17761
17762         * class.c (base_binfo): Remove unused base_has_virtual member.
17763         (finish_base_struct): Likewise.
17764         (finish_struct_1): Likewise.
17765
17766 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
17767
17768         * search.c (expand_upcast_fixups): Fix bogus code generation
17769         problem where the generated code uses the wrong index into the
17770         runtime built vtable on the stack.  Old code could clobber random
17771         stack values.
17772
17773 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
17774
17775         * init.c (perform_member_init): Make sure the partial EH cleanups
17776         live on the function_obstack.
17777
17778 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
17779
17780         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
17781         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
17782
17783 Tue Dec 24 10:24:03 1996  Jeffrey A Law  <law@cygnus.com>
17784
17785         * decl.c (grokvardecl): Avoid ANSI style initialization.
17786
17787 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
17788
17789         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
17790
17791 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
17792
17793         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
17794
17795 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17796
17797         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
17798         arguments we compare against.  Start the count of I at 1, not 0,
17799         since argv[0] is still the command.
17800
17801 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
17802
17803         * lang-specs.h: Accept .cp as an C++ extension.
17804
17805 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17806
17807         * cp-tree.h (ptr_reasonably_similar): Add decl.
17808
17809 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17810
17811         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
17812         pointer.  New local SPECBITS with the parm's value.
17813         (grokdeclarator): Pass &specbits down.
17814
17815         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
17816         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
17817
17818         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
17819         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
17820
17821         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
17822         not an error_mark_node.
17823
17824 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
17825
17826         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
17827         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
17828
17829 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17830
17831         * decl.c (grokdeclarator): When giving an anonymous struct a name,
17832         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
17833         not affected).
17834
17835         * typeck2.c (build_m_component_ref): If component is a pointer
17836         to data member, resolve the OFFSET_REF now.
17837
17838         * call.c (convert_like): Don't go into infinite recursion.
17839
17840         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
17841
17842         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
17843         * tree.c (layout_basetypes): And on the vbase ptr.
17844
17845 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
17846
17847         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
17848         CHAR_TYPE_SIZE so bool is always the same size as another type.
17849
17850         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
17851
17852 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
17853
17854         * decl2.c (grok_x_components): Remove synthesized methods from
17855         TYPE_METHODS of an anonymous union, complain about member
17856         functions.
17857         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
17858         anonymous unions.
17859         (finish_function): Just clear the DECL_RTL of our arguments.
17860
17861 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
17862
17863         * decl2.c (finish_file): Emit DWARF debugging info for static data
17864         members.
17865
17866         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
17867
17868 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
17869
17870         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
17871         IDENTIFIER_NODE.
17872
17873 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
17874
17875         * Make-lang.in (g++-cross$(exeext)): Fix typo.
17876
17877 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17878
17879         Make the g++ driver now be a standalone program, rather than one
17880         that tries to run the gcc driver after munging up the options.
17881         * Make-lang.in (g++.c, g++spec.o): New rules.
17882         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
17883         added.
17884         (g++$(exeext)): New rule, based on xgcc rule.
17885         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
17886         * g++spec.c: New file.
17887         * g++.c: Removed file.
17888
17889 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
17890
17891         * cvt.c (build_up_reference): Arrange for any temporary values
17892         that have been keep in registers until now to be put into memory.
17893
17894 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17895
17896         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
17897         that make -j3 bootstrap works better.
17898
17899 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
17900
17901         * decl.c (pushtag): Do pushdecl for anon tags.
17902
17903 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
17904
17905         * typeck.c (c_expand_return): Fix logic.
17906         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
17907
17908 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
17909
17910         * g++.c (main): Make sure arglist has a final NULL entry.  Add
17911         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
17912         stdin/stdout of the invoked program are redirected to
17913         nowheresville.
17914
17915 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
17916
17917         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
17918
17919 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
17920
17921         * init.c (resolve_offset_ref): Handle obj.vfn better.
17922         * typeck.c (build_component_ref): Set TREE_TYPE on result from
17923         build_vfn_ref.
17924
17925 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
17926
17927         * typeck.c (convert_for_assignment): Also handle anachronistic
17928         implicit conversions from (::*)() to cv void*.
17929         * cvt.c (cp_convert_to_pointer): Likewise.
17930
17931 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
17932
17933         * lex.c (handle_cp_pragma): Fix bogus warning.
17934
17935 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
17936
17937         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
17938         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
17939
17940 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
17941
17942         * class.c (finish_struct_1): Support DWARF2_DEBUG.
17943         * search.c (dfs_debug_mark): Likewise.
17944         * decl2.c (finish_vtable_vardecl): Likewise.
17945         * decl.c (pushtag, finish_enum): Likewise.
17946         * lex.c (check_newline): Use debug_* instead of calling *out
17947         functions directly.
17948
17949 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17950
17951         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
17952         on some picky hosts.
17953
17954 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
17955
17956         * class.c (finish_struct_1): A class has a non-trivial copy
17957         constructor if it has virtual functions.
17958
17959         * cvt.c (cp_convert): Always call a constructor.
17960
17961         * call.c (reference_binding): Still tack on a REF_BIND
17962         for bad conversions.
17963         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
17964
17965         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
17966         (c_expand_return): Likewise.
17967         * typeck2.c (digest_init): Likewise for { }.
17968         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
17969         * cvt.c (cp_convert): Handle failure better.
17970
17971 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17972
17973         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
17974         of GCC be path-relative.
17975
17976 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
17977
17978         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
17979         it does need choose-temp.o and pexecute.o.
17980
17981 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17982
17983         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
17984         that we still use it.
17985         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
17986
17987 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
17988
17989         * init.c (expand_default_init): Avoid calling constructors to
17990         initialize reference temps.
17991
17992         * cvt.c (convert_to_reference): Fix.
17993
17994 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
17995
17996         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
17997         (convert_to_reference): Likewise.
17998         * typeck.c (convert_for_initialization): Likewise.
17999         * init.c (expand_default_init): Likewise.
18000         (expand_aggr_init_1): Likewise.
18001         * cp-tree.h (CONV_NONCONVERTING): Lose.
18002         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
18003         * *.c: Adjust.
18004         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
18005
18006 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
18007
18008         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
18009
18010 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18011
18012         * init.c (expand_aggr_init_1): Don't crash on non-constructor
18013         TARGET_EXPR.
18014
18015 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18016
18017         * g++.c: Include gansidecl.h.
18018         (VPROTO, PVPROTO, VA_START): Delete.
18019         (choose_temp_base_try, choose_temp_base, perror_exec,
18020         run_dos) [__MSDOS__]: Delete fns.
18021         (pfatal_with_name): Delete fn.
18022         (temp_filename): Declare like in gcc.c.
18023         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
18024         (error_count, signal_count): Define.
18025         (error): Delete both definitions.
18026         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
18027         (pfatal_pexecute): Add fn from gcc.c.
18028         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
18029         code to use the pexecute stuff also used by gcc.c.
18030         (MIN_FATAL_STATUS): Define.
18031         * Make-lang.in (g++): Add dependency on and linking with
18032         choose-temp.o and pexecute.o.
18033
18034         * cp-tree.h: Include gansidecl.h.
18035         (STDIO_PROTO): Delete #undef/#define.
18036         * cvt.c (NULL): Delete #undef/#define.
18037         * expr.c (NULL): Likewise.
18038         * init.c (NULL): Likewise.
18039         * rtti.c (NULL): Likewise.
18040         * xref.c (NULL): Likewise.
18041
18042         * cp-tree.h (build_user_type_conversion): Add prototype.
18043         * call.c (build_user_type_conversion): Delete prototype.  Correct
18044         decl of FLAGS arg to be an int.
18045         * cvt.c (build_user_type_conversion): Likewise.
18046
18047 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
18048
18049         * cp-tree.def: Add TRY_BLOCK and HANDLER.
18050         * except.c (expand_start_catch_block): Support templates.
18051         * parse.y (try_block, handler_seq): Likewise.
18052         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
18053
18054 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
18055
18056         * pt.c (current_template_args): New fn.
18057         (push_template_decl): Use it.
18058         * decl.c (grokdeclarator): Use it.
18059
18060         * decl2.c (build_expr_from_tree): Dereference ref vars.
18061
18062         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
18063         the decl-specifier-seq.
18064
18065         * decl.c (grok_op_properties): Don't force the type of a conversion
18066         op to be complete.  Don't warn about converting to the same type
18067         for template instantiations.
18068
18069         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
18070         methods.
18071
18072 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
18073
18074         * typeck.c (get_delta_difference): Remove previous bogusness.
18075         Don't give errors if force is set.
18076
18077 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18078
18079         * decl2.c (finish_file): Don't emit debug info.
18080         * decl.c (pushdecl): Lose obsolete code.
18081         (grokdeclarator): Still do the long long thing after complaining.
18082         * search.c (note_debug_info_needed): Don't do anything if we're in a
18083         template.
18084         * method.c (synthesize_method): For non-local classes,
18085         push_to_top_level first.
18086
18087 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
18088
18089         * typeck.c (get_delta_difference): Add no_error parameter.
18090         (build_ptrmemfunc): Call get_delta_difference with no_error set;
18091         we don't want error messages when converting unrelated
18092         pointer-to-member functions.
18093
18094 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
18095
18096         * error.c (dump_expr): Improve the wording on error messages that
18097         involve pointer to member functions.
18098
18099 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
18100
18101         * cvt.c (cp_convert_to_pointer): Move code for conversions from
18102         (::*)() to void* or (*)() up a bit, so that we can convert from
18103         METHOD_TYPEs as well.
18104
18105 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18106
18107         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
18108         There are no 'member' types.
18109         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
18110         (build_x_typeid): Handle errors.
18111
18112 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
18113
18114         * typeck.c (convert_for_assignment): Handle anachronistic implicit
18115         conversions from (::*)() to void* or (*)().
18116         * cvt.c (cp_convert_to_pointer): Likewise.
18117         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
18118         conversions from here.
18119         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
18120         * lang-options.h: Likewise.
18121         * decl2.c (warn_pmf2ptr): Define.
18122         * cp-tree.h: Declare it.
18123         * typeck2.c (digest_init): Allow pmfs down into
18124         convert_for_initialization.
18125
18126 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
18127
18128         * typeck.c (c_expand_return): Fix for returning overloaded fn.
18129
18130 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18131
18132         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
18133         * decl.c (grok_reference_init): Pass DIRECT_BIND.
18134         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
18135         DIRECT_BIND.
18136         * call.c (convert_like): Don't pass INDIRECT_BIND.
18137         * typeck.c (convert_arguments): Likewise.
18138         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
18139
18140 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
18141
18142         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
18143         similar code in build_up_ref.
18144         * cvt.c (build_up_reference): Drastically simplify.
18145
18146 Mon Oct 28 12:45:05 1996  Jeffrey A Law  <law@cygnus.com>
18147
18148         * typeck.c (signed_or_unsigned_type): If the given type already
18149         as the correct signedness, then just return it.
18150
18151         * typeck.c ({un,}signed_type): If can't do anything, call
18152         signed_or_unsigned_type.
18153
18154 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
18155
18156         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
18157         current_class_type is NULL.
18158
18159 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
18160
18161         * class.c (finish_struct_1): Avoid empty structs by adding a field
18162         so layout_type gets the mode right.
18163
18164         * typeck.c (c_expand_return): Drastically simplify.
18165
18166 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
18167
18168         * typeck.c (decay_conversion): Handle overloaded methods.
18169
18170 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
18171
18172         * call.c (build_over_call): A TARGET_EXPR has side-effects.
18173
18174 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
18175
18176         * cvt.c (convert_to_pointer_force): Add code to support pointer to
18177         member function to pointer to function conversions.
18178         * init.c (resolve_offset_ref): Add code to allow faked up objects,
18179         ignoring them if they are not used, and giving an error, if they
18180         are needed.
18181         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
18182         code, and so that we can give an error, if we needed an object,
18183         and one was not provided.
18184         (build_c_cast): Don't call default_conversion when we want to
18185         convert to pointer to function from a METHOD_TYPE.
18186
18187 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
18188
18189         * Make-lang.in (cplib2.ready): Fix logic.
18190
18191         * decl.c (shadow_tag): Only complain about non-artificial function
18192         members.
18193
18194         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
18195
18196 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
18197
18198         * expr.c (cplus_expand_expr): Pre-tweak call_target like
18199         expand_inline_function would.
18200
18201         * pt.c (mark_decl_instantiated): If extern_p, call
18202         mark_inline_for_output.
18203
18204 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
18205
18206         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
18207         pmd conversions.
18208
18209         * typeck.c (get_delta_difference): Fix wording, as we can be used
18210         for pointer to data members.
18211
18212 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
18213
18214         * pt.c (tsubst): If the function decl isn't a member of this
18215         template, return a copy of the decl (including copying the
18216         lang-specific part) so we don't hose ourselves later.
18217
18218 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
18219
18220         * class.c (finish_struct): Remove DWARF-specific tag handling.
18221         * decl.c (pushtag): Likewise.
18222         (finish_function): Always clear DECL_ARGUMENTS on function decls with
18223         no saved RTX.
18224         * decl2.c (finish_file): Emit DWARF debugging info for static data
18225         members.
18226
18227 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
18228
18229         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
18230         isn't the same as the new one before we whack it.
18231
18232 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
18233
18234         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
18235         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
18236         warn_traditional and warn_strict_prototypes; remove ancient
18237         'overload' code; remove references to flag_traditional.
18238
18239 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
18240
18241         * input.c (sub_getch): Handle 8-bit characters in string literals.
18242
18243 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
18244
18245         * tree.c (mapcar): Handle CONSTRUCTORs.
18246         (copy_to_permanent): Handle expression_obstack properly.
18247
18248         * Make-lang.in (cplib2.txt): Also depend on the headers.
18249
18250         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
18251         INT_TYPE_SIZE.
18252         (expand_class_desc): Use USItype for offset field.
18253         * tinfo.h (struct __class_type_info): Likewise.
18254
18255         * method.c (build_overload_int): TYPE_PRECISION should be applied
18256         to types.
18257
18258 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
18259
18260         * call.c (build_new_op): A COND_EXPR involving void must be a
18261         builtin.
18262
18263 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
18264
18265         * typeck.c (build_x_component_ref): New fn.
18266         (build_object_ref): Use it.
18267         * parse.y (primary): Use it.
18268         * decl2.c (build_expr_from_tree): Use it.
18269         * cp-tree.h: Declare it.
18270
18271         * decl.c (start_decl): Variable-sized arrays cannot be initialized.
18272         * error.c (dump_type_suffix): Handle variable arrays.
18273
18274 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18275
18276         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
18277
18278 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
18279
18280         * decl.c (lookup_name_real): Don't try to look up anything in a
18281         TYPENAME_TYPE.
18282
18283         * tinfo2.cc (__throw_type_match_rtti): Oops.
18284
18285 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18286
18287         * Make-lang.in (exception.o): Use -fno-PIC for now.
18288
18289 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
18290
18291         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
18292         calling them.
18293         (get_tinfo_fn_dynamic): Extracted from build_typeid.
18294         * tinfo2.cc (__dynamic_cast): Adjust.
18295
18296         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
18297         (build_x_typeid): Likewise.
18298
18299         * parse.y: Call build_x_typeid instead of build_typeid.
18300         * cp-tree.def: Add TYPEID_EXPR.
18301         * pt.c (tsubst_copy): Handle typeid.
18302         * decl2.c (build_expr_from_tree): Likewise.
18303         * rtti.c (build_x_typeid): Throw bad_typeid from here.
18304         (build_typeid): Not here.
18305         * cp-tree.h: Declare build_x_typeid.
18306
18307 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
18308
18309         * call.c (convert_like): Pull out constant values.
18310
18311         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
18312
18313 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
18314
18315         * decl.c (init_decl_processing): Create short int types before
18316         creating size_t in case a machine description needs to use
18317         unsigned short for size_t.
18318
18319 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18320
18321         * Make-lang.in (exception.o): Turn off pic.
18322
18323         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
18324         type, multi-level ptr conversions.
18325
18326         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
18327         (throw_bad_cast): Use it.
18328         (throw_bad_typeid): New fn.
18329         (build_typeid): Throw bad_typeid as needed.
18330         Use build_call.
18331         (synthesize_tinfo_fn): Handle functions and arrays before checking
18332         for cv-quals.
18333
18334         * Remove .h from standard C++ headers, add new.h, move into inc
18335         subdirectory.
18336
18337         * exception*: Remove pointer from object, constructors.  Add
18338         default exception::what that uses type_info::name.  Add
18339         __throw_bad_typeid.
18340
18341         * init.c (build_new): Don't add a cookie to new (void *) T[2].
18342
18343 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
18344
18345         * Make-lang.in: Building C++ code depends on cc1plus.
18346
18347 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18348
18349         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
18350         a HOST_WIDE_INT, not a tree.
18351
18352 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
18353
18354         * exception.cc: Don't include <stdlib.h>.
18355
18356         * Make-lang.in (c++.clean): Remove cplib2.*.
18357
18358 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
18359
18360         * parse.y (component_decl_1, component_costructor_declarator case):
18361         Pass attributes/prefix_attributes in tree list.
18362
18363 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
18364
18365         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
18366
18367 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
18368
18369         * lex.c (do_identifier): Don't do deferred lookup in a template
18370         header.
18371
18372         * typeck2.c (store_init_value): Oops.
18373
18374         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
18375         New files for C++ lang-support library.
18376         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
18377         (CXX_LIB2FUNCS): Define.
18378         And rules for building the C++ lang-support code.
18379         * config-lang.in (headers): Define.
18380         (lib2funcs): Define.
18381
18382 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
18383
18384         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
18385         digest_init.
18386         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
18387         * typeck2.c (store_init_value): Check for initializing pmf with { }
18388         here.
18389         (process_init_constructor): Not here.
18390
18391 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
18392
18393         * pt.c (begin_template_parm_list): Increment
18394         processing_template_decl here.
18395         (end_template_parm_list): Not here.
18396         (process_template_parm): No need to add 1 to it now.
18397         * *.c: Use processing_template_decl instead of current_template_parms
18398         to check for being in a template.
18399
18400         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
18401         (tsubst_copy): Handle CONSTRUCTOR.
18402         (instantiate_decl): Set up context properly for variables.
18403         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
18404         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
18405
18406 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18407
18408         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
18409
18410 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
18411
18412         * method.c (make_thunk): Call comdat_linkage before setting the
18413         TREE_CODE.
18414
18415         * decl2.c (comdat_linkage): Use make_decl_one_only.
18416         (import_export_decl): Likewise.
18417         * decl.c (init_decl_processing): Check supports_one_only instead of
18418         SUPPORTS_WEAK.
18419
18420 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
18421
18422         * decl2.c (grokfield): Tighten checking for access decls.
18423
18424         * decl.c (make_typename_type): Resolve references to
18425         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
18426         (lookup_name_real): Types that depend on a template parameter get
18427         an implicit 'typename' unless they're in the current scope.
18428         (start_decl_1): We don't care about incomplete types that depend
18429         on a template parm.
18430         (grokdeclarator): Resolve 'typename's in the type specifier that
18431         refer to members of the current scope.
18432
18433         * call.c (build_over_call): Remove 'inline called before
18434         definition' diagnostic.
18435         (build_method_call): Likewise.
18436         * decl.c (duplicate_decls): Downgrade 'used before declared
18437         inline' to a warning, only with -Winline.
18438
18439 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
18440
18441         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
18442
18443 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
18444
18445         * call.c (build_method_call): When calling a signature
18446         default implementation, as in other cases, let instance_ptr simply
18447         be instance.
18448
18449 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
18450
18451         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
18452
18453 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
18454
18455         * except.c (expand_start_catch_block): Add a pushlevel so that -g
18456         works on hppa and SPARC.
18457
18458 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18459
18460         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
18461
18462 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
18463
18464         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
18465         before testing whether it's a signature.
18466
18467 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
18468
18469         * call.c (build_new_method_call): Don't complain about signature
18470         pointers and references not being an aggr type.
18471         (build_this): If a signature pointer or reference was passed in,
18472         just return it.
18473         (build_new_method_call): If instance is a signature pointer, set
18474         basetype to the signature type of instance.
18475         * sig.c (build_signature_method_call): Deleted basetype and
18476         instance parameters, they can be found as the DECL_CONTEXT of
18477         function and as the first argument passed in.
18478         * cp-tree.h: Changed declaration of build_signature_method_call.
18479         * call.c (build_method_call): Deleted first two arguments in call
18480         of build_signature_method_call.
18481         (build_over_call): Added call to build_signature_method_call.
18482
18483 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
18484
18485         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
18486         target_expr.
18487
18488 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18489
18490         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
18491
18492 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
18493
18494         * except.c (expand_start_try_stmts): Move to except.c in the backend.
18495         (expand_end_try_stmts): Remove.
18496
18497         * init.c (perform_member_init): Use add_partial_entry () instead
18498         of directly manipulating lists.
18499         (emit_base_init): Likewise.
18500
18501 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
18502
18503         * except.c (expand_exception_blocks): Always make sure USE and
18504         CLOBBER insns that came at the end still do, the backend relies
18505         upon this.
18506
18507 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
18508
18509         * call.c (build_over_call): We can only use a TARGET_EXPR of the
18510         right type.
18511
18512 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
18513
18514         * cvt.c (convert_to_reference): Revert last change, don't complain
18515         about temp without target decl.
18516
18517 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
18518
18519         * decl.c (grokdeclarator): Don't core dump when void() is given.
18520
18521 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
18522
18523         * decl.c (copy_args_p): Don't crash.
18524
18525 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
18526
18527         * pt.c (tsubst): And support template args inside the exception
18528         specification.
18529
18530         * pt.c (tsubst): Add support for exception specifications in
18531         template functions.
18532
18533 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
18534
18535         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
18536         fields now.
18537         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
18538         (start_function): Likewise.
18539         (start_method): Likewise.
18540         (grokfield): Likewise.
18541         (make_call_declarator): Add throw spec parameter.
18542         (set_quals_and_spec): Add routine.
18543         * lex.c (set_quals_and_spec): Likewise.
18544         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
18545         * decl.c (shadow_tag): Eliminate the throw spec parameter to
18546         grokdeclarator.
18547         (groktypename): Likewise.
18548         (start_decl): Eliminate the throw spec parameter.  Eliminate the
18549         throw spec parameter to grokdeclarator.  Eliminate the throw spec
18550         field in DECL_STMT.
18551         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
18552         (grokfndecl): Remove useless set of raises.
18553         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
18554         the throw spec parameter to start_decl.  Pull the throw spec out
18555         of the call declarator.
18556         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
18557         (start_function): Eliminate the throw spec parameter.  Eliminate
18558         the throw spec parameter to grokdeclarator.
18559         (start_method): Likewise.
18560         * decl2.c (grokfield): Likewise.
18561         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
18562         (grokoptypename): Likewise.
18563         (finish_file): Eliminate the throw spec parameter to
18564         start_function.  Add throw spec to make_call_declarator.
18565         * except.c (init_exception_processing): Add throw spec to
18566         make_call_declarator.  Eliminate the throw spec parameter to
18567         start_decl.
18568         (expand_start_catch_block): Eliminate the throw spec parameter to
18569         grokdeclarator.
18570         (expand_builtin_throw): Add throw spec to make_call_declarator.
18571         Eliminate the throw spec parameter to start_function.
18572         (start_anon_func): Likewise.
18573         * lex.c (make_call_declarator): Add throw spec parameter.
18574         (set_quals_and_spec): New routine.
18575         (cons_up_default_function): Add throw spec to make_call_declarator.
18576         Eliminate the throw spec parameter to grokfield.
18577         * method.c (synthesize_method): Eliminate the throw spec parameter
18578         to start_function.
18579         * pt.c (process_template_parm): Eliminate the throw spec parameter
18580         to grokdeclarator.
18581         (tsubst): Add throw spec to make_call_declarator.
18582         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
18583         (do_function_instantiation): Eliminate the throw spec parameter to
18584         grokdeclarator.  Eliminate the throw spec parameter to
18585         start_function.
18586         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
18587         to start_function.
18588         * parse.y (datadef): Remove non-winning optimization.
18589         (decl): Likewise.
18590         (fndef): Remove ambiguous error productions uncovered by grammar
18591         fixing.
18592         (constructor_declarator): Add exception_specification_opt here.
18593         (component_constructor_declarator): Likewise.
18594         (direct_after_type_declarator): Likewise.
18595         (complex_direct_notype_declarator): Likewise.
18596         (direct_abstract_declarator): Likewise.
18597         (fn.def1): Remove exception_specification_opt.
18598         (fn.def2): Likewise.
18599         (condition): Likewise.
18600         (initdcl0): Likewise.
18601         (initdcl): Likewise.
18602         (notype_initdcl0): Likewise.
18603         (nomods_initdcl0): Likewise.
18604         (component_decl_1): Likewise.
18605         (component_declarator): Likewise.
18606         (after_type_component_declarator0): Likewise.
18607         (after_type_component_declarator): Likewise.
18608         (notype_component_declarator): Likewise.
18609
18610 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
18611
18612         * call.c (build_over_call): Also use an INIT_EXPR when
18613         initializing anything from an rvalue.
18614
18615         * call.c (build_over_call): Call stabilize_reference when building
18616         an INIT_EXPR instead of calling the copy ctor.
18617
18618         * call.c (joust): Extend the previous change to all comparisons.
18619
18620         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
18621         NO_LINKAGE_HEURISTICS.
18622
18623         * decl2.c (finish_file): Emit any statics that weren't already.
18624
18625         * typeck.c (build_static_cast): Implement.
18626         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
18627         * decl.c (grokparms): Use can_convert_arg instead of
18628         implicit_conversion directly.
18629         (copy_args_p): New fn.
18630         * cvt.c (convert_to_reference): Don't complain about temp with
18631         static_cast.
18632         (build_up_reference): Handle TARGET_EXPRs.
18633         * call.c (build_over_call): Elide unnecessary temps.
18634         (can_convert*): Use new overloading code.
18635
18636 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
18637
18638         * call.c: Move TYPE_PTR*_MACROS ...
18639         * cp-tree.h: To here.
18640         * typeck.c (build_reinterpret_cast): Implement.
18641
18642         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
18643         ptr_complete_ob.
18644         (joust): If we're comparing a function to a builtin and the worst
18645         conversion for the builtin is worse than the worst conversion for the
18646         function, take the function.
18647
18648         * typeck.c (build_const_cast): Implement.
18649         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
18650         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
18651
18652 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
18653
18654         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
18655         too early.  Make sure we explode if exprtype turns out to be a
18656         NULL_TREE when it shouldn't be.
18657
18658 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
18659
18660         * cp-tree.h: New routine make_call_declarator.
18661         * lex.c (make_call_declarator): Define it.
18662         * except.c (init_exception_processing): Use it.
18663         (expand_builtin_throw): Likewise.
18664         (start_anon_func): Likewise.
18665         * decl2.c (finish_file): Likewise.
18666         * lex.c (cons_up_default_function): Likewise.
18667         * parse.y: Likewise.
18668         * pt.c (tsubst): Likewise.
18669
18670 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
18671
18672         * decl2.c (groktypefield): Remove unused code.
18673
18674 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
18675
18676         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
18677         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
18678         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
18679         nonempty_cv_qualifiers.
18680         * hash.h: Rebuild.
18681
18682         * lex.c (make_pointer_declarator): Change type_quals into
18683         cv_qualifiers.
18684         (make_reference_declarator): Likewise.
18685
18686 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
18687
18688         * decl.c (start_function): Only check interface_* for templates
18689         with flag_alt_external_templates.
18690
18691         * call.c (build_new_op): Check for comparison of different enum types.
18692         (build_over_call): Fix arg # output.
18693
18694         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
18695
18696 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
18697
18698         * call.c (build_new_op): Check for erroneous args.
18699
18700         * call.c (build_new_method_call): Add missing args to cp_error.
18701
18702         * tree.c (error_type): Don't print reference-to-array.
18703
18704         * typeck.c (convert_for_assignment): Don't say contravariance for
18705         removing const.
18706
18707 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
18708
18709         * call.c (build_over_call): Diagnose bad convs for `this'.
18710
18711         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
18712         on _ctor_arg.
18713
18714         * call.c (convert_like): Handle bad convs.
18715         (build_over_call): Handle bad convs better.
18716
18717         * decl2.c: -fansi-overloading is now the default.
18718
18719         * call.c (build_new_method_call): Check for erroneous args.
18720
18721         * pt.c (instantiate_class_template): Propagate
18722         TYPE_USES_MULTIPLE_INHERITANCE.
18723
18724 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
18725
18726         * call.c (enforce_access): Add static to routine.
18727
18728 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
18729
18730         * call.c (build_user_type_conversion_1): Fix bad handling.
18731         (compare_ics): Likewise.
18732
18733 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
18734
18735         * call.c (standard_conversion): Oops.
18736
18737 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
18738
18739         * g++.c: Update test for win32 (&& ! cygwin32).
18740
18741 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
18742
18743         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
18744         (ptr_reasonably_similar): New fn.
18745         * call.c (BAD_RANK): New rank.
18746         (ICS_BAD_FLAG): New macro.
18747         (standard_conversion): Handle almost-right pointer conversions.
18748         (reference_binding): Handle bad rvalue bindings.
18749         (add_*_candidate): Stuff.
18750         (build_over_call): Pass bad conversions to convert_for_initialization.
18751         (compare_ics): Handle bad convs.
18752         (joust): Likewise.
18753
18754 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
18755
18756         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
18757         integer_type_node when computing pointer offsets.
18758
18759 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
18760
18761         * tree.c (lvalue_type): New fn.
18762         (error_type): New fn.
18763         * call.c (op_error): Use error_type.
18764         (add_conv_candidate): Use lvalue_type.
18765         (add_builtin_candidates): Likewise.
18766         * error.c (args_as_string): Use error_type.
18767
18768 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
18769
18770         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
18771         (tsubst): Not here.
18772
18773         * decl.c (init_decl_processing): With -ansi, __null's type is the
18774         signed integral type with the same number of bits as a pointer.
18775         Introduce a new variable null_node for it.
18776         * cp-tree.h: Adjust.
18777         * call.c (null_ptr_cst_p): Adjust.
18778
18779 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
18780
18781         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
18782         optimize.
18783
18784 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
18785
18786         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
18787         fns of classes without virtual functions.
18788
18789         * call.c (add_function_candidate): Handle `this' specially.
18790         (compare_ics): Likewise.
18791
18792 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
18793
18794         * typeck.c (build_conditional_expr): Fix handling of __null.
18795
18796         * decl2.c (comdat_linkage): New fn.
18797         (import_export_vtable): Use it.
18798         (import_export_decl): Use it.
18799         * method.c (make_thunk): Use it.
18800
18801 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
18802
18803         * pt.c (end_template_decl): If we don't actually have parms, return.
18804         * parse.y (template_header): Accept 'template <>'.
18805
18806         * errfn.c: Allow 5 args.
18807
18808 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
18809
18810         * tree.c (make_temp_vec): New fn.
18811         * pt.c (push_template_decl): Handle partial specs.
18812         (instantiate_class_template): Likewise.
18813         (more_specialized): Use get_bindings.
18814         (more_specialized_class): New fn.
18815         (get_class_bindings): New fn.
18816         (most_specialized_class): New fn.
18817         (do_function_instantiation): List candidates for ambiguous case.
18818         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
18819         (shadow_tag): Call push_template_decl for partial specializations.
18820         * parse.y: Likewise.
18821         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
18822         DECL_TEMPLATE_MEMBERS.
18823         * call.c (print_z_candidates): Reduce duplication.
18824
18825 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
18826
18827         * decl2.c (lang_decode_option): Allow -fansi-overloading.
18828
18829 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
18830
18831         * pt.c (get_bindings): New fn.
18832         (most_specialized): Likewise.
18833         (do_function_instantiation): Use them.
18834         (add_maybe_template): New fn.
18835         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
18836         * call.c (build_new_op): Handle guiding decls.
18837         (build_new_function_call): Likewise.
18838         * decl2.c (finish_file): Likewise.
18839
18840         * decl2.c (mark_used): Do synthesis here.
18841         * call.c (build_method_call): Not here.
18842         (build_over_call): Or here.
18843         * typeck.c (build_function_call_real): Or here.
18844         * tree.c (bot_manip): Call mark_used on functions used in default
18845         args.
18846
18847 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
18848
18849         * decl2.c (import_export_vtable): Delete code that disabled vtable
18850         heuristic on systems with ASM_OUTPUT_EXTERNAL.
18851
18852 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
18853
18854         * typeck.c (build_x_function_call): Handle static call context
18855         better.
18856
18857         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
18858         the function, not its outer block.
18859
18860         * call.c (build_field_call): Pass fields on to build_opfncall
18861         regardless of TYPE_OVERLOADS_CALL_EXPR.
18862         (build_method_call): Pass on to build_new_method_call sooner.
18863
18864         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
18865         gives us.
18866         * class.c (instantiate_type): Don't put a POINTER_TYPE to
18867         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
18868         modifying it.
18869
18870 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
18871
18872         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
18873         (add_builtin_candidate): Don't take enums for ++.
18874         (build_new_method_call): Handle non-aggregates and field calls.
18875         Move new overloading code from...
18876         * cvt.c: Here.
18877
18878         * decl.c (grokparms): Don't check default args in templates.
18879
18880 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
18881
18882         * cvt.c (build_new_op): Fix args to build_unary_op.
18883         (add_builtin_candidates): Don't call type_promotes_to on float.
18884
18885         * decl.c (grokparms): Check the type of the default arg.
18886
18887         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
18888         returning NULL_TREE.
18889
18890         * typeck.c (build_x_binary_op): Avoid doing extra work.
18891         (build_x_unary_op): Likewise.
18892         (build_x_conditional_expr): Likewise.
18893         * cvt.c (build_over_call): Return.
18894         (add_builtin_candidate): Fix MEMBER_REF.
18895         (build_new_op): Likewise.
18896
18897 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
18898
18899         * method.c (build_overload_name): Put bug fix into code but leave
18900         disabled for now so we can be bug compatible with older releases
18901         that do repeats incorrectly.  In the future, we can enable it.
18902
18903 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
18904
18905         * cvt.c (convert_like): Don't call build_cplus_new twice.
18906
18907         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
18908         Control new overloading code with -fansi-overloading.
18909
18910 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
18911
18912         * cvt.c (build_over_call): Call build_cplus_new.
18913         * call.c (build_method_call): Likewise.
18914         * typeck.c (build_function_call_real): Likewise.
18915         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
18916         the COND_EXPR in a TARGET_EXPR so they use the same slot.
18917
18918         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
18919         recursive calls.
18920         * typeck.c (complete_type): Propagate
18921         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
18922
18923 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
18924
18925         * cvt.c (joust): More ?: kludging.  Sigh.
18926         (build_over_call): Don't try to synthesize global fns.
18927
18928         * search.c (lookup_conversions): Use binfo marking.
18929
18930 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
18931
18932         * search.c (build_mi_matrix): Use the correct value of cid
18933         when determining the new mi_size.
18934
18935 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
18936
18937         * cvt.c (add_builtin_candidates): Do consider type conversion ops
18938         for the first parms of += et al.
18939         (strip_top_quals): New fn.
18940         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
18941         (implicit_conversion): Likewise.
18942         (add_builtin_candidates): Be careful about arrays.
18943         (build_new_method_call): Handle vtable optimization.
18944
18945 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
18946
18947         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
18948         * cvt.c (reference_binding): Use it.
18949         (implicit_conversion): Use it.
18950         (add_builtin_candidate, COND_EXPR): Use it.
18951
18952         * cvt.c (build_new_function_call): Check for error args.
18953
18954         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
18955
18956         * gxx.gperf: Add __null.
18957         * hash.h: Regenerate.
18958         * lex.h: Add RID_NULL.
18959         * lex.c (init_lex): Create null_pointer_node here, stick it in
18960         RID_NULL.
18961         * decl.c (init_decl_processing): Still set its type here.
18962         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
18963         (convert_to_pointer_force): Likewise.
18964         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
18965         if (! pedantic).
18966         * call.c (convert_harshness): Use null_ptr_cst_p.
18967         * typeck.c (convert_for_assignment): Likewise.  Don't produce
18968         null_pointer_node.
18969
18970         * error.c (args_as_string): Handle lists of actual args, too.
18971         * cvt.c (null_ptr_cst): Support (void*)0 for now.
18972         (build_user_type_conversion_1): Improve diagnostics.
18973         (build_new_function_call): Likewise.
18974         (build_object_call): Likewise.
18975         (build_new_method_call): Likewise.  Move call before def diagnostic...
18976         (build_over_call): Here.
18977
18978         * cvt.c (build_new_method_call): Don't complain about no match if
18979         LOOKUP_SPECULATIVELY.
18980         (build_over_call): Fix 'this' for virtual fn.
18981         (build_new_method_call): Add diagnostic.
18982
18983 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
18984
18985         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
18986         constructors to be passed in.
18987         (build_over_call): Likewise.
18988         (build_user_type_conversion_1): Pass them in.
18989         (convert_like): Likewise.
18990         (build_object_call): Handle overloaded conversions.
18991         (build_over_call): Pass the right args to build_vfn_ref.
18992         (standard_conversion): Fix pmf convs.
18993         (joust): Handle comparing statics and non-statics.
18994         (build_new_method_call): New fn.
18995         * call.c (build_method_call): Call it if NEW_OVER.
18996
18997 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
18998
18999         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
19000         %D instead.
19001
19002 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
19003
19004         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
19005         instead of just maybe_build_cleanup so that we deallocate the
19006         thrown object.
19007
19008 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19009
19010         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
19011         * cp-tree.h (finish_prevtable_vardecl): Add decl.
19012
19013 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
19014
19015         * pt.c (instantiate_class_template): Call complete_type.  Also, if
19016         we're at the end of the file and we just instantiated a template
19017         class with a vtable, call finish_prevtable_vardecl.
19018
19019         * error.c (dump_decl): Don't explode (or explode more gracefully
19020         as appropriate) if the object being dumped has a null type.
19021         (dump_expr): Likewise.
19022
19023         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
19024         by counting the number of nodes that we'll need before allocating
19025         the array.
19026         (lookup_fnfields): Fix comment.
19027         (breadth_first_search): Fix comment.
19028
19029 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
19030
19031         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
19032         TYPE_ALIGN.
19033         * class.c (finish_struct): Call cplus_decl_attributes here.
19034         (finish_struct_1): Not here.
19035         * cp-tree.h: Adjust.
19036
19037         * pt.c (type_unification): New parameter STRICT.
19038         (unify): If STRICT, don't allow cv addition or base deduction.
19039         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
19040
19041 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
19042
19043         * search.c (get_template_base{_recursive}): New fns.
19044         * pt.c (more_specialized): New fn.
19045         (do_function_instantiation): Use it.
19046         (unify): Handle base deduction.
19047         * cvt.c (joust): Use more_specialized.
19048         Don't arbitrarily choose between non-builtin candidates.
19049         (build_over_call): Call require_complete_type.
19050
19051         * decl.c (start_function): Statics are static even in a #pragma
19052         interface file.
19053
19054         * decl2.c (import_export_vtable): Disable vtable heuristic on
19055         systems with ASM_OUTPUT_EXTERNAL.
19056
19057         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
19058         (standard_conversion): No std conv to enum type.
19059
19060         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
19061         for ptm's.
19062
19063         * cvt.c (reference_binding): Bind directly to a base subobject of
19064         a class rvalue.
19065
19066         * cvt.c (build_new_op): Enforce access control.
19067
19068 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
19069
19070         * typeck2.c (process_init_constructor): When scanning the
19071         union for a named field, skip things that aren't FIELD_DECLs.
19072
19073         * method.c (synthesize_method): Don't scan fndecl's rtl if
19074         we're at the end of the file; just assume the function can't
19075         be inlined.
19076
19077 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
19078
19079         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
19080         it failed.
19081
19082         * cvt.c (build_user_type_conversion_1): Handle overloaded
19083         conversion ops.
19084
19085         * cvt.c (add_builtin_candidates): Don't consider type conversion
19086         operators for the first parameter of operator=.
19087
19088 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
19089
19090         * typeck.c (complete_type): Only call layout_type if we're not
19091         expanding a template.
19092
19093 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
19094
19095         * cvt.c (compare_ics): Oops.
19096
19097         * cvt.c (op_error): Oops.
19098
19099         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
19100         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
19101         (build_conv): Use them.
19102         (implicit_conversion): Use them.
19103         (convert_like): Handle them.
19104         (build_new_op): Handle builtin COND_EXPR again.
19105         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
19106         in lists of types for COND_EXPR.
19107         (add_builtin_candidate): Add enum candidates for COND_EXPR.
19108
19109 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
19110
19111         * typeck.c (build_modify_expr): Always attempt to build a call to
19112         the assignment operator, even if we're using a default one.
19113         (convert_for_initialization): Call complete_type.
19114
19115 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
19116
19117         * cvt.c (reference_binding): A REF_BIND gets the reference type.
19118         (implicit_conversion): Likewise.
19119         (convert_like): Likewise.
19120         (compare_ics): Likewise.
19121         (compare_qual): Likewise.
19122         (print_z_candidates): Handle no candidates.
19123         (build_new_op): Don't handle builtin COND_EXPR for now.
19124
19125 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
19126
19127         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
19128
19129 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
19130
19131         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
19132
19133         * cvt.c (build_builtin_candidate): Oops.
19134         (build_new_op): Oops.
19135
19136         * method.c (build_opfncall): Pass COND_EXPR on.
19137         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
19138         (add_builtin_candidate{,s}): Likewise.
19139         (add_builtin_candidates): Likewise.
19140         (print_z_candidates, op_error, build_new_op): Likewise.
19141         (type_decays_to): New fn.
19142         * lex.c (init_lex): Just say ?: for COND_EXPR.
19143
19144 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
19145
19146         * typeck.c (complete_type): Call layout_type rather than building
19147         a new array type.
19148
19149         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
19150         only use ptrdiff_t.
19151
19152 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
19153
19154         * cvt.c: Always compile the new overloading code (but don't use it).
19155         (implicit_conversion): Add a BASE_CONV when converting to
19156         the same class type.
19157         (convert_like): Handle BASE_CONV.
19158
19159 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
19160
19161         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
19162         (add_builtin_candidate): Likewise.
19163
19164         NEW_OVER changes:
19165         * typeck.c (build_x_function_call): Try an operator function
19166         whenever we call an object of class type.
19167         * method.c (build_opfncall): Pass CALL_EXPRs through.
19168         * cvt.c (implicit_conversion): Do const-ref case first.
19169         (add_conv_candidate, build_object_call, op_error): New fns.
19170         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
19171         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
19172         builtin candidates.
19173         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
19174         Fall back on preincrement handling.  Use op_error.
19175         Handle warn_synth.
19176         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with
19177         an error_mark_node.
19178         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
19179         properly.
19180
19181 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
19182
19183         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
19184
19185 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
19186
19187         * typeck.c (build_component_ref_1): Use build_component_ref
19188         instead of open coding it here.
19189
19190 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
19191
19192         * g++.c (main): Don't link with -lg++.
19193
19194         NEW_OVER changes:
19195         * cvt.c (convert_to_reference): Don't use convert_from_reference on
19196         result of build_type_conversion.
19197         (cp_convert): Only call build_method_call for ctors if
19198         build_type_conversion failed.
19199         (ptr_complete_ob): New function.
19200         (TYPE_PTR{,OB,MEM}_P): New macros.
19201         ({add,build}_builtin_candidate{,s}): New functions.
19202         (print_z_candidates): Handle builtins.
19203         (build_user_type_conversion_1): Don't use conversion fns for
19204         converting to a base type.
19205         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
19206         (build_user_type_conversion): Use convert_from_reference.
19207         (build_new_op): New function.
19208         (build_over_call): Fix handling of methods.
19209         (compare_ics): Handle AMBIG_CONV properly.
19210         * typeck2.c: Increment abort count.
19211         * method.c (build_opfncall): Forward most requests to build_new_op.
19212         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
19213
19214 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19215
19216         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
19217         invalid second argument to dump_expr_list.
19218
19219 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
19220
19221         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
19222
19223 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
19224
19225         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
19226         ASSEMBLE_EXTERNAL.
19227
19228 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
19229
19230         * typeck2.c (process_init_constructor): New pedwarn for using { }
19231         to initialize a pointer to member function.
19232         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
19233         we can avoid the new error.
19234
19235 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
19236
19237         * typeck.c (build_ptrmemfunc1): New function to hide details of
19238         pointer to member functions better.
19239
19240 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
19241
19242         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
19243         methods into the actual method, as we know the implied object is
19244         not used.
19245
19246 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19247
19248         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
19249         inside a system header.
19250
19251 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
19252
19253         * call.c (build_method_call): Call complete_type on the
19254         instance type.
19255
19256 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
19257
19258         * typeck.c (build_component_ref): Always build up an OFFSET_REF
19259         for obj_ptr->func so that we can know which object to use in a
19260         method call.
19261
19262 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
19263
19264         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
19265         around things.  Also improve maintainability.
19266
19267 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
19268
19269         * decl.c (grokdeclarator): Check for overflow when evaluating an
19270         array dimension.
19271
19272 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
19273
19274         * cvt.c (cp_convert): Don't check for ambiguity with constructor
19275         if NEW_OVER.
19276
19277         * typeck.c (build_x_function_call): Pass function overload
19278         questions to new overloading code if NEW_OVER.
19279         * init.c (expand_aggr_init_1): Only check for type conversion ops
19280         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
19281         Don't check for ambiguity with constructor if NEW_OVER.
19282         * cvt.c (convert_to_reference): Dereference the result of a type
19283         conversion operator.
19284         (build_conv): Propagate ICS_USER_FLAG.
19285         (implicit_conversion): Call instantiate_type.
19286         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
19287         (add_function_candidate): Fix cv-quals on argtype.
19288         (print_z_candidates): New function.
19289         (build_new_function_call): Call it.
19290         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
19291         consider non-converting constructors.
19292         Call print_z_candidates.
19293         Return an AMBIG_CONV for an ambiguous conversion.
19294         (build_user_type_conversion): Handle AMBIG_CONV.
19295         (convert_like): Fix test for building TARGET_EXPR.
19296         Call instantiate_type.
19297         Handle AMBIG_CONV and LVALUE_CONV.
19298         (build_over_call): Handle 0 args and ellipsis.
19299         * cp-tree.def: Add AMBIG_CONV.
19300
19301 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
19302
19303         * decl.c (lookup_name_real): If we find mem in obj when parsing
19304         `obj->mem', make sure we return the right value.
19305
19306 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
19307
19308         * search.c (get_base_distance): Call complete_type.
19309
19310 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
19311
19312         * decl.c (store_bindings): Make static.
19313
19314 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
19315
19316         * init.c (expand_aggr_init_1): Don't check type conversions if
19317         NEW_OVER.
19318
19319         * cvt.c (z_candidate): Put back template field.
19320         (add_function_candidate): Set it.
19321         (add_template_candidate): Likewise.
19322         (joust): Use it.
19323         (compare_qual): Handle references and pointers to members.
19324         (compare_ics): Handle reference bindings.
19325
19326         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
19327
19328 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
19329
19330         * call.c (compute_conversion_costs): Call complete_type.
19331
19332         * tree.c (vec_binfo_member): Use comptypes instead of comparing
19333         pointers, so we can handle template parameters.
19334
19335 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
19336
19337         * cvt.c (cp_convert_to_pointer): We have to call complete_type
19338         here; let's make it explicit instead of a side effect of an
19339         error check.
19340
19341 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
19342
19343         * cvt.c (z_candidate): Remove template field.
19344         (reference_binding): Handle binding to temporary.
19345         (implicit_conversion): Likewise.
19346         (add_function_candidate): Handle artificial constructor parms.
19347         Handle functions with too few parms.
19348         (add_template_candidate): New function.
19349         (build_user_type_conversion_1): Handle constructors.
19350         (convert_like): Likewise.
19351         (build_over_call): Likewise.
19352         (build_new_function_call): Support templates.
19353         (compare_ics): Fix reference, inheritance handling.
19354
19355 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
19356
19357         * decl.c: Add signed_size_zero_node.
19358         (init_decl_processing): Build it.
19359         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
19360         when we're trying to make a negative delta.
19361
19362 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19363
19364         Stop doing this damn index==strchr variable name confusion.
19365         * class.c (add_virtual_function): Change local var INDEX to be
19366         named IDX.
19367         (add_method): Likewise.
19368         * lex.c (print_parse_statistics): Likewise.
19369         * search.c (make_memoized_table_entry): Likewise.
19370         (lookup_fnfields_here): Likewise.
19371         (lookup_field): Likewise.
19372         (lookup_fnfields): Likewise.
19373         (get_baselinks): Likewise.
19374         * sig.c (build_signature_table_constructor): Likewise.
19375         (build_signature_method_call): Likewise.
19376         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
19377         (get_member_function_from_ptrfunc): Likewise.
19378         (build_ptrmemfunc): Change local var INDEX to be IDX.
19379         (c_expand_start_case): Likewise.
19380
19381 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
19382
19383         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
19384         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
19385         (convert_to_reference): Use build_type_conversion to convert to
19386         the reference type directly.
19387         (standard_conversion): Fix void* case, non-conversions.
19388         (reference_binding): Fix expr == 0 case, non-conversions.
19389         (convert_like): Support REF_BIND.
19390         (compare_qual): Split out from compare_ics.
19391         (compare_ics): Use it, handle icses with only a qual_conv.
19392
19393         * init.c (expand_vec_init): Don't crash if decl is NULL.
19394
19395 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
19396
19397         * mpw-config.in: New file, configury for Mac MPW.
19398         * mpw-make.sed: New file, makefile editing for MPW.
19399
19400 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
19401
19402         * pt.c (instantiate_class_template): Call repo_template_used.
19403
19404         * search.c (lookup_conversions): Only lookup conversions in
19405         complete types.
19406
19407 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19408
19409         * cp-tree.def: Renamed from tree.def, to avoid confusion with
19410         gcc's tree.def.
19411         * cp-tree.h, lex.c: Include cp-tree.def.
19412         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
19413
19414 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
19415
19416         * init.c (build_vec_delete_1): Call complete_type.
19417
19418 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
19419
19420         * except.c (start_anon_func): Make sure anonymous functions are
19421         never external.
19422
19423 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
19424
19425         * decl.c (finish_function): If function_depth > 1, set nested.
19426
19427         * decl2.c (grokbitfield): Revert Bob's change.
19428         * class.c (finish_struct_1): Fix handling of named bitfield widths.
19429
19430 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
19431
19432         * pt.c (add_pending_template): Handle types.
19433         (lookup_template_class): With -fexternal-templates, just add the class
19434         to pending_templates instead of instantiating it now.
19435         * decl2.c (finish_file): Handle types in pending_templates.
19436
19437 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
19438
19439         * decl2.c (grokbitfield): Handle constant decls appropriately.
19440         Give an appropriate error message now instead of spewing core
19441         later.
19442
19443 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
19444
19445         * decl2.c: Don't turn on thunks by default for now.
19446
19447 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
19448
19449         * typeck.c (complete_type): Handle error_mark_node.
19450         (common_type, OFFSET_TYPE): Handle template_type_parms.
19451
19452 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
19453
19454         * pt.c (instantiate_decl): If at_eof, call import_export_decl
19455         regardless of DECL_INLINE.
19456
19457         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
19458
19459         * class.c (finish_struct_bits): Copy TYPE_SIZE.
19460
19461         * rtti.c (build_dynamic_cast): Support templates.
19462         * tree.def: Support DYNAMIC_CAST_EXPR.
19463         * pt.c (tsubst_copy): Likewise.
19464         * decl2.c (build_expr_from_tree): Likewise.
19465
19466 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
19467
19468         * typeck.c (build_static_cast): Support templates.
19469         (build_const_cast): Likewise.
19470         * tree.def: Support CONST/STATIC_CAST_EXPR.
19471         * pt.c (tsubst_copy): Likewise.
19472         * decl2.c (build_expr_from_tree): Likewise.
19473
19474 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
19475
19476         * decl2.c (finish_vtable_vardecl): Don't trust
19477         TREE_SYMBOL_REFERENCED for vtables of local classes.
19478
19479 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
19480
19481         * pt.c (tsubst_copy): Handle operator T.
19482
19483 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19484
19485         * init.c (build_delete): Move creation of PARMS inside test of
19486         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
19487
19488 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
19489
19490         * typeck.c (build_conditional_expr): Don't assume that
19491         the arguments to ?: are always pointers or records.
19492
19493 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
19494
19495         * decl2.c (import_export_decl): Still emit static/weak/comdat
19496         copies of inline template functions with -fno-implicit-templates.
19497
19498 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
19499
19500         * init.c (build_delete): Determine the complete basetype
19501         path to the destructor we're calling.
19502
19503 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
19504
19505         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
19506         initialize the enum, because we really and truly don't know where
19507         it came from.
19508         (start_enum): Don't copy integer_zero_node because
19509         build_enumerator will do it.
19510
19511 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
19512
19513         * decl.c (finish_function): Do access control on base destructors.
19514
19515         * pt.c (tsubst, case FUNCTION_DECL): Set up
19516         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
19517         hose us.
19518
19519 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
19520
19521         * cvt.c (build_up_reference): If we have already extended the
19522         lifetime of the temporary, don't try it again.
19523         * typeck.c (c_expand_return): Don't try and convert the return
19524         value twice when we want a reference, once is enough.
19525
19526 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
19527
19528         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
19529         LOOKUP_ONLYCONVERTING at all for now.
19530
19531         * search.c (add_conversions): Put the conversion function in
19532         TREE_VALUE, the basetype in TREE_PURPOSE.
19533         * cvt.c (build_type_conversion): Adjust.
19534         * cvt.c (build_expr_type_conversion): Adjust.
19535         * call.c (user_harshness): Adjust.
19536
19537 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
19538
19539         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
19540         backend's benefit.
19541
19542 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
19543
19544         * except.c (expand_start_catch_block): Add a dummy region, if we
19545         get an error, so that we can avoid core dumping later.
19546
19547 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
19548
19549         * cp-tree.h (OFFSET_REF): Remove.
19550         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
19551         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
19552         * init.c (expand_aggr_init_1): Likewise.
19553         (build_new): Likewise.
19554         * typeck.c (expand_target_expr): Likewise.
19555
19556 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
19557
19558         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
19559         TARGET_EXPR.
19560
19561 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
19562
19563         * cvt.c (build_up_reference): Redo how and when temporaries are
19564         created.
19565         * decl.c (grok_reference_init): Don't try and be smart about
19566         running cleanups.
19567
19568 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
19569
19570         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
19571         (TARGET_EXPR...), now that it has 4 arguments.
19572         * tree.c (build_cplus_new): Likewise.
19573
19574 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
19575
19576         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
19577
19578         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
19579         * decl.c (struct saved_scope): Remove named_labels,
19580         {base,member}_init_list.
19581         (maybe_push_to_top_level): Don't set them.  Call
19582         push_cp_function_context if appropriate.
19583         (pop_from_top_level): Likewise.
19584
19585         * method.c (do_build_assign_ref): Remove obsolete check of
19586         TYPE_HAS_ASSIGN_REF (basetype).
19587
19588         * decl.c (grokfndecl): Diagnose user definition of
19589         implicitly-declared methods.
19590
19591 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
19592
19593         * method.c (do_build_copy_constructor): Add code to give
19594         meaningful error messages instead of crashing.
19595         (do_build_assign_ref): Don't synthesize assignment operators for
19596         classes containing reference or const members.
19597
19598         * class.c (struct base_info): Remove cant_synth_copy_ctor
19599         and cant_synth_asn_ref.
19600         (finish_base_struct): Remove the code that tries to conditionalize
19601         synthesis of copy constructors & assignment operators based on
19602         access permissions.  Instead, let it fail when it tries to
19603         synthesize the copy constructor.  This will give meaningful error
19604         messages instead of silently generating code to perform a bitcopy.
19605
19606 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
19607
19608         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
19609         determining types for constant values.
19610
19611         * decl.c (struct named_label_list): Use instead of stuffing
19612         random items into a TREE_LIST node.
19613         (named_label_uses): Use the new struct.
19614         (poplevel): Likewise.
19615         (lookup_label): Likewise.
19616         (define_label): Add an error message to tell the user the line
19617         where the goto is located in addition to the destination of the
19618         goto.
19619         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
19620         named_label_uses.
19621         (finish_function): Likewise.
19622
19623         (start_decl): Complain about defining a static data member
19624         in a different type from which it was declared.
19625
19626 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
19627
19628         * cvt.c (build_expr_type_conversion): Adjust.
19629
19630 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
19631
19632         * call.c (build_method_call): Always convert 'this' to the
19633         appropriate type.
19634
19635         * search.c (add_conversions): Put the conversion function in
19636         TREE_VALUE, the type in TREE_PURPOSE.
19637         * cvt.c (build_type_conversion): Adjust.
19638         * call.c (user_harshness): Adjust.
19639
19640         * method.c (emit_thunk): Call temporary_allocation and
19641         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
19642
19643         * tree.c (build_cplus_array_type): Handle tweaking of
19644         TYPE_MAIN_VARIANT here.
19645         * typeck.c (common_type): Not here.
19646
19647         * typeck.c (complete_type): Only try to complete an array type if
19648         it has a domain.
19649
19650 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
19651
19652         * decl.c (grokvardecl): Call complete_type.
19653         (grokdeclarator): Call complete_type for PARM_DECLs.
19654
19655 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
19656
19657         * pt.c (instantiate_class_template): Re-set
19658         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
19659
19660 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
19661
19662         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
19663         smart enough to do it right.
19664         * tree.c (cp_expand_decl_cleanup): Likewise.
19665         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
19666         cp_expand_decl_cleanup.
19667         (store_parm_decls): Likewise.
19668         (hack_incomplete_structures): Likewise.
19669         * except.c (push_eh_cleanup): Likewise.
19670
19671 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
19672
19673         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
19674         frontend to the backend where it belongs.
19675         * tree.c (unsave_expr): Likewise.
19676         (unsave_expr_now): Likewise.
19677         * tree.def (UNSAVE_EXPR): Likewise.
19678         * cp-tree.h (unsave_expr): Likewise.
19679         (unsave_expr_now): Likewise.
19680
19681 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
19682
19683         * init.c (emit_base_init): Make sure the partial EH cleanups live
19684         on the function_obstack.
19685
19686 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
19687
19688         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
19689         when checking for pointer types.
19690
19691 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
19692
19693         * pt.c (instantiate_class_template): Remove obsolete check for
19694         access declarations.
19695
19696 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
19697
19698         * call.c (build_overload_call): Simplify calls to
19699         build_overload_call by removing last parameter.
19700         (build_method_call): Likewise.
19701         * cp-tree.h: Likewise.
19702         * method.c (build_opfncall): Likewise.
19703         * typeck.c (build_x_function_call): Likewise.
19704
19705 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
19706
19707         * call.c (default_parm_conversions): Factor out common code.
19708         (build_method_call): Use it.
19709         (build_overload_call_real): Use it.
19710
19711 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
19712
19713         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
19714         but pedwarn as the code is bogus.
19715         * typeck.c (decay_conversion): Likewise.
19716         (build_function_call_real): Use build_addr_func instead of
19717         default_conversion.  Don't allow pointer-to-method functions down
19718         here.
19719         (build_unary_op): Use real pointer-to-member functions instead of
19720         fake ones.
19721         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
19722         (convert_for_assignment): Removed some obsolete code.
19723         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
19724         build_x_function_call instead of current_class_ptr.  Only call
19725         digest_init once on an initializer, we do this just checking
19726         TREE_TYPE.
19727         (build_expr_from_tree): Pass current_class_ref to
19728         build_x_function_call instead of current_class_ptr.
19729         * init.c (build_member_call): Likewise.
19730         * pase.y: Likewise.
19731         * error.c (dump_expr): Handle OFFSET_REFs better.
19732         * pt.c (unify): Handle pointer-to-member functions better.
19733         * decl.c (finish_function): Clear out current_class_ref just like
19734         we do for current_class_ptr.
19735
19736         * typeck.c (get_delta_difference): Handle virtual bases better.
19737
19738 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
19739
19740         * sig.c (build_signature_table_constructor): Use the delta for
19741         the original basetype for this virtual function with thunks.
19742         (build_signature_method_call): We still need to adjust 'this'
19743         with thunks.
19744
19745 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
19746
19747         * call.c (build_addr_func): New routine.  Used to get the `real'
19748         address of a function or a method.  Needed to avoid getting a
19749         pointer-to-member function.
19750         (build_call): New routine to build CALL_EXPRs.
19751         (build_method_call): Use it.
19752         * cvt.c (convert_to_aggr): Likewise.
19753         * typeck.c (build_function_call_real): Likewise.
19754         * sig.c (build_signature_table_constructor): Use build_addr_func.
19755         * cp-tree.h (build_call, build_addr_func): Declare them.
19756
19757 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
19758
19759         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
19760         * parse.y: Remove uses of LOOKUP_AGGR.
19761
19762 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
19763
19764         * *.[chy]: Rename current_class_decl to current_class_ptr, and
19765         C_C_D to current_class_ref.
19766
19767 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
19768
19769         * call.c (convert_harshness): Tighten up pointer conversions.
19770
19771 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
19772
19773         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
19774         (finish_file): Likewise.
19775
19776 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
19777
19778         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
19779
19780         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
19781         code.
19782
19783 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
19784
19785         * decl2.c: Turn on thunks by default where supported.
19786
19787 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
19788
19789         * cp-tree.h (build_overload_call_maybe): Removed.
19790         * call.c (build_overload_call_real): Invert meaning of last arg to
19791         be require_complete.
19792         (build_overload_call): Likewise.
19793         * typeck.c (build_x_function_call): Use build_overload_call_real
19794         instead of build_overload_call_maybe.
19795
19796 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
19797
19798         * decl2.c (finish_file): Don't try to emit functions that haven't
19799         been compiled.
19800
19801 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
19802
19803         * decl2.c (finish_vtable_vardecl): Oops.
19804
19805         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
19806         Also store the bindings from previous_class_values.
19807         (pop_from_top_level): Restore them.
19808
19809 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
19810
19811         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
19812         symbol has been referenced.
19813         (finish_file): Re-join synthesis/vtable loop with inline emission
19814         loop, disable inlining when an inline is output.
19815
19816 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
19817
19818         * except.c (init_exception_processing): Setup saved_in_catch.
19819         (push_eh_cleanup): Reset __eh_in_catch.
19820         (expand_start_catch_block): Set __eh_in_catch.
19821
19822 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
19823
19824         * except.c (push_eh_cleanup): Add tracking for whether or not we
19825         have an active exception object.
19826         (expand_builtin_throw): Use it to make sure a rethrow without an
19827         exception object is caught.
19828
19829 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
19830
19831         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
19832         cache.
19833
19834 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
19835
19836         * decl2.c (finish_file): Also use sentries for vars with
19837         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
19838         created).
19839
19840         * lex.c (handle_cp_pragma): Disable #pragma
19841         interface/implementation if SUPPORTS_ONE_ONLY > 1.
19842
19843 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
19844
19845         * method.c (emit_thunk): Wrap default case in
19846         temporary/permanent_allocation.
19847
19848         * method.c (make_thunk): Use DECL_ONE_ONLY.
19849         (emit_thunk): Call assemble_end_function.
19850
19851 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
19852
19853         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
19854         (import_export_decl): Likewise.
19855         (finish_prevtable_vardecl): Disable vtable hack if
19856         SUPPORTS_ONE_ONLY > 1.
19857
19858 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
19859
19860         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
19861         PREDECREMENT_EXPRs take two arguments, not one.
19862
19863 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
19864
19865         * class.c (build_vtable_entry): Don't build thunks for abstract
19866         virtuals.
19867
19868         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
19869         frontend.
19870
19871 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
19872
19873         * class.c (set_rtti_entry): Use size_zero_node.
19874         (build_vtable): Likewise.
19875
19876 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
19877
19878         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
19879         (prepare_fresh_vtable): Likewise.
19880
19881 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
19882
19883         * method.c (emit_thunk): Call mark_used on the target function.
19884
19885         * call.c (build_method_call): Don't warn about pending templates.
19886
19887 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
19888
19889         * decl2.c (finish_file): Fix list walking logic.
19890
19891         * typeck2.c (check_for_new_type): Only warn if -pedantic.
19892
19893 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
19894
19895         * class.c (finish_struct_1): Remove old code for
19896         dont_allow_type_definitions.
19897         * cp-tree.h: Likewise.
19898         * spew.c: Make sure cp-tree.h is included before parse.h, so the
19899         definition of flagged_type_tree is found before it is used.
19900         * lex.c: Likewise.
19901         * parse.y: Added the ftype member to the type union, and changed a
19902         number of rules to use it instead of ttype.  Added calls to
19903         check_for_new_type() as appropriate.
19904         * typeck2.c (check_for_new_type): New function for checking
19905         if a newly defined type appears in the specified tree.
19906         * cp-tree.h: Add new type flagged_type_tree.  Add a prototype
19907         for check_for_new_type().
19908
19909 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
19910
19911         * decl2.c (finish_file): Only use a sentry if the decl is public.
19912
19913         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
19914         don't pass LOOKUP_ONLYCONVERTING.
19915
19916 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
19917
19918         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
19919         properly keeps track of const and volatile type modifiers.
19920
19921 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
19922
19923         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
19924         * pt.c (comp_template_args): Use it.
19925
19926         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
19927         assemble_external for artificial function decls.
19928
19929         * decl.c (cp_finish_decl): Oops.
19930
19931 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
19932
19933         * decl2.c (import_export_decl): Put static data member templates
19934         into common storage, or make them weak, depending on whether they
19935         are dynamically or statically initialized.
19936         (get_sentry): New function.
19937         (finish_file): Do import_export_decl for static data members before
19938         building the init/fini functions.  Don't init/fini a variable that's
19939         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
19940         push/pop_temp_slots.
19941         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
19942         expand_static_init thang.
19943         * method.c (get_id_2): New function.
19944
19945 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
19946
19947         * parse.y (empty_parms): Make sure we use C++-style prototypes
19948         when we're declaring member functions.
19949
19950 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
19951
19952         * Makefile.in (CONFLICTS): 16 s/r conflicts.
19953         * parse.y (self_template_type): New nonterminal.
19954
19955 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
19956
19957         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
19958         name.
19959         * parse.y (base_class.1): Allow 'typename foo::bar'.
19960
19961         * lex.c (check_newline): Remove #pragma code that plays with the
19962         input stream, since we now deal with tokens.  Clear nextchar when
19963         we're done.
19964         (handle_cp_pragma): Use real_yylex.
19965         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
19966         in one place.
19967
19968         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
19969
19970         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
19971
19972 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
19973
19974         * parse.y: New token SELFNAME for potential constructor.
19975         * spew.c (yylex): Handle it.
19976         * lex.c (identifier_type): Produce it.
19977
19978         * parse.y (complete_type_name): In :: case, don't push class binding.
19979         (complex_type_name): Likewise.
19980
19981 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
19982
19983         * typeck.c (build_reinterpret_cast): Handle pointer to member
19984         functions.
19985
19986 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19987
19988         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
19989         pragmas.
19990         (check_newline): Put the vtable/unit/implementation/interface pragma
19991         code into handle_cp_pragma, replacing it with a call.
19992         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
19993         args.  Get the next token after handling the pragma token.
19994
19995 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
19996
19997         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
19998         (convert_to_pointer_force): Likewise.
19999
20000         * init.c (build_new): Fix array new without -fcheck-new.
20001
20002 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
20003
20004         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
20005         tree.c: Lose TYPE_NESTED_NAME.
20006
20007         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
20008         as identifiers.
20009
20010         * tree.def: Add VEC_INIT_EXPR.
20011         * expr.c (cplus_expand_expr): Handle it.
20012         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
20013         the extra file-scope symbol nastiness.
20014
20015 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
20016
20017         * method.c (make_thunk): Thunks are static.
20018         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
20019
20020         * decl2.c (mark_vtable_entries): Emit thunks as needed.
20021         (finish_file): Don't emit them here.
20022
20023 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
20024
20025         * rtti.c (build_dynamic_cast): Handle null pointers.
20026         (ifnonnull): New function.
20027
20028 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
20029
20030         * call.c (build_method_call): Remember the original basetype we
20031         were called with.  Give an error message instead of trying
20032         (incorrectly) to call a non-static member function through a
20033         non-inherited class.
20034
20035         * search.c (expand_upcast_fixups): Mark the new fixup as
20036         DECL_ARTIFICIAL.
20037
20038 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
20039
20040         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
20041
20042         * class.c (set_rtti_entry): Fix for thunks.
20043
20044         * decl2.c (import_export_decl): Still emit typeinfo fns for
20045         cv-variants of builtin types.
20046
20047         * rtti.c (expand_class_desc): Set up base_info_type_node here.
20048         (init_rtti_processing): Instead of here.
20049
20050 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
20051
20052         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
20053         (build_typeid): Only complain about taking dynamic typeid without
20054         -frtti.
20055
20056         * decl2.c: flag_rtti defaults to 1.
20057
20058         * rtti.c (get_tinfo_var): The general class case is now smaller.
20059         (init_rtti_processing): Pack the latter three fields of base_info
20060         into 32 bits.
20061
20062 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
20063
20064         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
20065
20066 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
20067
20068         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
20069         (push_memoized_context): Split out code to undefer pop_type_level to
20070         (clear_memoized_cache): here.
20071         (pop_memoized_context): We can only handle one layer of deferral of
20072         pop_type_level so clear the cache, if there was a previous level.
20073
20074 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
20075
20076         * rtti.c (init_rtti_processing): Build up base_info_type_node.
20077         (expand_class_desc): Use one pointer to an array of base_info
20078         structs, passed using a CONSTRUCTOR.
20079
20080 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
20081
20082         * class.c (build_vbase_path): Remove block extern for
20083         flag_assume_nonnull_objects here.
20084         (build_vfn_ref): Split out functionality into build_vtbl_ref.
20085         (build_vtbl_ref): New routine.
20086         (build_vtable): Set up rtti info here.
20087         (add_virtual_function): Note in CLASSTYPE_RTTI the best
20088         place where we can get the rtti pointers from to avoid having to
20089         search around for a place.
20090         (finish_base_struct): Likewise.
20091         (finish_struct_1): Likewise.  Never create totally new vtables
20092         with totally new vtable pointers for rtti.  Disable code to layout
20093         vtable pointers better until we want to break binary
20094         compatibility.
20095         * rtti.c (build_headof_sub): New routine to convert down to a
20096         sub-object that has an rtti pointer in the vtable.
20097         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
20098         maintainable.
20099         (build_dynamic_cast): Make sure we have saved it, if we need to.
20100         * search.c (dfs_init_vbase_pointers): Disable code that deals with
20101         a more efficient vtable layout, enable later.
20102         * call.c (flag_assume_nonnull_objects): Moved declaration to
20103         * cp-tree.h: here.  Declare build_vtbl_ref.
20104         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
20105         function calls that want a tree.
20106
20107 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
20108
20109         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
20110         other X subobjects in the most derived type.  Ack.
20111
20112         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
20113         get_typeid will do it for us.
20114         (get_typeid_1): Break out call-building for expand_*_desc to use.
20115         (get_typeid): Call it.
20116         (expand_*_desc): Likewise.
20117         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
20118         and void *.
20119         (init_decl_processing): Lose builtin_type_tdescs lossage.
20120         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
20121
20122 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
20123
20124         * pt.c (tsubst): When calling set_nested_typename, use
20125         TYPE_NESTED_NAME (current_class_type) instead of
20126         current_class_name.
20127
20128         * decl.c (pushdecl): Likewise.
20129         (pushdecl_class_level): Likewise.
20130         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
20131         set_nested_typename.
20132
20133 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
20134
20135         * rtti.c (synthesize_tinfo_fn): Handle arrays.
20136
20137         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
20138
20139 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
20140
20141         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
20142         (init_rtti_processing): Lose bad_cast_type.
20143         (build_dynamic_cast): Use throw_bad_cast.
20144
20145         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
20146
20147         * decl2.c (finish_file): Don't synthesize artificial functions
20148         that are external and not inline.
20149
20150         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
20151
20152         * decl2.c (finish_file): Handle having new inlines added to
20153         saved_inlines by synthesis.
20154
20155         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
20156
20157 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
20158
20159         RTTI rewrite to initialize nodes as needed, not require that
20160         users #include <typeinfo>, complete functionality and reduce wasted
20161         space.
20162         * rtti.c (init_rtti_processing): New fn.
20163         (build_typeid): The vtable entry is now a function.
20164         (get_tinfo_var): New fn.
20165         (get_tinfo_fn): Likewise.
20166         (get_typeid): Use it.
20167         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
20168         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
20169         points __rtti_*.
20170         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
20171         (synthesize_tinfo_fn): New fn.
20172         * method.c (build_t_desc_overload): Lose.
20173         (build_overload_with_type): More generic.
20174         * decl.c (init_decl_processing): Call init_rtti_processing.
20175         * class.c (set_rtti_entry): Use get_tinfo_fn.
20176         * decl2.c (mark_vtable_entries): Mark the rtti function.
20177         (finish_prevtable_vardecl): Don't build_t_desc.
20178         (import_export_decl): Handle tinfo functions.
20179         (finish_file): Likewise.
20180         * typeck.c (inline_conversion): New fn.
20181         (build_function_call_real): Use it.
20182         * cp-tree.h: Add decls.
20183
20184         * method.c (hack_identifier): Also convert component_refs from
20185         references.
20186
20187         * lex.c (cons_up_default_function): Use the type, not the name, in
20188         declspecs.
20189
20190         * decl2.c (import_export_vtable): Fix weak vtables.
20191
20192 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
20193
20194         * search.c (get_base_distance_recursive): Fix access checks for
20195         protected bases.
20196
20197 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20198
20199         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
20200         cp-tree.h.
20201         (convert_harshness): Add prototypes wrapped by PROTO.
20202         * decl2.c (grok_function_init): Likewise.
20203         (do_toplevel_using_decl): Change to void return type.
20204         * class.c (build_vtable_entry): Remove decl of make_thunk.
20205         (merge_overrides): Fix order of arg definitions.
20206         (finish_vtbls): Likewise.
20207         (fixup_vtable_deltas): Likewise.
20208         (modify_all_direct_vtables): Likewise.
20209         (modify_all_indirect_vtables): Likewise.
20210         * search.c (get_base_distance_recursive): Likewise.
20211         (get_abstract_virtuals_1): Likewise.
20212         (fixup_virtual_upcast_offsets): Likewise.
20213         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
20214         * init.c (perform_member_init): Fix order of arg definitions.
20215         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
20216         * cp-tree.h (make_thunk): Add decl.
20217         (overload_template_name, push_template_decl): Add decls.
20218         (do_toplevel_using_decl): Change to void return type.
20219         (vec_binfo_member): Add decl.
20220
20221 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20222
20223         * typeck.c (mark_addressable, convert_for_assignment,
20224         convert_for_initialization, pointer_int_sum, pointer_diff,
20225         unary_complex_lvalue): Add prototypes wrapped by PROTO.
20226         (convert_sequence): #if 0 fn decl, since definition also is.
20227
20228 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
20229
20230         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
20231         cast to pointer types for type searching.
20232
20233 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20234
20235         * typeck.c (get_delta_difference): Use cp_error, not error, in the
20236         case where BINFO == 0.
20237
20238 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
20239
20240         * call.c (build_method_call): Fix wording of error messages so
20241         constructors come out right.
20242
20243 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
20244
20245         * decl.c (push_overloaded_decl): Don't warn about hidden
20246         constructors when both the type and the function are declared
20247         in a system header file.
20248
20249 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
20250
20251         * class.c (finish_struct_1): Propagate the TYPE_PACKED
20252         flag for the type to the type's fields.
20253
20254 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20255
20256         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
20257
20258 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
20259
20260         * class.c (base_info, finish_base_struct): Replace
20261         needs_virtual_dtor with base_has_virtual.
20262
20263         (finish_struct_1): Remove the old code that tried to make default
20264         destructors virtual.  Use base_has_virtual when checking if we need
20265         to add a vtable entry for the rtti code.
20266
20267 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
20268
20269         * pt.c (push_template_decl): Complain about template decl with
20270         inappropriate declaration.
20271
20272 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
20273
20274         * typeck.c (build_x_unary_op): Remove bogus check for taking
20275         the address of a member function.
20276
20277 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
20278
20279         * parse.y (constructor_declarator): Only push the class if
20280         we are not already in the class.
20281
20282 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
20283
20284         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
20285         Add additional argument to INIT_CUMULATIVE_ARGS.
20286
20287 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
20288
20289         * decl.c (shadow_tag): Fix error about anon union with methods.
20290
20291         * parse.y (self_reference): Only generate a self-reference if this
20292         is a non-template class.
20293         (opt.component_decl_list): Only use it if it was generated.
20294
20295         * parse.y (component_decl_1): Use constructor_declarator.
20296         (fn.def2): Likewise.
20297         (notype_component_declarator0): Likewise.
20298
20299 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
20300
20301         * typeck.c (build_x_unary_op): Add checks for taking the address
20302         of a TARGET_EXPR or of a member function, and give appropriate
20303         warnings.
20304
20305 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
20306
20307         * pt.c (process_template_parm): Allow template type parms to be
20308         used as types for template const parms.
20309
20310 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
20311
20312         * init.c (expand_vec_init): Ensure the eh cleanups are on the
20313         function_obstack.
20314
20315 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
20316
20317         * decl.c (lookup_name_real): Be even more picky about the
20318         ambiguous lookup warning.
20319         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
20320         * parse.y (constructor_declarator): Rather than here.
20321
20322         * parse.y (constructor_declarator): New nonterminal.
20323         (fn.def1): Use it.
20324         (explicit_instantiation): Likewise.
20325
20326 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
20327
20328         Add implicit declaration of class name at class scope.
20329         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
20330         * parse.y (self_reference): New nonterminal.
20331         (opt.component_decl_list): Use it.
20332         (fn.def1): Add nested_name_specifier type_name cases.
20333         * class.c (build_self_reference): New function.
20334         (finish_struct): Handle access_default later, move self-reference
20335         decl to the end.
20336         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
20337         * cp-tree.h: Adjust.
20338
20339         * pt.c (do_function_instantiation): Separate handling of member
20340         functions and non-member functions properly.
20341
20342 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
20343
20344         * pt.c (process_template_parm): Improve error for 'volatile class K'.
20345
20346         * class.c (finish_struct_1): Check the right slot for destructors.
20347
20348         * decl.c (start_enum): Complain about enum templates.
20349
20350 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
20351
20352         * init.c (resolve_offset_ref): Offset pointers to member data by one.
20353         * typeck.c (unary_complex_lvalue): Likewise.
20354
20355 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
20356
20357         * typeck.c (c_expand_return): Check for a returned local
20358         array name, similar to the check for an ADDR_EXPR.
20359
20360 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
20361
20362         * decl.c (cp_finish_decl): Don't build cleanups for static
20363         variables here.
20364
20365 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
20366
20367         * typeck.c (build_modify_expr): Fix error messages to be more
20368         accurate.
20369         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
20370         assignment operators.
20371         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
20372         assignment operators.
20373
20374 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
20375
20376         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
20377         give an error if initialized.  pedwarn about nested type with the
20378         same name as its enclosing class.
20379
20380         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
20381
20382         * typeck.c (require_complete_type): Be sure to instantiate the
20383         MAIN_VARIANT of the type.
20384
20385         * decl2.c (finish_file): Instantiate pending templates before
20386         processing static constructors and destructors.
20387
20388         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
20389         unless at_eof.
20390
20391 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
20392
20393         * decl2.c (delete_sanity): If error_mark_node is passed
20394         in as an expression, quit while we're ahead.
20395
20396         * decl.c (grokdeclarator): Give an error message if `friend'
20397         is combined with any storage class specifiers.
20398
20399 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
20400
20401         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
20402         definition of nonexistent nested type.
20403
20404         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
20405         not to say 'typedef'.
20406
20407 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20408
20409         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
20410         * search.c (dfs_walk, dfs_init_vbase_pointers,
20411         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
20412         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
20413
20414 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
20415
20416         * except.c (build_throw): Support minimal parse.
20417         * pt.c (tsubst_copy): Support THROW_EXPR.
20418         * decl2.c (build_expr_from_tree): Likewise.
20419
20420         * pt.c (mangle_class_name_for_template): Always allocate
20421         scratch_firstobj.
20422
20423 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
20424
20425         * cvt.c (cp_convert_to_pointer): Give an appropriate error
20426         when trying to cast from an incomplete type.
20427
20428 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
20429
20430         * pt.c (instantiate_class_template): Don't bother setting up
20431         CLASSTYPE_TAGS explicitly, as the nested types will add
20432         themselves.
20433
20434 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
20435
20436         * decl.c (shadow_tag): Remove old error check for usage of
20437         an enum without a previous declaration.
20438         (xref_tag): Add error message about usage of enums without a
20439         previous declaration.
20440
20441 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
20442
20443         * lex.c (do_identifier): Only do name consistency check if we're
20444         parsing.
20445
20446         * pt.c (push_template_decl): Don't crash if we get a member defn
20447         that doesn't match.
20448
20449         * decl.c (xref_tag_from_type): New function to do an xref without
20450         always having to figure out code_type_node.
20451         * cp-tree.h: Declare it.
20452         * pt.c (instantiate_class_template): Use it for friend classes.
20453         (lookup_template_class): Use it.
20454
20455         * typeck2.c (build_functional_cast): Pull out a single parm before
20456         passing it to build_c_cast.
20457
20458 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
20459
20460         * expr.c (do_case): Give an error message if a pointer is
20461         given as a case value.
20462
20463 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
20464
20465         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
20466         an overload list.
20467
20468         * lex.c (cons_up_default_function): Really, now, interface hackery
20469         does not apply to synthesized methods.
20470
20471 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
20472
20473         * call.c (build_method_call): Ctors and dtors now have special names
20474         with respect to lookups.
20475         * class.c (add_method): Likewise.
20476         (grow_method): Likewise.
20477         (finish_struct_methods): Likewise.
20478         (warn_hidden): Likewise.
20479         (finish_struct_1): Likewise.
20480         * cvt.c (convert_to_reference): Likewise.
20481         (convert_to_aggr): Likewise.
20482         (cp_convert): Likewise.
20483         * decl2.c (check_classfn): Likewise.
20484         * init.c (expand_member_init): Likewise.
20485         (expand_default_init): Likewise.
20486         (expand_aggr_init_1): Likewise.
20487         (build_offset_ref): Likewise.
20488         (build_new): Likewise.
20489         (build_delete): Likewise.
20490         * lex.c (do_inline_function_hair): Likewise.
20491         * search.c (lookup_field_1): Likewise.
20492         (lookup_fnfields_here): Likewise.
20493         (lookup_field): Likewise.
20494         (lookup_fnfields): Likewise.
20495         (get_virtual_destructor): Likewise.
20496         (dfs_debug_mark): Likewise.
20497         (dfs_pushdecls): Likewise.
20498         (dfs_compress_decls): Likewise.
20499         * tree.c (layout_basetypes): Likewise.
20500         * typeck.c (build_component_ref): Likewise.
20501         (build_x_function_call): Likewise.
20502         (build_modify_expr): Likewise.
20503         (convert_for_initialization): Likewise.
20504         (build_functional_cast): Likewise.
20505         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
20506         (CTOR_NAME): New.
20507         (DTOR_NAME): New.
20508         * decl.c (ctor_identifier): New.
20509         (dtor_identifier): New.
20510         (init_decl_processing): Set them.
20511
20512 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
20513
20514         * typeck.c (build_component_ref): Don't get confused by fields whose
20515         context has no type name, like pointer to member functions.
20516
20517 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
20518
20519         * decl.c (grokdeclarator): Handle typedef without declarator.
20520
20521         * pt.c (tsubst): Handle SCOPE_REF in declarator.
20522
20523         * parse.y (bad_parm): Catch another case of missing `typename'.
20524
20525         * lex.c (yyprint): Handle TYPE_DECLs.
20526
20527         * decl.c (start_function): Don't try to be clever.
20528
20529         * lex.c: Lose compiler_error_with_decl.
20530         * typeck2.c: Lose error_with_aggr_type.
20531         (incomplete_type_error): Use cp_* instead of old functions.
20532         (readonly_error): Likewise.
20533         * typeck.c (convert_arguments): Likewise.
20534         * search.c (lookup_nested_field): Likewise.
20535         * method.c (make_thunk): Likewise.
20536         * decl.c (grokparms): Likewise.
20537         * cp-tree.h: Update.
20538
20539         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
20540         and value.
20541
20542 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
20543
20544         * method.c (build_opfncall): When deleting a pointer to an
20545         array, build a new pointer to the tree past any ARRAY_TYPE
20546         nodes.
20547
20548 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20549
20550         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
20551
20552 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
20553
20554         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
20555         and ! DECL_INLINE.
20556
20557         * decl.c (finish_function): Don't set nested based on
20558         hack_decl_function_context.
20559         * parse.y (function_try_block): Check for nested function.
20560         (pending_inlines): Likewise.
20561
20562         * decl2.c (build_expr_from_tree): If a unary op already has a
20563         type, just return it.
20564
20565         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
20566
20567         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
20568         (finish_file): Check the return value of walk_vtables.
20569         (finish_prevtable_vardecl): Return int.
20570         (finish_vtable_vardecl): Likewise.
20571         (prune_vtable_vardecl): Likewise.
20572         * lex.c (set_vardecl_interface_info): Likewise.
20573         * cp-tree.h: Adjust return types.
20574
20575         * class.c (delete_duplicate_fields_1): Don't complain about
20576         duplicate nested types if they're the same type.
20577         (finish_struct): Remove check for duplicate.
20578         * decl2.c (grokfield): Don't check for typedef of anonymous type.
20579
20580 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
20581
20582         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
20583
20584         * decl.c (grokdeclarator): Lose special handling of class-level
20585         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
20586         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
20587
20588         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
20589
20590         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
20591
20592         * search.c (compute_access): Fix handling of anonymous union
20593         members.
20594         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
20595         from anonymous unions to their members.
20596
20597         * typeck.c (build_x_function_call): For static member functions,
20598         hand off to build_member_call.
20599
20600 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
20601
20602         * typeck.c (build_component_ref): Handle OFFSET_REFs.
20603
20604         * init.c (expand_vec_init): Fix init == 0 case.
20605
20606 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
20607
20608         * init.c (build_new): pedwarn about init and array new.
20609         (expand_vec_init): Handle lists, use convert_for_initialization.
20610
20611         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
20612         when converting to an aggregate type.
20613         * cvt.c (cp_convert): Pass it through.
20614
20615         * typeck.c (build_conditional_expr): Handle user-defined
20616         conversions to slightly different types.
20617
20618         * decl.c (grokdeclarator): Force an array type in a parm to be
20619         permanent.
20620
20621         * decl2.c (do_using_directive): Sorry.
20622         (do_namespace_alias): Likewise.
20623         * lex.c (real_yylex): Warn about using the `namespace' keyword.
20624
20625 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
20626
20627         * parse.y (datadef): Move call to note_list_got_semicolon up.
20628
20629 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
20630
20631         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
20632
20633 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
20634
20635         * decl.c (cp_finish_decl): The exception regions have to be
20636         nested, not overlapping.  We start the exception region for a
20637         decl, after it has been fully built, and all temporaries for it
20638         have been cleaned up.
20639
20640 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
20641
20642         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
20643
20644 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
20645
20646         * tree.def: Add RETURN_INIT.
20647         * pt.c (instantiate_decl): Handle RETURN_INIT.
20648         * decl.c (store_return_init): Handle minimal_parse_mode.
20649
20650         * tree.c (cp_build_type_variant): Just return an error_mark_node.
20651         * decl.c (make_typename_type): Don't try to get the file and line
20652         of an identifier.
20653         * typeck.c (comptypes): Handle TYPENAME_TYPE.
20654
20655 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
20656
20657         * decl.c (poplevel): Make sure we clear out and restore old local
20658         non-VAR_DECL values by default when they go out of scope.
20659
20660 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
20661
20662         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
20663         referring to addresses of variables and functions.
20664
20665         * error.c (dump_expr): Support SIZEOF_EXPR.
20666
20667         * init.c (do_friend): Use the return value of check_classfn.
20668
20669         * typeck.c (convert_arguments): Call complete_type.
20670
20671         * method.c (hack_identifier): After giving an error, set value to
20672         error_mark_node.
20673
20674 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
20675
20676         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
20677         lossage for local classes.
20678         * cp-tree.h: Declare it.
20679         * decl.c (lookup_name_real): Evil, painful hack for local classes.
20680         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
20681         Use hack_decl_function_context.
20682         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
20683         (start_function): Use hack_decl_function_context.
20684         (finish_function): Likewise.
20685         * method.c (synthesize_method): Likewise.
20686         * lex.c (process_next_inline): Likewise.
20687         (do_pending_inlines): Likewise.
20688         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
20689         done with it.
20690
20691 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
20692
20693         * sig.c (build_signature_pointer_or_reference_type): Align
20694         signature pointers/references on 8-byte boundaries so they can be
20695         grabbed 2 words at a time on a Sparc.
20696
20697 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
20698
20699         * method.c (hack_identifier): Requiring a static chain is now a
20700         hard error.
20701         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
20702         functions.
20703
20704 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
20705
20706         * init.c (build_offset_ref): Call complete_type.
20707
20708         * decl.c (pop_from_top_level): Always pop previous_class_type.
20709
20710         * parse.y: Handle multiple decls in a for-init-statement.
20711         * pt.c (tsubst_expr): Likewise.
20712
20713         * pt.c (tsubst): Use tsubst_expr for the second operand of an
20714         ARRAY_REF.
20715
20716         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
20717         (poplevel_class): Set it here.
20718         (pop_from_top_level): Pop it here if we're returning to class scope.
20719         * class.c (pushclass): Don't set it here.
20720
20721         * decl.c (maybe_push_to_top_level): Save current_template_parms,
20722         and clear it if !pseudo.
20723         (pop_from_top_level): Restore it.
20724
20725         * decl2.c (finish_file): Push the dummy each time we walk the list
20726         of vtables.
20727
20728         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
20729         something for CAST_EXPR.
20730
20731 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
20732
20733         * cvt.c (cp_convert): Warn about implicit conversion of the
20734         address of a function to bool, as it is always true.
20735
20736 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
20737
20738         * typeck.c (c_expand_return): Fix warning for local externs returned.
20739
20740 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
20741
20742         * tree.c (mapcar): Propagate const and volatile properly.
20743
20744         * typeck.c (complete_type): Be sure to instantiate the
20745         MAIN_VARIANT of the type.
20746
20747         * method.c (synthesize_method): Class interface hackery does not
20748         apply to synthesized methods.
20749
20750 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
20751
20752         * pt.c (comp_template_args): Use comptypes rather than just
20753         checking for TEMPLATE_TYPE_PARM equivalence.
20754
20755         * typeck.c (build_x_function_call): Call complete_type before
20756         checking TYPE_OVERLOADS_CALL_EXPR.
20757
20758 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
20759
20760         * g++.c (main): Check also for new define ALT_LIBM.
20761
20762 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
20763
20764         * pt.c (instantiate_class_template): If we don't have a pattern
20765         yet, that's OK.
20766         (coerce_template_parms): If we see a local class, bail.
20767
20768         * decl.c (grok_reference_init): Make sure there's a type before
20769         checking its code.
20770
20771         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
20772         (push_template_decl): Likewise.
20773
20774         * parse.y (named_class_head): Set
20775         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
20776
20777         * decl.c (xref_tag): Diagnose redeclaration of template
20778         type-parameter name.
20779
20780         * error.c (dump_type): Handle anonymous template type parms.
20781
20782         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
20783         TYPE_STUB_DECL.
20784         (coerce_template_parms): Likewise.
20785
20786 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
20787
20788         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
20789         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
20790
20791 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
20792
20793         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
20794         before trying to get its STUB_DECL.
20795         (coerce_template_parms): Likewise.
20796
20797         * parse.y (template_type_parm): If they didn't use 'class',
20798         pretend they did after giving an error.
20799
20800         * pt.c (coerce_template_parms): Diagnose use of local class.
20801
20802         * decl.c (grok_reference_init): Use instantiate_type.
20803
20804         * error.c (dump_expr): Handle TEMPLATE_DECLs.
20805
20806         * parse.y (named_class_head): Diagnose mismatching types and tags.
20807
20808         * decl.c (pushdecl): Type decls and class templates clash with
20809         artificial type decls, not hide them.
20810
20811         * decl.c (redeclaration_error_message): Diagnose redefinition of
20812         templates properly.
20813         (duplicate_decls): Diagnose disallowed overloads for template
20814         functions, too.
20815
20816         * decl.c (start_decl): Call complete_type before checking for a
20817         destructor.
20818
20819         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
20820
20821         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
20822
20823 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
20824
20825         * decl.c (grok_op_properties): Don't check for operator++(int) in
20826         a template.
20827
20828         * tree.c (perm_manip): Return a copy of variable and function
20829         decls with external linkage.
20830
20831         * tree.def: Change some of the min tree codes to type "1".
20832         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
20833         * method.c (build_overload_int): Emit something arbitrary for
20834         anything but an INTEGER_CST if we're in a template.
20835
20836         * decl.c (cp_finish_decl): Call complete_type before deciding
20837         whether or not to lay out the decl.
20838
20839         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
20840
20841 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
20842
20843         * typeck2.c (build_x_arrow): Call complete_type.
20844
20845         * pt.c (add_pending_template): Broken out.
20846         (lookup_template_class): If -fexternal-templates, call it for all
20847         the methods of implemented types.
20848         (instantiate_class_template): Instead of instantiating them here.
20849         (instantiate_decl): Handle -fexternal-templates earlier.
20850
20851 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20852
20853         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
20854         memoized lookup stuff inside GATHER_STATISTICS.
20855
20856 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
20857
20858         * decl.c (start_decl): Complain about array of incomplete type
20859         here.
20860         (grokdeclarator): Not here.
20861
20862         * parse.y (template_parm): Expand full_parm inline so we can set
20863         the rule's precedence.
20864
20865         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
20866         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
20867         * decl2.c (grokbitfield): Don't check for integer constant here.
20868         * class.c (finish_struct_1): Check here.
20869
20870         * decl.c (define_label): Make the min decl go on permanent_obstack.
20871
20872         * pt.c (unify): Don't handle CONST_DECLs.
20873         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
20874         (tsubst_copy): Likewise.
20875
20876         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
20877         CONST_DECL for a template parm.
20878
20879 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
20880
20881         * decl.c (grokdeclarator): Complain about array of incomplete type
20882         here.
20883         (start_decl_1): Not here.
20884
20885         * pt.c (tsubst): Handle pointer-to-function declarators.
20886
20887         * method.c (hack_identifier): If pedantic, diagnose local class
20888         methods that require a static chain.
20889
20890         * decl.c (grok_op_properties): No longer static.
20891         * cp-tree.h: Declare it.
20892         * pt.c (tsubst): Call it for operators.
20893         Use tsubst_copy for TREE_VECs.
20894
20895         * parse.y (template_arg): The expr has precedence like '>'.
20896
20897 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
20898
20899         * pt.c (coerce_template_parms): Don't coerce an expression using
20900         template parms.
20901         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
20902         (tsubst): Don't use build_index_2_type if the max_value uses template
20903         parms.
20904         * method.c (build_overload_int): Emit something arbitrary for an
20905         expression using template parms.
20906
20907         * parse.y (template_close_bracket): New non-terminal to catch use
20908         of '>>' instead of '> >' in template class names.
20909         (template_type): Use it.
20910         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
20911
20912         * tree.def: Add CAST_EXPR.
20913         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
20914         CONVERT_EXPR for minimal_parse_mode.
20915         * typeck.c (build_c_cast): Likewise.
20916         * pt.c (tsubst_copy): Likewise.
20917         * decl2.c (build_expr_from_tree): Likewise.
20918         * error.c (dump_expr): Likewise.
20919
20920 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20921
20922         * except.c (SetTerminate, SetUnexpected): Put back global vars.
20923         (init_exception_processing): Put back decl/init of
20924         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
20925         fns from libstdc++.
20926
20927         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
20928         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
20929         Delete unused fns.
20930         * cp-tree.h (declare_uninstantiated_type_level,
20931         uninstantiated_type_level_p): Delete prototypes.
20932
20933 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
20934
20935         * pt.c (tsubst_expr): Add default return.
20936
20937 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20938
20939         * error.c (fndecl_as_string): Delete unused arg CNAME.
20940         * sig.c (build_signature_table_constructor,
20941         build_signature_method_call): Fix calls.
20942
20943         * class.c (the_null_vtable_entry): Delete var definition.
20944         (init_class_processing): Delete tree the_null_vtable_entry init.
20945         * decl.c (no_print_{functions, builtins}): Declare as static.
20946         (__tp_desc_type_node): #if 0 var definition.
20947         (init_type_desc): #if 0 init of __tp_desc_type_node.
20948         (vb_off_identifier): Move var decl into init_decl_processing.
20949         (current_function_assigns_this): Declare as static.
20950         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
20951         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
20952         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
20953         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
20954         * init.c (BI_header_type, BI_header_size): Declare as static.
20955         * pt.c (template_classes): Delete unused var.
20956         (add_pending_template): Delete decl for non-existent fn.
20957         (lookup_template_class): Delete vars CODE and TAG_CODE.
20958         (instantiate_template): Delete unused var TARGS.
20959         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
20960         Delete decls.
20961         (__tp_desc_type_node): #if 0 var decl.
20962         (fndecl_as_string): Fix prototype.
20963
20964 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
20965
20966         * tree.def: Add GOTO_STMT.
20967         * pt.c (tsubst_expr): Support goto and labels.
20968         * decl.c (define_label): Support minimal parsing.
20969         * parse.y (simple_stmt): Likewise.
20970
20971 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20972
20973         * xref.c (GNU_xref_member): Only define/set var I if
20974         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
20975         used.
20976         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
20977         (GNU_xref_end): Fix call.
20978         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
20979         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
20980
20981         * tree.c (build_exception_variant): Delete unused vars I, A, T,
20982         T2, and CNAME.
20983         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
20984         (mapcar): Delete unused var CODE.
20985         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
20986         (break_out_cleanups): Fix call.
20987         (bot_manip): Likewise.
20988         * call.c (build_method_call): Likewise.
20989         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
20990         Likewise.
20991         * typeck.c (unary_complex_lvalue, build_modify_expr,
20992         convert_for_initialization): Likewise.
20993         * typeck2.c (build_functional_cast): Likewise.
20994         * cp-tree.h (build_cplus_new): Fix prototype.
20995
20996         * repo.c (open_repo_file): Delete unused var Q.
20997         (repo_compile_flags, repo_template_declared,
20998         repo_template_defined, repo_class_defined, repo_inline_used,
20999         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
21000         (repo_get_id, repo_vtable_used): Declare as static.
21001         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
21002         prototypes.
21003
21004 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
21005
21006         * parse.y (pending_inlines): Add function_try_block case.
21007
21008         * pt.c (unify): Fix for template const parms.
21009
21010 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21011
21012         * lex.c (extract_interface_info): Delete forward decl.
21013         (default_copy_constructor_body, default_assign_ref_body): Delete
21014         decls for non-existent functions.
21015         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
21016         (init_lex): Delete setting them.
21017         (cons_up_default_function): Delete unused vars FUNC_BUF,
21018         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
21019         #if 0'd synth code.
21020         (toplevel, expression_obstack): Delete unused extern decls.
21021         (tree_node_kind): Delete unused enum.
21022         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
21023         GATHER_STATISTICS.
21024         (tree_node_kind_names): Delete unused extern decl.
21025         (synth_obstack): Delete unused var.
21026         (init_lex): Don't set it.
21027         (init_parse): Add decl before use.
21028         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
21029         (current_unit_{name, language}): Delete unused vars.
21030         (check_newline): Don't bother setting them, just accept the #pragma.
21031         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
21032         (current_unit_{name, language}): Delete decls.
21033
21034         * search.c: Wrap all of the memoized functions, macros, and
21035         variables inside #ifdef GATHER_STATISTICS.
21036         (lookup_field, lookup_fnfields): Likewise.
21037         (init_search_processing): Likewise.
21038         (reinit_search_statistics): Wrap whole function.
21039         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
21040
21041         * decl.c (finish_function): Only call pop_memoized_context if
21042         GATHER_STATISTICS is defined.
21043         (start_function): Likewise for push_memoized_context.
21044         * class.c (pushclass, popclass): Likewise.
21045
21046         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
21047         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
21048
21049         * cvt.c (cp_convert): Delete unused local var FORM.
21050         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
21051         prototypes.
21052
21053 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
21054
21055         * pt.c (do_poplevel): Oops; really return what we get from
21056         poplevel this time.
21057
21058 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21059
21060         * cp-tree.h (is_aggr_type): Add prototype.
21061
21062         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
21063         * method.c ({push,pop}_cp_function_context): Delete decls.
21064         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
21065         (SetUnexpected, SetTerminate): Delete unused vars.
21066         (init_exception_processing): Don't set SetUnexpected or
21067         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
21068         (output_exception_table_entry): Delete unused array LABEL.
21069         (expand_internal_throw): Delete unused var PARAMS.
21070         (expand_start_catch_block): Delete unused var CLEANUP.
21071         (emit_exception_table): Delete unused var EH_NODE_DECL.
21072         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
21073         GOTO_UNWIND_AND_THROW.  Don't set them.
21074         (end_eh_unwinder): Add top decl.
21075         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
21076         (exception_section, push_rtl_perm, do_function_call,
21077         lang_interim_eh, push_eh_cleanup, eh_outer_context,
21078         expand_end_eh_spec, end_eh_unwinder): Declare as static.
21079         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
21080         throw_used): Likewise.
21081         * cp-tree.h (expand_end_eh_spec): Delete prototype.
21082
21083         * search.c (dfs_mark, dfs_mark_vtable_path,
21084         dfs_unmark_vtable_path, dfs_mark_new_vtable,
21085         dfs_unmark_new_vtable, dfs_clear_search_slot,
21086         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
21087         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
21088         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
21089         functions.
21090         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
21091         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
21092         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
21093         Only define #ifdef GATHER_STATISTICS.
21094         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
21095         is defined.
21096         (vbase_decl): Delete var definition.
21097         (init_search): Delete old decl.
21098         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
21099         never actually used.
21100         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
21101         (get_base_distance_recursive): Delete unused fourth arg
21102         BASETYPE_PATH.  Fix call .
21103         (get_base_distance): Fix call.
21104         (push_class_decls): Delete unused var ID.
21105         (make_memoized_table_entry): Declare as static.
21106         (breadth_first_search): Declare as static.
21107         (tree_has_any_destructor_p): Declare as static.
21108         (pop_class_decls): Delete unused arg pop_class_decls.
21109         * class.c (popclass): Fix call to pop_class_decls.
21110         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
21111         tree_has_any_destructor_p): Delete prototypes.
21112
21113         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
21114         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
21115         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
21116         (build_user_desc): Delete unused var T.
21117         (build_class_desc): Delete unused vars T and OFF.
21118         (build_t_desc): Delete unused var NAME_STRING.
21119         (build_headof): Make static.
21120         (get_bad_cast_node): Likewise.
21121         (get_def_to_follow): Likewise.
21122         * cp-tree.h (init_type_desc): Add prototype.
21123         (build_headof): Remove prototype.
21124
21125 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
21126
21127         * pt.c (tsubst): Only look for matching decls at file scope for
21128         non-member functions.
21129
21130         * call.c (build_scoped_method_call): Handle scoped destructor
21131         calls in templates.
21132
21133         * decl.c (*_top_level): Also save previous_class_values.
21134
21135         * pt.c (tsubst_expr): Support do {} while loops.
21136         * parse.y (simple_stmt): Likewise.
21137         * tree.def: Likewise.
21138
21139         * method.c (build_overload_identifier): For a class nested in a
21140         template class, don't mangle in the template parms from our
21141         context.
21142
21143         * lex.c, cp-tree.h: Remove support for template instantiations in
21144         the pending_inlines code.
21145         * pt.c: Remove dead functions and unused arguments.
21146         (uses_template_parms): TYPENAME_TYPEs always use template parms.
21147         * parse.y: Stop passing anything to end_template_decl.
21148         * tree.c (print_lang_statistics): Only print tinst info #ifdef
21149         GATHER_STATISTICS.
21150
21151 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21152
21153         * init.c (expand_recursive_init{,_1}): Delete decls.
21154         (sort_member_init): Delete unused var INIT.
21155         (emit_base_init): Delete unused var X.
21156         (build_offset_ref): Delete unused var CNAME.
21157         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
21158         (emit_base_init): Delete unused local var BASE.  Delete extern
21159         decl of IN_CHARGE_IDENTIFIER.
21160         (build_delete): Delete unused local var VIRTUAL_SIZE.
21161
21162         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
21163         (build_delete): Fix call.
21164         * decl2.c (delete_sanity): Likewise.
21165         * cp-tree.h (build_vec_delete): Update prototype.
21166
21167         * typeck.c (common_base_type): Delete unused var TMP.
21168         (build_binary_op): Delete local var ARGS_SAVE.
21169         (build_array_ref): Delete unused var ITYPE.
21170         (c_expand_return): Delete unused var USE_TEMP.
21171
21172         * typeck.c (compexcepttypes): Delete unused arg STRICT.
21173         (comptypes): Fix calls.
21174         * decl.c (duplicate_decls): Likewise.
21175         * cp-tree.h (compexcepttypes): Delete extra arg.
21176
21177         * decl2.c (check_classfn): Delete unused second arg CNAME.
21178         * decl.c (start_decl, grokfndecl): Fix calls.
21179         * init.c (do_friend): Likewise.
21180         * cp-tree.h (check_classfn): Update prototype.
21181
21182         * cp-tree.h (signature_error, import_export_vtable,
21183         append_signature_fields, id_in_current_class, mark_used,
21184         copy_assignment_arg_p): Add decls.
21185         * decl2.c (mark_used): Delete decl.
21186
21187         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
21188
21189         * class.c (get_vtable_entry): Disable unused function.
21190         (doing_hard_virtuals): Delete unused static global var.
21191         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
21192         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
21193         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
21194         (modify_one_vtable): Delete unused var OLD_RTTI.
21195         (finish_struct_anon): Delete unused vars OFFSET and X.
21196         (finish_struct_bits): Delete unused var METHOD_VEC.
21197         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
21198         for-scope local variable METHODS.
21199
21200         * call.c (user_harshness): Delete unused/unneeded arg PARM.
21201         (ideal_candidate): Delete unused args BASETYPE and PARMS.
21202         (build_method_call): Delete unused args passed into ideal_candidate.
21203         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
21204         * cp-tree.h (synthesize_method): Add decl.
21205
21206         * decl.c (note_level_for_for): Give void return type.
21207         (pushdecl_nonclass_level): Likewise.
21208         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
21209         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
21210         (suspend_binding_level): Delete unused var LEVEL.
21211         (duplicate_decls): Delete unused var CTYPE.
21212         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
21213         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
21214         PTR_ENDLINK.
21215         (grokdeclarator): Delete unused var C.
21216         (grokdeclarator): Delete unused var SIZE_VARIES.
21217         (grokparms): Delete unused var SAW_VOID.
21218         (start_function): Delete unused var OLDDECL.
21219         (cplus_expand_expr_stmt): Delete unused var
21220         REMOVE_IMPLICIT_IMMEDIATELY.
21221
21222         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
21223
21224         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
21225
21226 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
21227
21228         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
21229         (build_min_nt): Likewise.
21230         * pt.c (do_pushlevel): Emit line note.
21231         (do_poplevel): Return what we get from poplevel.
21232         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
21233         * parse.y: Use do_pushlevel and do_poplevel.
21234         * cp-tree.h: Declare do_poplevel.
21235
21236         * cp-tree.h: Declare at_eof.
21237         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
21238         * decl2.c (import_export_decl): Renamed from import_export_inline.
21239         (finish_file): Call it to do interface handling for statics.
21240         * pt.c (tsubst_copy): Call mark_used on variables and functions
21241         used here.
21242
21243         * decl2.c (finish_file): Don't emit statics we can't generate.
21244         * pt.c (instantiate_decl): Don't set interface on instantiations
21245         we can't generate.
21246
21247         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
21248         * tree.c (print_lang_statistics): Print max template depth.
21249         * pt.c (push_tinst_level): Dump entire instantiation context.
21250         (instantiate_class_template): Use it and pop_tinst_level.
21251         (instantiate_decl): Likewise.
21252
21253         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
21254         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
21255
21256 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
21257
21258         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
21259         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
21260         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
21261         the new template implementation.
21262
21263 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21264
21265         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
21266
21267 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
21268
21269         * decl.c (cp_finish_decl): Delay emitting the debug information for
21270         a typedef that has been installed as the canonical typedef, if the
21271         type has not yet been defined.
21272
21273 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
21274
21275         * decl2.c (grokfield): Still call pop_nested_class for access decls.
21276
21277 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21278
21279         * decl.c (lookup_label): Call label_rtx.
21280
21281         * decl.c (make_binding_level): New function.
21282         (pushlevel, pushlevel_class): Call it instead of explicit
21283         duplicate calls to xmalloc.
21284
21285         * decl.c (init_decl_processing): Delete useless build_pointer_type
21286         call.
21287
21288         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
21289         (sizet_ftype_string): Delete variable.
21290         (init_decl_processing): Add built-in functions fabsf, fabsl,
21291         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
21292         variable strlen_ftype, used for strlen.
21293
21294 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
21295
21296         * decl.c (push_to_top_level): Start from current_binding_level
21297         again for now; the stl hacks depend on g++ being broken in this
21298         way, and it'll be fixed in the template rewrite.
21299
21300         * tree.def: Add USING_DECL.
21301         * decl2.c (do_class_using_decl): Implement.
21302         (grokfield): Pass access decls off to do_class_using_decl instead of
21303         grokdeclarator.
21304         * error.c (dump_decl): Handle USING_DECLs.
21305         * decl.c (grokdeclarator): Remove code for handling access decls.
21306         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
21307         as access decls for now.
21308         (finish_struct): Don't check USING_DECLs for other uses of the name.
21309
21310         * search.c (get_matching_virtual): Use cp_error_at.
21311
21312 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21313
21314         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
21315         match c-typeck.c.
21316         (self_promoting_args_p): Move the check that TYPE is non-nil
21317         before trying to look at its main variant.
21318         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
21319
21320         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
21321         Delete macros.
21322         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
21323         (do_friend): Delete call to xref_friend.
21324         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
21325
21326         * typeck.c (convert_sequence): #if 0 unused function.
21327
21328         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
21329         be in decl_in_memory_p.
21330         (decl_in_memory_p): Delete decl.
21331         * expr.c (decl_in_memory_p): Delete fn.
21332         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
21333
21334         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
21335
21336 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
21337
21338         * class.c (finish_struct_1): Check for a pure-specifier on a
21339         non-virtual function here.
21340
21341         * decl2.c (grok_function_init): Don't check whether the function
21342         is virtual here.
21343         (grokfield): Don't call check_for_override here.
21344
21345         * decl.c (push_to_top_level): Start from inner_binding_level,
21346         check class_shadowed in class levels.
21347
21348 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
21349
21350         * decl.c (resume_level): Ignore things that don't have names, instead
21351         of core dumping.
21352
21353 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21354
21355         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
21356
21357 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
21358
21359         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
21360         synthesized dtor.
21361
21362         * parse.y (complete_type_name): Bind global_scope earlier.
21363         (complex_type_name): Likewise.
21364         (qualified_type_name): Remove.
21365
21366 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
21367
21368         * decl.c (grokfndecl): Move code that looks for virtuals in base
21369         classes...
21370         * class.c (check_for_override): ... to a new function.
21371         (finish_struct_1): Call it.
21372
21373         * cp-tree.h: Declare warn_sign_compare.
21374
21375         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
21376         rather than extra_warnings to decide whether to warn about
21377         comparison of signed and unsigned.
21378
21379         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
21380         implies -Wsign-compare.  -Wall doesn't imply -W.
21381
21382 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
21383
21384         * typeck.c (build_component_ref): Fix to handle anon unions in base
21385         classes as well.
21386
21387 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21388
21389         * class.c (resolves_to_fixed_type_p): Delete code dealing with
21390         a WITH_CLEANUP_EXPR, since we don't generate them any more.
21391         * cvt.c (build_up_reference): Likewise.
21392         * decl.c (grok_reference_init): Likewise.
21393         (cp_finish_decl): Likewise.
21394         * error.c (dump_expr): Likewise.
21395         * tree.c (real_lvalue_p): Likewise.
21396         (lvalue_p): Likewise.
21397         (build_cplus_new): Likewise.
21398         (unsave_expr_now): Likewise.
21399         * typeck.c (unary_complex_lvalue, build_modify_expr,
21400         c_expand_return): Likewise.
21401
21402 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21403
21404         Make the C++ front-end pay attention to attributes for structures.
21405         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
21406         finish_struct_1.
21407         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
21408         Take out old round_up_size use and setting the DECL_ALIGN possibly
21409         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
21410         can override what the attribute set.
21411         * cp-tree.h (finish_struct): Update prototype.
21412         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
21413         attributes to finish_struct.
21414         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
21415         value down into finish_struct.
21416         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
21417
21418 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
21419
21420         * decl.c (poplevel):  Re-word dead for local handling.
21421         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
21422         (cp_finish_decl):  If is_for_scope, check for duplicates so
21423         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
21424
21425         * lex.c (do_identifier):  Use global binding in preference of
21426         dead for local variable.
21427
21428 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
21429
21430         * init.c (initializing_context): Handle anon union changes, the
21431         context where fields of anon unions can be initialized now has to be
21432         found by walking up the TYPE_CONTEXT chain.
21433
21434 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
21435
21436         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
21437         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
21438         (obscure_complex_init): If bss is supported, always set
21439         DECL_INITIAL to error_mark_node.
21440
21441 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21442
21443         * init.c (is_friend): Make sure there's a context before we see if
21444         it's an aggr type.
21445
21446 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
21447
21448         * init.c (is_friend): Classes are not friendly with nested classes.
21449
21450 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
21451
21452         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
21453         and record its result.
21454
21455 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
21456
21457         * class.c (finish_struct_anon): Switch around code to not move anon
21458         union elements around, nor mess up their contexts, nor offsets,
21459         instead we now build up the right number of COMPONENT_REFs for all
21460         the anon unions that may be present at build_component_ref time.
21461         * typeck.c (lookup_anon_field): New routine to handle field lookup
21462         on fields without names.  We find them, based upon their unique type
21463         instead.
21464         * typeck.c (build_component_ref): Allow FIELD_DECL components.
21465         Handle finding components in anonymous unions, and ensure that a
21466         COMPONENT_REF is built for each level as necessary.
21467
21468 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
21469
21470         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
21471         code that ensures that copy ctors are used if appropriate.
21472
21473 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21474
21475         * init.c (build_vec_delete): Only give an error if base isn't an
21476         error_mark_node.
21477
21478 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
21479
21480         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
21481         (yylex): If we see `new', keep slurping.
21482
21483 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
21484
21485         * class.c (finish_struct_1): Move code for handling anon unions...
21486         (finish_struct_anon): to here.  Fixup so that we do the offset
21487         calculations right, and so that the fields are physically moved to
21488         the containers's chain.
21489
21490 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21491
21492         * decl.c (grokdeclarator): Avoid trying to get an operand off an
21493         identifier node.
21494
21495 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
21496
21497         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
21498         POINTER_SIZE to agree with expr.c.
21499
21500 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
21501
21502         * search.c (lookup_field): Don't report ambiguities if protect is 0,
21503         instead return NULL_TREE.
21504
21505 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
21506
21507         * class.c (finish_struct_1): Call warn_hidden if we want warnings
21508         about overloaded virtual functions.
21509         (warn_hidden): New routine to warn of virtual functions that are
21510         hidden by other virtual functions, that are not overridden.
21511         (get_basefndecls): New routine, used by warn_hidden.
21512         (mark_overriders): New routine, used by warn_hidden.
21513         * search.c (get_matching_virtual): Remove old warning that just
21514         isn't very useful.
21515
21516 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21517
21518         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
21519
21520         * typeck.c (null_ptr_cst_p): Delete unused fn.
21521         (build_function_call_maybe): Delete unused fn.
21522
21523         * expr.c (extract_init): #if 0 the code after unconditional return 0
21524         for now.
21525
21526         Delete old cadillac code.
21527         * edsel.c: Remove file.
21528         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
21529         * Makefile.in (CXX_OBJS): Delete edsel.o.
21530         (edsel.o): Delete rule.
21531         * cp-tree.h (flag_cadillac): Delete var decl.
21532         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
21533         * decl2.c (flag_cadillac): Delete var definition.
21534         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
21535         (grokfield): Delete code depending on flag_cadillac.
21536         (finish_anon_union): Likewise.
21537         * class.c (finish_struct_1): Likewise.
21538         (pushclass): Likewise.
21539         (popclass): Likewise.
21540         (push_lang_context): Likewise.
21541         (pop_lang_context): Likewise.
21542         * decl.c (init_decl_processing): Likewise.
21543         (start_decl): Likewise.
21544         (cp_finish_decl): Likewise.
21545         (xref_tag): Likewise.
21546         (finish_enum): Likewise.
21547         (start_function): Likewise.
21548         (finish_function): Likewise.
21549         (finish_stmt): Likewise.
21550         * lex.c (lang_init): Likewise.
21551         (check_newline): Likewise.
21552
21553         * lex.c (do_pending_inlines): Delete synthesized method kludge.
21554
21555         Delete defunct, ancient garbage collection implementation.
21556         * rtti.c: New file with the RTTI stuff from gc.c.
21557         * gc.c: Removed file (moved the remaining stuff into rtti.c).
21558         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
21559         (rtti.o): New rule, replacing gc.o.
21560         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
21561         * cp-tree.h: Delete gc-related fn decls.
21562         (DECL_GC_OFFSET): Delete macro.
21563         (flag_gc): Delete extern decl.
21564         * decl.c (current_function_obstack_index): Delete var decl.
21565         (current_function_obstack_usage): Delete var decl.
21566         (start_function): Delete clearing of current_function_obstack_index
21567         and current_function_obstack_usage.
21568         (init_decl_processing): Delete code relying on -fgc.
21569         Delete call to init_gc_processing.
21570         (cp_finish_decl): Delete calls to build_static_gc_entry and
21571         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
21572         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
21573         and to expand_expr of a __gc_main call.
21574         (maybe_gc_cleanup): Delete var decl.
21575         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
21576         * decl2.c (flag_gc): Delete var decl.
21577         (lang_f_options): Delete offering of -fgc.
21578         (lang_decode_option): Delete -fgc and -fno-gc handling.
21579         (get_temp_regvar): Delete gc code.
21580         * init.c (build_new): Delete gc code.
21581         * lex.c (init_lex): Delete checking of flag_gc.
21582
21583         * typeck.c (convert_arguments): Delete gc code.
21584         (build_component_addr): Delete -fgc warning.
21585         (build_modify_expr): Delete gc code.
21586
21587         * decl2.c (build_push_scope): Delete fn.
21588         * cp-tree.h (build_push_scope): Delete decl.
21589
21590         * search.c (clear_search_slots): Delete fn.
21591         * cp-tree.h (clear_search_slots): Delete decl.
21592
21593         * search.c (tree_needs_constructor_p): Delete fn.
21594         * cp-tree.h (tree_needs_constructor_p): Delete decl.
21595
21596         * tree.c (id_cmp): Delete fn.
21597
21598         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
21599         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
21600
21601         * tree.c (decl_value_member): Delete fn.
21602         * cp-tree.h (decl_value_member): Delete decl.
21603
21604         * tree.c (list_hash_lookup_or_cons): Delete fn.
21605         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
21606
21607         * method.c (cplus_exception_name): Delete fn.
21608         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
21609
21610         * spew.c (shift_tokens): Delete fn.
21611
21612 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
21613
21614         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
21615         to cp_finish_decl.
21616         * parse.y: Likewise.
21617
21618 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21619
21620         * tree.c (build_cplus_staticfn_type): Delete function definition;
21621         never used.
21622         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
21623
21624         * tree.c (virtual_member): Delete function definition; never used.
21625         * cp-tree.h (virtual_member): Delete decl.
21626
21627 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
21628
21629         * typeck.c (build_component_ref): Handle getting vbase pointers
21630         out of complex multiple inheritance better.
21631
21632 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
21633
21634         * typeck.c (build_object_ref): Make sure we use the real type, not
21635         any reference type.
21636
21637 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
21638
21639         * tree.c (build_exception_variant): Don't create new types if we
21640         don't have to, also build new types on the right obstack.
21641
21642 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
21643
21644         * decl.c (store_bindings): Split out from push_to_top_level.
21645         (push_to_top_level): Call it for b->type_shadowed on class binding
21646         levels.
21647
21648 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
21649
21650         * search.c (expand_upcast_fixups): Fix so that offsets stored in
21651         vbase_offsets are always right.  Fixes a problem where virtual base
21652         upcasting and downcasting could be wrong during conversions on this
21653         during virtual function dispatch at ctor/dtor time when dynamic
21654         vtable fixups for deltas are needed.  This only sounds easier than
21655         it is.  :-)
21656         (fixup_virtual_upcast_offsets): Change to reflect new calling
21657         convention for expand_upcast_fixups.
21658
21659 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21660
21661         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
21662         check that it's usable as the bitfield width.
21663
21664 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21665
21666         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
21667         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
21668         only ever used for functions in it.
21669
21670 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
21671
21672         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
21673         (nested_type): Likewise.
21674         (nested_name_specifier): Use lastiddecl.
21675
21676         * decl.c (grokdeclarator): Adjust accordingly.
21677         * init.c (expand_member_init): Likewise.
21678         * parse.y (base_class): Likewise.
21679         * typeck2.c (build_functional_cast): Likewise.
21680
21681         * typeck2.c (build_functional_cast): Fill in name after we've
21682         checked for non-aggr type.
21683
21684 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
21685
21686         * decl2.c (warn_pointer_arith): Default to on.
21687
21688 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
21689
21690         * lex.c (is_rid): New function.
21691         * decl.c (grokdeclarator): Diagnose reserved words used as
21692         declarator-ids.
21693
21694 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
21695
21696         * tree.c (get_decl_list): Don't lose cv-quals.
21697
21698         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
21699         typespecs used as declarator-ids.
21700
21701 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
21702
21703         * decl.c (poplevel): When poping a level, don't give a warning for
21704         any subblocks that already exist.
21705
21706 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
21707
21708         * typeck.c (build_object_ref): Finish what I started.
21709
21710         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
21711
21712         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
21713
21714         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
21715         scope.
21716
21717 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
21718
21719         * decl.c (xref_tag): Handle passing a type in directly.
21720
21721         * parse.y (qualified_type_name): Pull out the type.
21722         (nested_type): Likewise.
21723         Take types directly instead of as identifiers.
21724         * call.c (build_scoped_method_call): Take types directly instead of
21725         as identifiers.
21726         * decl.c (xref_basetypes): Likewise.
21727         * init.c (expand_member_init): Likewise.
21728         (build_member_call): Likewise.
21729         (build_offset_ref): Likewise.
21730         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
21731         * method.c (do_build_assign_ref): Likewise.
21732         * decl.c (grokdeclarator): Handle a type appearing as the
21733         declarator-id for constructors.
21734         * method.c (do_build_copy_constructor): current_base_init_list now
21735         uses the types directly, not their names.
21736         * init.c (sort_base_init): Likewise.
21737         (expand_member_init): Likewise.
21738         * init.c (is_aggr_type): New function, like is_aggr_typedef.
21739
21740 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
21741
21742         * tree.c (layout_basetypes): Call build_lang_field_decl instead
21743         of build_lang_decl if first arg is a FIELD_DECL.
21744
21745 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21746
21747         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
21748         non-empty.
21749         * except.c (expand_start_catch_block): Set TREE_USED to avoid
21750         warnings about the catch handler.
21751
21752 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
21753
21754         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
21755         expand_target_expr.
21756
21757 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
21758
21759         Fix access control to use trees rather than integers.
21760         * class.c (access_{default, public, protected, private,
21761         default_virtual, public_virtual, private_virtual}_node): Add
21762         definitions.
21763         (init_class_processing): Do creation of those nodes.
21764         * cp-tree.h (access_type): Delete enum decl.
21765         (access_{default, public, protected, private, default_virtual,
21766         public_virtual, private_virtual}_node): Add decls.
21767         (compute_access): Change return type.
21768         * search.c (compute_access): Have tree return type, instead of enum.
21769         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
21770         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
21771         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
21772         * parse.y (VISSPEC): Make ttype rather than itype.
21773         (base_class_access_list): Likewise.
21774         * *.[cy]: Change all refs of `access_public' to `access_public_node',
21775         etc.
21776         * call.c (build_method_call): Make ACCESS be a tree.
21777         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
21778         * cvt.c (convert_to_aggr): Likewise.
21779         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
21780         Likewise.
21781         * method.c (hack_identifier): Likewise.
21782         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
21783
21784 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
21785
21786         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
21787         frontend, and make it more consistent with respect to
21788         warn_pointer_arith.
21789
21790 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
21791
21792         * decl.c (pushdecl): Check for duplicate parameter names.
21793
21794 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
21795
21796         * decl.c (expand_static_init): Call assemble_external for atexit.
21797
21798 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
21799
21800         * except.c (do_unwind): Remove some generated dead code.
21801         (eh_outer_context): New routine, factor out some common code from
21802         expand_builtin_throw and end_eh_unwinder.  Add code to do return
21803         address masking for the PA.
21804         (expand_builtin_throw): Use eh_outer_context instead of open coding
21805         it here.
21806         (end_eh_unwinder): Likewise.
21807
21808 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
21809
21810         * except.c (expand_throw): Call assemble_external for __empty, if we
21811         use it.
21812
21813 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
21814
21815         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
21816         NORMAL_RETURN_ADDR_OFFSET.
21817         (end_eh_unwinder): Likewise.
21818
21819 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
21820
21821         * gc.c (build_dynamic_cast): Make sure we don't cast away const
21822         when dealing with references, and make sure we handle dynamic
21823         casting to a cv qualified reference.
21824
21825 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
21826
21827         * except.c (struct eh_context): New structure top hold eh context
21828         information.
21829         (push_eh_context): New routine.
21830         (pop_eh_context): Likewise.
21831         * decl.c (push_cp_function_context): Use them.
21832         (pop_cp_function_context): Likewise.
21833
21834 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
21835
21836         * decl2.c (finish_file): Also prune uninteresting functions in the
21837         inline emission loop.
21838
21839 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
21840
21841         * sig.c (build_signature_table_constructor): Mark functions
21842         in the signature as referenced.
21843
21844 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
21845
21846         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
21847         the inline emission stuff.
21848
21849 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
21850
21851         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
21852         weak symbols.
21853         * lang-options.h: Add -f{no-,}weak.
21854         * decl.c (init_decl_processing): If the target does not support weak
21855         symbols, don't use them.
21856         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
21857
21858 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
21859
21860         * init.c (expand_member_init): warning for base init after members.
21861
21862 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
21863
21864         * cvt.c (build_expr_type_conversion): Don't convert to a reference
21865         type.
21866
21867 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
21868
21869         * method.c (report_type_mismatch): Improve wording for volatile
21870         mismatches.
21871
21872 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
21873
21874         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
21875         expand_assignment, as the later doesn't handle things that have
21876         copy constructors well.  The compiler would do bitwise copying,
21877         instead of ctor calling in some cases.
21878
21879 Wed Dec 13 17:05:54 1995  Paul Eggert  <eggert@twinsun.com>
21880
21881         * g++.c (my_strerror): Return "cannot access" if errno is 0.
21882         (pfatal_with_name, perror_exec): Don't assume that
21883         the returned value from my_strerror contains no '%'s.
21884         (concat): Remove.
21885         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
21886
21887 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
21888
21889         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
21890         TYPE_METHODS/TREE_CHAIN mean what they used to.
21891         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
21892         instead of TYPE_METHODS.
21893         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
21894         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
21895         * cp-tree.h (CLASSTYPE_METHODS): Lose.
21896         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
21897         TYPE_METHODS.
21898         (struct lang_decl): Lose next_method field.
21899         (DECL_NEXT_METHOD): Lose.
21900         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
21901         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
21902         anymore.
21903         (finish_struct_methods): Don't mess with the TREE_CHAINs in
21904         fn_fields.
21905
21906         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
21907         vector.
21908
21909         * call.c (build_method_call): Synthesize here even when not inlining.
21910         * typeck.c (build_function_call_real): Likewise.
21911
21912 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
21913
21914         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
21915         == DBX_DEBUG, call dbxout_start_new_source_file and
21916         dbxout_resume_previous_source_file when appropriate.
21917
21918 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
21919
21920         * except.c (start_anon_func): Push to the top level.
21921         (end_anon_func): Pop from the top level.
21922
21923 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
21924
21925         * cp-tree.h (build_cleanup): New routine to build cleanups.
21926         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
21927         call at ctor time and use atexit to run it later.
21928         * decl2.c (build_cleanup): New routine, taken from finish_file.
21929         (finish_file): Use build_cleanup instead, and don't put function
21930         local statics in global dtor list.
21931
21932 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
21933
21934         * except.c (expand_throw): Ensure that we have cleanups, if we try
21935         and expand cleanups.
21936
21937 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
21938
21939         * except.c (expand_throw): Add logic to manage dynamic cleanups for
21940         the EH object.
21941         (expand_end_catch_block): Use the magic of expand_goto, instead of
21942         emit_jump so that we get the cleanup for any catch clause parameter
21943         and the cleanup for the exception object.  Update to reflect label
21944         changes.
21945         (push_eh_cleanup): New routine to register a cleanup for an
21946         exception object.
21947         (empty_fndecl): Used to default cleanup actions to
21948         nothing.
21949         (init_exception_processing): Setup empty_fndecl.  Setup
21950         saved_cleanup.
21951         (expand_start_catch_block): Update to reflect label changes.  Call
21952         push_eh_object to register the cleanup for the EH object.
21953         (start_anon_func): New routine to start building lambda expressions
21954         from trees.
21955         (end_anon_func): New routine to end them.
21956         (struct labelNode): Change so that we can use tree labels, or rtx
21957         labels.
21958         (saved_cleanup): Object to check for dynamic cleanups for the
21959         exception handling object.
21960         (push_label_entry): Change so that we can use tree labels, or rtx
21961         labels.
21962         (pop_label_entry): Likewise.
21963         (top_label_entry): Likewise.
21964         (expand_start_all_catch): Use tree label instead of rtx label, so
21965         that we can get the magic of expand_goto.
21966         (expand_end_all_catch): Update to reflect label changes.
21967
21968         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
21969         use UNSAVE_EXPRs.
21970         * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
21971         building_cleanup logic, as we now use UNSAVE_EXPRs.
21972         * cp-tree.h (unsave_expr): Declare it.
21973         * decl.c (building_cleanup): Remove.
21974         (maybe_build_cleanup): Remove building_cleanup logic, and use
21975         UNSAVE_EXPR instead.
21976
21977 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
21978
21979         * gc.c (build_t_desc): Update error message to say <typeinfo>.
21980
21981 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
21982
21983         * decl.c (pushdecl): Only warn about shadowing a local variable if
21984         warn_shadow is true.
21985
21986 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
21987
21988         * typeck.c (build_binary_op_nodefault): Added warning about
21989         comparisons between different enum types with -Wall, unless
21990         -fenum-int-equiv set.
21991
21992 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
21993
21994         * class.c (finish_struct_1): Skip down to the inner type in
21995         multidimensional arrays.  Ensures ctors will be made for types that
21996         need constructing.
21997
21998 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
21999
22000         * decl.c (last_dtor_insn): New to track the last compiler generated
22001         insn in a dtor.
22002         (store_parm_decls): Set it.
22003         (finish_function): Use it to see if the dtor is empty.  Avoid doing
22004         vtable setup all the time, if we can.
22005         (struct cp_function): Add last_dtor_insn.
22006         (push_cp_function_context): Save it.
22007         (pop_cp_function_context): Restore it.
22008
22009 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
22010
22011         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
22012         warnings.
22013
22014 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
22015
22016         * typeck.c (expand_target_expr): Make sure targets get put into the
22017         current temp_slot_level, so that the free_temp_slots call will reuse
22018         them.
22019
22020 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
22021
22022         * class.c (finish_struct_1): Delay delta fixups for virtual bases
22023         until after we have done the hard virtuals, to avoid a bogus `every
22024         virtual function must have a unique final overrider' for virtual
22025         functions that are only overridden by hard virtuals.
22026
22027 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
22028
22029         * pt.c (do_function_instantiation): Don't try to find a file-scope
22030         template for a member function.
22031
22032 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
22033
22034         * g++.c (main): Add handling of -nodefaultlibs.
22035
22036 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
22037
22038         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
22039         distinguish between direct bindings of reference variables, and
22040         indirect bindings of reference variables.
22041         * cvt.c (build_up_reference): Use it.
22042         * typeck.c (convert_arguments): Use it to indicate this is an
22043         indirect binding.
22044         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
22045         as they are unused.
22046         (expand_static_init): Likewise.
22047         (cplus_expand_expr_stmt): Likewise.
22048         * decl2.c (finish_file): Likewise.
22049         * init.c (perform_member_init): Likewise.
22050         (emit_base_init): Likewise.
22051         (expand_aggr_vbase_init_1): Likewise.
22052
22053 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22054
22055         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
22056         get a DECL_LANG_SPECIFIC node.
22057         * cp-tree.h (lang_decl_flags): Add new member `level'.
22058         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
22059         decl_flags level member.
22060
22061 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22062
22063         * call.c (build_method_call): Make sure instance has a
22064         TYPE_LANG_SPECIFIC node before we dive into it.
22065
22066 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
22067
22068         * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
22069
22070 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
22071
22072         * decl.c (duplicate_decls): When smashing decls, smash staticness in
22073         the usual way.
22074
22075 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
22076
22077         * decl.c (poplevel): Handle the merging of subblocks of cleanups
22078         when finishing blocks that have already been created (usually due to
22079         the fixup goto code).  Fixes bad debugging information.
22080
22081 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
22082
22083         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
22084         that's not a list of overloaded functions.
22085
22086 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22087
22088         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
22089         before trying to use DECL_ABSTRACT_VIRTUAL_P.
22090
22091 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
22092
22093         * decl2.c (mark_used): New function for hooking into setting of
22094         TREE_USED on decls.
22095         * call.c (build_method_call): Use it.
22096         * class.c (instantiate_type): Likewise.
22097         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
22098         for all like-named functions.
22099         * method.c (hack_identifier): Likewise.
22100         (emit_thunk): Don't call assemble_external.
22101         (make_thunk): Create thunk as a FUNCTION_DECL so that it
22102         gets the right mode and ENCODE_SECTION_INFO works.
22103
22104         * parse.y: Use mark_used.  Pass operator names to do_identifier.
22105         * lex.c (do_identifier): Handle operator names.
22106
22107         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
22108
22109 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22110
22111         * errfn.c: Include stdio.h.
22112         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
22113
22114 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
22115
22116         * typeck2.c (digest_init): Always convert initializers to the
22117         right type.
22118
22119 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
22120
22121         * init.c (member_init_ok_or_else): Don't allow member initializers
22122         for indirect members, as it is invalid.
22123
22124 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22125
22126         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
22127
22128 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
22129
22130         * parse.y (for.init.statement): Catch compound statements inside for
22131         initializations, if we're being pedantic.
22132
22133 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
22134
22135         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
22136         looking for.
22137
22138 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
22139
22140         * error.c (dump_expr): Don't core dump when a boolean expression is
22141         used as a default argument.
22142
22143 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
22144
22145         * class.c (finish_struct_bits): Check aggregate_value_p instead of
22146         RETURN_IN_MEMORY.
22147
22148 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
22149
22150         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
22151         BLKmode type that would otherwise be returned in registers.
22152
22153 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22154
22155         * g++.c (WITHLIBC): New macro.
22156         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
22157         saw_libc and pass it at the end if it was set.
22158
22159 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
22160
22161         * parse.y (fn.def1): Call split_specs_attrs in
22162         declmods notype_declarator case.