OSDN Git Service

* decl.c (start_decl): Use 'tem'.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
2
3         * decl.c (start_decl): Use 'tem'.
4
5 Thu May 14 16:30:47 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
6
7         * exception.cc: Include eh-common.h.
8         (struct cp_eh_info): add eh_info struct with NEW_EH_MODEL.
9         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
10         (__cp_push_exception): Initialize eh_info struct as well.
11         * except.c: Remove local structs and include eh-common.h.
12         (init_exception_processing): Set language and version codes.
13         (call_eh_info): add presence of eh_info to runtime description of 
14         struct cp_eh_info.
15         (expand_end_eh_spec): call start_catch_block() and end_catch_block().
16         * semantics.c (finish_try_block): call start_catch_block() and 
17         end_catch_block().
18         * parse.y (function_try_block): call start_catch_block() and 
19         end_catch_block().
20
21 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
22
23         * typeck.c (original_type): New function.
24         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
25         to see if they're actually the same.
26         * cp-tree.h (original_type): Declare.
27
28 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
29
30         * Makefile.in (lex.o): Depend on output.h.
31         
32         * call.c (add_function_candidate): Remove unused variable `cand'.
33         (add_conv_candidate): Likewise.
34         (build_builtin_candidate): Likewise.
35         
36         * cp-tree.h: Add prototype for `types_overlap_p'.
37
38         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
39
40         * decl2.c (merge_functions): Remove unused variables `tmp' and
41         `tempn'.
42
43         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
44         (code_as_string): Likewise.
45         (language_as_string): Likewise.
46         (parm_as_string): Likewise.
47         (op_as_string): Likewise.
48         (assop_as_string): Likewise.
49         (cv_as_string): Likewise.
50
51         * lex.c: Include output.h.
52
53         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
54
55         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
56         ATTRIBUTE_UNUSED.
57
58         * tinfo.cc (__class_type_info::dcast): Change the type of variable
59         `i' from int to size_t.
60
61         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
62         ATTRIBUTE_UNUSED.
63
64 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
65
66         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
67         DECL_NAMESPACE_SCOPE_P.
68         (lang_decl_name): Likewise.
69         * pt.c (tsubst_friend_function, tsubst): Likewise.
70         * decl.c (pushdecl, redeclaration_error_message, start_decl, 
71         cp_finish_decl, start_function): Likewise.
72         * class.c (finish_struct_1): Likewise.
73         * call.c (build_over_call): Likewise.
74         (compare_ics): Use DERIVED_FROM_P.
75
76 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
77
78         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
79         * method.c (build_mangled_name): Use it.
80         (build_decl_overload_real): Likewise.
81
82         * error.c (dump_simple_decl): New function, broken out from ...
83         (dump_decl): Use it.
84
85 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
86
87         * ptree.c (lang_print_xnode): Add missing `break'.
88
89         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
90
91         * call.c (add_template_candidate): Adjust for changes to
92         fn_type_unification. 
93         (add_template_candidate_real): Likewise.
94         (add_template_conv_candidate): Likewise.
95         (build_user_type_conversion_1): Likewise.
96         (build_new_function_call): Likewise.
97         (build_object_call): Likewise.
98         (build_new_op): Likewise.
99         (build_new_method_call): Likewise.
100         * class.c (instantiate_type): Likewise.
101         * cp-tree.h (unification_kind_t): New type.
102         (fn_type_unification): Adjust prototype.
103         (type_unificaiton): Likewise.
104         * pt.c (UNIFY_ALLOW_NONE): New macro.
105         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
106         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
107         (UNIFY_ALLOW_DERIVED): Likewise.
108         (unify): Change prototype.
109         (maybe_adjust_types_for_deduction): New function.
110         (check_cv_quals_for_unify): Likewise.
111         (determine_specialization): Adjust.
112         (fn_type_unification): Likewise.
113         (type_unification): Likewise.
114         (type_unification_real): Likewise.  Use
115         maybe_adjust_types_for_deduction.  Fix mishandling of
116         back-unification of template functions passed as arguments.  Pass
117         appropriate combination of UNIFY_ALLOW_* to unify.
118         (unify): Remove unused NTPARMS parameter.  Use
119         check_cv_quals_for_unify.  Remove bogus code that allowed
120         too-generous unification in order to adhere more closely to standard.
121         (get_bindings_real): Adjust.
122         (get_class_bindings): Likewise.
123
124         * method.c (build_overload_identifier): Only use the innermost
125         template arguments when mangling.
126         * pt.c (tsubst_template_argument_vector): New function.
127         (complete_template_args): Deal with the situation where the
128         extra_args contain more than one level of arguments.
129         (lookup_template_class): Deal with member template classes, which
130         may have more than one level of arguments.
131         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
132         Improve handling of member template classes.  Use
133         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
134         tsubst_template_argument_vector where appropriate.
135         (regenerate_decl_from_template): Break out from ...
136         (instantiate_decl): Here.
137         
138         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
139         * parse.h: Regenerated.
140         * parse.c: Really regenerated.
141         
142         * cp-tree.h (finish_unary_op_expr): New function.
143         (finish_id_expr): Likewise.
144         (begin_new_placement): Likewise.
145         (finish_new_placement): Likewise.
146         (finish_declarator): Likewise.
147         (finish_translation_unit): Likewise.
148         (finish_parmlist): Likewise.
149         (begin_class_definition): Likewise.
150         (finish_class_definition): Likewise.
151         (finish_default_args): Likewise.
152         (finish_inline_definitions): Likewise.
153         * parse.y (GCC_ASM_KEYWORD): Remove.
154         (TYPENAME_ELLIPSIS): Likewise.
155         * parse.c: Regenerated.
156         Use new functions in semantics.c in the actions for many rules.
157         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
158         * hash.h: Regenerated.
159         * semantics.c (finish_expr_stmt): Allow NULL expr.
160         (finish_unary_op_expr): New function, containing
161         code previously in parse.y.
162         (finish_id_expr): Likewise.
163         (begin_new_placement): Likewise.
164         (finish_new_placement): Likewise.
165         (finish_declarator): Likewise.
166         (finish_translation_unit): Likewise.
167         (finish_parmlist): Likewise.
168         (begin_class_definition): Likewise.
169         (finish_class_definition): Likewise.
170         (finish_default_args): Likewise.
171         (finish_inline_definitions): Likewise.
172
173 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
174
175         * typeck.c (build_c_cast): Don't decay arrays and functions to
176         pointer type when converting to a class type.
177
178 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
179
180         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
181         (DECL_CLASS_SCOPE_P): Likewise.
182
183 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
184
185         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
186         * decl2.c (constructor_name_full): Likewise.
187
188 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
189
190         * tree.c (mapcar): Add OVERLOAD support.
191
192         * init.c (resolve_offset_ref): We must use basetype_path before we
193         destroy it with a call to convert_pointer_to.
194
195 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
196
197         * class.c (currently_open_class): New fn.
198         * decl.c (lookup_name_real): Use it.
199         * search.c (lookup_field): Likewise.
200
201 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
202
203         * cp-tree.def (OVERLOAD): New node.  
204         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
205         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
206         (NAMESPACE_BINDING): Remove.
207         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
208         namespace_binding.
209         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
210         Define.
211         (tree_overload): New struct.
212         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
213         (REAL_IDENTIFIER_TYPE_VALUE): Define.
214         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
215         (lang_decl_flags): Remove in_namespace.
216         (lang_decl): Remove chain.
217         (DECL_CHAIN, DECL_NAMESPACE): Remove.
218         (flag_honor_std): Declare extern.
219         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
220         namespace_binding, set_namespace_binding,
221         lookup_function_nonclass, cat_namespace_levels,
222         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
223         scratch_ovl_cons, ovl_member, build_overload): Declare.
224         (decl_list_length, get_namespace_id, current_namespace_id,
225         overloaded_globals_p): Remove.
226         (lookup_using_namespace, qualified_lookup_using_namespace): Change
227         return type.
228         (push_scratch_obstack): New macro.
229         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
230         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
231         convs, fns.
232         (build_new_function_call): Iterate using OVL_CHAIN.  
233         Print DECL_NAME in when reporting ambiguities.
234         (build_object_call): Iterate using OVL_NEXT for fns, convs.
235         (build_new_op): Call lookup_function_nonclass.  
236         Iterate using OVL_NEXT.
237         (build_op_delete_call): Change detection of members.
238         Do not wrap TREE_LIST around fields and single global functions.
239         (build_over_call): Don't push a class level if the context is a
240         namespace.
241         (build_new_method_call): Iterate using OVL_NEXT.
242         * class.c (add_method): Chain overloaded members using
243         build_overload.  Remove copying of method.
244         (grow_method): When iterating through the obstack, expect OVERLOAD
245         nodes.  Chain overload members.
246         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
247         nodes in call to get_baselinks.
248         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
249         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
250         fdecls that are OVERLOAD nodes.
251         (validate_lhs): New function.
252         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
253         code. Use DECL_NAME in error messages. Split code between global
254         and member function processing.
255         * decl.c (global_type_node): New static variable.
256         (in_std): New global.
257         (struct binding_level): New field usings.
258         (resume_binding_level): Assert that we are not in a class.
259         (toplevel_bindings_p): Just check for namespace_p or
260         pseudo_global.
261         (resume_level): Remove.
262         (find_binding): New function.
263         (binding_for_name): Call it.
264         (namespace_binding, set_namespace_binding): New functions.
265         (push_namespace): Associate binding level with new namespace,
266         resume_binding_level for existing namespace.  Remove old code.
267         Fake std by counting.
268         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
269         (maybe_push_to_top_level): Save current namespace.
270         (pop_from_top_level): Restore saved namespace.
271         (pop_namespace): Call suspend_binding_level.  Remove old code.
272         (cat_namespace_levels): New function.
273         (set_identifier_type_value_with_scope): For namespace bindings,
274         set BINDING_TYPE, and use global_type_node.
275         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
276         (identifier_type_value): New function.
277         (pushtag): If no context, use current_namespace.
278         (duplicate_decls): Don't process DECL_CHAIN.
279         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
280         already set. Never reset it to NULL_TREE.  Lookup global variables
281         in their namespace.  Push overloaded templates if they are on
282         namespace level.
283         (pushdecl_namespace_level): New function.
284         (pushdecl_top_level): Implement using pushdecl_namespace_level.
285         (pushdecl_using_decl): New function.
286         (overloaded_globals_p): Remove.
287         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
288         them. Use namespace_binding and set_namespace_value.
289         (redeclaration_error_message): Complain if the declarations come
290         from different namespaces.
291         (lookup_tag): On namespace level, look in the BINDING_TYPE.
292         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
293         old code.
294         (select_decl): New function.
295         (lookup_name_real): Call it for qualified and unqualified lookup.
296         Pass tree_bindings from the stack.
297         If prefer_type is 1, also accept namespaces.
298         (lookup_function_nonclass): New function.
299         (init_decl_processing): Set the binding level of the global
300         namespace to global_binding_level.
301         Build a proper type list for __builtin_apply.
302         Initialize std_node to "fake std" if flag_honor_std is set.
303         Initialize global_type_node.
304         Allocated bad_alloc in namespace std if flag_honor_std.
305         (define_function): Set the DECL_CONTEXT to the current_namespace.
306         (start_decl): A namespace is not considered as a context here.  If
307         the DECL_CONTEXT is a namespace, push the decl.
308         (cp_finish_decl): Check for namespaces used as initializers.
309         (grokfndecl): Add namespace parameter.  Remove processing of
310         DECL_CHAIN.
311         (grokvardecl): Add namespace parameter.
312         (grokdeclarator): Process SCOPEs that are namespaces.  For
313         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
314         (start_function): Check for contexts that are namespaces.  
315         Set context for declarations that have not been pushed.
316         (store_parm_decls): Check for ::main only.
317         (finish_function): Likewise.
318         (start_method): Check for contexts that are namespaces.
319         (start_method): Remove DECL_CHAIN processing.
320         * decl2.c (flag_honor_std): Declare.
321         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
322         (decl_namespace_list): New static global.
323         (grok_x_components): Ignore namespaces as type contexts.
324         (check_classfn): Expect OVERLOAD nodes.
325         (grokfield): Remove DECL_CHAIN processing.
326         (finish_file): Call cat_namespace_levels.
327         (merge_functions): New function.
328         (ambiguous_decl): Rewrite.
329         (lookup_using_namespace): Produce tree_bindings.
330         (qualified_lookup_using_namespace): Likewise.
331         (set_decl_namespace, decl_namespace, current_decl_namespace,
332         push_decl_namespace, pop_decl_namespace): New functions.
333         (arg_lookup): New struct.
334         (add_function, arg_assoc_namespace, arg_assoc_class,
335         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
336         New functions.
337         (get_namespace_id, current_namespace_id): Remove.
338         (do_toplevel_using_decl): Rewrite.
339         (do_class_using_decl): Complain about namespace qualifiers.
340         (do_using_directive): Sorry if not on namespace level.  Complain
341         about unknown namespaces.
342         * error.c (dump_aggr_type): Check for namespace contexts.
343         * except.c (init_exception_processing): Push terminate into std.
344         * friend.c (is_friend): A namespace is not a context, here.
345         * init.c (expand_member_init): Remove DECL_CHAIN processing.
346         (build_offset_ref): Process OVERLOAD nodes.
347         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
348         * lex.c (identifier_type): Loop using OVL_CHAIN.
349         (see_typename): Set looking_for_typename to 2.
350         (real_yylex): Likewise. 
351         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
352         (do_scoped_id): Expect OVERLOAD nodes.
353         Change calling convention for qualified_lookup_using_namespace.
354         (build_lang_decl): Don't set in_namespace anymore.
355         * method.c (typevec_size): New global.
356         (build_overload_nested_name): Return if global_namespace.
357         Otherwise, always expect a declaration context.
358         (build_qualified_name): Likewise.
359         Make sure we don't write beyond typevec_size.
360         (build_decl_overload_real): Likewise.
361         Allocate one extra slot for the namespace.
362         (hack_identifier): Mark code dead.
363         Process OVERLOAD and NAMESPACE_DECL nodes.
364         * parse.y (program): Pop namespaces until in global namespace.
365         (extdef): In a using-declaration, don't discard the identifier if
366         there is no declaration.
367         (left_curly): Ignore type contexts which are namespaces.
368         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
369         used as scope.
370         * pt.c (template_class_depth): Expect types to be namespaces.
371         (determine_specialization): Simplify by expecting OVERLOAD nodes.
372         (push_template_decl): Push into namespace level.
373         Reset ctx if it is a namespace.
374         Set DECL_CONTEXT to current_namespace if not set already.
375         Ignore real contexts that are namespaces.
376         (mangle_class_name_for_template): Skip global_namespace.
377         Mangle other namepaces as declarations.
378         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
379         (lookup_template_class): Push into namespace of context.
380         If the context is a namespace, set it to global_namespace.
381         Use id_context for mangling.
382         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
383         (tsubst_friend_function): Ignore namespace contexts.
384         Push into namespace level.
385         (tsubst): Handle NAMESPACE_DECL nodes.
386         Remove DECL_CHAIN processing.
387         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
388         * ptree.c (print_lang_identifier): Print bindings.
389         (lang_print_xnode): Print OVERLOAD nodes.
390         * rtti.c (init_rtti_processing): Push type_info into std.
391         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
392         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
393         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
394         lookup_fnfields_here): Likewise.
395         Process all nodes, instead of going through TREE_CHAIN.
396         * sig.c (build_signature_pointer_or_reference_type): Set context
397         to global_namespace.
398         (build_signature_table_constructor): Expect OVERLOAD nodes.
399         * spew.c (yylex): Save old setting of looking_for_typename.
400         * tree.c (decl_list_length): Remove.
401         (binding_init): New function.
402         (count_functions): Rewrite.
403         (is_overloaded_fn): Expect OVERLOAD nodes.
404         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
405         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
406         ovl_member): New functions.
407         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
408         (type_unknown_p): Likewise.
409         (require_instantiated_type): Likewise.
410         (build_component_ref): Declare code dead.
411         (build_x_function_call): Create and expect OVERLOAD nodes.
412         (build_function_call_real): Check for ::main only.
413         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
414         (convert_for_assignment): Check for TREE_LIST before accessing
415         TREE_VALUE.
416         * decl.c (duplicate_decls): Check for namespace bindings instead
417         of global bindings.
418         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
419         lookup_name_current_level, start_decl, xref_tag, 
420         finish_enum): Likewise.
421         * init.c (build_offset_ref): Likewise.
422         * search.c (lookup_field): Likewise.
423         (lookup_fnfields): Likewise.
424         (dfs_debug_mark): Likewise.
425         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
426         (poplevel_class, pop_from_top_level): Likewise.
427         * decl2.c (finish_method): Likewise.
428         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
429         * decl.c (record_builtin_type): Likewise.
430         (init_decl_processing, grokfndecl): Likewise.
431         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
432         (make_lang_type): Likewise.
433         * parse.y (make_thunk): Likewise.
434         * pt.c (tsubst): Likewise.
435         * tree.c (debug_binfo): Likewise.
436         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h, 
437         tinfo2.cc, inc/new.h: Add std qualifications.
438         * inc/new: Wrap with namespace std if __HONOR_STD.
439         * inc/typeinfo: Likewise.
440
441 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
442
443         * call.c (build_user_type_conversion_1): Handle second_conv 
444         properly for templates.
445
446 Thu May  7 17:09:25 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
447
448         * method.c (build_decl_overload_real): Set TREE_USED flag to
449         zero for build_type_variants nodes as well.
450
451 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
452
453         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
454
455 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
456
457         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
458         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
459         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o, 
460         xref.o): Add toplev.h dependencies.
461
462 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
463
464         * errfn.c (cp_error, cp_warning): Remove declarations for
465         error and warning respectively.
466
467 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
468
469         * error.c: Convert to using ctype macros defined in system.h.
470         * method.c: Likewise.
471         * xref.c: Likewise.
472         * lex.c: Likewise.  Also remove redundant system header stuff.
473
474 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
475
476         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c, 
477         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c, 
478         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c, 
479         xref.c: Add include of toplev.h.
480
481 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
482
483         * tree.c (perm_manip): Also regenerate the RTL of an extern.
484         (copy_to_permanent): Use end_temporary_allocation.
485
486 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
487
488         * init.c (expand_vec_init): The initialization of each array
489         element is a full-expression.
490
491 Tue May  5 18:24:13 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
492
493         * method.c (build_mangled_name): Add a call to build_type_variant 
494         to get the right type.
495
496 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
497
498         * Makefile.in: Add .SUFFIXES.
499
500         * cp-tree.def: Remove NAMESPACE_DECL.
501
502 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
503
504         * call.c (build_over_call): Do evaluate arg even if it has empty 
505         class type.
506         * decl.c (start_function): Don't push a member function.
507
508 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
509
510         * Makefile.in (g++FAQ.info): Put -o option before input file.
511
512 Thu Apr 30 13:05:33 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
513
514         * gxxint.texi: Add info for squangling codes K and B.
515
516 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
517
518         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
519         the expression in templates.
520         (finish_stmt_expr): Likewise.
521
522 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
523
524         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
525
526 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
527
528         * decl.c (maybe_push_to_top_level): Always clear
529         current_template_parms and processing_template_decl.
530         (pushtag): Remove check of current_class_type and some comments,
531         since maybe_push_to_top_level no longer creates confusion.
532
533 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
534
535         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
536         (DECL_CLASS_TEMPLATE_P): Likewise.
537         (DECL_PRIMARY_TEMPLATE): Likewise.
538         (PRIMARY_TEMPLATE_P): Use it.
539         (push_template_decl_real): New function.
540         (redeclare_class_template): Take new template parameters as
541         input. 
542         (is_specialization_of): New function.
543         (comp_template_args): Declare.
544         * decl.c (pushtag): Handle friend template classes.
545         (xref_tag): Likewise.  Use new calling convention for
546         redeclare_class_template.
547         * decl2.c (grok_x_components): Handle friend templates.
548         * friend.c (is_friend): Use is_specialization_of where
549         appropriate.  Deal with friend class templates.
550         (make_friend_class): Let a class template be friends with itself.
551         * pt.c (comp_template_args): Remove declaration.
552         (tsubst_friend_class): New function.
553         (push_template_decl_real): New function.
554         (push_template_decl): Use it.
555         (redeclare_class_template): Adjust for new calling convention.
556         (comp_template_args): Give it external linkage.
557         (instantiate_class_type): Use tsubst_friend_class to deal
558         with friend templates.
559         * typeck.c (comptypes): Use comp_template_args, rather than
560         expanding it inline.
561         * parse.y (component_decl): Handle a nested template type 
562         like other component type declarations.
563
564         * pt.c (check_explicit_specialization): Handle overloaded
565         constructors correctly.
566
567         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
568         (lookup_template_class): Use it.
569
570 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
571
572         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
573         * cp-tree.h: Add WRAPPER support.
574         * call.c (add_candidate): Split out from add_*_candidate fns.
575         (build_over_call): Take the candidate instead of function and args.
576         Enforce access control here.  Emit overload warnings here.
577         (add_warning): New fn.
578         (joust): Add WARN parm.  If not set, call add_warning instead of
579         printing a warning.  Reenable some warnings.
580         (tourney): Pass it.
581         (convert_like): Adjust.
582         (build_new_op): Adjust.
583         (build_new_function_call): Adjust.
584         (build_user_type_conversion_1): Adjust.
585         (USER_CONV_FN): Adjust.
586         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper, 
587         build_int_wrapper): New fns.
588
589 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
590
591         * pt.c (unify): Fix typo in previous change.
592
593 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
594
595         * error.c (dump_type_real): Declare canonical_name.
596
597         * typeck.c (comp_target_types): Fix PMFs.
598
599 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
600
601         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
602         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
603         TEMPLATE_DECL.
604
605          * pt.c (tsubst): Decrease the template-level of
606          TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
607          TEMPLATE_PARM_INDEX.
608          (template_decl_level): New function.
609          (unify): Make sure to record unifications for template
610          parameters, even when the parameters exactly match the arguments.
611          Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
612          TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
613          aren't from the level we're currently working on.
614
615 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
616
617         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
618
619         * decl2.c (check_member_template): Set DECL_IGNORED for member
620         class templates, too.
621
622         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
623
624 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
625
626         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
627
628 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
629
630         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
631         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
632         (init_decl_processing): Handle TI types.
633         * typeck.c (unsigned_type, signed_type): Handle TI types.
634
635 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
636
637         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
638         New local added_libraries.  Increment count when add library to
639         arglist.
640
641 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
642
643         * cp-tree.h (type_as_string_real): New function.
644         * pt.c (mangle_class_name_for_template): Use it.
645         * error.c (dump_aggr_type): Change prototype.
646         (dump_type_prefix): Likewise.
647         (dump_type_suffix): Likewise.
648         (dump_type_real): Convert from dump_type.  If desired, the
649         "canonica" name of a typedef, i.e., the name of the underlying
650         type, can be printed.
651         (dump_type): Call dump_type_real.
652
653 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
654
655         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
656
657         * typeck.c (comp_target_types): Tweak pedantic case.
658         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
659         Return -1 or 1 instead of 1 or 2.
660         (compparms): Remove STRICT handling.
661         (convert_for_assignment): Fix handling of pmfs.
662
663 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
664
665         * typeck.c (comp_target_types): Handle references like pointers.
666         (comp_target_parms): Note that return code from comp_target_types
667         can be negative to indicate failure.
668
669 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
670
671         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
672         which requires a working target compiler to build.
673
674 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
675
676         * tree.c (avoid_overlap): Add prototype.
677
678         * spew.c (num_tokens): Add prototype.
679         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
680
681         * search.c (dfs_check_overlap): Add prototype.
682         (dfs_no_overlap_yet): Likewise.
683
684         * pt.c (original_template): Add prototype.
685         (inline_needs_template_parms): Likewise.
686         (push_inline_template_parms_recursive): Likewise.
687         (retrieve_specialization, register_specialization): Likewise.
688         (print_candidates, reduce_template_parm_level): Likewise.
689         (build_template_decl, mark_template_parm): Likewise.
690         (tsubst_friend_function, get_bindings_real): Likewise.
691
692         * method.c (start_squangling): Add prototype.
693         (end_squangling, check_ktype, issue_ktype): Likewise.
694         (build_overloaded_scope_ref, check_btype): Likewise.
695         (build_mangled_template_parm_index): Likewise.
696
697         * lex.c (init_cpp_parse): Add prototype.
698         (handle_cp_pragma, handle_sysv_pragma): Likewise.
699         (reduce_cmp, token_cmp): Likewise.
700
701         * except.c (call_eh_info): Add prototype.
702         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
703         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
704
705         * decl2.c (is_namespace_ancestor): Add prototype.
706         (namespace_ancestor, add_using_namespace): Likewise.
707         (ambiguous_decl): Likewise.
708
709         * decl.c (indent): Add prototype.
710
711         * call.c (add_template_candidate_real): Add prototype.
712
713 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
714
715         * decl2.c (build_expr_from_tree): Just return a PMF.
716
717 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
718
719         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
720         when doing initializations.
721
722         * pt.c (unify): Use comptypes to compare type args.
723
724 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
725
726         * decl.c (duplicate_decls): Fix check for when it's safe to free
727         the new decl.
728
729         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
730         to type_as_string.
731
732 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
733
734         * pt.c (build_template_parm_index): Add prototype.
735
736         * search.c (my_tree_cons): Don't clear words outside the
737         newly allocated node.
738
739 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
740
741         * lex.c (init_parse): Now returns char* containing the filename.
742
743 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
744                           Jeff Law   <law@cygnus.com>
745
746         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
747         than a pointer.
748
749 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
750
751         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
752
753 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
754
755         * decl.c (duplicate_decls): Don't warn for redundant decls if
756         friend: let add_friend take care of it.
757
758 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
759
760         * sig.c (build_signature_pointer_constructor): Don't set
761         TREE_HAS_CONSTRUCTOR for a signature pointer.
762         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
763         * init.c (resolve_offset_ref): Warn about implicit & on pmfs 
764         here, too.
765         * typeck.c (build_unary_op): Only allow taking the address of a 
766         real constructor.
767         * typeck2.c (digest_init): Simplify.
768         (store_init_value): Don't pedwarn about using { } for pmfs.
769
770 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
771
772         * cp-tree.h (start_decl):  Update prototype.
773         * decl.c (start_decl):  Like the C version, new parameters
774         for the attributes.  Call cplus_decl_attributes here,
775         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
776         (grokdeclarator):  Pass NULL for new start_decl arguments.
777         * pt.c (tsubst_expr):  Likewise.
778         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
779         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
780         * lex.c (build_lang_decl): Add lang_name_java.
781         * class.c (push_lang_context): Add lang_name_java.
782         * method.c (build_mangled_name): Check for is_java_type.
783
784 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
785
786         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
787         * call.c (build_scoped_method_call): Check for TREE_CODE for
788         VOID_TYPE instead of type ==  void_type_node.
789         (build_method_call): Ditto.
790         * decl.c (lookup_name_real): Ditto.
791         (grokdeclarator): Ditto.
792         (start_decl): Ditto.
793         (grokparms): Ditto.
794         (start_function): Ditto.
795         (finish_function): Ditto.
796         (start_method): Ditto.
797
798 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
799
800         * lex.c (finput): New variable.
801         (init_cpp_parse):  Renamed from init_parse.
802         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
803         (finish_parse): New function.
804         * cp-tree.h (init_lex, init_parse): Remove declarations.
805
806 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
807
808         * call.c (build_call): Still evaluate the actual argument.
809         * class.c (is_empty_class): Update for -fnew-abi.
810
811         * decl2.c: -fnew-abi implies -fsquangle.
812
813         * method.c (do_build_assign_ref): Don't do anything to copy
814         an empty class.
815         (do_build_copy_constructor): Likewise.
816         * call.c (build_over_call): Likewise.
817
818 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
819
820         * tree.c (avoid_overlap): Return a value.
821
822 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
823
824         * method.c (check_btype): Add missing argument to xrealloc.
825         (check_ktype): Likewise.
826
827 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
828
829         Implement empty base optimization.
830         * class.c (finish_struct_1): Add vbase fields earlier.  Set 
831         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
832         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
833         (types_overlap_p): New fn.
834         * tree.c (avoid_overlap): New fn.
835         (build_base_fields): Use it to avoid overlapping empty bases.
836         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
837
838         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
839
840         Re-implement allocation of base class subobjects.
841         * tree.c (unshare_base_binfos): New fn.
842         (layout_basetypes): Use it.  Now handles offsets of both virtual and
843         non-virtual bases, after layout_type.
844         (layout_vbasetypes): Remove.
845         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
846         (build_vbase_pointer_fields): Split out from old layout_basetypes.
847         * class.c (finish_base_struct): Lose offset handling code.
848         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
849         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
850         * cp-tree.h: Adjust.
851
852 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
853
854         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
855         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
856         * class.c (duplicate_tag_error): Likewise.
857         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
858         * tree.c (layout_vbasetypes): Update from layout_record, remove
859         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
860         (layout_basetypes): Likewise.
861
862 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
863
864         * class.c, Make sure system.h is included just after config.h.
865         Delete lingering stdio and errno references too.
866         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
867         
868 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
869
870         * friend.c (is_friend): Fix access control for local classes.
871
872         * class.c (is_empty_class): New fn.
873         * call.c (build_call): Don't pass empty class objects to a function.
874
875 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
876
877         * call.c (build_over_call): Do name resolution for default
878         arguments of function templates in the scope of the templates.
879
880 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
881
882         * call.c: Include system.h.  Remove includes, declarations and
883         defines provided by system.h.
884         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
885         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
886         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
887         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
888         * typeck2.c, xref.c: Likewise.
889         * Makefile.in: Dependencies updated as appropriate.
890         * Make-lang.in: Likewise.
891
892 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
893
894         * pt.c (fn_type_unification): Allow incomplete unification without 
895         an immediate error message.
896
897 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
898
899         * tree.c (member_p): New fn.
900         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
901         initializing class members.
902
903         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
904         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
905
906         * call.c (build_method_call): Handle non-scoped destructors, too.
907         * pt.c (tsubst_copy): Likewise.
908
909         * pt.c (print_template_context): Split out...
910         (push_tinst_level): ...from here.
911
912         * friend.c (is_friend): Don't pass a type to decl_function_context.
913
914         * typeck.c (convert_for_initialization): Always hand off
915         conversions to class type.
916
917 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
918
919         * friend.c (is_friend): Local classes have the same access as the
920         enclosing function.
921
922 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
923
924         * typeck.c (expand_target_expr): Delete dead function.
925
926         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
927
928         * repo.c (save_string): Delete dead function.
929
930         * method.c (thunk_printable_name): Delete dead function.
931
932         * lex.c (yynextch): Delete dead function.
933
934         * expr.c (tree_extract_aggr_init): #if 0 out.
935
936         * except.c (do_unwind): Delete dead function.
937         (easy_expand_asm): Likewise.
938
939         * cvt.c (build_conversion_type_1): Delete dead function.
940
941         * cp-tree.h (push_expression_obstack): Declare.
942
943         * call.c (source_type): #if 0 out.
944
945         * class.c (alter_access): Remove unused label.  Add braces
946         around empty else clause.
947
948         * lex.c (yyprint): Fix argument to printf.
949
950 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
951
952         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
953
954         * pt.c (instantiate_class_template): Make sure template
955         arguments are permanent.
956         * init.c (resolve_offset_ref): Don't go looking around in
957         template types.
958
959         * semantics.c: Add routines to handle expressions, and some
960         declaration processing.
961         * parse.y: Use them.
962         (current_class_depth): Move declaration to cp-tree.h.
963         * parse.c: Regenerated.
964         * cp-tree.h: Use them.
965         (current_class_depth): Declare.
966         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
967
968 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
969
970         * error.c (dump_decl): Be a bit more explicit with template
971         type arguments, when verbose.
972         
973 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
974
975         * inc/exception: Reorder closing braces.
976
977 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
978
979         * pt.c (redeclare_class_template): New function.
980         * cp_tree.h (redeclare_class_template): Declare it.
981         * decl.c (xref_tag): Use it.
982
983 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
984
985         * call.c (build_over_call): Check IS_AGGR_TYPE, not 
986         TYPE_LANG_SPECIFIC.
987         * typeck.c (convert_arguments): Likewise.
988
989         * decl.c (grokdeclarator): Remove const and volatile from type after
990         setting constp and volatilep.
991
992         * class.c (finish_struct_1): Don't warn about bool bitfield larger
993         than one bit.
994
995 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
996
997         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
998
999 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
1000
1001         * call.c (build_object_call): Complain about ambiguous operator(),
1002         rather that crashing.
1003         (build_new_op): Likewise.
1004         (build_op_delete_call): Likewise.
1005
1006 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
1007
1008         * cvt.c (perform_qualification_conversions): Use comp_target_types
1009         instead of comp_ptr_ttypes.
1010
1011 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
1012
1013         * cp-tree.h (enforce_access): Declare.
1014         * call.c (enforce_access): Make it extern, not static.
1015         * class.c (alter_access): Use enforce_access; modify code for ISO
1016         compliance, rather than ARM rules.
1017
1018 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
1019
1020         * cp-tree.h: Fix typo.
1021
1022 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
1023
1024         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
1025         if (aggregate_value_p (type)).
1026
1027         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
1028
1029 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
1030
1031         * tree.c (mapcar): When dealing with a DECL, use it's constant
1032         value, if any.
1033         * pt.c (lookup_template_class): Don't mangle the names of template
1034         classes whose arguments are unknown.
1035
1036         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
1037
1038 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
1039
1040         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
1041
1042 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
1043
1044         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
1045         boolean_type_node to 1.
1046
1047 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
1048
1049         * error.c (dump_expr): Remove unused variable `l'.
1050
1051         * pt.c (for_each_template_parm): New function, created by
1052         converting uses_template_parms.
1053         (tree_fn_t): New typedef.
1054         (uses_template_parms): Use it.
1055         (mark_template_parm): New function.
1056         (push_template_decl): Check that the argument list of a partial
1057         specialization uses all the template parameters.
1058
1059         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
1060         with it; we might want it for debugging.
1061         * cp-tree.h (type_unification): Change interface.
1062         * class.c (finish_struct_1): Skip nested template types, just like
1063         ordinary nested types.
1064         (instantiate_type): Use new interface to type_unification.
1065         * lex.c (init_lex): Add __sz as opname for sizeof.
1066         * method.c (build_overload_scope_ref): New function.
1067         (build_overload_int): Handle complex expressions.  Set
1068         numeric_output_need_bar if necessary.
1069         (build_overload_value): Handle non-PARM_DECL nodes; this
1070         routine is now used by build_overload_int.  Remove some
1071         assignments to numeric_output_need_bar.  Use
1072         build_overload_scope_ref.
1073         (build_qualified_name): Note that some template mangled names end
1074         with digits, and set numeric_output_need_bar appropriately.  Use
1075         build_underscore_int.
1076         * pt.c (unify): Change interface.
1077         (type_unification_real): Likewise.
1078         (determine_specialization): Use new interfaces.
1079         (tsubst): Deal gracefully with situations in which the argument
1080         vector is not fully filled.
1081         (fn_type_unification): Use new interfaces.
1082         (type_unification): Likewise.  Remove NOP_EXPR hack.
1083         (type_unification_real): Likewise.
1084         (unify): Likewise.  Deal with unification of complex expresions.
1085
1086 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
1087
1088         * pt.c (complete_template_args): Initialize skip properly.
1089
1090         * decl.c (make_typename_type): Revert.
1091         (make_implicit_typename): Remove.
1092         (lookup_name_real): Don't call it.  Call lookup_field if we see a
1093         TYPE_DECL from a template base.
1094         * search.c (lookup_field): Do implicit typename stuff.
1095
1096 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
1097                           Geoff Noer    <noer@cygnus.com>
1098
1099         * Makefile.in: Various fixes for building cygwin32 native toolchains.
1100         * Make-lang.in: Likewise.
1101
1102 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
1103
1104         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
1105
1106 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
1107
1108         * decl.c (make_implicit_typename): Rewrite removed code.
1109         (make_typename_type): Call it if the type we look up comes from
1110         a base that uses template parms.
1111
1112         * pt.c (complete_template_args): Rewrite.
1113         (tsubst, FUNCTION_DECL): Use it.
1114
1115 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
1116
1117         * semantics.c (finish_asm_stmt): Fix combine strings. Call
1118         c_expand_asm_operands () if output_operands, input_operands or
1119         clobbers is not NULL_TREE.
1120
1121 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
1122
1123         * pt.c (complete_template_args): New function.
1124         (get_bindings): Deal with specializations of function templates
1125         with return type containing parameters from outer class 
1126         templates.
1127         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
1128         substitute arguments and compose a new type.
1129
1130 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
1131
1132         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
1133         FUNCTION_DECLs.
1134
1135 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
1136
1137         * decl.c (make_implicit_typename): Lose useless code.
1138
1139         * call.c (standard_conversion): Handle A* -> const A* properly.
1140
1141         * pt.c (get_bindings_real): Rename from get_bindings.  Add 
1142         check_rettype parm.
1143         (get_bindings): Pass 1.
1144         (get_bindings_overload): Pass 0.
1145
1146 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
1147
1148         * pt.c (check_explicit_specialization): When reverting a static
1149         member function, also remove the `this' parameter from
1150         last_function_parms.
1151
1152 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
1153
1154         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
1155         a function context.
1156
1157         * decl.c (store_bindings): Use free_binding_vecs.
1158         (pop_from_top_level): Likewise.
1159
1160 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
1161
1162         * decl.c (make_implicit_typename): Only change the type of a 
1163         TYPENAME_TYPE.
1164
1165 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
1166
1167         * semantics.c: New file, containing routines to perform the
1168         semantic phase of parsing.
1169         * parse.y: Use it.
1170         * pt.c (tsubst_expr): Likewise.
1171         * cp-tree.h: Declare the various functions in semantics.c.
1172         Provide macros to access _STMT tree nodes.
1173         * cp-tree.def: Add ASM_STMT tree node.
1174         * Makefile.in, Make-lang.in: Add dependencies on and for
1175         semantics.c.
1176         
1177 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
1178
1179         * pt.c (push_template_decl): Only check primary templates.
1180
1181         * pt.c (check_explicit_specialization): Complain about default args
1182         in explicit specialization.
1183
1184         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a 
1185         constructor_declarator.
1186
1187 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
1188
1189         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
1190         has no overloaded operator ->.
1191
1192         * call.c (build_field_call): Don't crash when presented with a
1193         field that is actually a nested type.
1194
1195         * decl.c (pushtag): Deal with friend class injection in local
1196         classes.
1197
1198         * call.c (build_object_call): Don't crash if OBJ is a
1199         pointer-to-member-function.
1200
1201 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
1202
1203         * pt.c (push_template_decl): Complain about template with C linkage,
1204         anonymous template class.
1205
1206 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
1207
1208         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
1209         * search.c: Likewise.
1210
1211         * lex.c (do_pending_defargs): Only call 
1212         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
1213
1214         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
1215
1216 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
1217
1218         * parse.y: Deal with CONSTRUCTORS in new_initializers.
1219
1220 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
1221
1222         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
1223         closely mimics the behavior in parse.y.
1224         (tsubst_expr): Return the resuting BLOCK when making a tsubst'ing
1225         into a compound statement.
1226         
1227 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
1228
1229         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
1230         * pt.c (inline_needs_template_parms): New fn.
1231         (original_template): New fn.
1232         (push_inline_template_parms_recursive): New fn.
1233         (maybe_begin_member_template_processing): Use them.
1234         (maybe_end_member_template_processing): Likewise.
1235         (is_member_or_friend_template): Rename to is_member_template.
1236         Member functions of local classes are never member templates.
1237
1238 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
1239
1240         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
1241         added in the class scope to catch redefinition error.
1242
1243         * pt.c (reduce_template_parm_level): Also copy 
1244         the DECL_TEMPLATE_PARMS field.
1245
1246 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
1247
1248         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
1249         reduced-level template type parameter.
1250
1251 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
1252
1253         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
1254         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
1255         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
1256         * decl.c (duplicate_decls): Propagate it.
1257         * typeck2.c (abstract_virtuals_error): Use two loops to emit
1258         abstract virtual functions and virtual functions which need a
1259         final overrider separately.
1260         
1261 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
1262
1263         * lang-specs.h: Properly put brackets around array elements in 
1264         initializer.
1265
1266         * typeck.c (build_binary_op_nodefault): Correctly place parens around
1267         && and || in expression.
1268
1269 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
1270
1271         * call.c (default_parm_conversions): Remove prototype definition.
1272         (build_method_call): Remove unused variable result.
1273
1274         * cvt.c (ocp_convert): Remove unused variable conversion.
1275
1276         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
1277
1278         * except.c (do_unwind): #if 0 definition of unused variables fcall
1279         and next_pc.
1280
1281         * expr.c (extract_scalar_init): #if 0 prototype and function 
1282         definition.
1283
1284         * init.c (expand_aggr_init_1): Remove unused variable init_type.
1285         (build_new_1): Remove unused variable t.
1286
1287         * pt.c (instantiate_class_template): Remove unused variable newtag;
1288         cast called function return value to void.
1289         (do_decl_instantiation): Remove unused variables name and fn.
1290
1291         * tree.c (get_type_decl): Add default return to shut up compiler from
1292         complaining control reaches end of non-void function.
1293
1294         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
1295
1296 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
1297
1298         * call.c (default_parm_conversions): Remove prototype definition.
1299         (build_method_call): Remove unused variable result.
1300         (build_over_call): Add default case in enumeration switch.
1301
1302 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
1303
1304         * decl2.c (lang_decode_option): Change j's type to size_t.
1305
1306         * tree.c (layout_vbasetypes): record_align and desired_align are of
1307         type unsigned int; const_size and nonvirtual_const_size likewise.
1308
1309 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
1310
1311         * parse.y (new_initializer): Make sure all initializers are
1312         lists.
1313
1314 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
1315
1316         * decl2.c (import_export_decl): Mark tinfo functions for
1317         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
1318
1319 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
1320
1321         * method.c: Fix typo.
1322
1323 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1324
1325         * method.c: Include "system.h" to get stdlib.h, stdio.h,
1326         ctype.h, string.h, etc.
1327         (issue_nrepeats): Add default case in enumeration switch.
1328         (check_btype): Likewise.
1329         (process_overload_item): Likewise.
1330          
1331         * Makefile.in (method.o): Depend on system.h.
1332
1333 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1334
1335         * lex.c (do_scoped_id): Fix parenthesizing.
1336
1337 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
1338
1339         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
1340         FLAG_RTTI is unset, initialize type info machinery and continue
1341         with FLAG_RTTI enabled.
1342         (get_typeid): Ditto.
1343
1344 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
1345
1346         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
1347         from B.
1348
1349 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
1350
1351         * pt.c (finish_member_template_decl): Deal more gracefully with
1352         invalid declarations.
1353
1354 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
1355
1356         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
1357         cp-tree.h: Clean up more old overloading code, old RTTI code, and
1358         some formatting quirks.
1359
1360         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
1361         method.c, pt.c, ptree.c, typeck.c: Remove support for 
1362         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
1363         * class.h: Remove.
1364         * Makefile.in: Adjust.
1365
1366         * pt.c (unify): Don't allow reduced cv-quals when strict.
1367
1368         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
1369         *type_unification* and unify.
1370
1371 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
1372
1373         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
1374         (nested_name_specifier): And add it before this use.
1375         (typename_sub0): And this use.  Also add use without the keyword.
1376         (typename_sub1): Likewise.
1377         * pt.c (instantiate_class_template): Don't actually instantiate 
1378         anything if our type uses template parms.
1379
1380 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
1381
1382         * decl.c (start_function): Don't call temporary_allocation for a
1383         nested function.
1384
1385 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
1386
1387         * pt.c (instantiate_class_template): Don't mess with friends if
1388         our type uses template parms.
1389
1390 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
1391
1392         * parse.y (nested_name_specifier): Use explicit_template_type.
1393         (typename_sub): Allow a template_type, an explicit_template_type,
1394         or an implicit template type at the end.
1395         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
1396         * decl.c (make_typename_type): Handle template-id where the name
1397         is a TEMPLATE_DECL.
1398         * call.c (build_scoped_method_call): Handle member template 
1399         destructor call.
1400         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member 
1401         destructor is represented by the type.
1402
1403         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
1404         * parse.y (nested_name_specifier): Add 'template' case.
1405         (explicit_template_type): New rule.
1406         (typename_sub): Use it.
1407         * decl.c (make_typename_type): Handle getting a template-id for NAME.
1408         * pt.c (tsubst): Likewise.
1409
1410 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
1411
1412         * pt.c (add_to_template_args): Fix thinko.
1413         (instantiate_class_template): Call it later.
1414
1415         * pt.c (get_class_bindings): Add outer_args parm.
1416         (most_specialized_class): Likewise.
1417         (instantiate_class_template): Pass it.
1418         (more_specialized_class): Likewise.
1419         (lookup_template_class): Get context from template if none
1420         was specified.
1421         (finish_member_template_decl): Don't do anything with a
1422         partial specialization.
1423         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
1424         AGGREGATE_TYPE_P.
1425         * class.c (finish_struct): Member class templates have already been
1426         checked for name clashes.
1427         * decl.c (pushdecl_with_scope): Handle pushing at class level.
1428
1429 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
1430
1431         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
1432         (tsubst, *_PARM): Support multiple levels of template classes.
1433         (instantiate_class_template): Look up the pattern from the
1434         original template.
1435         (lookup_template_class): Handle getting a template for d1.
1436         (push_template_decl): Correct setting of 'primary'.
1437         (reduce_template_parm_level): Add 'levels' parm.
1438         (finish_member_template_decl): Support member class templates.
1439         (template_class_depth): Handle multiple levels.
1440         * parse.y (component_decl_1, fn.def2): Remove member template case.
1441         (component_decl): Add member template cases.
1442         * decl2.c (check_member_template): We now handle member template
1443         classes.
1444         * decl.c (pushtag): Handle member templates.
1445         * method.c (do_inline_function_hair): Don't touch
1446         IDENTIFIER_GLOBAL_VALUE.
1447         * init.c (build_offset_ref): If name isn't an identifier, just 
1448         return it.
1449         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
1450
1451         * typeck.c (get_delta_difference): Do adjust for conversions to
1452         and from virtual base.
1453
1454 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
1455
1456         * typeck.c (get_delta_difference): Give hard error for conversion
1457         from virtual base.
1458
1459         * cp-tree.h: Tweak formatting.
1460
1461 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
1462
1463         * decl.c (push_namespace): Handle redeclaration error.
1464
1465         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
1466         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
1467         (NAMESPACE_BINDING): New macro.
1468         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
1469         * *.c: Use them.
1470
1471         * pt.c (push_template_decl): Use innermost_args.
1472
1473         * decl.c (get_unique_name): Tweak from earlier in the name.
1474
1475 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
1476
1477         * cp-tree.def: Add CPLUS_BINDING node.
1478         * cp-tree.h (tree_binding): new struct
1479         (BINDING_SCOPE, BINDING_VALUE): new macros
1480         (current_namespace, global_namespace): declare extern
1481         (struct lang_decl_flags): new field in_namespace
1482         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): new macros
1483         (DECL_NAMESPACE, SET_DECL_NAMESPACE): new macros
1484         (TREE_INDIRECT_USING): new macro
1485         * decl2.c (current_namespace, global_namespace): Declare.  The
1486         value is a NAMESPACE_DECL now, not a TREE_LIST.
1487         (is_namespace_ancestor, namespace_ancestor):new static functions.
1488         (add_using_namespace, ambiguous_decl): likewise.
1489         (lookup_using_namespace): new support function for lookup_name.
1490         (qualified_lookup_using_namespace): new support function for
1491         do_scoped_id and lookup_namespace_name
1492         (get_namespace_id): mark as obsolete.
1493         (current_namespace_id): Likewise.
1494         (do_namespace_alias): Implement.
1495         (do_using_directive): Implement as call to add_using_namespace.
1496         * decl.c (binding_for_name): new function.
1497         (push_namespace, pop_namespace): implement.
1498         (push_decl): don't install a FUNCTION_DECL in the global branch.
1499         (lookup_namespace_name): implement using qualified lookup.
1500         (lookup_name_real): For global scoping, lookup in
1501         global_namespace. For namespace scoping, lookup in given
1502         namespace. For unscoped lookup, iterate over namespace,
1503         considering using directives.
1504         (init_decl_processing): initialize global_namespace.
1505         (grokvardecl): Build assembler name as static name for globals.
1506         (grokdeclarator): Remove old namespace mangling.
1507         (xref_tag): When installing a global binding for the
1508         tag, make sure we have an identifier.
1509         * method.c (build_overload_nested_name): mangle namespaces.
1510         (build_qualified_name): Likewise.
1511         (build_decl_overload_real): Likewise.
1512         * lex.c (build_lang_decl): set namespace for new declaration to
1513         current_namespace.
1514         (do_scoped_id): find global names in global or current
1515         namespace, or using qualified namespace lookup, depending on
1516         context.
1517         * init.c (build_member_call): When scope is namespace, use
1518         build_x_function_call instead.
1519         (build_offset_ref): When scope is namespace, collapse processing
1520         to lookup_namespace_name instead.
1521         * error.c (dump_decl): Support NAMESPACE_DECL.
1522         * decl.c (pushdecl): Bind globals to current namespace.
1523         (push_overloaded_decl): Likewise.
1524         (lookup_tag): Likewise.
1525         (lookup_name_current_level): Likewise.
1526         (xref_tag): Likewise.
1527         (start_function): Likewise.
1528         * lex.c (do_identifier): Likewise.
1529         (identifier_typedecl_value): Likewise.
1530         (real_yylex): Likewise.
1531         * method.c (do_inline_function_hair): Likewise.
1532         * parse.y (unscoped): Likewise.
1533         * pt.c (check_explicit_specialization): Likewise.
1534         (lookup_template_class): Likewise.
1535         * rtti.c (call_void_fn): Likewise.
1536         * sig.c (build_sigtable): Likewise.
1537         * ptree.c (lang_print_xnode): New function.
1538
1539 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
1540
1541         * pt.c (instantiate_class_template): Don't instantiate if pedantic
1542         and the args use template parms.
1543
1544         * pt.c (push_tinst_level): If the instantiaton uses template parms,
1545         fail silently.
1546         * decl.c (xref_basetypes): Do call complete_type for basetypes
1547         that involve template parameters.
1548
1549 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
1550
1551         * typeck2.c (process_init_constructor): Fix labeled init check.
1552
1553 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
1554
1555         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
1556         argument to tsubst and friends.
1557
1558         * pt.c (tsubst, FUNCTION_DECL): Tidy.
1559
1560         * typeck.c (build_x_function_call): Handle static member function
1561         templates like non-templates.  Handle friend templates like normal
1562         function templates.
1563         * pt.c (tsubst, *_PARM): Don't use orig_level.
1564         (get_bindings): Don't call add_to_template_args.
1565         (instantiate_template): Likewise.
1566         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
1567         * ptree.c (print_lang_type): Print index/level for template parms.
1568
1569 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
1570
1571         * Make-lang.in (cc1plus): Note that cc1plus depends on
1572         cp/cp-tree.h and cp/cp-tree.def.
1573         
1574         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
1575         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
1576         position in a template parameter list.
1577         * cp-tree.h (template_parm_index): New structure, used as the tree
1578         structure for a TEMPLATE_PARM_INDEX.
1579         (TEMPLATE_PARM_IDX): New macro.
1580         (TEMPLATE_PARM_LEVEL): Likewise.
1581         (TEMPLATE_PARM_DESCENDANTS): Likewise.
1582         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
1583         (TEMPLATE_PARM_DECL): Likewise.
1584         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
1585         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
1586         (TEMPLATE_TYPE_DECL): Likewise.
1587         (TEMPLATE_CONST_IDX): Remove.
1588         (TEMPLATE_CONST_LEVEL): Likewise.
1589         (TEMPLATE_CONST_SET_INFO): Likewise.
1590         (TEMPLATE_TYPE_SET_INFO): Likewise.
1591         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
1592         node.
1593         (TEMPLATE_TYPE_LEVEL): Likewise.
1594         * decl.c (decls_match): Call comp_template_parms, rather than
1595         expanding it inline.
1596         (duplicate_decls): If two template declarations are being merged,
1597         then their TEMPLATE_INFOs should be merged as well.
1598         (grokfndecl): Save template-id information when declaring a friend
1599         with explicit template arguments.  Pass arguments to
1600         check_explicit_specialization via correct convention; at some
1601         point check_explicit_specialization changed, but these call-sites
1602         did not.
1603         (grokdeclarator): Tidy up slightly.
1604         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
1605         two template functions with the same DECL_ASSEMBLER_NAME the same,
1606         since the names are not yet mangled.
1607         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
1608         TEMPLATE_CONST_PARM. 
1609         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
1610         decl for a non-type parameter, rather than printing `<tparm ...>'.
1611         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
1612         (do_friend): Deal with template friends.
1613         * lex.c (do_pending_inlines): Call
1614         maybe_begin_member_template_processing, rather than
1615         conditionally calling begin_member_template_processing.
1616         (process_next_inline): Likewise.  Call
1617         maybe_end_member_template_processing, rather than
1618         conditionally calling end_member_template_processing.
1619         (do_pending_defargs): Likewise.
1620         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
1621         TEMPLATE_CONST_PARM.  
1622         * method.c (build_mangled_template_parm_index): New function.
1623         (build_overload_value): Use it.
1624         (build_overload_name): Likewise.
1625         * pt.c (finish_member_template_decl): Allow friend declarations.
1626         (template_class_depth): New function.
1627         (is_member_template): Rename, and modify, to become...
1628         (is_member_or_friend_template): New function.
1629         (end_member_template_processing): Rename, and modify, to become...
1630         (maybe_end_member_template_processing).
1631         (build_template_parm_index): New function.
1632         (reduce_template_parm_level): New function.
1633         (process_template_parm): Modify to use build_template_parm_index.
1634         (push_template_decl): Deal with friend templates.
1635         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
1636         TEMPLATE_CONST_PARM.
1637         (tsubst_friend_function): New function.
1638         (instantiate_class_template): Generate the DECL_FRIENDLIST
1639         for a new instantiation by using tsubst_friend_function rather
1640         than just tsubst.
1641         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
1642         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
1643         appropriate new macros.  Use reduce_template_parm_level to
1644         generate lower-level template parameters.  Handle tsubst'ing into
1645         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
1646         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
1647         templates.  Similarly for the template parameters for a new
1648         template.
1649         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
1650         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
1651         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.  
1652         (get_bindings): Call add_to_template_args if necessary.
1653         (instantiate_decl): Handle instantiations of friend templates.
1654         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
1655         TEMPLATE_TYPE_PARM as a list of fields; it's not!
1656         * spew.c (yylex): Do a little manual constant propogation to
1657         clarify the code.
1658         
1659 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
1660
1661         * error.c: Include sys/types.h.
1662
1663 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
1664
1665         * method.c (build_mangled_name): Start CPP directives in column zero.
1666
1667 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
1668
1669         * typeck2.c (process_init_constructor): Sorry about non-trivial
1670         labeled initializers.
1671         * parse.y (initlist): Reenable labeled initializers.
1672
1673 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
1674
1675         * pt.c (coerce_template_parms) Add a new parameter, is_tmpl_parm,
1676         all callers changed.  Rely on the new parameter instead of arg 
1677         being a TREE_LIST when determine whether we are working inside
1678         template template parameter.  Clean up is_type test.
1679         
1680 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
1681
1682         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
1683         * typeck2.c (initializer_constant_valid_p): Allow conversions
1684         between pointers and refrerences.
1685
1686 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
1687
1688         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
1689         if pedantic || warn_pointer_arith.
1690
1691 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
1692
1693         * pt.c (unify): Handle TEMPLATE_DECL.
1694
1695 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
1696
1697         * cp-tree.h (strip_attrs): Remove decl.
1698
1699 1998-02-18  Doug Evans  <devans@cygnus.com>
1700
1701         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
1702         Update olddecl's attributes too.
1703         (strip_attrs): Remove function.
1704         * typeck.c (common_type): Call merge_machine_type_attributes.
1705
1706 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
1707
1708         * parse.y (initdcl0_innards): New grammar symbol.
1709         (nomods_initdecls, nomods_initdcl0): Change type from itype to
1710         none, since the resulting value is never used.
1711         (parse_decl): New function.
1712         (datadef): Remove redundant actions.
1713         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
1714         * parse.c: Regenerated.
1715         
1716 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
1717
1718         * parse.y (simple_stmt): Use getdecls() to check for decl.
1719
1720 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
1721
1722         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New 
1723         macros.
1724         (c++.install-common): Install c++filt properly as native or as cross
1725         variant.
1726         (c++.uninstall): Add c++filt.
1727
1728 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
1729
1730         * call.c (standard_conversion): Fix multi-level ptr conversions.
1731
1732 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
1733
1734         * init.c (build_new): Propagate error_mark_node up.
1735
1736 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
1737
1738         * parse.y (simple_stmt): If the condition isn't a declaration, 
1739         start the controlled block after the test.
1740
1741 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1742
1743         * call.c (build_over_call): Convert builtin abs, labs and fabs to
1744         tree-codes.
1745         * decl.c (init_decl_processing): Reenable abs, labs and fabs as
1746         builtins.
1747
1748 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
1749
1750         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
1751
1752 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
1753
1754         * cp-tree.h: Add access_protected_virtual_node.
1755         * class.c (init_class_processing): Initialize it.
1756         * decl.c (xref_basetypes): Use it.
1757         * parse.y (base_class_access_list): Likewise.
1758
1759         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
1760         (c++.install-common): Install c++filt.
1761
1762 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
1763
1764         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
1765
1766 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
1767
1768         * call.c (reference_binding): Use comptypes when comparing
1769         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
1770
1771 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
1772
1773         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
1774         (really_overloaded_fn): Move check here from is_overloaded_fn. 
1775         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
1776
1777 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
1778
1779         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
1780         conversions.
1781
1782 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
1783
1784         * cp-tree.h (push_template_decl): Return the decl passed in, or an
1785         equivalent duplicate.
1786         * decl.c (pushtag): Use the return value from push_template_decl.
1787         (duplicate_decls): When duplicating a template declaration, merge
1788         the DECL_TEMPLATE_RESULTs as well.
1789         (make_implicit_typename): Don't try to dive into typename types to
1790         find a context for making a new implicit typename.
1791         (start_decl): Use the return value from push_template_decl.
1792         (grokdeclarator): Complain about declarations list `const operator
1793         int'.  Since we don't correctly handle in-class initializations of
1794         non-static data members, complain about this (now illegal)
1795         practice.  Issue an error for initializations of non-const statics
1796         since that is illegal as well, and since we don't handle that case
1797         correctly either.
1798         (start_function): Use the return value from push_template_decl.
1799         (start_method): Likewise.
1800         * decl2.c (grokfield): Likewise.  Since the change to
1801         grokdeclarator ensures that all initialized fields are in fact
1802         static, remove a redundant test for TREE_PUBLIC.
1803         * parse.y (initlist): Disable labeled initializers since they do
1804         not work as per the documentation, and since they do not use the
1805         same syntax as the C front end.
1806         * pt.c (push_template_decl): Return the decl passed in, or an
1807         equivalent duplicate.
1808         (lookup_template_class): When searching in a nested context,
1809         use the right arguments.
1810         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
1811         * typeck.c (build_component_ref): Assign the correct type to the
1812         result of build_vfn_ref.
1813         
1814 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
1815
1816         * pt.c (convert_nontype_argument): Fix typo.
1817         (check_explicit_specialization): Allow old-style specialization
1818         of class template members.
1819
1820 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
1821                           Manfred Hollstein  <manfred@s-direktnet.de>
1822
1823         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
1824         when deciding to override DECL_ASSEMBLER_NAME.
1825
1826 Tue Feb 10 15:30:55 EST 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
1827
1828         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
1829         * cp-tree.h (flag_do_squangling): Add declaration.
1830         * lang-options.h: Add -fsquangle and -fno-squangle.
1831         * method.c: Add macros and static variables for squangling.
1832         (build_overload_name): Rename to build_mangled_name, add logic for B 
1833         compression, and split into process_modifiers and 
1834         process_overload_item.
1835         (process_modifiers): New function, to handle constant, reference, 
1836         and pointer types. 
1837         (process_overload_item): New function, handles issue of type codes.
1838         (build_overload_name): New function, start squangling and call 
1839         build_mangled_name.
1840         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
1841         (start_squangling): New function to initialize squangling structs.
1842         (end_squangling): New function to destroy squangling structs.
1843         (nrepeats): Rename variable to Nrepeats.
1844         (issue_nrepeats): New function for issuing 'n' type repeats.
1845         (check_ktype): New function to check for type K name compression.
1846         (build_overload_nested_name): Add a check for K name compression.
1847         (build_qualified_name): Add a check for K name compression and don't
1848         use DECL_ASSEMBLER_NAME when squangling is on.
1849         (check_btype): New function, checks for B type compression.
1850         (build_static_name, build_decl_overload_real): Initiate squangling.
1851         (build_typename_overload, build_overload_with_type): Initiate 
1852         squangling
1853
1854 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
1855
1856         * method.c (make_thunk): Avoid name buffer overflow.
1857
1858 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
1859
1860         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
1861         don't define them yet.
1862
1863         * parse.y (nomods_initdcl0): Add constructor_declarator case.
1864
1865 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1866
1867         * config-lang.in (diff_excludes): Use basename only.
1868
1869 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
1870
1871         * tinfo2.cc: Add tinfo for signed char.
1872
1873 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
1874
1875         * search.c (compute_access): Handle protected constructors in derived
1876         classes as accessible.
1877
1878 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
1879
1880         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
1881         Call convert_from_reference sooner.
1882
1883 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
1884
1885         * cvt.c (ocp_convert): Obtain the constant values from constant
1886         decls even if the destination type is the same as the type of the
1887         decl. 
1888
1889         * decl2.c (finish_file): Make sure that static inlines with
1890         definitions are not marked DECL_EXTERNAL before returning.
1891
1892 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
1893
1894         * decl.c: Lose arg_looking_for_template.
1895         (lookup_name_real): Likewise.
1896         * parse.y: Lose processing_template_arg, template_arg1
1897         (primary): Likewise.
1898         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
1899
1900 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
1901
1902         * error.c (dump_decl): Fix type of default arguments for template
1903         template parameters and nontype template parameters.
1904         * parse.y (template_parm): Handle invalid default template 
1905         template arguments here.
1906
1907         * parse.y (template_parm): Use template_arg instead of PTYPENAME 
1908         for default template template argument.
1909         * pt.c (coerce_template_parms): Merge default template argument 
1910         codes.  Can treat RECORD_TYPE as template name if it is implicitly
1911         created.  Fix argument index in error message.
1912         * typeck.c (comptypes): Merge template argument comparison codes in 
1913         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
1914
1915 Tue Jan  6 01:42:44 1998  Mumit Khan <khan@xraylith.wisc.edu>
1916
1917         * lex.c (file_name_nondirectory): Also check for '/'.
1918
1919 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
1920
1921         * parse.y (primary): Deal with statement-expressions in
1922         templates. 
1923         * pt.c (tsubst_copy): Handle BIND_EXPR.
1924         * tree.c (mapcar): Likewise.
1925
1926         * call.c (add_template_candidate_real): Pass extra parameter to
1927         fn_type_unification. 
1928         * cp-tree.h (fn_type_unification): Add parameter.
1929         * pt.c (fn_type_unification): Add additional parameter to deal with
1930         static member functions.
1931         (get_bindings): Deal with static member functions.
1932
1933         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.      
1934         (revert_static_member_fn): Declare.
1935         * decl.c (revert_static_member_fn): Remove declaration.  Change
1936         linkage from internal to external.
1937         (cp_finish_decl): Deal with virtual functions in classes local to
1938         template functions.
1939         * decl2.c (finish_file): Don't forget to emit increment/decrement
1940         expressions in initializers for file-scope variables.
1941         * parse.y (typename_sub2): If the typename doesn't names a
1942         template, rather than a type, issue an error message.
1943         * pt.c (check_explicit_specialization): Handle specializations of
1944         static member functions.
1945         (coerce_template_parms): Handle offset references to lists of
1946         member functions.
1947         * search.c (note_debug_info_needed): Don't crash when handed a
1948         type which is being defined.
1949         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
1950         that can happen with some illegal code.
1951
1952 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1953
1954         * call.c (user_harshness): Initialize `code' to 0.
1955         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
1956         (null_ptr_cst_p): Add parentheses around && within ||.
1957         (standard_conversion): Likewise.
1958         (z_candidate): Likewise.
1959         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
1960         (build_object_call): Likewise for `mem_args'.
1961         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
1962         default case in enumeration switch.
1963
1964         * class.c (build_vtable_entry): Add explicit braces to avoid
1965         ambiguous `else'.
1966         (build_class_init_list): Likewise.
1967         (finish_struct_1): Initialize `width' to 0.
1968         (instantiate_type): Initialize `name' to NULL_TREE.  Add
1969         explicit braces to avoid ambiguous `else'.
1970
1971         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
1972         `else'.
1973
1974         * decl.c (grok_reference_init): Eliminate unused parameter, all
1975         callers changed.
1976         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
1977         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
1978         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
1979         (grokdeclarator): Add parentheses around && within ||.  Add
1980         explicit braces to avoid ambiguous `else'.
1981         (grokparms): Initialize `type' to NULL_TREE.
1982         (xref_tag): Remove unused label `just_return'.
1983         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
1984         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
1985         (hack_incomplete_structures): Add parentheses around assignment
1986         used as truth value.
1987
1988         * decl2.c (coerce_delete_type): Hide definition of `e3'.
1989
1990         * error.c: Include <stdlib.h>.
1991         (dump_expr): Change the type of `i' to size_t.  Remove unused
1992         label `error'. 
1993
1994         * except.c (init_exception_processing): Remove unused variable `d'.
1995         (expand_throw): Likewise for `label'.
1996
1997         * friend.c (add_friends): Add explicit braces to avoid ambiguous
1998         `else'.
1999
2000         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
2001         (sort_base_init): Likewise for `binfo'.
2002         (expand_member_init): Likewise for `rval'.
2003         (build_member_call): Add parentheses around assignment used as
2004         truth value.
2005         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
2006         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
2007         `old_immediate_size_expand' to 0.
2008         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
2009         (build_vec_delete_1): Remove unused variable `block'.
2010         (expand_vec_init): Initialize `itype' to NULL_TREE.
2011
2012         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
2013         declaration of `index' and `rindex' with autoconf macros.
2014         (reinit_parse_for_expr): Remove unused variables
2015         `look_for_semicolon' and `look_for_lbrac'.
2016         (cons_up_default_function): Initialize `args' to NULL_TREE.
2017         (readescape): Initialize `firstdig' to 0.
2018         (real_yylex): Add parentheses around assignment used as truth value. 
2019
2020         * method.c: Include <strings.h> if we don't have <string.h>.
2021         Protect declaration of `index' with autoconf macro.
2022
2023         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
2024         Initialize `type' to NULL_TREE.
2025         (structsp): Remove unused variable `id'.
2026
2027         * pt.c (coerce_template_parms): Add explicit braces to avoid
2028         ambiguous `else'.
2029         (lookup_template_class): Initialize `template' to NULL_TREE.
2030         (instantiate_class_template): Remove unused variable `name' and `e'.
2031         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
2032         (do_poplevel): Initialize `saved_warn_unused' to 0.
2033         (type_unification): Remove unused varable `parm'.
2034         (unify): Likewise for `j'.
2035
2036         * repo.c (init_repo): Add parentheses around assignment used as
2037         truth value.
2038         (finish_repo): Remove unused varable `p'.
2039         
2040         * search.c (get_binfo): Initiize `type' to NULL_TREE.
2041         (get_base_distance): Likewise.
2042         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
2043         and `new_v' to NULL_TREE.
2044         (lookup_fnfields): Likewise for `rval_binfo_h'.
2045         (breadth_first_search): Add parentheses around assignment used as
2046         truth value.
2047         (get_template_base): Initialize `type' to NULL_TREE.
2048
2049         * sig.c (append_signature_fields): Initialize `last_mfptr' to
2050         NULL_TREE.
2051         (build_signature_table_constructor): Likewise for
2052         `last_rhs_field', `pfn' and `vt_off'.
2053         (build_sigtable): Likewise for `init'.
2054
2055         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
2056         (propagate_binfo_offsets): Likewise for `delta'.
2057         (hash_tree_cons): Initialize hashcode to 0.
2058         (can_free): Likewise for `size'.
2059         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
2060         
2061         * typeck.c (convert_sequence): Hide prototype.
2062         (common_type): Add explicit braces to avoid ambiguous `else'.
2063         (comp_target_types): Likewise.
2064         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
2065         (build_function_call_real): Add explicit braces to avoid ambiguous
2066         `else'.
2067         (convert_arguments): Initialize `called_thing' to 0.
2068         (convert_for_initialization): Initialize `savew' and `savee' to 0.
2069
2070         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
2071         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
2072         (build_x_arrow): Likewise for `last_rval'.
2073
2074         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
2075
2076 Sun Feb  1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
2077
2078         * decl.c (init_decl_processing): Use set_sizetype.
2079         * decl2.c (sizetype): Don't declare.
2080         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
2081         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
2082         (build_component_addr, unary_complex_lvalue): Likewise.
2083         * rtti.c (expand_class_desc): Likewise.
2084         * class.c (get_vfield_offset): Likewise.
2085
2086 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
2087
2088         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
2089         early to avoid bogus error.  Handle overloaded function
2090         names provided as template arguments correctly.
2091         (coerce_template_parms): Don't mishandle overloaded functions when
2092         dealing with template template parameters.
2093         (lookup_template_class): Issue an error message, rather than
2094         crashing, when the TYPE_DECL provided is not a template type.
2095
2096 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
2097
2098         * class.c (instantiate_type): Don't just return a known type if
2099         it's wrong.
2100
2101 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
2102
2103         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
2104         since that code could never be reached.
2105         
2106         * error.c (dump_decl): Avoid aborting in the midst of printing an
2107         error message about an illegal template declaration.
2108
2109         * parse.y (structsp): Print an error message, rather than crashing,
2110         when a class-head does not name a class.
2111
2112         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
2113         template arguments as a g++ extension.
2114         
2115         * cp-tree.def (ALIGNOF_EXPR): New tree code.
2116         * decl2.c (grok_alignof): If processing_template_decl, just store
2117         the expression.
2118         * typeck.c (c_alignof): Likewise.
2119         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
2120         * error.c (dump_expr): Likewise.
2121         * pt.c (tsubst_copy): Likewise.
2122         * tree.c (cp_tree_equal): Likewise.
2123         * pt.c (uses_template_parms): Correctly determine whether or not a
2124         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
2125         folding can be done.
2126         
2127         * cp-tree.h (grok_enum_decls): Remove type parameter.
2128         * decl.c (grok_enum_decls): Likewise.
2129         * decl2.c (grok_x_components): Call grok_enum_decls
2130         unconditionally, since it will do nothing if there is no
2131         current_local_enum.  Use the new calling sequence.
2132         * pt.c (tsubst_enum): Use the new calling sequence for
2133         grok_enum_decls.
2134
2135         * decl.c (start_function): Make member functions of local classes
2136         in extern inline functions have comdat linkage here...
2137         (grokdeclarator): Rather than here.
2138         
2139 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
2140
2141         * pt.c (convert_nontype_argument): Use decl_constant_value.
2142
2143 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
2144
2145         * call.c (add_template_candidate_real): New function.
2146         (add_template_candidate): Use it.
2147         (add_template_conv_candidate): Likewise.
2148         (joust): Pass extra argument to more_specialized.
2149         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
2150         (is_local_class): Remove.
2151         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
2152         * cp-tree.h (is_local_class): Remove.
2153         (perform_array_to_pointer_conversion): Likewise.
2154         (finish_member_template_decl): Add.
2155         (check_explicit_specialization): Return a tree, not an int.
2156         (more_specialized): Take additional argument.
2157         (get_bindings): Likewise.
2158         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
2159         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
2160         (perform_array_to_pointer_conversion): Remove.
2161         * decl.c (saved_scope): Add processing_specialization,
2162         processing_explicit_instantiation fields.
2163         (maybe_push_to_top_level): Save them.
2164         (pop_from_top_level): Restore them.
2165         (grokfndecl): Use new return value from
2166         check_explicit_specialization. 
2167         (start_decl): Don't check flag_guiding_decls before pushing
2168         decls. 
2169         (cp_finish_decl): Remove previous (bogus) change.
2170         (grok_declarator): Use decl_function_context rather than
2171         is_local_class. 
2172         * decl2.c (finish_file): Pass extra argument to get_bindings.
2173         (build_expr_from_tree): Let build_x_component_ref check 
2174         validity of arguments rather than doing it here.
2175         * lex.c (cons_up_default_function): Remove code fooling with
2176         processing_specialization, processing_explicit_instantiation
2177         flags, as that is now done in {maybe_push_top,pop_from}_top_level. 
2178         * method.c (build_overload_identifier): Mangle local classes in
2179         template functions correctly.
2180         * parse.y (finish_member_template_decl): Move to pt.c.
2181         * pt.c (finish_member_template_decl): Moved here from parse.y.
2182         (print_candidates): New function.
2183         (determine_specialization): Change interface.  Properly look for
2184         most specialized versions of template candidates.
2185         (check_explicit_specialization): Fully process explicit
2186         instantiations. 
2187         (push_template_decl): Avoid looking at CLASSTYPE fields in
2188         FUNCTION_DECLS. 
2189         (determine_overloaded_function): Remove.
2190         (convert_nontype_argument): Change name from
2191         convert_nontype_parameter.  Use determine_overloaded_function
2192         instead of instantiate_type.
2193         (mangle_class_name_for_template): Handle type contexts as well as
2194         function contexts.
2195         (classtype_mangled_name): Likewise.
2196         (lookup_template_class): Likewise.
2197         (tsubst): Likewise.
2198         (more_specialized): Take explict template arguments as a
2199         parameter. 
2200         (most_specialized): Likewise.
2201         (get_bindings): Likewise.  Check that return types match before
2202         proclaiming a function a match.
2203         (do_decl_instantiation): Remove code searching for function to
2204         instantiate; that is now done in check_explicit_specialization.
2205         (add_maybe_template): Pass extra argument to get_bindings.
2206         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
2207         implementation.
2208         * typeck.c (build_component_ref): Check for invalid arguments.
2209
2210 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
2211
2212         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that 
2213         return_target and call_target are equivalent.
2214
2215         * pt.c (type_unification_real): Just accept function parms that
2216         don't use any template parms.
2217
2218 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
2219
2220         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
2221         unset DECL_NOT_REALLY_EXTERN.
2222
2223         * parse.y (typename_sub*): Fix std::.
2224
2225 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
2226
2227         * error.c (dump_decl): Fix type default template args.
2228         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
2229
2230 Fri Jan 23 18:34:37 1998  Mumit Khan <khan@xraylith.wisc.edu>
2231
2232         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
2233         (file_name_nondirectory): Use.
2234
2235 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
2236
2237         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
2238         that are not really present.  Substitute default arguments in 
2239         template template arguments.  Correctly convert TEMPLATE_DECL to 
2240         TEMPLATE_TEMPLATE_PARM.
2241         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM 
2242         are no longer treated specially here.
2243         * parse.y (template_template_parm): Fix copy error.
2244         * decl.c (grokdeclarator): Warn about missing `typename' for nested
2245         type created from template template parameters.
2246         * parse.y (bad_parm): Likewise
2247
2248         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
2249         (push_nested_class): Likewise.
2250         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
2251         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
2252         (copy_template_template_parm): Declare.
2253         * decl.c (arg_looking_for_template): New variable.
2254         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
2255         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
2256         node if arg_looking_for_template is nonzero.
2257         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
2258         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
2259         (grokdeclarator): Handle TEMPLATE_DECL.
2260         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
2261         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
2262         (dump_type_prefix, dump_type_suffix) Handle TEMPLATE_TEMPLATE_PARM.
2263         (dump_decl): Handle unnamed template type parameters.
2264         Handle template template parameters.
2265         (dump_function_name): Handle template template parameters.
2266         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef): 
2267         Handle TEMPLATE_TEMPLATE_PARM.
2268         * method.c (build_template_template_parm_names): New function.
2269         (build_template_parm_names): Handle TEMPLATE_DECL.
2270         (build_overload_nested_name, build_overload_name): 
2271         Handle TEMPLATE_TEMPLATE_PARM.
2272         * parse.y (maybe_identifier): New nonterminal.
2273         (template_type_parm): Use it.
2274         (template_template_parm, template_arg1): New nonterminal.
2275         (template_parm): Add template_template_parm rules.
2276         (template_arg): Set processing_template_arg.
2277         (template_arg1): Rules moved from template_arg.
2278         (primary, nonnested_type): Set arg_looking_for_template if we are
2279         processing template arguments.
2280         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
2281         (process_template_parm): Handle template template parameters.
2282         (coerce_template_parms, comp_template_args): Likewise.
2283         (mangle_class_name_for_template, lookup_template_class): Likewise.
2284         (uses_template_parms): Handle TEMPLATE_DECL and 
2285         TEMPLATE_TEMPLATE_PARM.
2286         (current_template_args): Handle TEMPLATE_DECL.
2287         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
2288         * search.c (dfs_walk, dfs_record_inheritance): 
2289         Handle TEMPLATE_TEMPLATE_PARM.
2290         * tree.c (copy_template_template_parm): New function.
2291         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
2292         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
2293
2294 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
2295
2296         * decl.c (start_decl): Don't allow duplicate definitions of static
2297         data members.
2298
2299         * call.c (build_user_type_conversion_1): Handle user-defined
2300         template conversion operators correctly.
2301
2302         * decl2.c (build_expr_from_tree): Issue an error message if the
2303         object in a COMPONENT_REF is a TEMPLATE_DECL.
2304         
2305         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
2306         
2307         * class.c (is_local_class): New function.
2308         * cp-tree.h (is_local_class): Declare it.
2309         (last_tree): Likewise.
2310         (begin_tree): Likewise.
2311         (end_tree): Likewise.
2312         (lookup_template_class): Change prototype.
2313         * decl.c (cp_finish_decl): Check for NULL where necesary.
2314         Consider FUNCTION_DECLS to declare objects with top-level binding,
2315         when calling make_decl_rtl.
2316         (grokdeclarator): Give members of local classes internal linkage.
2317         (start_function): Remove declaration of last_tree.
2318         (finish_function): Set flag_keep_inline_functions around call to
2319         rest_of_compilation if we are processing a member function in a
2320         local class.
2321         (start_method): Call push_template_decl for member functions of
2322         local classes in template functions.
2323         * decl2.c (import_export_decl): Don't give external linkage to
2324         instantiations of templates with internal linkage.
2325         * parse.y (last_tree): Remove declaration.
2326         (template_type): Pass extra parameter to lookup_template_class.
2327         (self_template_type): Likewise.
2328         (structsp): Move call to reset_specialization into left_curly.
2329         (left_curly): Call reset_specialization, and begin_tree.
2330         * pt.c (saved_trees): New variable.
2331         (mangle_class_name_for_template): Change prototype.  Use
2332         additional function context to name local classes in templates
2333         correctly. 
2334         (classtype_mangled_name): Pass the context.
2335         (push_template_decl): Handle local classes and templates, and
2336         member functions for such classes.
2337         (convert_nontype_parameter): Fix handling of pointer-to-member
2338         constants. 
2339         (lookup_template_class): Handle local classes in templates.
2340         (tsubst): Likewise.  Don't assume that template instantiations
2341         have external linkage; pay attention to the template declaration. 
2342         (mark_decl_instantiated): Likewise.
2343         (begin_tree): New function.
2344         (end_tree): Likewise.
2345         
2346         * decl.c (xref_basetypes): Don't call complete_type for basetypes
2347         that involve template parameters; that can lead to infinite
2348         recursion unnecessarily.
2349
2350         * pt.c (register_specialization): Do not register specializations
2351         that aren't ready to be registered yet.
2352         (check_explicit_specialization): Handle explicit specialization of
2353         constructors and destructors.
2354         (build_template_decl): New function.
2355         (push_template_delc): Handle out-of-class specializations of
2356         member templates.
2357         
2358         * pt.c (check_explicit_specialization): Set up the template
2359         information before registering the specialization.
2360         (coerce_template_parms): Fix thinko.
2361         (tsubst): Handle specializations of member templates correctly.
2362
2363         * class.c (finish_struct_methods): Remove calls to
2364         check_explicit_specialization from here.
2365         (finish_struct): And insert them here.
2366         * cp-tree.h (perform_qualification_conversions): New function.
2367         (perform_array_to_pointer_conversion): Likewise.
2368         (begin_explicit_instantiation): Likewise.
2369         (end_explicit_instantiation): Likewise.
2370         (determine_specialization): Renamed from
2371         determine_explicit_specialization. 
2372         (comp_template_parms): New function.
2373         (processing_explicit_instantiation): New variable.
2374         * cvt.c (perform_qualification_conversions): New function.
2375         (perform_array_to_pointer_conversion): Likewise.
2376         * decl.c (duplicate_decls): Don't consider template functions
2377         alike unless they have the same parameters.  Refine handling of
2378         instantiation/specialization mismatches.
2379         (start_decl): Don't call pushdecl for template specializations,
2380         since they don't affect overloading.
2381         (start_function): Likewise
2382         (grokfndecl): Call check_explicit_specialization a little later.
2383         Don't call duplicate_decls for memberm template specializations.
2384         (grokdeclarator): Don't update template_count for classes that are
2385         themselves specializations.  Remove use of `2' as parameter to
2386         grokfndecl since that value isn't used.
2387         * lex.c (cons_up_default_function): Save and restore
2388         processing_explicit_instantiation around calls to grokfield.
2389         * parse.y (finish_member_template_decl): New function.
2390         (component_decl_1): Use it.
2391         (fn.def2): Likewise.
2392         (template_arg_list_opt): New nonterminal.       
2393         (template_type): Use it.
2394         (self_template_type): Likewise.
2395         (template_id): Likewise.
2396         (object_template_id): Likewise.
2397         (notype_template_declarator): Likwise.
2398         (begin_explicit_instantiation): Likewise.
2399         (end_explicit_instantiation): Likewise.
2400         (explicit_instantiation): Use them.
2401         * pt.c (coerce_template_parms): Add parameters.
2402         (processing_explicit_instantiation): New variable.
2403         (convert_nontype_parameter): New function.
2404         (determine_overloaded_function): Likewise.
2405         (begin_explicit_instantiation): Likewise.
2406         (end_explicit_instantiation): Likewise.
2407         (retrieve_specialization): Likewise.
2408         (register_specialization): Likewise.
2409         (processing_explicit_specialization): Removed.
2410         (determine_specialization): Handle specializations of member
2411         functions of template class instantiations.
2412         (check_explicit_specialization): Refine to conform to standard.
2413         (comp_template_parms): New function.
2414         (coerce_template_parms): Call convert_nontype_parameter.
2415         (tsubst): Refine handling of member templates.  Use
2416         register_specialization. 
2417         (instantiate_template): Use retrieve_specialization.
2418         (do_decl_instantiation): Likewise.
2419         (instantiate_decl): Likewise.
2420         (type_unification): Improve handling of explict template
2421         arguments. 
2422         * tree.c (mapcar): Return error_mark_node, rather than aborting,
2423         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
2424         * typeck.c (build_unary_op): Call determine_specialization, rather
2425         than determine_explicit_specialization.
2426
2427 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
2428
2429         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
2430
2431 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
2432
2433         * error.c (dump_decl): For enum tags, output the tag, not its value.
2434
2435 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
2436
2437         * decl.c (init_decl_processing): Only call init_rtti_processing
2438         FLAG_RTTI is set.
2439
2440 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
2441
2442         * init.c (build_new_1): Split out from build_new.
2443         (build_new): Just return a NEW_EXPR.
2444         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
2445
2446         * decl2.c (get_temp_regvar): Tweak.
2447
2448         * cp-tree.h (TREE_CALLS_NEW): Comment out.
2449         * class.c (resolves_to_fixed_type_p): Remove use.
2450         * method.c (build_opfncall): Likewise.
2451         * call.c (build_new_op): Likewise.
2452
2453 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
2454
2455         * exception.cc (__eh_alloc, __eh_free): New fns.
2456         (__cp_push_exception, __cp_pop_exception): Use them.
2457         (__uncatch_exception): Call terminate here if no exception.
2458         * except.c (build_terminate_handler): New fn.
2459         (expand_start_catch_block): Use it.
2460         (expand_exception_blocks): Likewise.
2461         (alloc_eh_object): New fn.
2462         (expand_throw): Use it.  Protect exception init with terminate.
2463         * typeck.c (build_modify_expr): Remove code that ignores trivial 
2464         methods.
2465
2466 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2467  
2468         * call.c (add_builtin_candidate): Add default case in enumeration
2469         switch.
2470         (build_new_op): Likewise.
2471         (convert_like): Likewise.
2472         * cvt.c (build_expr_type_conversion): Likewise.
2473         * tree.c (real_lvalue_p): Likewise.
2474         (lvalue_p): Likewise.
2475         (cp_tree_equal): Likewise.
2476         * typeck.c (comptypes): Likewise.
2477         (build_component_ref): Likewise.
2478         (build_function_call_real): Likewise.
2479         (build_binary_op_nodefault): Likewise.
2480         (build_unary_op): Likewise.
2481         (build_modify_expr): Likewise.
2482         * typeck2.c (initializer_constant_valid_p): Likewise.
2483
2484 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
2485
2486         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
2487
2488 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
2489
2490         * pt.c (coerce_template_parms): Make sure to digest_init if
2491         possible.
2492
2493         * decl.c (duplicate_decls): Make the newdecl virtual if the
2494         olddecl was, just as is done with other attributes of olddecl.
2495
2496 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
2497
2498         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the 
2499         address of an OFFSET_REF.
2500
2501         * cp-tree.def: Add AGGR_INIT_EXPR.
2502         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
2503         AGGR_INIT_EXPR where appropriate.
2504         * expr.c (cplus_expand_expr): Likewise.  Simplify.
2505
2506         * decl2.c (finish_file): Remove call to register_exception_table.
2507
2508 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
2509
2510         * pt.c (instantiate_class_template): Don't do injection when
2511         processing_template_decl is true, as pollutes current_binding_level 
2512         for base classes.
2513
2514 Wed Dec 17 21:17:39 1997  Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
2515
2516         * pt.c (maybe_fold_nontype_arg): Add prototype.
2517
2518 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
2519
2520         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
2521         * error.c (dump_expr): Likewise.
2522
2523 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
2524
2525         * typeck.c (build_function_call_real): Remove "inline called before
2526         definition" pedwarn.
2527
2528         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
2529
2530 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
2531
2532         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
2533
2534         * pt.c (type_unification_real): Change __null to type void* with 
2535         a warning.
2536
2537 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
2538
2539         * call.c (implicit_conversion): Don't call
2540         build_user_type_conversion_1 with a NULL expr, since it will
2541         crash. 
2542
2543         * pt.c (unify): Don't try to unify array bounds if either array is
2544         unbounded.
2545
2546 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
2547
2548         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at): 
2549         Replace extern decls with casts.
2550
2551         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
2552         Update last_parm_cleanup_insn.
2553         (store_after_parms): Remove.
2554         * cp-tree.h: Adjust.
2555
2556 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
2557
2558         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
2559         (finish_file): Check DECL_COMDAT instead of weak|one_only.
2560         (import_export_vtable): Use make_decl_one_only instead of
2561         comdat_linkage for win32 tweak.
2562         (import_export_decl): Likewise.
2563         * pt.c (mark_decl_instantiated): Likewise.
2564
2565         * decl2.c (finish_file): Lose handling of templates in pending_statics.
2566
2567 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
2568
2569         * decl2.c (finish_file): Lose call to expand_builtin_throw.
2570         * except.c (expand_builtin_throw): Remove.
2571         * cp-tree.h: Remove ptr_ptr_type_node.
2572         * decl.c: Likewise.
2573
2574 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
2575         
2576         * decl.c (ptr_ptr_type_node): Define.
2577         (init_decl_processing): Initialize it.
2578         * cp-tree.h: Declare it.
2579         * exception.cc (__cp_exception_info): Use __get_eh_info.
2580         (__cp_push_exception): Ditto.
2581         (__cp_pop_exception): Ditto.
2582
2583         From Scott Snyder <snyder@d0sgif.fnal.gov>:
2584         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
2585         saved_pc.
2586         (init_exception_processing): Removed saved_pc initialization.
2587
2588 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
2589
2590         * pt.c (instantiate_decl): Defer all templates but inline functions.
2591
2592 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
2593
2594         * init.c (expand_vec_init): Don't fold a list of parameters.
2595
2596         * decl.c (copy_args_p): Handle copy elision for types with virtual
2597         bases.
2598         * call.c (build_over_call): Likewise.
2599
2600 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
2601
2602         * pt.c (lookup_template_function): Copy the template arguments,
2603         not just the list containing them, to the permanent obstack.
2604
2605 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
2606
2607         * except.c (expand_start_catch_block): suspend_momentary for the
2608         terminate handler.
2609
2610         * error.c (dump_decl): Handle LOOKUP_EXPR.
2611
2612 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
2613
2614         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
2615         permanent obstack if we are processing a template decl.
2616         * typeck.c (build_static_cast): Likewise.
2617         (build_const_cast): Likewise.
2618         (build_reinterpret_cast): Likewise.
2619
2620         * pt.c (coerce_template_parms): Coerce some expressions, even
2621         when processing_template_decl.
2622
2623 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
2624
2625         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
2626         handling of pointer difference expressions.
2627
2628         * typeck.c (comp_target_types): Comparison of function/method types
2629         is independent of nptrs.
2630
2631 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
2632
2633         * pt.c (tsubst): Avoid creating pointer to reference and
2634         reference to reference types.
2635
2636 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
2637
2638         * parse.y (do_id): New nonterminal.
2639         (template_id): Use it.
2640
2641 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
2642
2643         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
2644         * spew.c (yylex): Don't do_identifier here.
2645         * decl2.c (build_expr_from_tree): Revert last change.
2646
2647         * decl2.c (build_expr_from_tree): Expand the name for a method call.
2648         * parse.y (object_template_id): Don't try to take the DECL_NAME.
2649
2650 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
2651
2652         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
2653         alloc_expr.
2654         * call.c (build_op_delete_call): Adjust.
2655
2656         * except.c (expand_end_catch_block): Lose rethrow region.
2657         (expand_start_catch_block): Likewise.
2658         (expand_end_catch_block): Don't expand_leftover_cleanups.
2659
2660 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
2661
2662         * pt.c (tsubst): Remove tree_cons call (places redundant info into
2663         DECL_TEMPLATE_INSTANTIATION).   
2664
2665 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
2666
2667         * tree.c (is_overloaded_fn): Handle getting a fn template.
2668         (really_overloaded_fn): Likewise.
2669         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
2670         * pt.c (check_explicit_specialization): Tweak.
2671         (determine_explicit_specialization): Tweak.
2672
2673         * tree.c, cp-tree.h (get_target_expr): New fn.
2674
2675 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
2676
2677         * pt.c (check_explicit_specialization): Fix misspelling in
2678         diagnostic: `preceeded'.
2679         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
2680         `conversiona'.
2681
2682 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
2683
2684         * pt.c (determine_explicit_specialization): Avoid an internal
2685         error for bad specializations.
2686
2687         * method.c (build_overload_value): Handle SCOPE_REF.
2688
2689 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
2690
2691         * class.c (prepare_fresh_vtable): Enable even more complex MI
2692         vtable names.
2693
2694 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
2695
2696         * exception.cc (__check_eh_spec): Optimize a bit.
2697
2698         * exception.cc (__cp_pop_exception): Lose handler arg.
2699         * except.c (do_pop_exception): Likewise.
2700         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
2701         (expand_end_catch_block): Likewise.
2702
2703 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
2704
2705         * pt.c (check_explicit_specialization): Complain about using a 
2706         template-id for a non-specialization.
2707
2708 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
2709
2710         * repo.c: Prototype rindex only if needed.
2711         * xref.c: Likewise.
2712
2713 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
2714
2715         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
2716
2717 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
2718
2719         * typeck.c (build_const_cast): Handle references here instead of
2720         handing off to convert_to_reference.
2721
2722         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
2723         TerminateFunctionCall.
2724         (init_exception_processing): Likewise.  Terminate et al are now
2725         the fns, not ADDR_EXPRs.
2726         (various): Lose redundant assemble_external calls.
2727         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
2728
2729         * cp-tree.h (struct lang_decl_flags): Add comdat.
2730         (DECL_COMDAT): New macro.
2731         * decl.c (duplicate_decls): Propagate it.
2732         (cp_finish_decl): Handle it.
2733         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
2734
2735         * class.c: Remove static pending_hard_virtuals.
2736         (add_virtual_function): Take pointers to pending_virtuals
2737         and pending_hard_virtuals.
2738         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
2739
2740 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
2741
2742         * decl2.c (import_export_vtable): If we support one_only but not
2743         weak symbols, mark instantiated template vtables one_only.
2744         (import_export_decl): Likewise for tinfo functions.
2745         (finish_vtable_vardecl): Also write out vtables from explicitly 
2746         instantiated template classes.
2747         * pt.c (mark_class_instantiated): Revert last change.
2748
2749         * except.c (expand_throw): Call mark_used on the destructor.
2750
2751 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
2752
2753         * lex.c (lang_init): Enable flag_exceptions by default if no
2754         command line switch was specified.
2755
2756 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
2757
2758         * pt.c (unify): Handle `void' template parameters in
2759         specializations.
2760
2761 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
2762
2763         * rtti.c (build_dynamic_cast): Handle template case here.
2764         (build_dynamic_cast_1): Not here.
2765
2766         * typeck2.c (digest_init): Make copies where appropriate.
2767
2768         * decl2.c (delete_sanity): resolve_offset_ref.
2769
2770         * except.c: Call terminate without caching so many bits.
2771
2772         * except.c (expand_start_catch_block): Fix catching a reference
2773         to pointer.
2774
2775 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
2776
2777         * init.c (build_new): Copy size to the saveable obstack.
2778
2779         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
2780         TRY_CATCH_EXPR for now.
2781
2782 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
2783
2784         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
2785         has DECL_LANG_SPECIFIC.
2786
2787         * exception.cc (struct cp_eh_info): Add handlers field.
2788         (__cp_push_exception): Initialize it.
2789         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
2790         (__throw_bad_exception): Remove.
2791         * except.c (call_eh_info): Add handlers field.
2792         (get_eh_handlers): New fn.
2793         (push_eh_cleanup): Increment handlers.
2794
2795 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
2796
2797         * except.c (expand_start_eh_spec): Use the try/catch code.
2798         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
2799         doing everything inline.
2800         (init_exception_processing): throw_type_match now takes
2801         const void pointers.
2802         * exception.cc (__check_eh_spec): New fn.
2803         * inc/exception: Neither terminate nor unexpected return.
2804         * decl.c: Make const_ptr_type_node public.
2805         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
2806
2807         * except.c (expand_start_catch_block): We only need the rethrow
2808         region for non-sjlj exceptions.
2809         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
2810
2811 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
2812
2813         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
2814         (various.o): Likewise.
2815         * inc/new: Add placement deletes.  Add throw specs for default new.
2816         * new.cc (set_new_handler): Move here from libgcc2.
2817         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
2818         (new): Move from libgcc2.  Throw bad_alloc.
2819         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
2820         * decl.c (init_decl_processing): Update exception specs on new and
2821         delete.
2822
2823         * method.c (build_decl_overload_real): Don't mess with global 
2824         placement delete.
2825
2826         * init.c (build_new): Check for null throw spec, not nothrow_t.
2827
2828         * decl.c (duplicate_decls): Don't complain about different exceptions
2829         from an internal declaration.
2830
2831         * call.c (build_op_delete_call): Fix check for member fns again.
2832
2833         * decl2.c (import_export_decl): Interface hackery affects
2834         virtual synthesized methods.
2835
2836 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
2837
2838         * decl.c (start_decl): Don't just complain about a mismatched 
2839         scope, fix it.
2840
2841         * decl.c (make_implicit_typename): Handle case where t is not
2842         actually from context.
2843         * tree.c (get_type_decl): Lose identifier case.
2844         * spew.c (yylex): Lose useless call to identifer_typedecl_value.
2845         * parse.y (nonnested_type): Just use lookup_name.
2846         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
2847
2848 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
2849
2850         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
2851         T was built in C language context (for example, by
2852         output_func_start_profiler).
2853
2854 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
2855
2856         * decl.c (make_implicit_typename): New fn.
2857         (lookup_name_real): Use it.  Use current_class_type as the context.
2858
2859 Mon Nov 17 23:42:03 1997  Bruno Haible <haible@ilog.fr>
2860
2861         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
2862
2863 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
2864
2865         * friend.c (do_friend): Warn about non-template friends in templates.
2866
2867         * call.c (build_op_delete_call): Fix handling of inherited delete.
2868
2869         * search.c (dfs_record_inheritance): Ignore template type parms.
2870
2871 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
2872
2873         * call.c (build_new_op): Fix copy error.
2874         (build_op_new_call): New fn.
2875         (build_op_delete_call): New fn.
2876         * cp-tree.h: Declare them.
2877         * init.c (build_new): Use them.  Support placement delete.
2878         (build_x_delete): Use build_op_delete_call.
2879         (build_delete): Likewise.
2880         * decl2.c (delete_sanity): Likewise.
2881         (coerce_delete_type): Don't complain about placement delete.
2882
2883 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
2884
2885         * call.c (build_new_function_call): Remove unused 'obj' parm.
2886         * cp-tree.h, typeck.c: Adjust.
2887
2888         * init.c (build_new): Make the cleanup last longer.
2889         (expand_vec_init): Call do_pending_stack_adjust.
2890
2891 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
2892
2893         * pt.c (do_type_instantiation): Fix typo.
2894         (mark_class_instantiated): If we support one_only but not weak 
2895         symbols, don't mark this as known.
2896
2897         * init.c (build_new): Handle vec delete in EH cleanup.
2898
2899 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
2900
2901         * call.c (build_method_call): Call complete_type before checking
2902         for destructor.
2903
2904 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
2905
2906         * decl.c (add_block_current_level): Delete.
2907         * init.c (build_vec_delete_1): Delete build_block and
2908         add_block_current_level calls.
2909
2910 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
2911
2912         * init.c (build_new): Handle freeing allocated memory when the
2913         constructor throws.
2914
2915         * call.c (build_new_method_call): Fix flags arg.
2916
2917         * pt.c (do_type_instantiation): Don't try to instantiate
2918         member templates.
2919         (mark_decl_instantiated): If we support one_only but not
2920         weak symbols, mark this one_only.
2921         * decl2.c (import_export_vtable): Don't defer handling of vtables
2922         if MULTIPLE_SYMBOL_SPACES.
2923
2924 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
2925
2926         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
2927
2928 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
2929
2930         * except.c (do_pop_exception): Return a value.
2931
2932 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
2933
2934         * call.c (build_new_method_call): Handle getting a
2935         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
2936         if we got template parms.
2937         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
2938         not just the args.
2939         * decl2.c (build_expr_from_tree): Tweak last change.
2940         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
2941         (maybe_fold_nontype_arg): Split out from tsubst_copy.
2942         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
2943
2944 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
2945
2946         * pt.c (tsubst_copy): Handle explicit template arguments in 
2947         function calls.
2948         * typeck.c (build_x_function_call): Likewise.
2949         * decl2.c (build_expr_from_tree): Lookup function name if it 
2950         hasn't been done.
2951
2952         * pt.c (tsubst): Instantiate template functions properly when 
2953         template parameter does not appear in function arguments and return 
2954         type.
2955         (comp_template_args): Handle member templates required by tsubst.
2956
2957 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
2958
2959         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
2960         previous change.
2961
2962 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
2963
2964         * pt.c (coerce_template_parms): Tweak error message.
2965
2966         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
2967         return type defaults to `int', even if there are storage-class
2968         specifiers.
2969
2970 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
2971
2972         Complete nested exception support.
2973         * except.c (do_pop_exception): Split out...
2974         (push_eh_cleanup): From here.  Handle the EH region by hand.
2975         (expand_start_catch_block): Add a new level for the catch parm.
2976         Move the rethrow region outside the two cleanup regions.
2977         Protect the initializer for the catch parm with terminate.
2978         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
2979         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
2980         popping off the middle of the stack.
2981         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR, 
2982         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
2983         (build_cplus_new): Only wrap CALL_EXPRs.
2984         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around 
2985         the constructor call.
2986
2987 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2988
2989         * Make-lang.in (c++.distdir): Make inc subdirectory.
2990
2991 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
2992
2993         * decl2.c (finish_file): Put back some code.
2994
2995 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
2996
2997         * decl2.c (finish_file): Remove redundant code.
2998         * method.c (emit_thunk): Don't let the backend defer generic thunks.
2999
3000 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
3001
3002         * except.c (call_eh_info): Split out...
3003         (push_eh_info): From here.
3004         (expand_builtin_throw): Use it.
3005         (expand_start_catch_block): Move region start back.
3006
3007 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
3008
3009         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
3010         (real_yylex): Record wide strings using target endianness, not host.
3011
3012 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
3013
3014         * repo.c (rindex): Add decl unconditionally.
3015         (get_base_filename, open_repo_file): Don't cast rindex.
3016         * xref.c (rindex): Add decl unconditionally.
3017         (index): Remove unused decl.
3018         (open_xref_file): Don't cast rindex.
3019
3020 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
3021
3022         * class.c (build_vbase_path): Propagate the result type properly.
3023
3024 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
3025
3026         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
3027         remaining use of saved_throw_type with a call to get_eh_type.
3028
3029 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
3030
3031         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
3032         (file_name_nondirectory): New function, doing the same as the macro.
3033         (set_typedecl_interface_info): Use it instead of the macro.
3034         (check_newline): Likewise.
3035         (handle_cp_pragma): Likewise.
3036
3037         * repo.c (get_base_filename): Cast result of rindex to char*.
3038         (open_repo_file): Likewise.
3039         * xref.c (open_xref_file): Likewise.
3040         * error.c (dump_char): Make its arg int, not char.
3041
3042         * except.c (push_eh_info): Pass the number of fields - 1 down, not
3043         the exact number of fields.
3044
3045 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
3046
3047         Support for nested exceptions.
3048         * tinfo2.cc (__is_pointer): New fn.
3049         * exception.cc (struct cp_eh_info): Define.
3050         (__cp_exception_info, __uncatch_exception): New fns.
3051         (__cp_push_exception, __cp_pop_exception): New fns.
3052         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
3053         Lose empty_fndecl.
3054         (init_exception_processing): Likewise.  __eh_pc is now external.
3055         (push_eh_info): New fn.
3056         (get_eh_{info,value,type,caught}): New fns.
3057         (push_eh_cleanup): Just call __cp_pop_exception.
3058         (expand_start_catch_block): Use push_eh_info.  Start the eh region
3059         sooner.
3060         (expand_end_eh_spec): Use push_eh_info.
3061         (expand_throw): Call __cp_push_exception to set up the exception info.
3062         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
3063         when we rethrow.
3064         (expand_builtin_throw): Don't refer to empty_fndecl.
3065
3066 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
3067
3068         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
3069
3070 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
3071
3072         * method.c (build_template_parm_names, build_decl_overload_real):
3073         Add static to definitions.
3074         * pt.c (add_to_template_args, note_template_header,
3075         processing_explicit_specialization, type_unification_real): Likewise.
3076         ({determine,check}_explicit_specialization): Use a single string for
3077         error messages.
3078
3079 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
3080
3081         * except.c (expand_exception_blocks): Call do_pending_stack_adust.
3082         (expand_end_catch_block): Likewise.
3083         (expand_end_eh_spec): Likewise.
3084
3085 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
3086
3087         * decl.c (duplicate_decls): Handle template specializations
3088         correctly. 
3089         * error.c (dump_function_name): Fix printing of specializations of
3090         member functions that are not member templates.
3091         * cp-tree.h (processing_specialization): Make global.
3092         * pt.c (processing_specialization): Likewise.
3093         * lex.c (cons_up_default_function): Save and restore
3094         processing_specialization to avoid confusion.
3095         
3096 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
3097
3098         * decl.c (init_decl_processing): Give null_node unknown* type.
3099         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
3100         (common_type): Likewise.
3101         * error.c (args_as_string): Recognize null_node.
3102
3103 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3104
3105         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
3106         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
3107
3108         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
3109
3110         * Make-lang.in (g++): Include prefix.o.
3111
3112 Thu Oct 16 15:31:09 1997  Judy Goldberg <judygold@sanwafp.com>
3113
3114         * pt.c (determine_explicit_specialization): Initialize "dummy"
3115         to keep Purify quiet.
3116
3117 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
3118
3119         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
3120         (build_overload_int): Not here.
3121
3122 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
3123
3124         * class.c (build_type_pathname): Remove.
3125         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
3126
3127 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
3128
3129         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
3130         &&label GNU extension.
3131
3132 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
3133
3134         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
3135         so as to avoid incorrect manglings.
3136         * method.c (build_decl_overload_real): Don't mangle return types
3137         for constructors.
3138         
3139 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
3140
3141         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
3142         scratch_tree_cons): Define as macros for now.
3143         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c, 
3144         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
3145         typeck2.c: Use them and the expression_obstack variants.
3146
3147 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
3148
3149         * decl.c (store_return_init): Allow classes with explicit ctors to
3150         be used with the named return values extension.
3151
3152 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
3153
3154         * pt.c (instantiate_decl): Fix previous change.
3155
3156 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
3157
3158         * pt.c (tsubst): Fix thinko.
3159         (instantiate_decl): Really use the original template.
3160
3161         * call.c (build_new_method_call): Use simple constructor_name for
3162         error messages.
3163
3164 Wed Oct  8 22:44:42 1997  Jeffrey A Law  (law@cygnus.com)
3165
3166         * method.c (build_underscore_int): Don't use ANSI specific
3167         features.
3168
3169 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
3170
3171         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
3172         for our key method; it might have been inlined by -O3.
3173
3174 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
3175
3176         * decl.c (make_typename_type): Do not try to call lookup_field for
3177         non-aggregate types.
3178
3179 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
3180
3181         * typeck.c (build_reinterpret_cast): Tweak.
3182
3183 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
3184
3185         * typeck.c (build_reinterpret_cast): converting a void pointer
3186         to function pointer with a reinterpret_cast produces a warning
3187         if -pedantic is issued
3188
3189 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
3190
3191         * typeck.c (c_expand_return): Don't warn about returning a
3192         reference-type variable as a reference.
3193
3194 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
3195
3196         * method.c (build_static_name): Fix typo.
3197
3198 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
3199
3200         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
3201         OLDDECL before we try to do DECL_USE_TEMPLATE.
3202
3203 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
3204
3205         * decl.c (duplicate_decls): Don't warn about template instances.
3206
3207         * typeck.c (mark_addressable): Lose ancient code that unsets
3208         DECL_EXTERNAL.
3209
3210         * pt.c (do_decl_instantiation): Lose support for instantiating
3211         non-templates.
3212
3213         * call.c (build_new_function_call): Fix handling of null explicit
3214         template args.
3215         (build_new_method_call): Likewise.
3216
3217 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
3218
3219         * method.c (build_underscore_int): Fix typo.
3220
3221 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
3222
3223         * tree.c (print_lang_statistics): #if 0 call to
3224         print_inline_obstack_statistics until its definition is checked in.
3225
3226 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
3227
3228         * decl2.c (finish_file): Move dump_tree_statistics to end.
3229
3230         * pt.c (instantiate_decl): Look for the original template.
3231         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
3232         of member templates.
3233
3234 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
3235
3236         * Makefile.in (g++FAQ.*): New rules.
3237         (CONFLICTS): Update.
3238         * g++FAQ.texi: Moved from libg++.
3239
3240         * parse.y (PFUNCNAME): Only specify the type once.
3241
3242 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
3243
3244         * lex.c (real_yylex): Clean up the code to fully behave the way
3245         the c-lex.c parser does for complex and real numbers.
3246
3247 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
3248
3249         * method.c (build_decl_overload_real): Reformat.
3250
3251 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
3252
3253         * method.c (synthesize_method): If at_eof, determine our linkage.
3254
3255 1997-09-29  Paul Eggert  <eggert@twinsun.com>
3256
3257         * lex.c (real_yylex): Treat `$' just like `_', except issue a
3258         diagnostic if !dollars_in_ident or if pedantic.
3259
3260         * lang-specs.h (@c++): -ansi no longer implies -$.
3261
3262         * decl2.c (lang_decode_option):
3263         -traditional and -ansi now do not mess with
3264         dollars_in_ident.
3265
3266 Mon Sep 29 19:57:51 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
3267
3268         * Makefile.in (parse.o, decl.o): Also depend on
3269         $(srcdir)/../except.h $(srcdir)/../output.h.
3270         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
3271         $(srcdir)/../except.h $(srcdir)/../output.h.
3272         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
3273         ../insn-codes.h.
3274
3275         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
3276
3277         * expr.c (cplus_expand_expr): Make it static. 
3278
3279         * decl2.c, init.c, typeck.c: Include "expr.h".
3280         (expand_expr): Use proper values when calling the function.
3281
3282 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
3283
3284         * lang-options.h: new -Wold-style-cast flag.
3285         * cp-tree.h (warn_old_style_cast): new variable.
3286         * decl2.c (warn_old_style_cast): ditto.
3287         (lang_decode_option): support -Wold-style-cast.
3288         (reparse_absdcl_as_casts): produce old-style-cast warning.
3289
3290 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
3291
3292         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
3293         TREE_USED, reset value based on already_used.
3294
3295         * init.c (expand_member_init): Revert change.
3296         
3297 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
3298
3299         * cp-tree.h, decl.c, decl2.c, pt.c:
3300         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
3301
3302         * decl2.c (lang_decode_option): Add missing ;.
3303
3304 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
3305
3306         * friend.c (do_friend): Disable injection for all template-derived
3307         decls.
3308         * decl2.c (lang_decode_option): Handle -fguiding-decls.
3309         * parse.y (notype_template_declarator): New nonterminal.
3310         (direct_notype_declarator): Use it.
3311         (complex_direct_notype_declarator): Likewise.
3312         (object_template_id): Accept any kind of identifier after TEMPLATE.
3313         (notype_qualified_id): Don't add template declarators here.
3314
3315 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
3316
3317         * call.c (add_template_candidate): Add explicit_targs parameter.
3318         (build_scoped_method_call): Use it.
3319         (build_overload_call_real): Likewise.
3320         (build_user_type_conversion_1): Likewise.
3321         (build_new_function_call): Likewise.
3322         (build_object_call): Likewise.
3323         (build_new_op): Likewise.
3324         (build_new_method_call): Likewise.
3325         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
3326         (build_new_method_call): Likewise.
3327
3328         * class.c (finish_struct_methods): Add specialization pass to
3329         determine which methods were specializing which other methods.
3330         (instantiate_type): Handle TEMPLATE_ID_EXPR.
3331
3332         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
3333
3334         * cp-tree.h (name_mangling_version): New variable.
3335         (flag_guiding_decls): Likewise.
3336         (build_template_decl_overload): New function.
3337         (begin_specialization): Likewise.
3338         (reset_specialization): Likewise.
3339         (end_specialization): Likewise.
3340         (determine_explicit_specialization): Likewise.
3341         (check_explicit_specialization): Likewise.
3342         (lookup_template_function): Likewise.
3343         (fn_type_unification): Add explicit_targs parameter.
3344         (type_unification): Likewise.
3345
3346         * decl.c (duplicate_decls): Add smarts for explicit
3347         specializations.
3348         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
3349         specializations.
3350         (grokfndecl): Call check_explicit_specialization.
3351
3352         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
3353         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
3354         (check_classfn): Handle specializations.
3355
3356         * error.c (dump_function_name): Print specialization arguments.
3357
3358         * friend.c (do_friend): Don't call pushdecl for template 
3359         instantiations. 
3360
3361         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
3362
3363         * lang-options.h: Add -fname-mangling-version, -fguiding-decls, 
3364         and -fno-guiding-decls.
3365
3366         * lex.c (identifier_type): Return PFUNCNAME for template function
3367         names.
3368
3369         * method.c (build_decl_overload_real): New function.
3370         (build_template_parm_names): New function.
3371         (build_overload_identifier): Use it.
3372         (build_underscore_int): New function.
3373         (build_overload_int): Use it.  Add levels for template
3374         parameters.
3375         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
3376         (build_overload_nested_names): Handle template type parameters.
3377         (build_template_decl_overload): New function.
3378
3379         * parse.y (YYSTYPE): New ntype member.
3380         (nested_name_specifier): Use it.
3381         (nested_name_specifier_1): Likewise.
3382         (PFUNCNAME): New token.
3383         (template_id, object_template_id): New non-terminals.
3384         (template_parm_list): Note specializations.
3385         (template_def): Likewise.
3386         (structsp): Likewise.
3387         (fn.def2): Handle member template specializations.
3388         (component_decl_1): Likewise.
3389         (direct_notype_declarator): Handle template-ids.
3390         (component_decl_1): Likewise.
3391         (direct_notype_declarator): Handle template-ids.
3392         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
3393
3394         * pt.c (processing_specializations): New variable.
3395         (template_header_count): Likewise.
3396         (type_unification_real): New function.
3397         (processing_explicit_specialization): Likewise.
3398         (note_template_header): Likewise.
3399         (is_member_template): Handle specializations.
3400         (end_template_decl): Call reset_specialization.
3401         (push_template_decl): Handle member template specializations.
3402         (tsubst): Likewise.
3403         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
3404         (instantiate_template): Handle specializations.
3405         (instantiate_decl): Likewise.
3406         (fn_type_unification): Handle explicit_targs.
3407         (type_unification): Likewise.  Allow incomplete unification
3408         without an error message, if allow_incomplete.
3409         (get_bindings): Use new calling sequence for fn_type_unification.
3410
3411         * spew.c (yylex): Handle PFUNCNAME.
3412
3413         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
3414         (really_overloaded_fn): Likewise.
3415         (get_first_fn): Handle function templates.
3416
3417         * typeck.c (build_x_function_call): Use really_overloaded_fn.
3418         Handle TEMPLATE_ID_EXPR.
3419         (build_x_unary_op): Likewise.
3420         (build_unary_op): Likewise.
3421         (mark_addressable): Templates whose address is taken are marked  
3422         as used. 
3423
3424 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3425
3426         * decl.c (init_decl_processing): Declare __builtin_constant_p as
3427         accepting any kind of type, not only int.
3428
3429 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
3430
3431         * search.c (get_matching_virtual): Notice virtual bases when sorrying
3432         about covariant returns.
3433
3434         * parse.y (member_init): Also imply typename here.  Remove ancient
3435         extension for initializing base members.
3436
3437 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
3438
3439         Handle multi-level typenames and implicit typename in base list.
3440         * parse.y (typename_sub{,[0-2]}): New rules.
3441         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
3442         (nonnested_type): New rule.
3443         (complete_type_name): Use it.
3444         (base_class.1): Use typename_sub and nonnested_type.
3445         (nested_name_specifier): Don't elide std:: here.
3446         * decl.c (make_typename_type): Handle getting a type for NAME.
3447         (lookup_name_real): Turn std:: into :: here.
3448
3449         Rvalue conversions were removed in London.
3450         * call.c (is_subseq): Don't consider lvalue transformations.
3451         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
3452         (joust): Reenable ?: kludge.
3453
3454 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
3455
3456         * decl.c (start_function): Up warning of no return type to be a
3457         pedwarn.
3458
3459 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
3460
3461         * init.c (expand_member_init): Don't set TREE_USED.
3462         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
3463         set,don't clear TREE_USED wholesale.
3464
3465 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
3466
3467         * call.c (build_over_call): Do require_complete_type before
3468         build_cplus_new.
3469
3470 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
3471
3472         * search.c (lookup_field): Call complete_type in all cases.
3473
3474         * decl.c (finish_function): Just warn about flowing off the end.
3475
3476 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
3477
3478         * decl.c (grokparms): Don't bash a permanent list node if we're
3479         in a function.
3480
3481 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
3482
3483         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
3484
3485 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
3486
3487         * call.c (build_new_op): Give better error for syntactically
3488         correct, but semantically invalid, use of undeclared template.
3489
3490         * call.c (compare_qual): Handle pmfs.
3491
3492         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
3493         after the exception spec.
3494
3495 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
3496
3497         * call.c (null_ptr_cst_p): Integer type, not integral type.
3498
3499         * call.c (joust): Disable warnings until they can be moved to the
3500         right place.
3501
3502 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
3503
3504         * Makefile.in, config-lang.in:  Convert to autoconf.
3505
3506 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
3507
3508         * decl.c (lookup_name_real): Add implicit 'typename' to types from
3509         base classes.
3510
3511         * pt.c (most_specialized_class): Fix typo.
3512         (tsubst): Move constant folding to TREE_VEC case.
3513
3514 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
3515
3516         * pt.c (do_poplevel): Don't warn about unused local variables
3517         while processing_template_decl since we don't always know whether
3518         or not they will need constructing/destructing.
3519
3520         * pt.c (uses_template_parms): Check the values of an enumeration
3521         type to make sure they don't depend on template parms.
3522
3523         * decl.c (make_typename_type): Don't lookup the field if the
3524         context uses template parms, even if we're not
3525         processing_template_decl at the moment.
3526
3527         * pt.c (coerce_template_parms): Avoid looking at the
3528         TYPE_LANG_DECL portion of a typename type, since there won't be
3529         one. 
3530         (tsubst): Do constant folding as necessary to make sure that
3531         arguments passed to lookup_template_class really are constants. 
3532
3533 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
3534
3535         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
3536         * decl2.c (finish_file): Only register exception tables if we
3537         need to.
3538
3539         * decl.c (init_decl_processing): Add __builtin_[fs]p.
3540
3541 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
3542
3543         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
3544
3545 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
3546
3547         * error.c (dump_decl): Avoid crashing when presented with a
3548         uninitialized constant, as can occur with a template parameter.
3549         (dump_expr): Make sure that there are enough levels of
3550         current_template_parms before we start diving through them.
3551
3552 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
3553
3554         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
3555         c-typeck.c.
3556
3557 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
3558
3559         * except.c (expand_throw): Call build_delete for all 
3560         exception types, not just objects with destructors.
3561
3562 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
3563
3564         * decl.c (current_local_enum): Remove static.
3565         * pt.c (tsubst_enum): Save and restore value of current_local_enum
3566         in case template is expanded in enum decl.
3567         (instantiate_class_template) : Use new tsubst_enum signature.
3568         (tsubst_expr): Likewise.
3569
3570 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
3571
3572         * pt.c (begin_member_template_processing): Take a function as
3573         argument, not a set of template arguments.  Use the template
3574         parameters, rather than the arguments.  Handle non-type parameters
3575         correctly.  Push a binding level for the parameters so that multiple
3576         member templates using the same parameter names can be declared.
3577         (end_member_template_processing): Pop the binding level.
3578         (push_template_decl): Mark member templates as static when
3579         appropriate. 
3580
3581         * lex.c (do_pending_inlines): Pass the function, not its template
3582         arguments, to begin_member_template_processing.
3583         (process_next_inline): Likewise.
3584         (do_pending_defargs): Likewise.
3585
3586         * error.c (dump_expr): Obtain the correct declaration for a
3587         TEMPLATE_CONST_PARM. 
3588
3589         * call.c (add_template_conv_candidate): New function.
3590         (build_object_call): Handle member templates, as done in the other
3591         build_ functions.
3592         
3593 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
3594
3595         * decl.c (replace_defag): Undo previous change.
3596         * lex.c (do_pending_defargs): Deal with member templates.
3597         
3598         * pt.c (is_member_template): Avoid crashing when passed a
3599         non-function argument.
3600
3601 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
3602
3603         * class.c (grow_method): Remove check for redeclaration.
3604
3605 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
3606
3607         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
3608         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
3609         (PRIMARY_TEMPLATE_P): Use it.
3610         * call.c (build_overload_call_real): Use it.
3611         * class.c (instantiate_type): Likewise.
3612         * decl.c (decls_match): Likewise.
3613         * method.c (build_overload_identifier): Likewise.
3614         * pt.c (push_template_decl): Likewise.
3615         (classtype_mangled_name): Likewise.
3616         (lookup_template_class): Likewise.
3617         
3618         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
3619         DECL_NTPARMS to conform to usage elsewhere.
3620         * call.c (add_template_candidate): Likewise.
3621         * class.c (instantiate_type): Likewise.
3622         * pt.c (instantiate_template): Likewise.
3623         (get_bindings): Likewise.
3624         
3625         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
3626         is_member_template.
3627
3628         * pt.c (unify): Undo changes to allow multiple levels of template
3629         parameters. 
3630         (type_unification): Likewise.
3631         (fn_type_unification): Likewise.
3632         (get_class_bindings): Likewise.
3633         * cp-tree.h (Likewise).
3634         
3635         * decl.c (replace_defarg): Check that the type of the default
3636         parameter does not invlove a template type before complaining
3637         about the initialization.
3638
3639         * error.c (dump_expr): Deal with template constant parameters in
3640         member templates correctly.
3641
3642         * pt.c (is_member_template): Deal with class specializations
3643         correctly. 
3644         (tsubst): Handle "partial instantiation" of member templates
3645         correctly. 
3646
3647 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
3648
3649         * pt.c (type_unification): Change calling squence to allow for
3650         multiple levels of template parameters.
3651         (tsubst_expr): Likewise.
3652         (tsubst): Likewise.
3653         (tsubst_copy): Likewise.
3654         (instantiate_template): Likewise.
3655         (unify): Likewise.
3656         * call.c (build_overload_call_real): Use it.
3657         (add_builtin_candidate): Use it.
3658         (build_new_method_call): Use it.
3659         * class.c (instantiate_type): Use it.
3660         * decl.c (grokdeclarator): Use it.
3661         * decl2.c (finish_file): Use it.
3662         * method.c (build_overload_identifier): Use it.
3663         
3664         * call.c (add_template_candidate):  Add additional parameter for
3665         the function return type.  Call fn_type_unification istead of
3666         type_unification.
3667         (build_user_type_conversion_1): Handle member templates.
3668         (build_new_function_call): Likewise.
3669         (build_new_op): Likewise.
3670         (build_new_method_call): Likewise.
3671         
3672         * class.c (grow_method): Don't give an error message indicating
3673         that two member templates with the same name are ambiguous.
3674         (finish_struct): Treat member template functions just like member
3675         functions.
3676         
3677         * cp-tree.h (check_member_template): Add declaration.
3678         (begin_member_template_processing): Likewise.
3679         (end_member_template_processing): Likewise.
3680         (fn_type_unification): Likewise.
3681         (is_member_template): Likewise.
3682         (tsubst): Change prototype.
3683         (tsubst_expr): Likewise.
3684         (tsubst_copy): Likewise.
3685         (instantiate_template): Likewise.
3686         (get_bindings): Likewise.
3687
3688         * decl.c (decls_match): Handle multiple levels of template
3689         parameters. 
3690         (pushdecl): Handle template type params just like other type
3691         declarations. 
3692         (push_class_level_binding): Return immediately if the
3693         class_binding_level is NULL.
3694         (grokfndecl): If check_classfn() returns a member_template, use
3695         the result of the template, not the template itself.
3696         
3697         * decl2.c (check_member_template): New function.  Check to see
3698         that the entity declared to be a member template can be one.
3699         (check_classfn): Allow redeclaration of member template functions
3700         with different types; the new functions can be specializations or
3701         explicit instantiations.
3702         
3703         * error.c (dump_decl): Handle multiple levels of template
3704         parameters. 
3705         (dump_function_decl): Update to handle function templates.
3706
3707         * lex.c (do_pending_inlines): Set up template parameter context
3708         for member templates.
3709         (process_next_inline): Likewise.
3710
3711         * method. (build_overload_identifier): Adjust for multiple levels
3712         of template parameters.
3713         
3714         * parse.y (fn.def2): Add member templates.
3715         (component_decl_1): Likewise.
3716
3717         * pt.c (begin_member_template_processing): New function.
3718         (end_member_template_processing): Likewise.
3719         (is_member_template): Likewise.
3720         (fn_type_unification): Likewise.
3721         (current_template_parms): Return a vector of all the template
3722         parms, not just the innermost level of parms.
3723         (push_template_decl): Deal with the possibility of member
3724         templates. 
3725         (lookup_template_class): Likewise.
3726         (uses_template_parms): Likewise.
3727         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
3728         TEMPLATE_CONST_PARM to deal with multiple levels of template
3729         arguments.   Add processing of TEMPLATE_DECL to produce new
3730         TEMPLATE_DECLs from old ones.
3731         (do_decl_instantiation): Handle member templates.
3732
3733         * search.c (lookup_fnfields_1): Handle member template conversion
3734         operators. 
3735
3736         * tree.c (cp_tree_equal): Check the levels, as well as the
3737         indices, of TEMPLATE_CONST_PARMs.
3738
3739         * typeck.c (comptypes): Check the levels, as well as the indices,
3740         fo TEMPLATE_TYPE_PARMs.
3741         (build_x_function_call): Treat member templates like member
3742         functions. 
3743         
3744 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
3745
3746         * typeck.c (c_expand_return): Always convert_for_initialization
3747         before checking for returning a pointer to local.
3748
3749         * pt.c (type_unification): If strict and the function parm doesn't
3750         use template parms, just compare types.
3751
3752 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
3753
3754         * method.c (build_overloaded_value): Replace direct call
3755         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
3756
3757 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
3758
3759         * typeck.c (convert_arguments): Don't arbitrarily choose the first
3760         of a set of overloaded functions.
3761
3762 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
3763
3764         * lex.c (real_yylex): Don't elide __FUNCTION__.
3765
3766         * method.c (build_overload_value): Add in_template parm.
3767         (build_overload_int): Likewise.
3768         (build_overload_identifier): Pass it.
3769
3770         * decl.c (duplicate_decls): Don't bash a previous template
3771         definition with a redeclaration.
3772
3773         * pt.c (unify): float doesn't match double.
3774
3775         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
3776         TYPE_DECL.  Handle getting non-template types.
3777         * parse.y (explicit_instantiation): Use typespec instead of
3778         aggr template_type.
3779
3780 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
3781
3782         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
3783
3784 Mon Sep  1 13:19:04 1997  Eugene Mamchits <eugin@ips.ras.ru>
3785
3786         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
3787         (compare_ics): Likewise.
3788
3789 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
3790
3791         * call.c (joust): Warn about choosing one conversion op over
3792         another because of 'this' argument when the other return type is
3793         better.
3794         (source_type): New fn.
3795
3796         * call.c (build_new_op): Strip leading REF_BIND from first operand
3797         to builtin operator.
3798
3799         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
3800         use its RTL.
3801
3802 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
3803
3804         * call.c (null_ptr_cst_p): Remove support for (void*)0.
3805
3806 Wed Aug 27 02:03:34 1997  Jeffrey A Law  (law@cygnus.com)
3807
3808         * typeck.c (expand_target_expr): Make definition match declaration.
3809
3810         * class.c (get_basefndecls): Make definition match declaration.
3811
3812 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
3813
3814         * input.c (sub_getch): Eventually give up and release the input file.
3815
3816         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
3817         right place.
3818
3819         * call.c (joust): Tweak message.
3820
3821 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
3822
3823         * error.c (type_as_string): Put const/volatile on template type
3824         parameters where appropriate.
3825
3826 Sat Aug 23 17:47:22 1997  Jeffrey A Law  (law@cygnus.com)
3827
3828         * call.c (strictly_better): Make arguments unsigned ints.
3829
3830 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
3831
3832         * lex.c (real_yylex): Refer to __complex instead of complex.
3833
3834 Thu Aug 21 22:25:46 1997  J"orn Rennecke <amylaar@cygnus.co.uk>
3835
3836         * lex.c (real_yylex): Don't use getc directly.
3837
3838 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
3839
3840         * call.c (is_subseq): Don't try to be clever.
3841
3842 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
3843
3844         * parse.y, pt.c: Include "except.h".
3845         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
3846         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
3847         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
3848         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
3849         prototyping.
3850
3851 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
3852
3853         * decl2.c (mark_vtable_entries): Instead of replacing pure
3854         virtuals with a reference to __pure_virtual, copy the decl and
3855         change the RTL.
3856
3857 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
3858
3859         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
3860
3861         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
3862
3863         * pt.c (instantiate_class_template): Call repo_template_used
3864         before finish_prevtable_vardecl.
3865
3866         * call.c (is_subseq): New fn.
3867         (compare_ics): Use it.
3868
3869         * repo.c (finish_repo): Don't crash on no args.
3870
3871         * parse.y (named_complex_class_head_sans_basetype): Handle
3872         explicit global scope.
3873         * decl2.c (handle_class_head): New fn.
3874
3875         * pt.c (unify): Add CONST_DECL case.
3876
3877 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
3878
3879         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
3880
3881         * cp-tree.h (report_type_mismatch): Add prototype.
3882         * call.c (build_overload_call_real): Remove erroneous fourth
3883         argument to report_type_mismatch.
3884         (build_user_type_conversion_1): Remove erroneous second arg to
3885         tourney.
3886         (build_new_function_call): Likewise.
3887         (build_object_call): Likewise.
3888         (build_new_op): Likewise.
3889         (build_new_method_call): Likewise.
3890
3891 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
3892
3893         * error.c (dump_decl): Don't bother processing a function with no
3894         DECL_LANG_SPECIFIC.
3895
3896         * method.c (emit_thunk): Call init_function_start in the macro case.
3897
3898 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
3899
3900         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
3901         defined and used to set flag_vtable_thunks.
3902
3903 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
3904
3905         * parse.y: Don't clear the inlines from their obstack until they've 
3906         all been processed.
3907
3908         * decl.c (duplicate_decls): Don't complain about exception
3909         specification mismatch if flag_exceptions is off.
3910
3911 Mon Aug 11 15:01:56  1997  Marc Lehmann <pcg@goof.com>
3912
3913         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
3914
3915 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
3916
3917         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
3918         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
3919         Include <stdio.h> before include files that formerly used STDIO_PROTO. 
3920
3921         * decl.c, g++spec.c, lex.c, method.c, repo.c:
3922         Include "config.h" first, as per autoconf manual.
3923
3924 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
3925
3926         * decl.c (duplicate_decls): Tweak wording.
3927         * lex.c (do_pending_defargs): Don't die if we see a default arg
3928         that isn't a DEFAULT_ARG.
3929         * error.c (dump_expr): Handle DEFAULT_ARG.
3930
3931         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
3932         * lang-options.h: Add -fhandle-exceptions.
3933
3934         * class.c (build_vtable): vtables are artificial.
3935         (prepare_fresh_vtable): Likewise.
3936
3937 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
3938
3939         * cvt.c (ocp_convert): After converting to the target type, set
3940         LOOKUP_NO_CONVERSION.
3941
3942         * call.c (joust): Warn about potentially confusing promotion rules
3943         with -Wsign-promo.
3944         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
3945
3946 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
3947
3948         * exception.cc: Declare __terminate_func with noreturn attribute.
3949
3950 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
3951
3952         * parse.y: Break out eat_saved_input, handle errors.
3953         (function_try_block): Use compstmt instead of compstmt_or_error.
3954
3955 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
3956
3957         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
3958
3959 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3960
3961         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
3962         existence of cc1plus check whether $(LANGUAGES) contains C++.
3963
3964 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3965
3966         * method.c (do_build_copy_constructor): When copying an anonymous
3967         union member loop around to handle nested anonymous unions.  Use
3968         the offset of the member relative to the outer structure, not the
3969         union.
3970
3971 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
3972
3973         * call.c (resolve_args): New fn.
3974         (build_new_function_call): Use it.
3975         (build_object_call): Likewise.
3976         (build_new_method_call): Likewise.
3977
3978 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
3979
3980         * call.c (build_over_call): tsubst all default parms from templates.
3981
3982 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
3983
3984         * decl.c (struct cp_function): Add static_labelno.
3985         (push_cp_function_context): Save it.
3986         (pop_cp_function_context): Restore it.
3987
3988 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
3989
3990         * typeck.c (build_component_ref_1): Convert from reference.
3991
3992 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
3993
3994         * parse.y (current_declspecs, prefix_attributes): Initialize to
3995         NULL_TREE.
3996
3997         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
3998         before we try to force it to be a TREE_LIST.
3999         (decl): Make sure $1.t is non-nil.
4000
4001 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
4002
4003         * pt.c (uses_template_parms): Handle template first-parse codes.
4004
4005         * decl.c (cp_finish_decl): Only warn about user-defined statics.
4006
4007 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
4008
4009         * pt.c (unify): Handle BOOLEAN_TYPE.
4010
4011         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
4012         * pt.c (tsubst): Don't set it.
4013         * call.c (build_over_call): Use uses_template_parms.
4014
4015 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
4016
4017         * method.c (build_overload_nested_name): Use static_labelno
4018         instead of var_labelno.
4019         (build_qualified_name): New fn.
4020         (build_overload_name): Split out from here.
4021         (build_static_name): Use build_qualified_name.
4022         * decl.c (cp_finish_decl): Statics in extern inline functions 
4023         have comdat linkage.
4024         (start_function): Initialize static_labelno.
4025
4026 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
4027
4028         * class.c (finish_struct_methods): add check of warn_ctor_dtor_privacy
4029         before "all member functions in class [] are private"
4030
4031 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
4032
4033         * lex.c (do_scoped_id): convert_from_reference.
4034         * init.c (build_offset_ref): Likewise.
4035
4036 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
4037
4038         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
4039
4040 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
4041
4042         * typeck.c (get_member_function_from_ptrfunc): Promote index
4043         before saving it.
4044
4045 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
4046
4047         * tree.c (layout_basetypes): Move non-virtual destructor warning.
4048         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
4049
4050 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
4051
4052         * decl.c (grokdeclarator): Call add_defarg_fn for the function
4053         type, too.
4054         * lex.c (add_defarg_fn): Adjust.
4055         (do_pending_defargs): Adjust.  Don't skip the first parm.
4056
4057 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
4058
4059         * decl.c (build_enumerator): Global enumerators are also readonly.
4060
4061         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
4062         (build_dynamic_cast): Call it and convert_from_reference.
4063
4064         * lex.c (add_defarg_fn): New fn.
4065         (snarf_defarg): Don't add to defarg_types.
4066         (do_pending_defargs): Lose defarg_types.  All fns we process now
4067         have defargs.
4068         * decl.c (grokfndecl): Call add_defarg_fn.
4069
4070         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
4071         * cp-tree.def: Add DEFAULT_ARG.
4072         * spew.c (yylex): Call snarf_defarg as appropriate.
4073         * parse.y: New tokens DEFARG and DEFARG_MARKER.
4074         (defarg_again, pending_defargs, defarg, defarg1): New rules.
4075         (structsp): Use pending_defargs.
4076         (parms, full_parm): Use defarg.
4077         * lex.c (init_lex): Initialize inline_text_firstobj.
4078         (do_pending_inlines): Never pass the obstack to feed_input.
4079         (process_next_inline): Call end_input instead of restore_pending_input.
4080         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
4081         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
4082         * input.c (end_input): New fn.
4083         (sub_getch): At the end of some fed input, just keep returning EOF
4084         until someone calls end_input.
4085         Remove 'obstack' field from struct input_source.
4086         * decl.c (grokparms): Handle DEFAULT_ARG.
4087         (replace_defarg): New fn.
4088         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
4089
4090 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
4091
4092         * call.c (implicit_conversion): If nothing else works, try binding
4093         an rvalue to a reference.
4094
4095 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
4096
4097         * decl.c (init_decl_processing): fix Jun 30 patch -- move
4098         ifndef for Cygwin32 to include SIGSEGV.
4099
4100 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
4101
4102         * class.c (finish_struct_1): Only complain about pointers without
4103         copy stuff if there are any constructors.
4104
4105         * rtti.c (build_dynamic_cast): Call complete_type on the types.
4106
4107         * decl.c (grokfndecl): If the function we chose doesn't actually
4108         match, die.
4109
4110         * decl2.c (grokclassfn): Don't specify 'const int' for the
4111         artificial destructor parm.
4112
4113         * pt.c (type_unification): If we are called recursively, nothing 
4114         decays.
4115
4116 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
4117
4118         * decl.c (init_decl_processing): Stop trying to catch signals
4119         other than SIGABRT since the Cygwin32 library doesn't support
4120         them correctly yet.  This fixes a situation in which g++ causes
4121         a hang on SIGSEGVs and other such signals in our Win32-hosted
4122         tools.
4123
4124 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
4125
4126         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
4127
4128 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
4129
4130         * typeck2.c (store_init_value): Always return the value if our 
4131         type needs constructing.
4132
4133         * method.c (hack_identifier): Convert class statics from
4134         reference, too.
4135
4136 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
4137
4138         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
4139
4140 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
4141
4142         * typeck.c (c_expand_return): Make sure we clean up temporaries at
4143         the end of return x;
4144
4145 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
4146
4147         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
4148
4149 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
4150
4151         * except.c (expand_builtin_throw): Add support
4152         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
4153
4154 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
4155
4156         * repo.c (extract_string): Null-terminate.
4157
4158         * cp-tree.h (TI_SPEC_INFO): New macro.
4159         (CLASSTYPE_TI_SPEC_INFO): New macro.
4160         * pt.c (push_template_decl): Correctly determine # of template parms 
4161         for partial specs.
4162
4163         * call.c (compare_ics): Really fix 'this' conversions.
4164
4165         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
4166         non-template fn.
4167
4168         * pt.c (push_template_decl): Complain about mismatch in # of
4169         template parms between a class template and a member template.
4170
4171 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
4172
4173         * method.c (synthesize_method): You can't call
4174         function_cannot_inline_p after finish_function.
4175         * decl.c (finish_function): Turn on flag_inline_functions and turn
4176         off DECL_INLINE before handing a synthesized method to the
4177         backend.
4178
4179 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
4180
4181         * method.c (synthesize_method): Remove July 30 change to never set
4182         DECL_INLINE if at_eof.
4183
4184 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
4185
4186         * xref.c (GNU_xref_member): Ensure that the node has a
4187         decl_lang_specific part before checking DECL_FRIEND_P.
4188
4189 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
4190
4191         * pt.c (instantiate_class_template): Diagnose non-class types used
4192         as bases.
4193
4194 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
4195
4196         * typeck.c (build_conditional_expr): Use convert_for_initialization
4197         instead of convert_and_check.
4198
4199 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
4200
4201         * parse.y (typespec): Don't pedwarn for typeof.
4202
4203 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
4204
4205         * repo.c (finish_repo): Only check changes if we would write a
4206         repo file.
4207
4208         * call.c (compare_ics): Fix handling of 'this' conversions.
4209
4210         * pt.c (do_decl_instantiation): Support static data too.  Rename
4211         from do_function_instantiation.
4212         * cp-tree.h: Adjust.
4213         * parse.y: Adjust.
4214
4215         * repo.c (extract_string): New fn.
4216         (get_base_filename): Use it.
4217         (init_repo): Compare old args with current args.
4218
4219 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
4220
4221         * Makefile.in, Make-lang.in: Protect C-ls with a comment
4222         character, idea from Paul Eggert <eggert@twinsun.com>.
4223
4224 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
4225
4226         * typeck.c (c_expand_return): Be more persistent in looking for
4227         returned temps.
4228
4229         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
4230         pointer to reference.
4231
4232         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
4233
4234 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
4235
4236         * init.c (build_member_call, build_offset_ref):
4237         Use do_scoped_id instead of do_identifier.
4238
4239         * cvt.c (convert): Remove bogosity.
4240
4241 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
4242
4243         * cvt.c (build_up_reference): Do checks of ARGTYPE and
4244         TARGET_TYPE before trying to use get_binfo.
4245
4246 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
4247
4248         * cvt.c (build_up_reference): Call get_binfo to get access control.
4249
4250         * decl2.c (import_export_decl): If we don't support weaks, leave
4251         statics undefined.
4252
4253 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
4254
4255         * except.c (expand_builtin_throw): Add support for machines that
4256         cannot access globals after throw's epilogue when
4257         -fno-sjlj-exceptions is used.
4258
4259 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
4260
4261         * parse.y: 'std::' becomes '::'.
4262         * lex.c (real_yylex): Remove 'namespace' warning.
4263         * init.c (build_member_call): Ignore 'std::'.
4264         (build_offset_ref): Likewise.
4265         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
4266         (do_toplevel_using_decl): Ignore 'using std::whatever'.
4267         * decl.c (push_namespace): Just sorry.
4268         (pop_namespace): Nop.
4269         (init_decl_processing): Declare std namespace.
4270
4271 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
4272
4273         * search.c (push_class_decls): A name which ambiguously refers to
4274         several instantiations of the same template just refers to the
4275         template.
4276
4277 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
4278
4279         * decl.c (build_enumerator): fix problem with unsigned long
4280         enumerated values being smashed to ints, causing overflow
4281         when computing next enumerated value. (for enum values around
4282         MAX_VAL).
4283
4284 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
4285
4286         * typeck.c (build_component_ref): Only call mark_used on a decl.
4287
4288 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
4289
4290         * typeck.c (build_c_cast): Make the check for a ptr to function
4291         more specific before possible default_conversion call.
4292
4293 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
4294
4295         * except.c (expand_exception_blocks): Simplify and fix and make
4296         sure we don't end a region in a sequence, as expand_end_bindings
4297         doesn't like it.
4298
4299 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
4300
4301         * except.c (init_exception_processing): Mark terminate as not
4302         returning so that the optimizer can optimize better.
4303
4304 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
4305
4306         * cvt.c (convert): Don't do any extra work, if we can avoid it
4307         easily.
4308
4309 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
4310
4311         * *.[chy]: Change cp_convert to ocp_convert, change convert to
4312         cp_convert.  convert is now reserved for the backend, and doesn't
4313         have the semantics a frontend person should ever want.
4314
4315 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
4316
4317         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
4318         Lose -traditional support.
4319
4320 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
4321
4322         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
4323
4324         * parse.y (self_reference): Do it for templates, too.
4325         * class.c (pushclass): Don't overload_template_name; the alias
4326         generated by build_self_reference serves the same purpose.
4327
4328         * tree.c (list_hash): Make static, take more args.
4329         (list_hash_lookup): Likewise.
4330         (list_hash_add): Make static.
4331         (list_hash_canon): Lose.
4332         (hash_tree_cons): Only build a new node if one isn't already in the
4333         hashtable.
4334         (hash_tree_chain): Use hash_tree_cons.
4335         * cp-tree.h: Adjust.
4336         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
4337         of calling lookup_name.
4338
4339 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
4340
4341         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
4342         doesn't refer to the CONST_DECLs.
4343
4344 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
4345
4346         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
4347         is bigger.
4348         (expand_class_desc): Convert the last argument to a sizetype.
4349
4350 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
4351
4352         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
4353         __real__): Add reswords.
4354         * hash.h: Regenerate.
4355         * lex.h (rid): Add RID_COMPLEX.
4356         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
4357         * lex.c (init_lex): Add building of RID_COMPLEX.
4358         (real_yylex): General cleanup in line with what c-lex.c also has,
4359         sans the cruft for traditional; add handling of SPEC_IMAG, complex
4360         types, and imaginary numeric constants.
4361         * parse.y (REALPART, IMAGPART): Add tokens.
4362         (unary_expr): Add REALPART and IMAGPART rules.
4363         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
4364         * decl.c (complex_{integer,float,double,long}_type_node): Define
4365         types.
4366         (init_decl_processing): Set up the types.
4367         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
4368         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
4369         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
4370         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
4371         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
4372         COMPLEX_TYPE case.
4373         * method.c (build_overload_name): Add handling of the different
4374         COMPLEX_TYPEs, prefixing them with `J'.
4375         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
4376         as a template parm.
4377         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
4378         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
4379         (mapcar): Handle COMPLEX_CST.
4380         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
4381         (common_type): Add code for complex types.
4382         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
4383         (convert_for_assignment): Likewise.
4384         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
4385
4386 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
4387
4388         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
4389         tsubst_expr, as it might try to do overload resolution.
4390
4391 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
4392
4393         * pt.c (instantiate_class_template): Oops.
4394
4395 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
4396
4397         * cp-tree.def: Add TAG_DEFN.
4398         * pt.c (tsubst_enum): New fn.
4399         (instantiate_class_template): Use it.
4400         (tsubst_expr): Support TAG_DEFN.
4401         (tsubst): Support local enums.
4402         (tsubst_copy): Likewise.
4403         * decl.c (finish_enum): Likewise.
4404         (start_enum): If this is a local enum, switch to permanent_obstack.
4405
4406 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
4407
4408         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
4409         (finish_function): Put the base init code for constructors just
4410         after the parm cleanup insns.
4411         (struct cp_function): Add last_parm_cleanup_insn.
4412         (push_cp_function_context): Likewise.
4413         (pop_cp_function_context): Likewise.
4414         
4415 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
4416
4417         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
4418
4419 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
4420
4421         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
4422         for THUNK_FNDECL before we switch to temporary allocation.
4423
4424 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
4425
4426         * call.c (build_new_op): Handle null arg2 for ?:.
4427
4428 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
4429
4430         * except.c (expand_exception_blocks): Ensure that we flow through
4431         the end of the exception region for the exception specification.
4432         Move exception region for the exception specification in, so that
4433         it doesn't protect the parm cleanup.  Remove some obsolete code.
4434         * decl.c (store_parm_decls): Likewise.
4435         (finish_function): Likewise.
4436
4437 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
4438
4439         * init.c (build_new): Fix nothrow handling.
4440
4441 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
4442
4443         * init.c (emit_base_init): Don't warn about the initialization
4444         list for an artificial member.
4445
4446 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
4447
4448         * expr.c (do_case): Handle !START case for the error msg.
4449
4450 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
4451
4452         * decl2.c, lang-options.h: New option -Weffc++.
4453         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
4454         to -Weffc++.
4455
4456         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
4457         to MULTIPLE_SYMBOL_SPACES.
4458
4459 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
4460
4461         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
4462
4463         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
4464
4465         * typeck.c (c_expand_return): Don't complain about returning void
4466         to void in an artificial function.
4467         * method.c (make_thunk): Change settings of READONLY/VOLATILE, 
4468         don't set DECL_RESULT, set DECL_ARTIFICIAL.
4469         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC. 
4470
4471 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
4472
4473         * init.c (init_decl_processing): Add supoprt for setjmp/longjmp based
4474         exception handling.
4475         * except.c (init_exception_processing): Likewise.
4476         (expand_end_catch_block): Likewise.
4477         (expand_exception_blocks): Likewise.
4478         (expand_throw): Likewise.
4479         * exception.cc (__default_terminate): Likewise.
4480
4481         * init.c (perform_member_init): Use new method of expr level
4482         cleanups, instead of cleanups_this_call and friends.
4483         (emit_base_init): Likewise.
4484         (expand_aggr_vbase_init_1): Likewise.
4485         (expand_vec_init): Likewise.
4486         * decl.c (cp_finish_decl): Likewise.
4487         (expand_static_init): Likewise.
4488         (store_parm_decls): Likewise.
4489         (cplus_expand_expr_stmt): Likewise.
4490         * decl2.c (finish_file): Likewise.
4491         
4492         * Make-lang.in (exception.o): Ok to compile with -O now.
4493
4494         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
4495         we know it will be done later by the backend.
4496
4497         * decl2.c (lang_f_options): Remove support for short temps.
4498         * lang-options.h: Likewise.
4499         
4500 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
4501
4502         * tree.c (varargs_function_p): New fn.
4503         * method.c (emit_thunk): Replace broken generic code with code to
4504         generate a heavyweight thunk function.
4505
4506 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
4507
4508         * pt.c (process_template_parm): pedwarn about floating-point parms.
4509
4510         * decl.c (grokdeclarator): inline no longer implies static.
4511
4512         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
4513
4514 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
4515
4516         * class.c (check_for_override): The signature of an overriding
4517         function is not changed.
4518
4519         * call.c (build_over_call): Move setting of conv into the loop.
4520         Note: this change, along with the related changes of the 18th thru
4521         the 20th of April, fix an infinite loop problem in conversions.
4522
4523 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
4524
4525         * call.c (build_user_type_conversion_1): Really ignore rvalue
4526         conversions when looking for a REFERENCE_TYPE.
4527
4528         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
4529         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
4530         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
4531         (build_unary_op): Likewise.
4532         * call.c (build_over_call): See through a CONVERT_EXPR around the
4533         ADDR_EXPR for on a temporary.
4534         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
4535         the ADDR_EXPR for a local variable.
4536
4537 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
4538
4539         * call.c (build_user_type_conversion_1): If we're trying to
4540         convert to a REFERENCE_TYPE, only consider lvalue conversions.
4541         (build_new_function_call): Print candidates.
4542         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
4543         (reference_binding): Binding a temporary of a reference-related type
4544         is BAD.
4545
4546 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
4547
4548         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
4549         * tinfo2.cc (type_info::before): Likewise.
4550
4551 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
4552
4553         * call.c (implicit_conversion): Oops.
4554
4555 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
4556
4557         * call.c (implicit_conversion): Try to find a reference conversion
4558         before binding a const reference to a temporary.
4559
4560 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
4561
4562         * exception.cc (__default_unexpected): Call terminate by default,
4563         so that if the user overrides terminate, the correct function will
4564         be called.
4565         
4566 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
4567
4568         * parse.y (left_curly): Avoid trying to use any fields of
4569         error_mark_node, as there aren't any.
4570
4571 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
4572
4573         * lex.c (do_identifier): Avoid breaking on overloaded methods
4574         as default arguments.
4575
4576 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
4577
4578         * call.c (add_template_candidate): Initialize the variable "dummy".
4579
4580 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
4581
4582         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
4583         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
4584
4585 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
4586
4587         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
4588         (debug_binfo): Delete decl, not needed.
4589
4590         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
4591         promotes_to_aggr_type): Delete fns.
4592         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
4593         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
4594         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
4595
4596         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
4597
4598         * friend.c (is_friend_type): Delete fn.
4599         * cp-tree.h (is_friend_type): Delete decl.
4600
4601         * decl.c (original_result_rtx, double_ftype_double,
4602         double_ftype_double_double, int_ftype_int, long_ftype_long,
4603         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
4604         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
4605
4606         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
4607         fwd decls.
4608         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
4609
4610         * decl.c (pushdecl_nonclass_level): #if 0, unused.
4611         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
4612
4613         * lex.c (reinit_lang_specific): #if 0, unused.
4614         * cp-tree.h (reinit_lang_specific): #if 0 decl.
4615
4616         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
4617         * cp-tree.h (revert_static_member_fn): Delete decl.
4618
4619         * class.c (root_lang_context_p): Delete fn.
4620         * cp-tree.h (root_lang_context_p): Delete decl.
4621
4622         * decl.c (set_current_level_tags_transparency): #if 0, unused.
4623         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
4624
4625         * lex.c (set_vardecl_interface_info): Make static.
4626         * cp-tree.h (set_vardecl_interface_info): Delete decl.
4627
4628         * call.c (find_scoped_type): Make static.
4629         * cp-tree.h (find_scoped_type): Delete decl.
4630
4631         * search.c (convert_pointer_to_vbase): Make static.
4632         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
4633
4634         * decl.c (const_ptr_type_node): Likewise.
4635         * cp-tree.h (const_ptr_type_node): Delete decl.
4636
4637         * typeck.c (common_base_type): Make static.
4638         * cp-tree.h (common_base_types): Delete erroneous decl.
4639
4640         * pt.c (classtype_mangled_name): Make static.
4641         * cp-tree.h (classtype_mangled_name): Delete decl.
4642
4643         * lex.c (check_newline): Make static.
4644         * cp-tree.h (check_newline): Delete decl.
4645
4646         * typeck.c (build_x_array_ref): Delete fn, same idea as
4647         grok_array_decl.
4648         * cp-tree.h (build_x_array_ref): Delete decl.
4649
4650         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
4651         copy_lang_decl.
4652         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
4653
4654         * class.c (build_vtable_entry): Make static.
4655         * cp-tree.h (build_vtable_entry): Delete decl.
4656
4657         * class.c (build_vbase_pointer): Make static.
4658         * cp-tree.h (build_vbase_pointer): Delete decl.
4659
4660         * sig.c (build_sptr_ref): Add forward decl and make static.
4661         * cp-tree.h (build_sptr_ref): Delete decl.
4662
4663         * call.c (build_new_method_call): Add forward decl and make static.
4664         * cp-tree.h (build_new_method_call): Delete decl.
4665
4666         * call.c (build_object_call): Make static.
4667         * class.c (check_for_override, complete_type_p, mark_overriders):
4668         Likewise.
4669         * decl.c (cp_function_chain): Likewise.
4670         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
4671         Likewise.
4672         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
4673         Likewise.
4674         * tree.c (build_cplus_array_type_1): Likewise.
4675         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
4676         (comp_target_parms): Likewise.
4677
4678         * init.c (build_builtin_call): Make static.
4679         * cp-tree.h (build_builtin_call): Delete decl.
4680
4681         * typeck.c (binary_op_error): Delete decl.
4682         * cp-tree.h (binary_op_error): Likewise.
4683
4684 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
4685
4686         * call.c (build_method_call): Compare against error_mark_node
4687         directly, rather than the ERROR_MARK tree code.
4688         * cvt.c (cp_convert): Likewise.
4689         * decl.c (print_binding_level): Likewise.
4690         (duplicate_decls): Likewise.
4691         (grokdeclarator): Likewise.
4692         (grokdeclarator): Likewise.
4693         * init.c (expand_aggr_init_1): Likewise.
4694         (decl_constant_value): Likewise.
4695         * method.c (build_opfncall): Likewise.
4696         (hack_identifier): Likewise.
4697         * typeck.c (build_modify_expr): Likewise.
4698
4699         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
4700
4701 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
4702
4703         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
4704
4705         * pt.c (coerce_template_parms): Add new error message.
4706
4707         * method.c (build_overload_value): Implement name mangling for
4708         floating-point template arguments.
4709
4710         * method.c (build_overload_int, icat, dicat): Fix mangling of template
4711         arguments whose absolute value doesn't fit in a signed word.
4712
4713 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
4714
4715         * friend.c: New file; put all of the friend stuff in here.
4716         * init.c: Instead of here.
4717         * Makefile.in (CXX_OBJS): Add friend.o.
4718         (friend.o): Add dependencies.
4719         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
4720
4721 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
4722
4723         * call.c (build_scoped_method_call): Complain if the scope isn't a
4724         base.
4725
4726 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
4727
4728         * parse.y (left_curly): Don't crash on erroneous type.
4729
4730         * init.c (build_delete): Fix type of ref.
4731
4732 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
4733
4734         * search.c (get_vbase_1): Renamed from get_vbase.
4735         (get_vbase): Wrapper, now non-static.
4736         (convert_pointer_to_vbase): Now static.
4737
4738         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
4739         * init.c (build_delete): Pass one.
4740         (build_partial_cleanup_for): Use build_scoped_method_call.
4741         * decl.c (finish_function): Pass a binfo.
4742
4743 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
4744
4745         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
4746
4747         * typeck.c (build_c_cast): Lose other reference to flag.
4748
4749         * call.c (build_field_call): Don't look for [cd]tor_identifier.
4750         * decl2.c (delete_sanity): Remove meaningless use of
4751         LOOKUP_HAS_IN_CHARGE.
4752         * decl.c (finish_function): Use build_scoped_method_call instead
4753         of build_delete for running vbase dtors.
4754         * init.c (build_delete): Call overload resolution code instead of
4755         duplicating it badly.
4756
4757 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
4758
4759         * call.c (build_over_call): Call mark_used before trying to elide
4760         the call.
4761
4762         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
4763
4764 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
4765
4766         * typeck.c (build_modify_expr): Always pedwarn for a cast to
4767         non-reference used as an lvalue.
4768
4769 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
4770
4771         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
4772
4773 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
4774
4775         * parse.y (handler): Fix template typo.
4776
4777 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
4778
4779         * error.c (lang_decl_name): New fn.
4780         * tree.c (lang_printable_name): Use it.
4781
4782 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
4783
4784         * g++spec.c: Include config.h so that we can catch bzero #defines
4785         from the config file.
4786
4787 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
4788
4789         * new1.cc: Include a declaration for malloc, to avoid warning, and
4790         avoid lossing on systems that require one (ones that define malloc
4791         in xm.h).
4792
4793 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
4794
4795         * decl2.c (max_tinst_depth): New variable.
4796         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
4797         option.
4798         * pt.c (max_tinst_depth): Variable moved.
4799         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
4800         as legal.
4801
4802 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
4803
4804         * decl.c (xref_basetypes): Allow a base class that depends on
4805         template parms to be incomplete.
4806
4807         * decl2.c (build_expr_from_tree): Support typeid(type).
4808         * rtti.c (get_typeid): Support templates.
4809         (expand_si_desc, expand_class_desc): Fix string length.
4810         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
4811
4812 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
4813
4814         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
4815
4816         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
4817
4818 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
4819
4820         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
4821         smashes together template and non-template decls of the same
4822         signature.
4823
4824 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
4825
4826         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
4827
4828 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
4829
4830         * decl.c (duplicate_decls): Next route, pedwarn about different
4831         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
4832
4833 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
4834
4835         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
4836         (struct lang_type): Delete has_default_implementation member.
4837         Increase dummy to 21.
4838         * decl.c (start_method): Delete usage.
4839
4840         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
4841         store_after_parms, start_decl_1, auto_function): Add decls.
4842         (get_arglist_len_in_bytes, declare_implicit_exception,
4843         have_exceptions_p, make_type_decl, typedecl_for_tag,
4844         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
4845         build_component_type_expr, cplus_exception_name,
4846         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
4847         * call.c (build_this): Make static.
4848         (is_complete): Likewise.
4849         (implicit_conversion): Likewise.
4850         (reference_binding): Likewise.
4851         (standard_conversion): Likewise.
4852         (strip_top_quals): Likewise.
4853         (non_reference): Likewise.
4854         (build_conv): Likewise.
4855         (user_harshness): Likewise.
4856         (rank_for_ideal): Likewise.
4857         * decl.c (start_decl_1): Delete forward decl.
4858         (push_decl_level): Make static.
4859         (resume_binding_level): Make static.
4860         (namespace_bindings_p): Make static.
4861         (declare_namespace_level): Make static.
4862         (lookup_name_real): Make static.
4863         (duplicate_decls): Make static.  Take register off NEWDECL and
4864         OLDDECL parm decls.
4865         * decl2.c (get_sentry): Make static.
4866         (temp_name_p): Delete fn.
4867         * except.c (auto_function): Delete decl.
4868         * lex.c (handle_{cp,sysv}_pragma): Make static.
4869         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
4870         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
4871         * pt.c (tsubst_expr_values): Make static.
4872         * rtti.c (combine_strings): Delete decl.
4873
4874 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
4875
4876         * pt.c (push_template_decl): Handle getting a typedef.
4877
4878         * call.c (build_new_function_call): Complain about void arg.
4879
4880 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
4881
4882         * decl.c (duplicate_decls): Give pedwarn of different exceptions
4883         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
4884
4885 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
4886
4887         * except.c (expand_throw): Don't expand the cleanup tree here,
4888         since we are not going to write the rtl out.  Fixes problem with
4889         -g -O on SPARC.
4890
4891 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
4892
4893         * Make-lang.in: Add $(exeext) as necessary.
4894
4895 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
4896
4897         * parse.y (handler_seq): Must have at least one catch clause.
4898
4899 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
4900
4901         * call.c (add_builtin_candidate): Restore ?: hack.
4902
4903         * decl.c (grok_op_properties): More warnings.
4904
4905 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
4906
4907         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
4908         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
4909
4910         * decl.c (duplicate_decls): Scale back to a warning, and only do
4911         'em if -pedantic.
4912
4913 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
4914
4915         * decl.c (duplicate_decls): pedwarn mismatched exception
4916         specifications.
4917
4918 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
4919
4920         * call.c (build_new_method_call): Don't display the invisible
4921         argument for controlling virtual bases.
4922
4923 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
4924
4925         * new: Add nothrow new and delete, bad_alloc and throw specifications
4926         for delete.
4927         * decl.c (init_decl_processing): Add throw specification for delete.
4928         * new.cc (nothrow): Define.
4929         * lex.c (real_yylex): Removing warning that throw and friends are
4930         keywords.
4931         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
4932         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
4933         * Make-lang.in: Add new{1,2}.{cc,o}.
4934
4935 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
4936
4937         * lex.c (cons_up_default_function): Fix return type of synth op=.
4938
4939         * init.c (emit_base_init): Add warnings for uninitialized members
4940         and bases.
4941
4942         * decl.c (xref_basetypes): Add warning for non-polymorphic type
4943         with destructor used as base type.
4944
4945         * decl.c (grok_op_properties): Add warning for op= returning void.
4946         * typeck.c (c_expand_return): Add warning for op= returning anything
4947         other than *this.
4948
4949         * class.c (finish_struct_1): Add warning for class with pointers
4950         but not copy ctor or copy op=.
4951
4952         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
4953         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
4954         (instantiate_template): If -fexternal-templates, add this
4955         instantiation to pending_templates.
4956
4957         * decl2.c (copy_assignment_arg_p): Disable old hack to support
4958         Booch components.
4959
4960 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
4961
4962         * cvt.c (cp_convert): Pedwarn enum to pointer conversions.
4963
4964 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
4965
4966         * call.c (standard_conversion): Handle getting references.  Tack
4967         on RVALUE_CONV here.  Do it for non-class types, too.
4968         (reference_binding): Pass references to standard_conversion.
4969         (implicit_conversion): Likewise.
4970         (add_builtin_candidate): Disable one ?: kludge.
4971         (convert_like): Handle RVALUE_CONVs for non-class types.
4972         (joust): Disable the other ?: kludge.
4973
4974 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
4975
4976         * decl.c (init_decl_processing): Add code to build up common
4977         function types beforehand, to avoid creation then removal of
4978         things already in the hash table.
4979
4980 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
4981
4982         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
4983         the arguments.
4984
4985         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
4986         current_template_parms.
4987
4988 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
4989
4990         * search.c (lookup_field): Don't return a function, check want_type.
4991
4992 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
4993
4994         * init.c (build_new): Make sure PLACEMENT has a type.
4995
4996 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
4997
4998         * init.c (build_new): Support new (nothrow).
4999
5000 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
5001
5002         * pt.c (instantiate_decl): Also do push_to_top_level before setting
5003         up DECL_INITIAL.
5004
5005         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
5006         * pt.c (tsubst): Defer instantiation of default args.
5007         * call.c (build_over_call): Until here.
5008
5009 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
5010
5011         * search.c (lookup_field): Make sure we have an
5012         IDENTIFIER_CLASS_VALUE before we try to return it.
5013
5014 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
5015
5016         * call.c (build_method_call): Delete unused var PARM.
5017         (build_overload_call_real): Likewise.
5018         (build_object_call): Delete unused var P.
5019         (build_new_op): Likewise.
5020         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
5021         var definitions, which are never used.
5022         (shadow_tag): Delete unused var FN.
5023         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
5024         * init.c (build_new): Delete unused var ALLOC_TEMP.
5025         * method.c (hack_identifier): Delete unused var CONTEXT.
5026         (do_build_copy_constructor): Delete unused var NAME.
5027         (synthesize_method): Delete unused var BASE.
5028         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
5029         * rtti.c (build_headof): Delete unused var VPTR.
5030         (get_typeid): Delete unused var T.
5031         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
5032         and ORIG_OP2.
5033         (build_ptrmemfunc): Delete unused vars U and NINDEX.
5034         * typeck2.c (build_functional_cast): Delete unused var BINFO.
5035
5036 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
5037
5038         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
5039         things in a type being defined.
5040         * decl.c (finish_enum): Reverse the values so that they are in
5041         the correct order.
5042
5043         * pt.c (instantiate_class_template): Don't initialize
5044         BINFO_BASETYPES until the vector is filled out.
5045         (unify): Don't abort on conflicting bindings, just fail.
5046         (instantiate_decl): Do push_tinst_level before any tsubsting.
5047
5048         * method.c (build_overload_value): Handle getting a
5049         TEMPLATE_CONST_PARM for a pointer.
5050
5051 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
5052
5053         * init.c (expand_member_init): Don't give 'not a base' error for
5054         templates.
5055
5056         * pt.c (instantiate_decl): Call import_export_decl later.
5057
5058         * pt.c (instantiate_class_template): Return a value.
5059
5060         * parse.y (extension): New rule for __extension__.
5061         (extdef, unary_expr, decl, component_decl): Use it.
5062
5063 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
5064
5065         * class.c (base_binfo): Remove unused base_has_virtual member.
5066         (finish_base_struct): Likewise.
5067         (finish_struct_1): Likewise.
5068
5069 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
5070
5071         * search.c (expand_upcast_fixups): Fix bogus code generation
5072         problem where the generated code uses the wrong index into the
5073         runtime built vtable on the stack.  Old code could clobber random
5074         stack values.
5075
5076 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
5077
5078         * init.c (perform_member_init): Make sure the partial EH cleanups
5079         live on the function_obstack.
5080
5081 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
5082
5083         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
5084         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
5085
5086 Tue Dec 24 10:24:03 1996  Jeffrey A Law  (law@cygnus.com)
5087
5088         * decl.c (grokvardecl): Avoid ANSI style initialization.
5089
5090 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
5091
5092         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
5093
5094 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
5095
5096         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
5097
5098 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
5099
5100         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
5101         arguments we compare against.  Start the count of I at 1, not 0,
5102         since argv[0] is still the command.
5103
5104 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
5105
5106         * lang-specs.h: Accept .cp as an C++ extension.
5107
5108 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
5109
5110         * cp-tree.h (ptr_reasonably_similar): Add decl.
5111
5112 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
5113
5114         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
5115         pointer.  New local SPECBITS with the parm's value.
5116         (grokdeclarator): Pass &specbits down.
5117
5118         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
5119         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
5120
5121         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
5122         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
5123
5124         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
5125         not an error_mark_node.
5126
5127 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
5128
5129         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
5130         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
5131         
5132 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
5133
5134         * decl.c (grokdeclarator): When giving an anonymous struct a name,
5135         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
5136         not affected).
5137
5138         * typeck2.c (build_m_component_ref): If component is a pointer
5139         to data member, resolve the OFFSET_REF now.
5140
5141         * call.c (convert_like): Don't go into infinite recursion.
5142
5143         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
5144
5145         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
5146         * tree.c (layout_basetypes): And on the vbase ptr.
5147
5148 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
5149
5150         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
5151         CHAR_TYPE_SIZE so bool is always the same size as another type.
5152
5153         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
5154
5155 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
5156
5157         * decl2.c (grok_x_components): Remove synthesized methods from
5158         TYPE_METHODS of an anonymous union, complain about member
5159         functions.
5160         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
5161         anonymous unions.
5162         (finish_function): Just clear the DECL_RTL of our arguments.
5163
5164 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
5165
5166         * decl2.c (finish_file): Emit DWARF debugging info for static data
5167         members.
5168
5169         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
5170
5171 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
5172
5173         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
5174         IDENTIFIER_NODE.
5175
5176 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
5177
5178         * Make-lang.in (g++-cross$(exeext)): Fix typo.
5179
5180 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
5181
5182         Make the g++ driver now be a standalone program, rather than one
5183         that tries to run the gcc driver after munging up the options.
5184         * Make-lang.in (g++.c, g++spec.o): New rules.
5185         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
5186         added.
5187         (g++$(exeext)): New rule, based on xgcc rule.
5188         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
5189         * g++spec.c: New file.
5190         * g++.c: Removed file.
5191
5192 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
5193
5194         * cvt.c (build_up_reference): Arrange for any temporary values
5195         that have been keep in registers until now to be put into memory.
5196
5197 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5198
5199         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
5200         that make -j3 bootstrap works better.
5201
5202 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
5203
5204         * decl.c (pushtag): Do pushdecl for anon tags.
5205
5206 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
5207
5208         * typeck.c (c_expand_return): Fix logic.
5209         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
5210
5211 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
5212
5213         * g++.c (main): Make sure arglist has a final NULL entry.  Add
5214         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
5215         stdin/stdout of the invoked program are redirected to
5216         nowheresville.
5217
5218 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
5219
5220         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
5221
5222 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
5223
5224         * init.c (resolve_offset_ref): Handle obj.vfn better.
5225         * typeck.c (build_component_ref): Set TREE_TYPE on result from
5226         build_vfn_ref.
5227
5228 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
5229
5230         * typeck.c (convert_for_assignment): Also handle anachronistic
5231         implicit conversions from (::*)() to cv void*.
5232         * cvt.c (cp_convert_to_pointer): Likewise.
5233
5234 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
5235
5236         * lex.c (handle_cp_pragma): Fix bogus warning.
5237
5238 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
5239
5240         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
5241         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
5242
5243 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
5244
5245         * class.c (finish_struct_1): Support DWARF2_DEBUG.
5246         * search.c (dfs_debug_mark): Likewise.
5247         * decl2.c (finish_vtable_vardecl): Likewise.
5248         * decl.c (pushtag, finish_enum): Likewise.
5249         * lex.c (check_newline): Use debug_* instead of calling *out
5250         functions directly.
5251
5252 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
5253
5254         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
5255         on some picky hosts.
5256
5257 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
5258
5259         * class.c (finish_struct_1): A class has a non-trivial copy
5260         constructor if it has virtual functions.
5261
5262         * cvt.c (cp_convert): Always call a constructor.
5263
5264         * call.c (reference_binding): Still tack on a REF_BIND
5265         for bad conversions.
5266         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
5267
5268         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
5269         (c_expand_return): Likewise.
5270         * typeck2.c (digest_init): Likewise for { }.
5271         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
5272         * cvt.c (cp_convert): Handle failure better.
5273
5274 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
5275
5276         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
5277         of GCC be path-relative. 
5278
5279 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
5280
5281         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
5282         it does need choose-temp.o and pexecute.o.
5283
5284 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
5285
5286         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
5287         that we still use it.
5288         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
5289
5290 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
5291
5292         * init.c (expand_default_init): Avoid calling constructors to 
5293         initialize reference temps.
5294
5295         * cvt.c (convert_to_reference): Fix.
5296
5297 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
5298
5299         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
5300         (convert_to_reference): Likewise.
5301         * typeck.c (convert_for_initialization): Likewise.
5302         * init.c (expand_default_init): Likewise.
5303         (expand_aggr_init_1): Likewise.
5304         * cp-tree.h (CONV_NONCONVERTING): Lose.
5305         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
5306         * *.c: Adjust.
5307         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
5308
5309 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
5310
5311         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
5312
5313 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
5314
5315         * init.c (expand_aggr_init_1): Don't crash on non-constructor
5316         TARGET_EXPR.
5317
5318 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
5319
5320         * g++.c: Include gansidecl.h.
5321         (VPROTO, PVPROTO, VA_START): Delete.
5322         (choose_temp_base_try, choose_temp_base, perror_exec,
5323         run_dos) [__MSDOS__]: Delete fns.
5324         (pfatal_with_name): Delete fn.
5325         (temp_filename): Declare like in gcc.c.
5326         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
5327         (error_count, signal_count): Define.
5328         (error): Delete both definitions.
5329         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
5330         (pfatal_pexecute): Add fn from gcc.c.
5331         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
5332         code to use the pexecute stuff also used by gcc.c.
5333         (MIN_FATAL_STATUS): Define.
5334         * Make-lang.in (g++): Add dependency on and linking with
5335         choose-temp.o and pexecute.o.
5336
5337         * cp-tree.h: Include gansidecl.h.
5338         (STDIO_PROTO): Delete #undef/#define.
5339         * cvt.c (NULL): Delete #undef/#define.
5340         * expr.c (NULL): Likewise.
5341         * init.c (NULL): Likewise.
5342         * rtti.c (NULL): Likewise.
5343         * xref.c (NULL): Likewise.
5344
5345         * cp-tree.h (build_user_type_conversion): Add prototype.
5346         * call.c (build_user_type_conversion): Delete prototype.  Correct
5347         decl of FLAGS arg to be an int.
5348         * cvt.c (build_user_type_conversion): Likewise.
5349
5350 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
5351
5352         * cp-tree.def: Add TRY_BLOCK and HANDLER.
5353         * except.c (expand_start_catch_block): Support templates.
5354         * parse.y (try_block, handler_seq): Likewise.
5355         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
5356
5357 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
5358
5359         * pt.c (current_template_args): New fn.
5360         (push_template_decl): Use it.
5361         * decl.c (grokdeclarator): Use it.
5362
5363         * decl2.c (build_expr_from_tree): Dereference ref vars.
5364
5365         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
5366         the decl-specifier-seq.
5367
5368         * decl.c (grok_op_properties): Don't force the type of a conversion
5369         op to be complete.  Don't warn about converting to the same type
5370         for template instantiations.
5371
5372         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
5373         methods.
5374
5375 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
5376
5377         * typeck.c (get_delta_difference): Remove previous bogusness.
5378         Don't give errors if force is set.
5379
5380 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
5381
5382         * decl2.c (finish_file): Don't emit debug info.
5383         * decl.c (pushdecl): Lose obsolete code.
5384         (grokdeclarator): Still do the long long thing after complaining.
5385         * search.c (note_debug_info_needed): Don't do anything if we're in a 
5386         template.
5387         * method.c (synthesize_method): For non-local classes,
5388         push_to_top_level first.
5389
5390 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
5391
5392         * typeck.c (get_delta_difference): Add no_error parameter.
5393         (build_ptrmemfunc): Call get_delta_difference with no_error set;
5394         we don't want error messages when converting unrelated
5395         pointer-to-member functions.
5396
5397 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
5398
5399         * error.c (dump_expr): Improve the wording on error messages that
5400         involve pointer to member functions.
5401
5402 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
5403
5404         * cvt.c (cp_convert_to_pointer): Move code for conversions from
5405         (::*)() to void* or (*)() up a bit, so that we can convert from
5406         METHOD_TYPEs as well.
5407
5408 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
5409
5410         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
5411         There are no 'member' types.
5412         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
5413         (build_x_typeid): Handle errors.
5414
5415 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
5416
5417         * typeck.c (convert_for_assignment): Handle anachronistic implicit
5418         conversions from (::*)() to void* or (*)().
5419         * cvt.c (cp_convert_to_pointer): Likewise.
5420         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
5421         conversions from here.
5422         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
5423         * lang-options.h: Likewise.
5424         * decl2.c (warn_pmf2ptr): Define.
5425         * cp-tree.h: Declare it.
5426         * typeck2.c (digest_init): Allow pmfs down into
5427         convert_for_initialization.
5428
5429 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
5430
5431         * typeck.c (c_expand_return): Fix for returning overloaded fn.
5432
5433 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
5434
5435         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
5436         * decl.c (grok_reference_init): Pass DIRECT_BIND.
5437         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
5438         DIRECT_BIND.
5439         * call.c (convert_like): Don't pass INDIRECT_BIND.
5440         * typeck.c (convert_arguments): Likewise.
5441         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
5442
5443 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
5444
5445         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
5446         similar code in build_up_ref.
5447         * cvt.c (build_up_reference): Drastically simplify.
5448
5449 Mon Oct 28 12:45:05 1996  Jeffrey A Law  (law@cygnus.com)
5450
5451         * typeck.c (signed_or_unsigned_type): If the given type already
5452         as the correct signedness, then just return it.
5453
5454         * typeck.c ({un,}signed_type): If can't do anything, call
5455         signed_or_unsigned_type.
5456
5457 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
5458
5459         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
5460         current_class_type is NULL.
5461
5462 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
5463
5464         * class.c (finish_struct_1): Avoid empty structs by adding a field
5465         so layout_type gets the mode right.
5466
5467         * typeck.c (c_expand_return): Drastically simplify.
5468
5469 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
5470
5471         * typeck.c (decay_conversion): Handle overloaded methods.
5472
5473 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
5474
5475         * call.c (build_over_call): A TARGET_EXPR has side-effects.
5476
5477 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
5478
5479         * cvt.c (convert_to_pointer_force): Add code to support pointer to
5480         member function to pointer to function conversions.
5481         * init.c (resolve_offset_ref): Add code to allow faked up objects,
5482         ignoring them if they are not used, and giving an error, if they
5483         are needed.
5484         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
5485         code, and so that we can give an error, if we needed an object,
5486         and one was not provided.
5487         (build_c_cast): Don't call default_conversion when we want to
5488         convert to pointer to function from a METHOD_TYPE.
5489
5490 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
5491
5492         * Make-lang.in (cplib2.ready): Fix logic.
5493
5494         * decl.c (shadow_tag): Only complain about non-artificial function
5495         members.
5496
5497         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
5498
5499 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
5500
5501         * expr.c (cplus_expand_expr): Pre-tweak call_target like
5502         expand_inline_function would.
5503
5504         * pt.c (mark_decl_instantiated): If extern_p, call
5505         mark_inline_for_output.
5506
5507 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
5508
5509         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
5510         pmd conversions.
5511
5512         * typeck.c (get_delta_difference): Fix wording, as we can be used
5513         for pointer to data members.
5514
5515 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
5516
5517         * pt.c (tsubst): If the function decl isn't a member of this
5518         template, return a copy of the decl (including copying the
5519         lang-specific part) so we don't hose ourselves later.
5520
5521 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
5522
5523         * class.c (finish_struct): Remove DWARF-specific tag handling.
5524         * decl.c (pushtag): Likewise.
5525         (finish_function): Always clear DECL_ARGUMENTS on function decls with
5526         no saved RTX.
5527         * decl2.c (finish_file): Emit DWARF debugging info for static data
5528         members.
5529
5530 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
5531
5532         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
5533         isn't the same as the new one before we whack it.
5534
5535 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
5536
5537         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
5538         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
5539         warn_traditional and warn_strict_prototypes; remove ancient
5540         'overload' code; remove references to flag_traditional.
5541
5542 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
5543
5544         * input.c (sub_getch): Handle 8-bit characters in string literals.
5545
5546 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
5547
5548         * tree.c (mapcar): Handle CONSTRUCTORs.
5549         (copy_to_permanent): Handle expression_obstack properly.
5550
5551         * Make-lang.in (cplib2.txt): Also depend on the headers.
5552
5553         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
5554         INT_TYPE_SIZE.
5555         (expand_class_desc): Use USItype for offset field.
5556         * tinfo.h (struct __class_type_info): Likewise.
5557
5558         * method.c (build_overload_int): TYPE_PRECISION should be applied
5559         to types.
5560
5561 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
5562
5563         * call.c (build_new_op): A COND_EXPR involving void must be a
5564         builtin.
5565
5566 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
5567
5568         * typeck.c (build_x_component_ref): New fn.
5569         (build_object_ref): Use it.
5570         * parse.y (primary): Use it.
5571         * decl2.c (build_expr_from_tree): Use it.
5572         * cp-tree.h: Declare it.
5573
5574         * decl.c (start_decl): variable-sized arrays cannot be initialized.
5575         * error.c (dump_type_suffix): Handle variable arrays.
5576
5577 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
5578
5579         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
5580
5581 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
5582
5583         * decl.c (lookup_name_real): Don't try to look up anything in a
5584         TYPENAME_TYPE.
5585
5586         * tinfo2.cc (__throw_type_match_rtti): Oops.
5587
5588 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
5589
5590         * Make-lang.in (exception.o): Use -fno-PIC for now.
5591
5592 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
5593
5594         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
5595         calling them.
5596         (get_tinfo_fn_dynamic): Extracted from build_typeid.
5597         * tinfo2.cc (__dynamic_cast): Adjust.
5598         
5599         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
5600         (build_x_typeid): Likewise.
5601
5602         * parse.y: Call build_x_typeid instead of build_typeid.
5603         * cp-tree.def: Add TYPEID_EXPR.
5604         * pt.c (tsubst_copy): Handle typeid.
5605         * decl2.c (build_expr_from_tree): Likewise.
5606         * rtti.c (build_x_typeid): Throw bad_typeid from here.
5607         (build_typeid): Not here.
5608         * cp-tree.h: Declare build_x_typeid.
5609
5610 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
5611
5612         * call.c (convert_like): Pull out constant values.
5613
5614         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
5615
5616 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
5617
5618         * decl.c (init_decl_processing): Create short int types before
5619         creating size_t in case a machine description needs to use
5620         unsigned short for size_t.
5621
5622 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
5623
5624         * Make-lang.in (exception.o): Turn off pic.
5625
5626         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
5627         type, multi-level ptr conversions.
5628
5629         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
5630         (throw_bad_cast): Use it.
5631         (throw_bad_typeid): New fn.
5632         (build_typeid): Throw bad_typeid as needed.
5633         Use build_call.
5634         (synthesize_tinfo_fn): Handle functions and arrays before checking
5635         for cv-quals.
5636
5637         * Remove .h from standard C++ headers, add new.h, move into inc
5638         subdirectory.
5639
5640         * exception*: Remove pointer from object, constructors.  Add
5641         default exception::what that uses type_info::name.  Add
5642         __throw_bad_typeid.
5643
5644         * init.c (build_new): Don't add a cookie to new (void *) T[2].
5645
5646 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
5647
5648         * Make-lang.in: Building C++ code depends on cc1plus.
5649
5650 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
5651
5652         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
5653         a HOST_WIDE_INT, not a tree.
5654
5655 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
5656
5657         * exception.cc: Don't include <stdlib.h>.
5658
5659         * Make-lang.in (c++.clean): Remove cplib2.*.
5660
5661 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
5662
5663         * parse.y (component_decl_1, component_costructor_declarator case):
5664         Pass attributes/prefix_attributes in tree list.
5665
5666 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
5667
5668         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
5669
5670 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
5671
5672         * lex.c (do_identifier): Don't do deferred lookup in a template
5673         header.
5674
5675         * typeck2.c (store_init_value): Oops.
5676
5677         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}: 
5678         New files for C++ lang-support library.
5679         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
5680         (CXX_LIB2FUNCS): Define.
5681         And rules for building the C++ lang-support code.
5682         * config-lang.in (headers): Define.
5683         (lib2funcs): Define.
5684
5685 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
5686
5687         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
5688         digest_init.
5689         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
5690         * typeck2.c (store_init_value): Check for initializing pmf with { }
5691         here.
5692         (process_init_constructor): Not here.
5693
5694 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
5695
5696         * pt.c (begin_template_parm_list): Increment
5697         processing_template_decl here.
5698         (end_template_parm_list): Not here.
5699         (process_template_parm): No need to add 1 to it now.
5700         * *.c: Use processing_template_decl instead of current_template_parms
5701         to check for being in a template.
5702
5703         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
5704         (tsubst_copy): Handle CONSTRUCTOR.
5705         (instantiate_decl): Set up context properly for variables.
5706         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
5707         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
5708
5709 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
5710
5711         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
5712
5713 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
5714
5715         * method.c (make_thunk): Call comdat_linkage before setting the
5716         TREE_CODE.
5717
5718         * decl2.c (comdat_linkage): Use make_decl_one_only.
5719         (import_export_decl): Likewise.
5720         * decl.c (init_decl_processing): Check supports_one_only instead of
5721         SUPPORTS_WEAK.
5722
5723 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
5724
5725         * decl2.c (grokfield): Tighten checking for access decls.
5726
5727         * decl.c (make_typename_type): Resolve references to
5728         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
5729         (lookup_name_real): Types that depend on a template parameter get
5730         an implicit 'typename' unless they're in the current scope.
5731         (start_decl_1): We don't care about incomplete types that depend
5732         on a template parm.
5733         (grokdeclarator): Resolve 'typename's in the type specifier that
5734         refer to members of the current scope.
5735
5736         * call.c (build_over_call): Remove 'inline called before
5737         definition' diagnostic.
5738         (build_method_call): Likewise.
5739         * decl.c (duplicate_decls): Downgrade 'used before declared
5740         inline' to a warning, only with -Winline.
5741
5742 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
5743
5744         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
5745
5746 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
5747
5748         * call.c (build_method_call): When calling a signature
5749         default implementation, as in other cases, let instance_ptr simply
5750         be instance.
5751
5752 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
5753
5754         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
5755
5756 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
5757
5758         * except.c (expand_start_catch_block): Add a pushlevel so that -g
5759         works on hppa and SPARC.
5760
5761 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
5762
5763         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
5764
5765 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
5766
5767         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
5768         before testing whether it's a signature.
5769
5770 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
5771
5772         * call.c (build_new_method_call): Don't complain about signature
5773         pointers and references not being an aggr type.
5774         (build_this): If a signature pointer or reference was passed in,
5775         just return it.
5776         (build_new_method_call): If instance is a signature pointer, set
5777         basetype to the signature type of instance.
5778         * sig.c (build_signature_method_call): Deleted basetype and
5779         instance parameters, they can be found as the DECL_CONTEXT of
5780         function and as the first argument passed in.
5781         * cp-tree.h: Changed declaration of build_signature_method_call.
5782         * call.c (build_method_call): Deleted first two arguments in call
5783         of build_signature_method_call.
5784         (build_over_call): Added call to build_signature_method_call.
5785
5786 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
5787
5788         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
5789         target_expr.
5790
5791 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
5792
5793         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
5794
5795 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
5796
5797         * except.c (expand_start_try_stmts): Move to except.c in the backend.
5798         (expand_end_try_stmts): Remove.
5799
5800         * init.c (perform_member_init): Use add_partial_entry () instead
5801         of directly manipulating lists.
5802         (emit_base_init): Ditto.
5803
5804 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
5805
5806         * except.c (expand_exception_blocks): Always make sure USE and
5807         CLOBBER insns that came at the end still do, the backend relies
5808         upon this.
5809
5810 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
5811
5812         * call.c (build_over_call): We can only use a TARGET_EXPR of the
5813         right type.
5814
5815 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
5816
5817         * cvt.c (convert_to_reference): Revert last change, don't complain
5818         about temp without target decl.
5819
5820 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
5821
5822         * decl.c (grokdeclarator): Don't core dump when void() is given.
5823
5824 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
5825
5826         * decl.c (copy_args_p): Don't crash.
5827
5828 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
5829
5830         * pt.c (tsubst): And support template args inside the exception
5831         specification.
5832
5833         * pt.c (tsubst): Add support for exception specifications in
5834         template functions.
5835
5836 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
5837
5838         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
5839         fields now.
5840         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
5841         (start_function): Likewise.
5842         (start_method): Likewise.
5843         (grokfield): Likewise.
5844         (make_call_declarator): Add throw spec parameter.
5845         (set_quals_and_spec): Add routine.
5846         * lex.c (set_quals_and_spec): Likewise.
5847         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
5848         * decl.c (shadow_tag): Eliminate the throw spec parameter to
5849         grokdeclarator.
5850         (groktypename): Likewise.
5851         (start_decl): Eliminate the throw spec parameter.  Eliminate the
5852         throw spec parameter to grokdeclarator.  Eliminate the throw spec
5853         field in DECL_STMT.
5854         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
5855         (grokfndecl): Remove useless set of raises.
5856         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
5857         the throw spec parameter to start_decl.  Pull the throw spec out
5858         of the call declarator.
5859         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
5860         (start_function): Eliminate the throw spec parameter.  Eliminate
5861         the throw spec parameter to grokdeclarator.
5862         (start_method): Likewise.
5863         * decl2.c (grokfield): Likewise.
5864         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
5865         (grokoptypename): Likewise.
5866         (finish_file): Eliminate the throw spec parameter to
5867         start_function.  Add throw spec to make_call_declarator.
5868         * except.c (init_exception_processing): Add throw spec to
5869         make_call_declarator.  Eliminate the throw spec parameter to
5870         start_decl.
5871         (expand_start_catch_block): Eliminate the throw spec parameter to
5872         grokdeclarator.
5873         (expand_builtin_throw): Add throw spec to make_call_declarator.
5874         Eliminate the throw spec parameter to start_function.
5875         (start_anon_func): Likewise.
5876         * lex.c (make_call_declarator): Add throw spec parameter.
5877         (set_quals_and_spec): New routine.
5878         (cons_up_default_function): Add throw spec to make_call_declarator.
5879         Eliminate the throw spec parameter to grokfield.
5880         * method.c (synthesize_method): Eliminate the throw spec parameter
5881         to start_function.
5882         * pt.c (process_template_parm): Eliminate the throw spec parameter
5883         to grokdeclarator.
5884         (tsubst): Add throw spec to make_call_declarator.
5885         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
5886         (do_function_instantiation): Eliminate the throw spec parameter to
5887         grokdeclarator.  Eliminate the throw spec parameter to
5888         start_function.
5889         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
5890         to start_function.
5891         * parse.y (datadef): Remove non-winning optimization.
5892         (decl): Likewise.
5893         (fndef): Remove ambiguous error productions uncovered by grammer
5894         fixing.
5895         (constructor_declarator): Add exception_specification_opt here.
5896         (component_constructor_declarator): Likewise.
5897         (direct_after_type_declarator): Likewise.
5898         (complex_direct_notype_declarator): Likewise.
5899         (direct_abstract_declarator): Likewise.
5900         (fn.def1): Remove exception_specification_opt.
5901         (fn.def2): Likewise.
5902         (condition): Likewise.
5903         (initdcl0): Likewise.
5904         (initdcl): Likewise.
5905         (notype_initdcl0): Likewise.
5906         (nomods_initdcl0): Likewise.
5907         (component_decl_1): Likewise.
5908         (component_declarator): Likewise.
5909         (after_type_component_declarator0): Likewise.
5910         (after_type_component_declarator): Likewise.
5911         (notype_component_declarator): Likewise.
5912
5913 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
5914
5915         * call.c (build_over_call): Also use an INIT_EXPR when
5916         initializing anything from an rvalue.
5917
5918         * call.c (build_over_call): Call stabilize_reference when building
5919         an INIT_EXPR instead of calling the copy ctor.
5920
5921         * call.c (joust): Extend the previous change to all comparisons.
5922
5923         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and 
5924         NO_LINKAGE_HEURISTICS.
5925
5926         * decl2.c (finish_file): Emit any statics that weren't already.
5927
5928         * typeck.c (build_static_cast): Implement.
5929         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
5930         * decl.c (grokparms): Use can_convert_arg instead of
5931         implicit_conversion directly.
5932         (copy_args_p): New fn.
5933         * cvt.c (convert_to_reference): Don't complain about temp with
5934         static_cast.
5935         (build_up_reference): Handle TARGET_EXPRs.
5936         * call.c (build_over_call): Elide unnecessary temps.
5937         (can_convert*): Use new overloading code.
5938
5939 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
5940
5941         * call.c: Move TYPE_PTR*_MACROS ...
5942         * cp-tree.h: To here.
5943         * typeck.c (build_reinterpret_cast): Implement.
5944
5945         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
5946         ptr_complete_ob.
5947         (joust): If we're comparing a function to a builtin and the worst
5948         conversion for the builtin is worse than the worst conversion for the
5949         function, take the function.
5950
5951         * typeck.c (build_const_cast): Implement.
5952         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
5953         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
5954
5955 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
5956
5957         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
5958         too early. Make sure we explode if exprtype turns out to be a
5959         NULL_TREE when it shouldn't be.
5960
5961 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
5962
5963         * cp-tree.h: New routine make_call_declarator.
5964         * lex.c (make_call_declarator): Define it.
5965         * except.c (init_exception_processing): Use it.
5966         (expand_builtin_throw): Likewise.
5967         (start_anon_func): Likewise.
5968         * decl2.c (finish_file): Likewise.
5969         * lex.c (cons_up_default_function): Likewise.
5970         * parse.y: Likewise.
5971         * pt.c (tsubst): Likewise.
5972         
5973 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
5974
5975         * decl2.c (groktypefield): Remove unused code.
5976
5977 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
5978
5979         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
5980         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
5981         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
5982         nonempty_cv_qualifiers.
5983         * hash.h: Rebuild.
5984         
5985         * lex.c (make_pointer_declarator): Change type_quals into
5986         cv_qualifiers.
5987         (make_reference_declarator): Likewise.
5988         
5989 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
5990
5991         * decl.c (start_function): Only check interface_* for templates
5992         with flag_alt_external_templates.
5993
5994         * call.c (build_new_op): Check for comparison of different enum types.
5995         (build_over_call): Fix arg # output.
5996
5997         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
5998
5999 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
6000
6001         * call.c (build_new_op): Check for erroneous args.
6002
6003         * call.c (build_new_method_call): Add missing args to cp_error.
6004
6005         * tree.c (error_type): Dont print reference-to-array.
6006
6007         * typeck.c (convert_for_assignment): Don't say contravariance for
6008         removing const.
6009
6010 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
6011
6012         * call.c (build_over_call): Diagnose bad convs for `this'.
6013
6014         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
6015         on _ctor_arg.
6016
6017         * call.c (convert_like): Handle bad convs.
6018         (build_over_call): Handle bad convs better.
6019
6020         * decl2.c: -fansi-overloading is now the default.
6021
6022         * call.c (build_new_method_call): Check for erroneous args.
6023
6024         * pt.c (instantiate_class_template): Propagate
6025         TYPE_USES_MULTIPLE_INHERITANCE.
6026
6027 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
6028
6029         * call.c (enforce_access): Add static to routine.
6030
6031 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
6032
6033         * call.c (build_user_type_conversion_1): Fix bad handling.
6034         (compare_ics): Likewise.
6035
6036 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
6037
6038         * call.c (standard_conversion): Oops.
6039
6040 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
6041
6042         * g++.c: Update test for win32 (&& ! cygwin32).
6043
6044 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
6045
6046         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
6047         (ptr_reasonably_similar): New fn.
6048         * call.c (BAD_RANK): New rank.
6049         (ICS_BAD_FLAG): New macro.
6050         (standard_conversion): Handle almost-right pointer conversions.
6051         (reference_binding): Handle bad rvalue bindings.
6052         (add_*_candidate): Stuff.
6053         (build_over_call): Pass bad conversions to convert_for_initialization.
6054         (compare_ics): Handle bad convs.
6055         (joust): Likewise.
6056
6057 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
6058
6059         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
6060         integer_type_node when computing pointer offsets.
6061
6062 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
6063
6064         * tree.c (lvalue_type): New fn.
6065         (error_type): New fn.
6066         * call.c (op_error): Use error_type.
6067         (add_conv_candidate): Use lvalue_type.
6068         (add_builtin_candidates): Likewise.
6069         * error.c (args_as_string): Use error_type.
6070
6071 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
6072
6073         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
6074         (tsubst): Not here.
6075
6076         * decl.c (init_decl_processing): With -ansi, __null's type is the
6077         signed integral type with the same number of bits as a pointer.
6078         Introduce a new variable null_node for it.
6079         * cp-tree.h: Adjust.
6080         * call.c (null_ptr_cst_p): Adjust.
6081
6082 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
6083
6084         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
6085         optimize.
6086
6087 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
6088
6089         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
6090         fns of classes without virtual functions.
6091
6092         * call.c (add_function_candidate): Handle `this' specially.
6093         (compare_ics): Likewise.
6094
6095 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
6096
6097         * typeck.c (build_conditional_expr): Fix handling of __null.
6098
6099         * decl2.c (comdat_linkage): New fn.
6100         (import_export_vtable): Use it.
6101         (import_export_decl): Use it.
6102         * method.c (make_thunk): Use it.
6103
6104 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
6105
6106         * pt.c (end_template_decl): If we don't actually have parms, return.
6107         * parse.y (template_header): Accept 'template <>'.
6108
6109         * errfn.c: Allow 5 args.
6110
6111 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
6112
6113         * tree.c (make_temp_vec): New fn.
6114         * pt.c (push_template_decl): Handle partial specs.
6115         (instantiate_class_template): Likewise.
6116         (more_specialized): Use get_bindings.
6117         (more_specialized_class): New fn.
6118         (get_class_bindings): New fn.
6119         (most_specialized_class): New fn.
6120         (do_function_instantiation): List candidates for ambiguous case.
6121         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
6122         (shadow_tag): Call push_template_decl for partial specializations.
6123         * parse.y: Likewise.
6124         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
6125         DECL_TEMPLATE_MEMBERS.
6126         * call.c (print_z_candidates): Reduce duplication.
6127
6128 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
6129
6130         * decl2.c (lang_decode_option): Allow -fansi-overloading.
6131
6132 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
6133
6134         * pt.c (get_bindings): New fn.
6135         (most_specialized): Likewise.
6136         (do_function_instantiation): Use them.
6137         (add_maybe_template): New fn.
6138         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
6139         * call.c (build_new_op): Handle guiding decls.
6140         (build_new_function_call): Likewise.
6141         * decl2.c (finish_file): Likewise.
6142
6143         * decl2.c (mark_used): Do synthesis here.
6144         * call.c (build_method_call): Not here.
6145         (build_over_call): Or here.
6146         * typeck.c (build_function_call_real): Or here.
6147         * tree.c (bot_manip): Call mark_used on functions used in default
6148         args.
6149
6150 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
6151
6152         * decl2.c (import_export_vtable): Delete code that disabled vtable
6153         heuristic on systems with ASM_OUTPUT_EXTERNAL.
6154
6155 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
6156
6157         * typeck.c (build_x_function_call): Handle static call context
6158         better.
6159
6160         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
6161         the function, not its outer block.
6162
6163         * call.c (build_field_call): Pass fields on to build_opfncall
6164         regardless of TYPE_OVERLOADS_CALL_EXPR.
6165         (build_method_call): Pass on to build_new_method_call sooner.
6166
6167         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
6168         gives us.
6169         * class.c (instantiate_type): Don't put a POINTER_TYPE to
6170         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
6171         modifying it.
6172
6173 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
6174
6175         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
6176         (add_builtin_candidate): Don't take enums for ++.
6177         (build_new_method_call): Handle non-aggregates and field calls.
6178         Move new overloading code from...
6179         * cvt.c: Here.
6180
6181         * decl.c (grokparms): Don't check default args in templates.
6182
6183 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
6184
6185         * cvt.c (build_new_op): Fix args to build_unary_op.
6186         (add_builtin_candidates): Don't call type_promotes_to on float.
6187
6188         * decl.c (grokparms): Check the type of the default arg.
6189
6190         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
6191         returning NULL_TREE.
6192
6193         * typeck.c (build_x_binary_op): Avoid doing extra work.
6194         (build_x_unary_op): Likewise.
6195         (build_x_conditional_expr): Likewise.
6196         * cvt.c (build_over_call): Return.
6197         (add_builtin_candidate): Fix MEMBER_REF.
6198         (build_new_op): Likewise.
6199
6200 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
6201
6202         * method.c (build_overload_name): Put bug fix into code but leave
6203         disabled for now so we can be bug compatible with older releases
6204         that do repeats incorrectly.  In the future, we can enable it.
6205
6206 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
6207
6208         * cvt.c (convert_like): Don't call build_cplus_new twice.
6209
6210         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
6211         Control new overloading code with -fansi-overloading.
6212
6213 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
6214
6215         * cvt.c (build_over_call): Call build_cplus_new.
6216         * call.c (build_method_call): Likewise.
6217         * typeck.c (build_function_call_real): Likewise.
6218         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
6219         the COND_EXPR in a TARGET_EXPR so they use the same slot.
6220
6221         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to 
6222         recursive calls.
6223         * typeck.c (complete_type): Propagate
6224         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
6225
6226 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
6227
6228         * cvt.c (joust): More ?: kludging.  Sigh.
6229         (build_over_call): Don't try to synthesize global fns.
6230
6231         * search.c (lookup_conversions): Use binfo marking.
6232
6233 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
6234
6235         * search.c (build_mi_matrix): Use the correct value of cid
6236         when determining the new mi_size.
6237
6238 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
6239
6240         * cvt.c (add_builtin_candidates): Do consider type conversion ops
6241         for the first parms of += et al.
6242         (strip_top_quals): New fn.
6243         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
6244         (implicit_conversion): Likewise.
6245         (add_builtin_candidates): Be careful about arrays.
6246         (build_new_method_call): Handle vtable optimization.
6247
6248 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
6249
6250         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
6251         * cvt.c (reference_binding): Use it.
6252         (implicit_conversion): Use it.
6253         (add_builtin_candidate, COND_EXPR): Use it.
6254
6255         * cvt.c (build_new_function_call): Check for error args.
6256
6257         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
6258
6259         * gxx.gperf: Add __null.
6260         * hash.h: Regenerate.
6261         * lex.h: Add RID_NULL.
6262         * lex.c (init_lex): Create null_pointer_node here, stick it in
6263         RID_NULL.
6264         * decl.c (init_decl_processing): Still set its type here.
6265         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
6266         (convert_to_pointer_force): Likewise.
6267         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
6268         if (! pedantic).
6269         * call.c (convert_harshness): Use null_ptr_cst_p.
6270         * typeck.c (convert_for_assignment): Likewise.  Don't produce
6271         null_pointer_node.
6272
6273         * error.c (args_as_string): Handle lists of actual args, too.
6274         * cvt.c (null_ptr_cst): Support (void*)0 for now.
6275         (build_user_type_conversion_1): Improve diagnostics.
6276         (build_new_function_call): Likewise.
6277         (build_object_call): Likewise.
6278         (build_new_method_call): Likewise.  Move call before def diagnostic...
6279         (build_over_call): Here.
6280
6281         * cvt.c (build_new_method_call): Don't complain about no match if
6282         LOOKUP_SPECULATIVELY.
6283         (build_over_call): Fix 'this' for virtual fn.
6284         (build_new_method_call): Add diagnostic.
6285
6286 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
6287
6288         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
6289         constructors to be passed in.
6290         (build_over_call): Likewise.
6291         (build_user_type_conversion_1): Pass them in.
6292         (convert_like): Likewise.
6293         (build_object_call): Handle overloaded conversions.
6294         (build_over_call): Pass the right args to build_vfn_ref.
6295         (standard_conversion): Fix pmf convs.
6296         (joust): Handle comparing statics and non-statics.
6297         (build_new_method_call): New fn.
6298         * call.c (build_method_call): Call it if NEW_OVER.
6299
6300 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
6301
6302         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
6303         %D instead.
6304
6305 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
6306
6307         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
6308         instead of just maybe_build_cleanup so that we deallocate the
6309         thrown object.
6310
6311 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
6312
6313         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
6314         * cp-tree.h (finish_prevtable_vardecl): Add decl.
6315
6316 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
6317
6318         * pt.c (instantiate_class_template): Call complete_type. Also, if
6319         we're at the end of the file and we just instantiated a template
6320         class with a vtable, call finish_prevtable_vardecl.
6321
6322         * error.c (dump_decl): Don't explode (or explode more gracefully
6323         as appropriate) if the object being dumped has a null type.
6324         (dump_expr): Likewise.
6325
6326         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
6327         by counting the number of nodes that we'll need before allocating
6328         the array.
6329         (lookup_fnfields): Fix comment.
6330         (breadth_first_search): Fix comment.
6331
6332 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
6333
6334         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
6335         TYPE_ALIGN.
6336         * class.c (finish_struct): Call cplus_decl_attributes here.
6337         (finish_struct_1): Not here.
6338         * cp-tree.h: Adjust.
6339
6340         * pt.c (type_unification): New parameter STRICT.
6341         (unify): If STRICT, don't allow cv addition or base deduction.
6342         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
6343
6344 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
6345
6346         * search.c (get_template_base{_recursive}): New fns.
6347         * pt.c (more_specialized): New fn.
6348         (do_function_instantiation): Use it.
6349         (unify): Handle base deduction.
6350         * cvt.c (joust): Use more_specialized.
6351         Don't arbitrarily choose between non-builtin candidates.
6352         (build_over_call): Call require_complete_type.
6353
6354         * decl.c (start_function): Statics are static even in a #pragma
6355         interface file.
6356
6357         * decl2.c (import_export_vtable): Disable vtable heuristic on
6358         systems with ASM_OUTPUT_EXTERNAL.
6359
6360         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
6361         (standard_conversion): No std conv to enum type.
6362
6363         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
6364         for ptm's.
6365
6366         * cvt.c (reference_binding): Bind directly to a base subobject of
6367         a class rvalue.
6368
6369         * cvt.c (build_new_op): Enforce access control.
6370
6371 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
6372
6373         * typeck2.c (process_init_constructor): When scanning the
6374         union for a named field, skip things that aren't FIELD_DECLs.
6375
6376         * method.c (synthesize_method): Don't scan fndecl's rtl if
6377         we're at the end of the file; just assume the function can't
6378         be inlined.
6379
6380 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
6381
6382         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
6383         it failed.
6384
6385         * cvt.c (build_user_type_conversion_1): Handle overloaded
6386         conversion ops.
6387
6388         * cvt.c (add_builtin_candidates): Don't consider type conversion
6389         operators for the first parameter of operator=.
6390
6391 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
6392
6393         * typeck.c (complete_type): Only call layout_type if we're not
6394         expanding a template.
6395
6396 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
6397
6398         * cvt.c (compare_ics): Oops.
6399
6400         * cvt.c (op_error): Oops.
6401
6402         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
6403         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
6404         (build_conv): Use them.
6405         (implicit_conversion): Use them.
6406         (convert_like): Handle them.
6407         (build_new_op): Handle builtin COND_EXPR again.
6408         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
6409         in lists of types for COND_EXPR.
6410         (add_builtin_candidate): Add enum candidates for COND_EXPR.
6411
6412 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
6413
6414         * typeck.c (build_modify_expr): Always attempt to build a call to
6415         the assignment operator, even if we're using a default one.
6416         (convert_for_initialization): Call complete_type.
6417
6418 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
6419
6420         * cvt.c (reference_binding): A REF_BIND gets the reference type.
6421         (implicit_conversion): Likewise.
6422         (convert_like): Likewise.
6423         (compare_ics): Likewise.
6424         (compare_qual): Likewise.
6425         (print_z_candidates): Handle no candidates.
6426         (build_new_op): Don't handle builtin COND_EXPR for now.
6427
6428 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
6429
6430         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
6431
6432 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
6433
6434         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
6435
6436         * cvt.c (build_builtin_candidate): Oops.
6437         (build_new_op): Oops.
6438
6439         * method.c (build_opfncall): Pass COND_EXPR on.
6440         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
6441         (add_builtin_candidate{,s}): Likewise.
6442         (add_builtin_candidates): Likewise.
6443         (print_z_candidates, op_error, build_new_op): Likewise.
6444         (type_decays_to): New fn.
6445         * lex.c (init_lex): Just say ?: for COND_EXPR.
6446
6447 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
6448
6449         * typeck.c (complete_type): Call layout_type rather than building
6450         a new array type.
6451
6452         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
6453         only use ptrdiff_t.
6454
6455 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
6456
6457         * cvt.c: Always compile the new overloading code (but don't use it).
6458         (implicit_conversion): Add a BASE_CONV when converting to
6459         the same class type.
6460         (convert_like): Handle BASE_CONV.
6461
6462 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
6463
6464         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
6465         (add_builtin_candidate): Likewise.
6466
6467         NEW_OVER changes:
6468         * typeck.c (build_x_function_call): Try an operator function
6469         whenever we call an object of class type.
6470         * method.c (build_opfncall): Pass CALL_EXPRs through.
6471         * cvt.c (implicit_conversion): Do const-ref case first.
6472         (add_conv_candidate, build_object_call, op_error): New fns.
6473         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
6474         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display 
6475         builtin candidates.
6476         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
6477         Fall back on preincrement handling.  Use op_error.  
6478         Handle warn_synth.
6479         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with 
6480         an error_mark_node.
6481         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
6482         properly.
6483
6484 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
6485
6486         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
6487
6488 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
6489
6490         * typeck.c (build_component_ref_1): Use build_component_ref
6491         instead of open coding it here.
6492
6493 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
6494
6495         * g++.c (main): Don't link with -lg++.
6496
6497         NEW_OVER changes:
6498         * cvt.c (convert_to_reference): Don't use convert_from_refeence on
6499         result of build_type_conversion.
6500         (cp_convert): Only call build_method_call for ctors if
6501         build_type_conversion failed.
6502         (ptr_complete_ob): New function.
6503         (TYPE_PTR{,OB,MEM}_P): New macros.
6504         ({add,build}_builtin_candidate{,s}): New functions.
6505         (print_z_candidates): Handle builtins.
6506         (build_user_type_conversion_1): Don't use conversion fns for 
6507         converting to a base type.
6508         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
6509         (build_user_type_conversion): Use convert_from_reference.
6510         (build_new_op): New function.
6511         (build_over_call): Fix handling of methods.
6512         (compare_ics): Handle AMBIG_CONV properly.
6513         * typeck2.c: Increment abort count.
6514         * method.c (build_opfncall): Forward most requests to build_new_op.
6515         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
6516
6517 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
6518
6519         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
6520         invalid second argument to dump_expr_list.
6521
6522 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
6523
6524         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
6525
6526 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
6527
6528         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
6529         ASSEMBLE_EXTERNAL.
6530
6531 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
6532
6533         * typeck2.c (process_init_constructor): New pedwarn for using { }
6534         to initialize a pointer to member function.
6535         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
6536         we can avoid the new error.
6537
6538 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
6539
6540         * typeck.c (build_ptrmemfunc1): New function to hide details of
6541         pointer to member functions better.
6542
6543 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
6544
6545         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
6546         methods into the actual method, as we know the implied object is
6547         not used.
6548
6549 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
6550
6551         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
6552         inside a system header.
6553
6554 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
6555
6556         * call.c (build_method_call): Call complete_type on the
6557         instance type.
6558
6559 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
6560
6561         * typeck.c (build_component_ref): Always build up an OFFSET_REF
6562         for obj_ptr->func so that we can know which object to use in a
6563         method call.
6564
6565 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
6566
6567         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
6568         around things.  Also improve maintainability.
6569
6570 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
6571
6572         * decl.c (grokdeclarator): Check for overflow when evaluating an
6573         array dimension.
6574
6575 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
6576
6577         * cvt.c (cp_convert): Don't check for ambiguity with constructor
6578         if NEW_OVER.
6579
6580         * typeck.c (build_x_function_call): Pass function overload
6581         questions to new overloading code if NEW_OVER.
6582         * init.c (expand_aggr_init_1): Only check for type conversion ops
6583         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
6584         Don't check for ambiguity with constructor if NEW_OVER.
6585         * cvt.c (convert_to_reference): Dereference the result of a type
6586         conversion operator.
6587         (build_conv): Propagate ICS_USER_FLAG.
6588         (implicit_conversion): Call instantiate_type.
6589         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
6590         (add_function_candidate): Fix cv-quals on argtype.
6591         (print_z_candidates): New function.
6592         (build_new_function_call): Call it.
6593         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
6594         consider non-converting constructors.
6595         Call print_z_candidates.
6596         Return an AMBIG_CONV for an ambiguous conversion.
6597         (build_user_type_conversion): Handle AMBIG_CONV.
6598         (convert_like): Fix test for building TARGET_EXPR.
6599         Call instantiate_type.
6600         Handle AMBIG_CONV and LVALUE_CONV.
6601         (build_over_call): Handle 0 args and ellipsis.
6602         * cp-tree.def: Add AMBIG_CONV.
6603
6604 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
6605
6606         * decl.c (lookup_name_real): If we find mem in obj when parsing
6607         `obj->mem', make sure we return the right value.
6608
6609 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
6610
6611         * search.c (get_base_distance): Call complete_type.
6612
6613 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
6614
6615         * decl.c (store_bindings): Make static.
6616
6617 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
6618
6619         * init.c (expand_aggr_init_1): Don't check type conversions if
6620         NEW_OVER.
6621
6622         * cvt.c (z_candidate): Put back template field.
6623         (add_function_candidate): Set it.
6624         (add_template_candidate): Likewise.
6625         (joust): Use it.
6626         (compare_qual): Handle references and pointers to members.
6627         (compare_ics): Handle reference bindings.
6628
6629         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
6630
6631 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
6632
6633         * call.c (compute_conversion_costs): Call complete_type.
6634
6635         * tree.c (vec_binfo_member): Use comptypes instead of comparing
6636         pointers, so we can handle template parameters.
6637
6638 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
6639
6640         * cvt.c (cp_convert_to_pointer): We have to call complete_type
6641         here; let's make it explicit instead of a side effect of an
6642         error check.
6643
6644 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
6645
6646         * cvt.c (z_candidate): Remove template field.
6647         (reference_binding): Handle binding to temporary.
6648         (implicit_conversion): Likewise.
6649         (add_function_candidate): Handle artificial constructor parms.
6650         Handle functions with too few parms.
6651         (add_template_candidate): New function.
6652         (build_user_type_conversion_1): Handle constructors.
6653         (convert_like): Likewise.
6654         (build_over_call): Likewise.
6655         (build_new_function_call): Support templates.
6656         (compare_ics): Fix reference, inheritance handling.
6657
6658 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
6659
6660         * decl.c: Add signed_size_zero_node.
6661         (init_decl_processing): Build it.
6662         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
6663         when we're trying to make a negative delta.
6664
6665 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
6666
6667         Stop doing this damn index==strchr variable name confusion.
6668         * class.c (add_virtual_function): Change local var INDEX to be
6669         named IDX.
6670         (add_method): Likewise.
6671         * lex.c (print_parse_statistics): Likewise.
6672         * search.c (make_memoized_table_entry): Likewise.
6673         (lookup_fnfields_here): Likewise.
6674         (lookup_field): Likewise.
6675         (lookup_fnfields): Likewise.
6676         (get_baselinks): Likewise.
6677         * sig.c (build_signature_table_constructor): Likewise.
6678         (build_signature_method_call): Likewise.
6679         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
6680         (get_member_function_from_ptrfunc): Likewise.
6681         (build_ptrmemfunc): Change local var INDEX to be IDX.
6682         (c_expand_start_case): Likewise.
6683
6684 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
6685
6686         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
6687         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
6688         (convert_to_reference): Use build_type_conversion to convert to
6689         the reference type directly.
6690         (standard_conversion): Fix void* case, non-conversions.
6691         (reference_binding): Fix expr == 0 case, non-conversions.
6692         (convert_like): Support REF_BIND.
6693         (compare_qual): Split out from compare_ics.
6694         (compare_ics): Use it, handle icses with only a qual_conv.
6695
6696         * init.c (expand_vec_init): Don't crash if decl is NULL.
6697
6698 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
6699
6700         * mpw-config.in: New file, configury for Mac MPW.
6701         * mpw-make.sed: New file, makefile editing for MPW.
6702
6703 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
6704
6705         * pt.c (instantiate_class_template): Call repo_template_used.
6706
6707         * search.c (lookup_conversions): Only lookup conversions in
6708         complete types.
6709
6710 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
6711
6712         * cp-tree.def: Renamed from tree.def, to avoid confusion with
6713         gcc's tree.def.
6714         * cp-tree.h, lex.c: Include cp-tree.def.
6715         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
6716
6717 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
6718
6719         * init.c (build_vec_delete_1): Call complete_type.
6720
6721 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
6722
6723         * except.c (start_anon_func): Make sure anonymous functions are
6724         never external.
6725
6726 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
6727
6728         * decl.c (finish_function): If function_depth > 1, set nested.
6729
6730         * decl2.c (grokbitfield): Revert Bob's change.
6731         * class.c (finish_struct_1): Fix handling of named bitfield widths.
6732
6733 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
6734
6735         * pt.c (add_pending_template): Handle types.
6736         (lookup_template_class): With -fexternal-templates, just add the class
6737         to pending_templates instead of instantiating it now.
6738         * decl2.c (finish_file): Handle types in pending_templates.
6739
6740 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
6741
6742         * decl2.c (grokbitfield): Handle constant decls appropriately.
6743         Give an appropriate error message now instead of spewing core
6744         later.
6745
6746 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
6747
6748         * decl2.c: Don't turn on thunks by default for now.
6749
6750 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
6751
6752         * typeck.c (complete_type): Handle error_mark_node.
6753         (common_type, OFFSET_TYPE): Handle template_type_parms.
6754
6755 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
6756
6757         * pt.c (instantiate_decl): If at_eof, call import_export_decl
6758         regardless of DECL_INLINE.
6759
6760         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
6761
6762         * class.c (finish_struct_bits): Copy TYPE_SIZE.
6763
6764         * rtti.c (build_dynamic_cast): Support templates.
6765         * tree.def: Support DYNAMIC_CAST_EXPR.
6766         * pt.c (tsubst_copy): Likewise.
6767         * decl2.c (build_expr_from_tree): Likewise.
6768
6769 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
6770
6771         * typeck.c (build_static_cast): Support templates.
6772         (build_const_cast): Likewise.
6773         * tree.def: Support CONST/STATIC_CAST_EXPR.
6774         * pt.c (tsubst_copy): Likewise.
6775         * decl2.c (build_expr_from_tree): Likewise.
6776
6777 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
6778
6779         * decl2.c (finish_vtable_vardecl): Don't trust
6780         TREE_SYMBOL_REFERENCED for vtables of local classes.
6781
6782 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
6783
6784         * pt.c (tsubst_copy): Handle operator T.
6785
6786 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
6787
6788         * init.c (build_delete): Move creation of PARMS inside test of
6789         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
6790
6791 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
6792
6793         * typeck.c (build_conditional_expr): Don't assume that
6794         the arguments to ?: are always pointers or records.
6795
6796 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
6797
6798         * decl2.c (import_export_decl): Still emit static/weak/comdat
6799         copies of inline template functions with -fno-implicit-templates.
6800
6801 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
6802
6803         * init.c (build_delete): Determine the complete basetype
6804         path to the destructor we're calling.
6805
6806 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
6807
6808         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
6809         initialize the enum, because we really and truly don't know where
6810         it came from.
6811         (start_enum): Don't copy integer_zero_node because
6812         build_enumerator will do it.
6813
6814 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
6815
6816         * decl.c (finish_function): Do access control on base destructors.
6817
6818         * pt.c (tsubst, case FUNCTION_DECL): Set up
6819         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
6820         hose us.
6821
6822 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
6823
6824         * cvt.c (build_up_reference): If we have already extended the
6825         lifetime of the temporary, don't try it again.
6826         * typeck.c (c_expand_return): Don't try and convert the return
6827         value twice when we want a reference, once is enough.
6828         
6829 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
6830
6831         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
6832         LOOKUP_ONLYCONVERTING at all for now.
6833
6834         * search.c (add_conversions): Put the conversion function in
6835         TREE_VALUE, the basetype in TREE_PURPOSE.
6836         * cvt.c (build_type_conversion): Adjust.
6837         * cvt.c (build_expr_type_conversion): Adjust.
6838         * call.c (user_harshness): Adjust.
6839
6840 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
6841
6842         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
6843         backend's benefit.
6844
6845 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
6846
6847         * except.c (expand_start_catch_block): Add a dummy region, if we
6848         get an error, so that we can avoid core dumping later.
6849
6850 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
6851
6852         * cp-tree.h (OFFSET_REF): Remove.
6853         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
6854         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
6855         * init.c (expand_aggr_init_1): Likewise.
6856         (build_new): Likewise.
6857         * typeck.c (expand_target_expr): Likewise.
6858
6859 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
6860
6861         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
6862         TARGET_EXPR.
6863
6864 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
6865
6866         * cvt.c (build_up_reference): Redo how and when temporaries are
6867         created.
6868         * decl.c (grok_reference_init): Don't try and be smart about
6869         running cleanups.
6870
6871 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
6872
6873         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
6874         (TARGET_EXPR...), now that it has 4 arguments.
6875         * tree.c (build_cplus_new): Likewise.
6876
6877 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
6878
6879         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
6880
6881         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
6882         * decl.c (struct saved_scope): Remove named_labels,
6883         {base,member}_init_list.
6884         (maybe_push_to_top_level): Don't set them.  Call
6885         push_cp_function_context if appropriate.
6886         (pop_from_top_level): Likewise.
6887
6888         * method.c (do_build_assign_ref): Remove obsolete check of
6889         TYPE_HAS_ASSIGN_REF (basetype).
6890
6891         * decl.c (grokfndecl): Diagnose user definition of
6892         implicitly-declared methods.
6893
6894 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
6895
6896         * method.c (do_build_copy_constructor): Add code to give
6897         meaningful error messages instead of crashing.
6898         (do_build_assign_ref): Don't synthesize assignment operators for
6899         classes containing reference or const members.
6900
6901         * class.c (struct base_info): Remove cant_synth_copy_ctor
6902         and cant_synth_asn_ref.
6903         (finish_base_struct): Remove the code that tries to conditionalize
6904         synthesis of copy constructors & assignment operators based on
6905         access permissions. Instead, let it fail when it tries to
6906         synthesize the copy constructor. This will give meaningful error
6907         messages instead of silently generating code to perform a bitcopy.
6908
6909 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
6910
6911         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
6912         determining types for constant values.
6913
6914         * decl.c (struct named_label_list): Use instead of stuffing
6915         random items into a TREE_LIST node.
6916         (named_label_uses): Use the new struct.
6917         (poplevel): Likewise.
6918         (lookup_label): Likewise.
6919         (define_label): Add an error message to tell the user the line
6920         where the goto is located in addition to the destination of the
6921         goto.
6922         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
6923         named_label_uses.
6924         (finish_function): Likewise.
6925         
6926         (start_decl): Complain about defining a static data member
6927         in a different type from which it was declared.
6928
6929 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
6930
6931         * cvt.c (build_expr_type_conversion): Adjust.
6932
6933 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
6934
6935         * call.c (build_method_call): Always convert 'this' to the
6936         appropriate type.
6937
6938         * search.c (add_conversions): Put the conversion function in
6939         TREE_VALUE, the type in TREE_PURPOSE.
6940         * cvt.c (build_type_conversion): Adjust.
6941         * call.c (user_harshness): Adjust.
6942
6943         * method.c (emit_thunk): Call temporary_allocation and
6944         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
6945
6946         * tree.c (build_cplus_array_type): Handle tweaking of
6947         TYPE_MAIN_VARIANT here.
6948         * typeck.c (common_type): Not here.
6949
6950         * typeck.c (complete_type): Only try to complete an array type if
6951         it has a domain.
6952
6953 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
6954
6955         * decl.c (grokvardecl): Call complete_type.
6956         (grokdeclarator): Call complete_type for PARM_DECLs.
6957
6958 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
6959
6960         * pt.c (instantiate_class_template): Re-set
6961         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
6962
6963 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
6964
6965         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
6966         smart enough to do it right.
6967         * tree.c (cp_expand_decl_cleanup): Likewise.
6968         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
6969         cp_expand_decl_cleanup.
6970         (store_parm_decls): Likewise.
6971         (hack_incomplete_structures): Likewise.
6972         * except.c (push_eh_cleanup): Likewise.
6973
6974 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
6975
6976         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
6977         frontend to the backend where it belongs.
6978         * tree.c (unsave_expr): Likewise.
6979         (unsave_expr_now): Likewise.
6980         * tree.def (UNSAVE_EXPR): Likewise.
6981         * cp-tree.h (unsave_expr): Likewise.
6982         (unsave_expr_now): Likewise.
6983
6984 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
6985
6986         * init.c (emit_base_init): Make sure the partial EH cleanups live
6987         on the function_obstack.
6988
6989 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
6990
6991         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
6992         when checking for pointer types.
6993
6994 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
6995
6996         * pt.c (instantiate_class_template): Remove obsolete check for
6997         access declarations.
6998
6999 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
7000
7001         * call.c (build_overload_call): Simplify calls to
7002         build_overload_call by removing last parameter.
7003         (build_method_call): Likewise.
7004         * cp-tree.h: Likewise.
7005         * method.c (build_opfncall): Likewise.
7006         * typeck.c (build_x_function_call): Likewise.
7007
7008 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
7009
7010         * call.c (default_parm_conversions): Factor out common code.
7011         (build_method_call): Use it.
7012         (build_overload_call_real): Use it.
7013
7014 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
7015
7016         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
7017         but pedwarn as the code is bogus.
7018         * typeck.c (decay_conversion): Likewise.
7019         (build_function_call_real): Use build_addr_func instead of
7020         default_conversion.  Don't allow pointer-to-method functions down
7021         here.
7022         (build_unary_op): Use real pointer-to-member functions instead of
7023         fake ones.
7024         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
7025         (convert_for_assignment): Removed some obsolete code.
7026         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
7027         build_x_function_call instead of current_class_ptr.  Only call
7028         digest_init once on an initializer, we do this just checking
7029         TREE_TYPE.
7030         (build_expr_from_tree): Pass current_class_ref to
7031         build_x_function_call instead of current_class_ptr.
7032         * init.c (build_member_call): Likewise.
7033         * pase.y: Likewise.
7034         * error.c (dump_expr): Handle OFFSET_REFs better.
7035         * pt.c (unify): Handle pointer-to-member functions better.
7036         * decl.c (finish_function): Clear out current_class_ref just like
7037         we do for current_class_ptr.
7038
7039         * typeck.c (get_delta_difference): Handle virtual bases better.
7040
7041 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
7042
7043         * sig.c (build_signature_table_constructor): Use the delta for
7044         the original basetype for this virtual function with thunks.
7045         (build_signature_method_call): We still need to adjust 'this'
7046         with thunks.
7047
7048 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
7049
7050         * call.c (build_addr_func): New routine.  Used to get the `real'
7051         address of a function or a method.  Needed to avoid getting a
7052         pointer-to-member function.
7053         (build_call): New routine to build CALL_EXPRs.
7054         (build_method_call): Use it.
7055         * cvt.c (convert_to_aggr): Likewise.
7056         * typeck.c (build_function_call_real): Likewise.
7057         * sig.c (build_signature_table_constructor): Use build_addr_func.
7058         * cp-tree.h (build_call, build_addr_func): Declare them.
7059
7060 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
7061
7062         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
7063         * parse.y: Remove uses of LOOKUP_AGGR.
7064
7065 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
7066
7067         * *.[chy]: Rename current_class_decl to current_class_ptr, and
7068         C_C_D to current_class_ref.
7069
7070 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
7071
7072         * call.c (convert_harshness): Tighten up pointer conversions.
7073
7074 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
7075
7076         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
7077         (finish_file): Likewise.
7078
7079 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
7080
7081         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
7082
7083         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
7084         code.
7085
7086 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
7087
7088         * decl2.c: Turn on thunks by default where supported.
7089
7090 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
7091
7092         * cp-tree.h (build_overload_call_maybe): Removed.
7093         * call.c (build_overload_call_real): Invert meaning of last arg to
7094         be require_complete.
7095         (build_overload_call): Likewise.
7096         * typeck.c (build_x_function_call): Use build_overload_call_real
7097         instead of build_overload_call_maybe.
7098
7099 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
7100
7101         * decl2.c (finish_file): Don't try to emit functions that haven't
7102         been compiled.
7103
7104 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
7105
7106         * decl2.c (finish_vtable_vardecl): Oops.
7107
7108         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
7109         Also store the bindings from previous_class_values.
7110         (pop_from_top_level): Restore them.
7111
7112 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
7113
7114         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
7115         symbol has been referenced.
7116         (finish_file): Re-join synthesis/vtable loop with inline emission
7117         loop, disable inlining when an inline is output.
7118
7119 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
7120
7121         * except.c (init_exception_processing): Setup saved_in_catch.
7122         (push_eh_cleanup): Reset __eh_in_catch.
7123         (expand_start_catch_block): Set __eh_in_catch.
7124
7125 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
7126
7127         * except.c (push_eh_cleanup): Add tracking for whether or not we
7128         have an active exception object.
7129         (expand_builtin_throw): Use it to make sure a rethrow without an
7130         exception object is caught.
7131
7132 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
7133
7134         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
7135         cache.
7136
7137 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
7138
7139         * decl2.c (finish_file): Also use sentries for vars with
7140         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
7141         created).
7142
7143         * lex.c (handle_cp_pragma): Disable #pragma
7144         interface/implementation if SUPPORTS_ONE_ONLY > 1.
7145
7146 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
7147
7148         * method.c (emit_thunk): Wrap default case in
7149         temporary/permanent_allocation.
7150
7151         * method.c (make_thunk): Use DECL_ONE_ONLY.
7152         (emit_thunk): Call assemble_end_function.
7153
7154 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
7155
7156         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
7157         (import_export_decl): Likewise.
7158         (finish_prevtable_vardecl): Disable vtable hack if
7159         SUPPORTS_ONE_ONLY > 1.
7160
7161 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
7162
7163         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
7164         PREDECREMENT_EXPRs take two arguments, not one.
7165
7166 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
7167
7168         * class.c (build_vtable_entry): Don't build thunks for abstract
7169         virtuals.
7170
7171         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
7172         frontend.
7173
7174 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
7175
7176         * class.c (set_rtti_entry): Use size_zero_node.
7177         (build_vtable): Likewise.
7178
7179 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
7180
7181         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
7182         (prepare_fresh_vtable): Likewise.
7183
7184 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
7185
7186         * method.c (emit_thunk): Call mark_used on the target function.
7187
7188         * call.c (build_method_call): Don't warn about pending templates.
7189
7190 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
7191
7192         * decl2.c (finish_file): Fix list walking logic.
7193
7194         * typeck2.c (check_for_new_type): Only warn if -pedantic.
7195
7196 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
7197
7198         * class.c (finish_struct_1): Remove old code for
7199         dont_allow_type_definitions.
7200         * cp-tree.h: Likewise.
7201         * spew.c: Make sure cp-tree.h is included before parse.h, so the
7202         definition of flagged_type_tree is found before it is used.
7203         * lex.c: Likewise.
7204         * parse.y: Added the ftype member to the type union, and changed a
7205         number of rules to use it instead of ttype. Added calls to
7206         check_for_new_type() as appropriate.
7207         * typeck2.c (check_for_new_type): New function for checking
7208         if a newly defined type appears in the specified tree.
7209         * cp-tree.h: Add new type flagged_type_tree. Add a prototype
7210         for check_for_new_type().
7211
7212 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
7213
7214         * decl2.c (finish_file): Only use a sentry if the decl is public.
7215
7216         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
7217         don't pass LOOKUP_ONLYCONVERTING.
7218
7219 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
7220
7221         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
7222         properly keeps track of const and volatile type modifiers.
7223
7224 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
7225
7226         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
7227         * pt.c (comp_template_args): Use it.
7228
7229         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
7230         assemble_external for artificial function decls.
7231
7232         * decl.c (cp_finish_decl): Oops.
7233
7234 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
7235
7236         * decl2.c (import_export_decl): Put static data member templates
7237         into common storage, or make them weak, depending on whether they
7238         are dynamically or statically initialized.
7239         (get_sentry): New function.
7240         (finish_file): Do import_export_decl for static data members before
7241         building the init/fini functions.  Don't init/fini a variable that's
7242         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
7243         push/pop_temp_slots.
7244         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
7245         expand_static_init thang.
7246         * method.c (get_id_2): New function.
7247
7248 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
7249
7250         * parse.y (empty_parms): Make sure we use C++-style prototypes
7251         when we're declaring member functions.
7252
7253 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
7254
7255         * Makefile.in (CONFLICTS): 16 s/r conflicts.
7256         * parse.y (self_template_type): New nonterminal.
7257
7258 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
7259
7260         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
7261         name.
7262         * parse.y (base_class.1): Allow 'typename foo::bar'.
7263
7264         * lex.c (check_newline): Remove #pragma code that plays with the
7265         input stream, since we now deal with tokens.  Clear nextchar when
7266         we're done.
7267         (handle_cp_pragma): Use real_yylex.
7268         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
7269         in one place.
7270
7271         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
7272
7273         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
7274
7275 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
7276
7277         * parse.y: New token SELFNAME for potential constructor.
7278         * spew.c (yylex): Handle it.
7279         * lex.c (identifier_type): Produce it.
7280
7281         * parse.y (complete_type_name): In :: case, don't push class binding.
7282         (complex_type_name): Likewise.
7283
7284 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
7285
7286         * typeck.c (build_reinterpret_cast): Handle pointer to member
7287         functions.
7288
7289 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
7290
7291         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
7292         pragmas.
7293         (check_newline): Put the vtable/unit/implementation/interface pragma
7294         code into handle_cp_pragma, replacing it with a call.
7295         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
7296         args.  Get the next token after handling the pragma token.
7297
7298 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
7299
7300         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
7301         (convert_to_pointer_force): Likewise.
7302
7303         * init.c (build_new): Fix array new without -fcheck-new.
7304
7305 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
7306
7307         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
7308         tree.c: Lose TYPE_NESTED_NAME.
7309
7310         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
7311         as identifiers.
7312
7313         * tree.def: Add VEC_INIT_EXPR.
7314         * expr.c (cplus_expand_expr): Handle it.
7315         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
7316         the extra file-scope symbol nastiness.
7317
7318 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
7319
7320         * method.c (make_thunk): Thunks are static.
7321         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
7322
7323         * decl2.c (mark_vtable_entries): Emit thunks as needed.
7324         (finish_file): Don't emit them here.
7325
7326 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
7327
7328         * rtti.c (build_dynamic_cast): Handle null pointers.
7329         (ifnonnull): New function.
7330
7331 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
7332
7333         * call.c (build_method_call): Remember the original basetype we
7334         were called with. Give an error message instead of trying
7335         (incorrectly) to call a non-static member function through a
7336         non-inherited class.
7337
7338         * search.c (expand_upcast_fixups): Mark the new fixup as
7339         DECL_ARTIFICIAL.
7340
7341 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
7342
7343         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
7344
7345         * class.c (set_rtti_entry): Fix for thunks.
7346
7347         * decl2.c (import_export_decl): Still emit typeinfo fns for
7348         cv-variants of builtin types.
7349
7350         * rtti.c (expand_class_desc): Set up base_info_type_node here.
7351         (init_rtti_processing): Instead of here.
7352
7353 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
7354
7355         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
7356         (build_typeid): Only complain about taking dynamic typeid without
7357         -frtti.
7358
7359         * decl2.c: flag_rtti defaults to 1.
7360
7361         * rtti.c (get_tinfo_var): The general class case is now smaller.
7362         (init_rtti_processing): Pack the latter three fields of base_info
7363         into 32 bits.
7364
7365 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
7366
7367         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
7368
7369 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
7370
7371         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
7372         (push_memoized_context): Split out code to undefer pop_type_level to
7373         (clear_memoized_cache): here.
7374         (pop_memoized_context): We can only handle one layer of deferral of
7375         pop_type_level so clear the cache, if there was a previous level.
7376
7377 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
7378
7379         * rtti.c (init_rtti_processing): Build up base_info_type_node.
7380         (expand_class_desc): Use one pointer to an array of base_info
7381         structs, passed using a CONSTRUCTOR.
7382
7383 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
7384
7385         * class.c (build_vbase_path): Remove block extern for
7386         flag_assume_nonnull_objects here.
7387         (build_vfn_ref): Split out functionality into build_vtbl_ref.
7388         (build_vtbl_ref): New routine.
7389         (build_vtable): Set up rtti info here.
7390         (add_virtual_function): Note in CLASSTYPE_RTTI the best
7391         place where we can get the rtti pointers from to avoid having to
7392         search around for a place.
7393         (finish_base_struct): Likewise.
7394         (finish_struct_1): Likewise.  Never create totally new vtables
7395         with totally new vtable pointers for rtti.  Disable code to layout
7396         vtable pointers better until we want to break binary
7397         compatibility.
7398         * rtti.c (build_headof_sub): New routine to convert down to a
7399         sub-object that has an rtti pointer in the vtable.
7400         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
7401         maintainable.
7402         (build_dynamic_cast): Make sure we have saved it, if we need to.
7403         * search.c (dfs_init_vbase_pointers): Disable code that deals with
7404         a more efficient vtable layout, enable later.
7405         * call.c (flag_assume_nonnull_objects): Moved declaration to
7406         * cp-tree.h: here.  Declare build_vtbl_ref.
7407         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
7408         function calls that want a tree.
7409
7410 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
7411
7412         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
7413         other X subobjects in the most derived type.  Ack.
7414
7415         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
7416         get_typeid will do it for us.
7417         (get_typeid_1): Break out call-building for expand_*_desc to use.
7418         (get_typeid): Call it.
7419         (expand_*_desc): Likewise.
7420         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
7421         and void *.
7422         (init_decl_processing): Lose builtin_type_tdescs lossage.
7423         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
7424
7425 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
7426
7427         * pt.c (tsubst): When calling set_nested_typename, use
7428         TYPE_NESTED_NAME (current_class_type) instead of
7429         current_class_name.
7430
7431         * decl.c (pushdecl): Likewise.
7432         (pushdecl_class_level): Likewise.
7433         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
7434         set_nested_typename.
7435
7436 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
7437
7438         * rtti.c (synthesize_tinfo_fn): Handle arrays.
7439
7440         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
7441
7442 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
7443
7444         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
7445         (init_rtti_processing): Lose bad_cast_type.
7446         (build_dynamic_cast): Use throw_bad_cast.
7447
7448         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
7449
7450         * decl2.c (finish_file): Don't synthesize artificial functions
7451         that are external and not inline.
7452
7453         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
7454
7455         * decl2.c (finish_file): Handle having new inlines added to
7456         saved_inlines by synthesis.
7457
7458         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
7459
7460 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
7461
7462         RTTI rewrite to initialize nodes as needed, not require that
7463         users #include <typeinfo>, complete functionality and reduce wasted 
7464         space.
7465         * rtti.c (init_rtti_processing): New fn.
7466         (build_typeid): The vtable entry is now a function.
7467         (get_tinfo_var): New fn.
7468         (get_tinfo_fn): Likewise.
7469         (get_typeid): Use it.
7470         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
7471         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
7472         points __rtti_*.
7473         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
7474         (synthesize_tinfo_fn): New fn.
7475         * method.c (build_t_desc_overload): Lose.
7476         (build_overload_with_type): More generic.
7477         * decl.c (init_decl_processing): Call init_rtti_processing.
7478         * class.c (set_rtti_entry): Use get_tinfo_fn.
7479         * decl2.c (mark_vtable_entries): Mark the rtti function.
7480         (finish_prevtable_vardecl): Don't build_t_desc.
7481         (import_export_decl): Handle tinfo functions.
7482         (finish_file): Likewise.
7483         * typeck.c (inline_conversion): New fn.
7484         (build_function_call_real): Use it.
7485         * cp-tree.h: Add decls.
7486
7487         * method.c (hack_identifier): Also convert component_refs from
7488         references.
7489
7490         * lex.c (cons_up_default_function): Use the type, not the name, in
7491         declspecs.
7492
7493         * decl2.c (import_export_vtable): Fix weak vtables.
7494
7495 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
7496
7497         * search.c (get_base_distance_recursive): Fix access checks for
7498         protected bases.
7499
7500 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
7501
7502         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
7503         cp-tree.h.
7504         (convert_harshness): Add prototypes wrapped by PROTO.
7505         * decl2.c (grok_function_init): Likewise.
7506         (do_toplevel_using_decl): Change to void return type.
7507         * class.c (build_vtable_entry): Remove decl of make_thunk.
7508         (merge_overrides): Fix order of arg definitions.
7509         (finish_vtbls): Likewise.
7510         (fixup_vtable_deltas): Likewise.
7511         (modify_all_direct_vtables): Likewise.
7512         (modify_all_indirect_vtables): Likewise.
7513         * search.c (get_base_distance_recursive): Likewise.
7514         (get_abstract_virtuals_1): Likewise.
7515         (fixup_virtual_upcast_offsets): Likewise.
7516         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
7517         * init.c (perform_member_init): Fix order of arg definitions.
7518         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
7519         * cp-tree.h (make_thunk): Add decl.
7520         (overload_template_name, push_template_decl): Add decls.
7521         (do_toplevel_using_decl): Change to void return type.
7522         (vec_binfo_member): Add decl.
7523
7524 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
7525
7526         * typeck.c (mark_addressable, convert_for_assignment,
7527         convert_for_initialization, pointer_int_sum, pointer_diff,
7528         unary_complex_lvalue): Add prototypes wrapped by PROTO.
7529         (convert_sequence): #if 0 fn decl, since definition also is.
7530
7531 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
7532
7533         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
7534         cast to pointer types for type searching.
7535
7536 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
7537
7538         * typeck.c (get_delta_difference): Use cp_error, not error, in the
7539         case where BINFO == 0.
7540
7541 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
7542
7543         * call.c (build_method_call): Fix wording of error messages so
7544         constructors come out right.
7545
7546 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
7547
7548         * decl.c (push_overloaded_decl): Don't warn about hidden
7549         constructors when both the type and the function are declared
7550         in a system header file.
7551
7552 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
7553
7554         * class.c (finish_struct_1): Propagate the TYPE_PACKED
7555         flag for the type to the type's fields.
7556
7557 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
7558
7559         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
7560
7561 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
7562
7563         * class.c (base_info, finish_base_struct): Replace 
7564         needs_virtual_dtor with base_has_virtual.
7565
7566         (finish_struct_1): Remove the old code that tried to make default
7567         destructors virtual. Use base_has_virtual when checking if we need
7568         to add a vtable entry for the rtti code.
7569
7570 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
7571
7572         * pt.c (push_template_decl): Complain about template decl with
7573         inappropriate declaration.
7574
7575 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
7576
7577         * typeck.c (build_x_unary_op): Remove bogus check for taking
7578         the address of a member function.
7579
7580 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
7581
7582         * parse.y (constructor_declarator): Only push the class if
7583         we are not already in the class.
7584
7585 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
7586
7587         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
7588         Add additional argument to INIT_CUMULATIVE_ARGS.
7589
7590 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
7591
7592         * decl.c (shadow_tag): Fix error about anon union with methods.
7593
7594         * parse.y (self_reference): Only generate a self-reference if this
7595         is a non-template class.
7596         (opt.component_decl_list): Only use it if it was generated.
7597
7598         * parse.y (component_decl_1): Use constructor_declarator.
7599         (fn.def2): Likewise.
7600         (notype_component_declarator0): Likewise.
7601
7602 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
7603
7604         * typeck.c (build_x_unary_op): Add checks for taking the address
7605         of a TARGET_EXPR or of a member function, and give appropriate
7606         warnings.
7607
7608 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
7609
7610         * pt.c (process_template_parm): Allow template type parms to be
7611         used as types for template const parms.
7612
7613 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
7614
7615         * init.c (expand_vec_init): Ensure the eh cleanups are on the
7616         function_obstack.
7617
7618 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
7619
7620         * decl.c (lookup_name_real): Be even more picky about the
7621         ambiguous lookup warning.
7622         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
7623         * parse.y (constructor_declarator): Rather than here.
7624
7625         * parse.y (constructor_declarator): New nonterminal.
7626         (fn.def1): Use it.
7627         (explicit_instantiation): Likewise.
7628
7629 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
7630
7631         Add implicit declaration of class name at class scope.
7632         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
7633         * parse.y (self_reference): New nonterminal.
7634         (opt.component_decl_list): Use it.
7635         (fn.def1): Add nested_name_specifier type_name cases.
7636         * class.c (build_self_reference): New function.
7637         (finish_struct): Handle access_default later, move self-reference
7638         decl to the end.
7639         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
7640         * cp-tree.h: Adjust.
7641
7642         * pt.c (do_function_instantiation): Separate handling of member
7643         functions and non-member functions properly.
7644
7645 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
7646
7647         * pt.c (process_template_parm): Improve error for 'volatile class K'.
7648
7649         * class.c (finish_struct_1): Check the right slot for destructors.
7650
7651         * decl.c (start_enum): Complain about enum templates.
7652
7653 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
7654
7655         * init.c (resolve_offset_ref): Offset pointers to member data by one.
7656         * typeck.c (unary_complex_lvalue): Likewise.
7657
7658 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
7659
7660         * typeck.c (c_expand_return): Check for a returned local
7661         array name, similar to the check for an ADDR_EXPR.
7662
7663 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
7664
7665         * decl.c (cp_finish_decl): Don't build cleanups for static
7666         variables here.
7667
7668 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
7669
7670         * typeck.c (build_modify_expr): Fix error messages to be more
7671         accurate.
7672         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
7673         assignment operators.
7674         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
7675         assignment operators.
7676
7677 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
7678
7679         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
7680         give an error if initialized.  Pedwarn about nested type with the
7681         same name as its enclosing class.
7682
7683         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
7684
7685         * typeck.c (require_complete_type): Be sure to instantiate the
7686         MAIN_VARIANT of the type.
7687
7688         * decl2.c (finish_file): Instantiate pending templates before
7689         processing static constructors and destructors.
7690
7691         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
7692         unless at_eof.
7693
7694 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
7695
7696         * decl2.c (delete_sanity): If error_mark_node is passed
7697         in as an expression, quit while we're ahead.
7698
7699         * decl.c (grokdeclarator): Give an error message if `friend'
7700         is combined with any storage class specifiers.
7701
7702 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
7703
7704         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
7705         definition of nonexistent nested type.
7706
7707         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
7708         not to say 'typedef'.
7709
7710 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
7711
7712         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
7713         * search.c (dfs_walk, dfs_init_vbase_pointers,
7714         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
7715         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
7716
7717 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
7718
7719         * except.c (build_throw): Support minimal parse.
7720         * pt.c (tsubst_copy): Support THROW_EXPR.
7721         * decl2.c (build_expr_from_tree): Likewise.
7722
7723         * pt.c (mangle_class_name_for_template): Always allocate
7724         scratch_firstobj.
7725
7726 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
7727
7728         * cvt.c (cp_convert_to_pointer): Give an appropriate error
7729         when trying to cast from an incomplete type.
7730
7731 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
7732
7733         * pt.c (instantiate_class_template): Don't bother setting up
7734         CLASSTYPE_TAGS explicitly, as the nested types will add
7735         themselves.
7736
7737 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
7738
7739         * decl.c (shadow_tag): Remove old error check for usage of
7740         an enum without a previous declaration.
7741         (xref_tag): Add error message about usage of enums without a
7742         previous declaration.
7743
7744 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
7745
7746         * lex.c (do_identifier): Only do name consistency check if we're
7747         parsing.
7748
7749         * pt.c (push_template_decl): Don't crash if we get a member defn
7750         that doesn't match.
7751
7752         * decl.c (xref_tag_from_type): New function to do an xref without
7753         always having to figure out code_type_node.
7754         * cp-tree.h: Declare it.
7755         * pt.c (instantiate_class_template): Use it for friend classes.
7756         (lookup_template_class): Use it.
7757
7758         * typeck2.c (build_functional_cast): Pull out a single parm before
7759         passing it to build_c_cast.
7760
7761 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
7762
7763         * expr.c (do_case): Give an error message if a pointer is
7764         given as a case value.
7765
7766 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
7767
7768         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
7769         an overload list.
7770
7771         * lex.c (cons_up_default_function): Really, now, interface hackery
7772         does not apply to synthesized methods.
7773
7774 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
7775
7776         * call.c (build_method_call): Ctors and dtors now have special names
7777         with respect to lookups.
7778         * class.c (add_method): Likewise.
7779         (grow_method): Likewise.
7780         (finish_struct_methods): Likewise.
7781         (warn_hidden): Likewise.
7782         (finish_struct_1): Likewise.
7783         * cvt.c (convert_to_reference): Likewise.
7784         (convert_to_aggr): Likewise.
7785         (cp_convert): Likewise.
7786         * decl2.c (check_classfn): Likewise.
7787         * init.c (expand_member_init): Likewise.
7788         (expand_default_init): Likewise.
7789         (expand_aggr_init_1): Likewise.
7790         (build_offset_ref): Likewise.
7791         (build_new): Likewise.
7792         (build_delete): Likewise.
7793         * lex.c (do_inline_function_hair): Likewise.
7794         * search.c (lookup_field_1): Likewise.
7795         (lookup_fnfields_here): Likewise.
7796         (lookup_field): Likewise.
7797         (lookup_fnfields): Likewise.
7798         (get_virtual_destructor): Likewise.
7799         (dfs_debug_mark): Likewise.
7800         (dfs_pushdecls): Likewise.
7801         (dfs_compress_decls): Likewise.
7802         * tree.c (layout_basetypes): Likewise.
7803         * typeck.c (build_component_ref): Likewise.
7804         (build_x_function_call): Likewise.
7805         (build_modify_expr): Likewise.
7806         (convert_for_initialization): Likewise.
7807         (build_functional_cast): Likewise.
7808         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
7809         (CTOR_NAME): New.
7810         (DTOR_NAME): New.
7811         * decl.c (ctor_identifier): New.
7812         (dtor_identifier): New.
7813         (init_decl_processing): Set them.
7814
7815 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
7816
7817         * typeck.c (build_component_ref): Don't get confused by fields whose
7818         context has no type name, like pointer to member functions.
7819
7820 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
7821
7822         * decl.c (grokdeclarator): Handle typedef without declarator.
7823
7824         * pt.c (tsubst): Handle SCOPE_REF in declarator.
7825
7826         * parse.y (bad_parm): Catch another case of missing `typename'.
7827
7828         * lex.c (yyprint): Handle TYPE_DECLs.
7829
7830         * decl.c (start_function): Don't try to be clever.
7831
7832         * lex.c: Lose compiler_error_with_decl.
7833         * typeck2.c: Lose error_with_aggr_type.
7834         (incomplete_type_error): Use cp_* instead of old functions.
7835         (readonly_error): Likewise.
7836         * typeck.c (convert_arguments): Likewise.
7837         * search.c (lookup_nested_field): Likewise.
7838         * method.c (make_thunk): Likewise.
7839         * decl.c (grokparms): Likewise.
7840         * cp-tree.h: Update.
7841
7842         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
7843         and value.
7844
7845 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
7846
7847         * method.c (build_opfncall): When deleting a pointer to an
7848         array, build a new pointer to the tree past any ARRAY_TYPE
7849         nodes.
7850
7851 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
7852
7853         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
7854
7855 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
7856
7857         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
7858         and ! DECL_INLINE.
7859
7860         * decl.c (finish_function): Don't set nested based on
7861         hack_decl_function_context.
7862         * parse.y (function_try_block): Check for nested function.
7863         (pending_inlines): Likewise.
7864
7865         * decl2.c (build_expr_from_tree): If a unary op already has a
7866         type, just return it.
7867
7868         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
7869
7870         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
7871         (finish_file): Check the return value of walk_vtables.
7872         (finish_prevtable_vardecl): Return int.
7873         (finish_vtable_vardecl): Likewise.
7874         (prune_vtable_vardecl): Likewise.
7875         * lex.c (set_vardecl_interface_info): Likewise.
7876         * cp-tree.h: Adjust return types.
7877
7878         * class.c (delete_duplicate_fields_1): Don't complain about
7879         duplicate nested types if they're the same type.
7880         (finish_struct): Remove check for duplicate.
7881         * decl2.c (grokfield): Don't check for typedef of anonymous type.
7882
7883 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
7884
7885         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
7886
7887         * decl.c (grokdeclarator): Lose special handling of class-level
7888         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
7889         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
7890
7891         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
7892
7893         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
7894
7895         * search.c (compute_access): Fix handling of anonymous union
7896         members.
7897         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
7898         from anonymous unions to their members.
7899
7900         * typeck.c (build_x_function_call): For static member functions,
7901         hand off to build_member_call.
7902
7903 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
7904
7905         * typeck.c (build_component_ref): Handle OFFSET_REFs.
7906
7907         * init.c (expand_vec_init): Fix init == 0 case.
7908
7909 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
7910
7911         * init.c (build_new): Pedwarn about init and array new.
7912         (expand_vec_init): Handle lists, use convert_for_initialization.
7913
7914         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
7915         when converting to an aggregate type.
7916         * cvt.c (cp_convert): Pass it through.
7917
7918         * typeck.c (build_conditional_expr): Handle user-defined
7919         conversions to slightly different types.
7920
7921         * decl.c (grokdeclarator): Force an array type in a parm to be
7922         permanent.
7923
7924         * decl2.c (do_using_directive): Sorry.
7925         (do_namespace_alias): Likewise.
7926         * lex.c (real_yylex): Warn about using the `namespace' keyword.
7927
7928 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
7929
7930         * parse.y (datadef): Move call to note_list_got_semicolon up.
7931
7932 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
7933
7934         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
7935
7936 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
7937
7938         * decl.c (cp_finish_decl): The exception regions have to be
7939         nested, not overlapping.  We start the exception region for a
7940         decl, after it has been fully built, and all temporaries for it
7941         have been cleaned up.
7942
7943 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
7944
7945         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
7946
7947 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
7948
7949         * tree.def: Add RETURN_INIT.
7950         * pt.c (instantiate_decl): Handle RETURN_INIT.
7951         * decl.c (store_return_init): Handle minimal_parse_mode.
7952
7953         * tree.c (cp_build_type_variant): Just return an error_mark_node.
7954         * decl.c (make_typename_type): Don't try to get the file and line
7955         of an identifier.
7956         * typeck.c (comptypes): Handle TYPENAME_TYPE.
7957
7958 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
7959
7960         * decl.c (poplevel): Make sure we clear out and restore old local
7961         non-VAR_DECL values by default when they go out of scope.
7962
7963 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
7964
7965         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
7966         referring to addresses of variables and functions.
7967
7968         * error.c (dump_expr): Support SIZEOF_EXPR.
7969
7970         * init.c (do_friend): Use the return value of check_classfn.
7971
7972         * typeck.c (convert_arguments): Call complete_type.
7973
7974         * method.c (hack_identifier): After giving an error, set value to
7975         error_mark_node.
7976
7977 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
7978
7979         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
7980         lossage for local classes.
7981         * cp-tree.h: Declare it.
7982         * decl.c (lookup_name_real): Evil, painful hack for local classes.
7983         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
7984         Use hack_decl_function_context.
7985         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
7986         (start_function): Use hack_decl_function_context.
7987         (finish_function): Likewise.
7988         * method.c (synthesize_method): Likewise.
7989         * lex.c (process_next_inline): Likewise.
7990         (do_pending_inlines): Likewise.
7991         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
7992         done with it.
7993
7994 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
7995
7996         * sig.c (build_signature_pointer_or_reference_type): Align
7997         signature pointers/references on 8-byte boundaries so they can be
7998         grabbed 2 words at a time on a Sparc.
7999
8000 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
8001
8002         * method.c (hack_identifier): Requiring a static chain is now a
8003         hard error.
8004         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
8005         functions.
8006
8007 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
8008
8009         * init.c (build_offset_ref): Call complete_type.
8010
8011         * decl.c (pop_from_top_level): Always pop previous_class_type.
8012
8013         * parse.y: Handle multiple decls in a for-init-statement.
8014         * pt.c (tsubst_expr): Likewise.
8015
8016         * pt.c (tsubst): Use tsubst_expr for the second operand of an
8017         ARRAY_REF.
8018
8019         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
8020         (poplevel_class): Set it here.
8021         (pop_from_top_level): Pop it here if we're returning to class scope.
8022         * class.c (pushclass): Don't set it here.
8023
8024         * decl.c (maybe_push_to_top_level): Save current_template_parms,
8025         and clear it if !pseudo.
8026         (pop_from_top_level): Restore it.
8027
8028         * decl2.c (finish_file): Push the dummy each time we walk the list
8029         of vtables.
8030
8031         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
8032         something for CAST_EXPR.
8033         
8034 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
8035
8036         * cvt.c (cp_convert): Warn about implicit conversion of the
8037         address of a function to bool, as it is always true.
8038
8039 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
8040
8041         * typeck.c (c_expand_return): Fix warning for local externs returned.
8042
8043 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
8044
8045         * tree.c (mapcar): Propagate const and volatile properly.
8046
8047         * typeck.c (complete_type): Be sure to instantiate the
8048         MAIN_VARIANT of the type.
8049
8050         * method.c (synthesize_method): Class interface hackery does not
8051         apply to synthesized methods.
8052
8053 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
8054
8055         * pt.c (comp_template_args): Use comptypes rather than just
8056         checking for TEMPLATE_TYPE_PARM equivalence.
8057
8058         * typeck.c (build_x_function_call): Call complete_type before
8059         checking TYPE_OVERLOADS_CALL_EXPR.
8060
8061 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
8062
8063         * g++.c (main): Check also for new define ALT_LIBM.
8064
8065 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
8066
8067         * pt.c (instantiate_class_template): If we don't have a pattern
8068         yet, that's OK.
8069         (coerce_template_parms): If we see a local class, bail.
8070
8071         * decl.c (grok_reference_init): Make sure there's a type before
8072         checking its code.
8073
8074         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
8075         (push_template_decl): Likewise.
8076
8077         * parse.y (named_class_head): Set
8078         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
8079
8080         * decl.c (xref_tag): Diagnose redeclaration of template
8081         type-parameter name.
8082
8083         * error.c (dump_type): Handle anonymous template type parms.
8084
8085         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
8086         TYPE_STUB_DECL.
8087         (coerce_template_parms): Likewise.
8088
8089 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
8090
8091         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
8092         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
8093
8094 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
8095
8096         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
8097         before trying to get its STUB_DECL.
8098         (coerce_template_parms): Likewise.
8099
8100         * parse.y (template_type_parm): If they didn't use 'class',
8101         pretend they did after giving an error.
8102
8103         * pt.c (coerce_template_parms): Diagnose use of local class.
8104
8105         * decl.c (grok_reference_init): Use instantiate_type.
8106
8107         * error.c (dump_expr): Handle TEMPLATE_DECLs.
8108
8109         * parse.y (named_class_head): Diagnose mismatching types and tags.
8110
8111         * decl.c (pushdecl): Type decls and class templates clash with
8112         artificial type decls, not hide them.
8113
8114         * decl.c (redeclaration_error_message): Diagnose redefinition of
8115         templates properly.
8116         (duplicate_decls): Diagnose disallowed overloads for template
8117         functions, too.
8118
8119         * decl.c (start_decl): Call complete_type before checking for a
8120         destructor.
8121
8122         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
8123
8124         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
8125
8126 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
8127
8128         * decl.c (grok_op_properties): Don't check for operator++(int) in
8129         a template.
8130
8131         * tree.c (perm_manip): Return a copy of variable and function
8132         decls with external linkage.
8133
8134         * tree.def: Change some of the min tree codes to type "1".
8135         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
8136         * method.c (build_overload_int): Emit something arbitrary for
8137         anything but an INTEGER_CST if we're in a template.
8138
8139         * decl.c (cp_finish_decl): Call complete_type before deciding
8140         whether or not to lay out the decl.
8141
8142         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
8143
8144 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
8145
8146         * typeck2.c (build_x_arrow): Call complete_type.
8147
8148         * pt.c (add_pending_template): Broken out.
8149         (lookup_template_class): If -fexternal-templates, call it for all
8150         the methods of implemented types.
8151         (instantiate_class_template): Instead of instantiating them here.
8152         (instantiate_decl): Handle -fexternal-templates earlier.
8153
8154 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8155
8156         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
8157         memoized lookup stuff inside GATHER_STATISTICS.
8158
8159 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
8160
8161         * decl.c (start_decl): Complain about array of incomplete type
8162         here.
8163         (grokdeclarator): Not here.
8164
8165         * parse.y (template_parm): Expand full_parm inline so we can set
8166         the rule's precedence.
8167
8168         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
8169         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
8170         * decl2.c (grokbitfield): Don't check for integer constant here.
8171         * class.c (finish_struct_1): Check here.
8172
8173         * decl.c (define_label): Make the min decl go on permanent_obstack.
8174
8175         * pt.c (unify): Don't handle CONST_DECLs.
8176         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
8177         (tsubst_copy): Likewise.
8178
8179         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
8180         CONST_DECL for a template parm.
8181
8182 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
8183
8184         * decl.c (grokdeclarator): Complain about array of incomplete type
8185         here.
8186         (start_decl_1): Not here.
8187
8188         * pt.c (tsubst): Handle pointer-to-function declarators.
8189
8190         * method.c (hack_identifier): If pedantic, diagnose local class
8191         methods that require a static chain.
8192
8193         * decl.c (grok_op_properties): No longer static.
8194         * cp-tree.h: Declare it.
8195         * pt.c (tsubst): Call it for operators.
8196         Use tsubst_copy for TREE_VECs.
8197
8198         * parse.y (template_arg): The expr has precedence like '>'.
8199
8200 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
8201
8202         * pt.c (coerce_template_parms): Don't coerce an expression using
8203         template parms.
8204         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
8205         (tsubst): Don't use build_index_2_type if the max_value uses template
8206         parms.
8207         * method.c (build_overload_int): Emit something arbitrary for an
8208         expression using template parms.
8209
8210         * parse.y (template_close_bracket): New non-terminal to catch use
8211         of '>>' instead of '> >' in template class names.
8212         (template_type): Use it.
8213         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
8214
8215         * tree.def: Add CAST_EXPR.
8216         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
8217         CONVERT_EXPR for minimal_parse_mode.
8218         * typeck.c (build_c_cast): Likewise.
8219         * pt.c (tsubst_copy): Likewise.
8220         * decl2.c (build_expr_from_tree): Likewise.
8221         * error.c (dump_expr): Likewise.
8222
8223 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8224
8225         * except.c (SetTerminate, SetUnexpected): Put back global vars.
8226         (init_exception_processing): Put back decl/init of
8227         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
8228         fns from libstdc++.
8229
8230         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
8231         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
8232         Delete unused fns.
8233         * cp-tree.h (declare_uninstantiated_type_level,
8234         uninstantiated_type_level_p): Delete prototypes.
8235
8236 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
8237
8238         * pt.c (tsubst_expr): Add default return.
8239
8240 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8241
8242         * error.c (fndecl_as_string): Delete unused arg CNAME.
8243         * sig.c (build_signature_table_constructor,
8244         build_signature_method_call): Fix calls.
8245
8246         * class.c (the_null_vtable_entry): Delete var definition.
8247         (init_class_processing): Delete tree the_null_vtable_entry init.
8248         * decl.c (no_print_{functions, builtins}): Declare as static.
8249         (__tp_desc_type_node): #if 0 var definition.
8250         (init_type_desc): #if 0 init of __tp_desc_type_node.
8251         (vb_off_identifier): Move var decl into init_decl_processing.
8252         (current_function_assigns_this): Declare as static.
8253         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
8254         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
8255         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
8256         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
8257         * init.c (BI_header_type, BI_header_size): Declare as static.
8258         * pt.c (template_classes): Delete unused var.
8259         (add_pending_template): Delete decl for non-existent fn.
8260         (lookup_template_class): Delete vars CODE and TAG_CODE.
8261         (instantiate_template): Delete unused var TARGS.
8262         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
8263         Delete decls.
8264         (__tp_desc_type_node): #if 0 var decl.
8265         (fndecl_as_string): Fix prototype.
8266
8267 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
8268
8269         * tree.def: Add GOTO_STMT.
8270         * pt.c (tsubst_expr): Support goto and labels.
8271         * decl.c (define_label): Support minimal parsing.
8272         * parse.y (simple_stmt): Likewise.
8273
8274 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8275
8276         * xref.c (GNU_xref_member): Only define/set var I if
8277         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
8278         used.
8279         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
8280         (GNU_xref_end): Fix call.
8281         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
8282         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
8283
8284         * tree.c (build_exception_variant): Delete unused vars I, A, T,
8285         T2, and CNAME.
8286         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
8287         (mapcar): Delete unused var CODE.
8288         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
8289         (break_out_cleanups): Fix call.
8290         (bot_manip): Likewise.
8291         * call.c (build_method_call): Likewise.
8292         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
8293         Likewise.
8294         * typeck.c (unary_complex_lvalue, build_modify_expr,
8295         convert_for_initialization): Likewise.
8296         * typeck2.c (build_functional_cast): Likewise.
8297         * cp-tree.h (build_cplus_new): Fix prototype.
8298
8299         * repo.c (open_repo_file): Delete unused var Q.
8300         (repo_compile_flags, repo_template_declared,
8301         repo_template_defined, repo_class_defined, repo_inline_used,
8302         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
8303         (repo_get_id, repo_vtable_used): Declare as static. 
8304         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
8305         prototypes.
8306
8307 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
8308
8309         * parse.y (pending_inlines): Add function_try_block case.
8310
8311         * pt.c (unify): Fix for template const parms.
8312
8313 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8314
8315         * lex.c (extract_interface_info): Delete forward decl.
8316         (default_copy_constructor_body, default_assign_ref_body): Delete
8317         decls for non-existent functions.
8318         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
8319         (init_lex): Delete setting them.
8320         (cons_up_default_function): Delete unused vars FUNC_BUF,
8321         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
8322         #if 0'd synth code.
8323         (toplevel, expression_obstack): Delete unused extern decls.
8324         (tree_node_kind): Delete unused enum.
8325         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
8326         GATHER_STATISTICS.
8327         (tree_node_kind_names): Delete unused extern decl.
8328         (synth_obstack): Delete unused var.
8329         (init_lex): Don't set it.
8330         (init_parse): Add decl before use.
8331         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
8332         (current_unit_{name, language}): Delete unused vars. 
8333         (check_newline): Don't bother setting them, just accept the #pragma.
8334         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
8335         (current_unit_{name, language}): Delete decls.
8336
8337         * search.c: Wrap all of the memoized functions, macros, and
8338         variables inside #ifdef GATHER_STATISTICS.
8339         (lookup_field, lookup_fnfields): Likewise.
8340         (init_search_processing): Likewise.
8341         (reinit_search_statistics): Wrap whole function.
8342         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
8343
8344         * decl.c (finish_function): Only call pop_memoized_context if
8345         GATHER_STATISTICS is defined.
8346         (start_function): Likewise for push_memoized_context.
8347         * class.c (pushclass, popclass): Likewise.
8348
8349         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
8350         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
8351
8352         * cvt.c (cp_convert): Delete unused local var FORM.
8353         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
8354         prototypes.
8355
8356 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
8357
8358         * pt.c (do_poplevel): Oops; really return what we get from
8359         poplevel this time.
8360
8361 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8362
8363         * cp-tree.h (is_aggr_type): Add prototype.
8364
8365         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
8366         * method.c ({push,pop}_cp_function_context): Delete decls.
8367         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
8368         (SetUnexpected, SetTerminate): Delete unused vars.
8369         (init_exception_processing): Don't set SetUnexpected or
8370         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
8371         (output_exception_table_entry): Delete unused array LABEL.
8372         (expand_internal_throw): Delete unused var PARAMS.
8373         (expand_start_catch_block): Delete unused var CLEANUP.
8374         (emit_exception_table): Delete unused var EH_NODE_DECL.
8375         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
8376         GOTO_UNWIND_AND_THROW.  Don't set them.
8377         (end_eh_unwinder): Add top decl.
8378         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
8379         (exception_section, push_rtl_perm, do_function_call,
8380         lang_interim_eh, push_eh_cleanup, eh_outer_context,
8381         expand_end_eh_spec, end_eh_unwinder): Declare as static.
8382         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
8383         throw_used): Likewise.
8384         * cp-tree.h (expand_end_eh_spec): Delete prototype.
8385
8386         * search.c (dfs_mark, dfs_mark_vtable_path,
8387         dfs_unmark_vtable_path, dfs_mark_new_vtable,
8388         dfs_unmark_new_vtable, dfs_clear_search_slot,
8389         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
8390         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
8391         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
8392         functions.
8393         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
8394         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
8395         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
8396         Only define #ifdef GATHER_STATISTICS.
8397         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
8398         is defined.
8399         (vbase_decl): Delete var definition.
8400         (init_search): Delete old decl.
8401         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
8402         never actually used.
8403         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
8404         (get_base_distance_recursive): Delete unused fourth arg
8405         BASETYPE_PATH.  Fix call .
8406         (get_base_distance): Fix call.
8407         (push_class_decls): Delete unused var ID.
8408         (make_memoized_table_entry): Declare as static.
8409         (breadth_first_search): Declare as static.
8410         (tree_has_any_destructor_p): Declare as static.
8411         (pop_class_decls): Delete unused arg pop_class_decls.
8412         * class.c (popclass): Fix call to pop_class_decls.
8413         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
8414         tree_has_any_destructor_p): Delete prototypes.
8415
8416         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
8417         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
8418         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
8419         (build_user_desc): Delete unused var T.
8420         (build_class_desc): Delete unused vars T and OFF.
8421         (build_t_desc): Delete unused var NAME_STRING.
8422         (build_headof): Make static.
8423         (get_bad_cast_node): Likewise.
8424         (get_def_to_follow): Likewise.
8425         * cp-tree.h (init_type_desc): Add prototype.
8426         (build_headof): Remove prototype.
8427
8428 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
8429
8430         * pt.c (tsubst): Only look for matching decls at file scope for
8431         non-member functions.
8432
8433         * call.c (build_scoped_method_call): Handle scoped destructor
8434         calls in templates.
8435
8436         * decl.c (*_top_level): Also save previous_class_values.
8437
8438         * pt.c (tsubst_expr): Support do {} while loops.
8439         * parse.y (simple_stmt): Likewise.
8440         * tree.def: Likewise.
8441
8442         * method.c (build_overload_identifier): For a class nested in a
8443         template class, don't mangle in the template parms from our
8444         context.
8445
8446         * lex.c, cp-tree.h: Remove support for template instantiations in
8447         the pending_inlines code.
8448         * pt.c: Remove dead functions and unused arguments.
8449         (uses_template_parms): TYPENAME_TYPEs always use template parms.
8450         * parse.y: Stop passing anything to end_template_decl.
8451         * tree.c (print_lang_statistics): Only print tinst info #ifdef
8452         GATHER_STATISTICS.
8453
8454 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8455
8456         * init.c (expand_recursive_init{,_1}): Delete decls. 
8457         (sort_member_init): Delete unused var INIT.
8458         (emit_base_init): Delete unused var X.
8459         (build_offset_ref): Delete unused var CNAME.
8460         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
8461         (emit_base_init): Delete unused local var BASE.  Delete extern
8462         decl of IN_CHARGE_IDENTIFIER.
8463         (build_delete): Delete unused local var VIRTUAL_SIZE.
8464
8465         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
8466         (build_delete): Fix call.
8467         * decl2.c (delete_sanity): Likewise.
8468         * cp-tree.h (build_vec_delete): Update prototype.
8469
8470         * typeck.c (common_base_type): Delete unused var TMP.
8471         (build_binary_op): Delete local var ARGS_SAVE.
8472         (build_array_ref): Delete unused var ITYPE.
8473         (c_expand_return): Delete unused var USE_TEMP.
8474
8475         * typeck.c (compexcepttypes): Delete unused arg STRICT.
8476         (comptypes): Fix calls.
8477         * decl.c (duplicate_decls): Likewise.
8478         * cp-tree.h (compexcepttypes): Delete extra arg.
8479
8480         * decl2.c (check_classfn): Delete unused second arg CNAME.
8481         * decl.c (start_decl, grokfndecl): Fix calls.
8482         * init.c (do_friend): Likewise.
8483         * cp-tree.h (check_classfn): Update prototype.
8484
8485         * cp-tree.h (signature_error, import_export_vtable,
8486         append_signature_fields, id_in_current_class, mark_used,
8487         copy_assignment_arg_p): Add decls.
8488         * decl2.c (mark_used): Delete decl.
8489
8490         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
8491
8492         * class.c (get_vtable_entry): Diable unused function.
8493         (doing_hard_virtuals): Delete unused static global var.
8494         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
8495         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
8496         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
8497         (modify_one_vtable): Delete unused var OLD_RTTI.
8498         (finish_struct_anon): Delete unused vars OFFSET and X.
8499         (finish_struct_bits): Delete unused var METHOD_VEC.
8500         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
8501         for-scope local variable METHODS.
8502
8503         * call.c (user_harshness): Delete unused/unneeded arg PARM.
8504         (ideal_candidate): Delete unused args BASETYPE and PARMS.
8505         (build_method_call): Delete unused args passed into ideal_candidate.
8506         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
8507         * cp-tree.h (synthesize_method): Add decl.
8508
8509         * decl.c (note_level_for_for): Give void return type.
8510         (pushdecl_nonclass_level): Likewise.
8511         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
8512         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
8513         (suspend_binding_level): Delete unused var LEVEL.
8514         (duplicate_decls): Delete unused var CTYPE.
8515         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
8516         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
8517         PTR_ENDLINK.
8518         (grokdeclarator): Delete unused var C.
8519         (grokdeclarator): Delete unused var SIZE_VARIES.
8520         (grokparms): Delete unused var SAW_VOID.
8521         (start_function): Delete unused var OLDDECL.
8522         (cplus_expand_expr_stmt): Delete unused var
8523         REMOVE_IMPLICIT_IMMEDIATELY. 
8524
8525         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
8526
8527         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
8528
8529 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
8530
8531         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
8532         (build_min_nt): Likewise.
8533         * pt.c (do_pushlevel): Emit line note.
8534         (do_poplevel): Return what we get from poplevel.
8535         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
8536         * parse.y: Use do_pushlevel and do_poplevel.
8537         * cp-tree.h: Declare do_poplevel.
8538         
8539         * cp-tree.h: Declare at_eof.
8540         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
8541         * decl2.c (import_export_decl): Renamed from import_export_inline.
8542         (finish_file): Call it to do interface handling for statics.
8543         * pt.c (tsubst_copy): Call mark_used on variables and functions
8544         used here.
8545
8546         * decl2.c (finish_file): Don't emit statics we can't generate.
8547         * pt.c (instantiate_decl): Don't set interface on instantiations
8548         we can't generate.
8549
8550         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
8551         * tree.c (print_lang_statistics): Print max template depth.
8552         * pt.c (push_tinst_level): Dump entire instantiation context.
8553         (instantiate_class_template): Use it and pop_tinst_level.
8554         (instantiate_decl): Likewise.
8555
8556         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
8557         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
8558
8559 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
8560
8561         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
8562         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
8563         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
8564         the new template implementation.
8565
8566 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8567
8568         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
8569
8570 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
8571
8572         * decl.c (cp_finish_decl): Delay emitting the debug information for
8573         a typedef that has been installed as the canonical typedef, if the
8574         type has not yet been defined.
8575
8576 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
8577
8578         * decl2.c (grokfield): Still call pop_nested_class for access decls.
8579
8580 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8581
8582         * decl.c (lookup_label): Call label_rtx.
8583
8584         * decl.c (make_binding_level): New function.
8585         (pushlevel, pushlevel_class): Call it instead of explicit
8586         duplicate calls to xmalloc.
8587
8588         * decl.c (init_decl_processing): Delete useless build_pointer_type
8589         call.
8590
8591         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
8592         (sizet_ftype_string): Delete variable.
8593         (init_decl_processing): Add built-in functions fabsf, fabsl,
8594         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
8595         variable strlen_ftype, used for strlen.
8596
8597 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
8598
8599         * decl.c (push_to_top_level): Start from current_binding_level
8600         again for now; the stl hacks depend on g++ being broken in this
8601         way, and it'll be fixed in the template rewrite.
8602
8603         * tree.def: Add USING_DECL.
8604         * decl2.c (do_class_using_decl): Implement.
8605         (grokfield): Pass access decls off to do_class_using_decl instead of
8606         grokdeclarator.
8607         * error.c (dump_decl): Handle USING_DECLs.
8608         * decl.c (grokdeclarator): Remove code for handling access decls.
8609         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
8610         as access decls for now.
8611         (finish_struct): Don't check USING_DECLs for other uses of the name.
8612
8613         * search.c (get_matching_virtual): Use cp_error_at.
8614
8615 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8616
8617         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
8618         match c-typeck.c.
8619         (self_promoting_args_p): Move the check that TYPE is non-nil
8620         before trying to look at its main variant.
8621         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
8622
8623         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
8624         Delete macros.
8625         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
8626         (do_friend): Delete call to xref_friend.
8627         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
8628
8629         * typeck.c (convert_sequence): #if 0 unused function.
8630
8631         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
8632         be in decl_in_memory_p.
8633         (decl_in_memory_p): Delete decl.
8634         * expr.c (decl_in_memory_p): Delete fn.
8635         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
8636
8637         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
8638
8639 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
8640
8641         * class.c (finish_struct_1): Check for a pure-specifier on a
8642         non-virtual function here.
8643
8644         * decl2.c (grok_function_init): Don't check whether the function
8645         is virtual here.
8646         (grokfield): Don't call check_for_override here.
8647
8648         * decl.c (push_to_top_level): Start from inner_binding_level,
8649         check class_shadowed in class levels.
8650
8651 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
8652
8653         * decl.c (resume_level): Ignore things that don't have names, instead
8654         of core dumping.
8655
8656 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8657
8658         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
8659
8660 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
8661
8662         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
8663         synthesized dtor.
8664
8665         * parse.y (complete_type_name): Bind global_scope earlier.
8666         (complex_type_name): Likewise.
8667         (qualified_type_name): Remove.
8668
8669 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
8670
8671         * decl.c (grokfndecl): Move code that looks for virtuals in base
8672         classes...
8673         * class.c (check_for_override): ... to a new function.
8674         (finish_struct_1): Call it.
8675
8676         * cp-tree.h: Declare warn_sign_compare.
8677
8678         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
8679         rather than extra_warnings to decide whether to warn about
8680         comparison of signed and unsigned.
8681
8682         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
8683         implies -Wsign-compare.  -Wall doesn't imply -W.
8684
8685 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
8686
8687         * typeck.c (build_component_ref): Fix to handle anon unions in base
8688         classes as well.
8689
8690 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8691
8692         * class.c (resolves_to_fixed_type_p): Delete code dealing with
8693         a WITH_CLEANUP_EXPR, since we don't generate them any more.
8694         * cvt.c (build_up_reference): Likewise.
8695         * decl.c (grok_reference_init): Likewise.
8696         (cp_finish_decl): Likewise.
8697         * error.c (dump_expr): Likewise.
8698         * tree.c (real_lvalue_p): Likewise.
8699         (lvalue_p): Likewise.
8700         (build_cplus_new): Likewise.
8701         (unsave_expr_now): Likewise.
8702         * typeck.c (unary_complex_lvalue, build_modify_expr,
8703         c_expand_return): Likewise.
8704
8705 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8706
8707         Make the C++ front-end pay attention to attributes for structures.
8708         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
8709         finish_struct_1.
8710         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
8711         Take out old round_up_size use and setting the DECL_ALIGN possibly
8712         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
8713         can override what the attribute set.
8714         * cp-tree.h (finish_struct): Update prototype.
8715         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
8716         attributes to finish_struct.
8717         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
8718         value down into finish_struct.
8719         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
8720
8721 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
8722
8723         * decl.c (poplevel):  Re-word dead for local handling.
8724         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
8725         (cp_finish_decl):  If is_for_scope, check for duplicates so
8726         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
8727
8728         * lex.c (do_identifier):  Use global binding in preference of
8729         dead for local variable.
8730
8731 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
8732
8733         * init.c (initializing_context): Handle anon union changes, the
8734         context where fields of anon unions can be initialized now has to be
8735         found by walking up the TYPE_CONTEXT chain.
8736
8737 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
8738
8739         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
8740         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
8741         (obscure_complex_init): If bss is supported, always set
8742         DECL_INITIAL to error_mark_node.
8743
8744 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8745
8746         * init.c (is_friend): Make sure there's a context before we see if
8747         it's an aggr type.
8748
8749 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
8750
8751         * init.c (is_friend): Classes are not friendly with nested classes.
8752
8753 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
8754
8755         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
8756         and record its result.
8757
8758 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
8759
8760         * class.c (finish_struct_anon): Switch around code to not move anon
8761         union elements around, nor mess up their contexts, nor offsets,
8762         instead we now build up the right number of COMPONENT_REFs for all
8763         the anon unions that may be present at build_component_ref time.
8764         * typeck.c (lookup_anon_field): New routine to handle field lookup
8765         on fields without names.  We find them, based upon their unique type
8766         instead.
8767         * typeck.c (build_component_ref): Allow FIELD_DECL components.
8768         Handle finding components in anonymous unions, and ensure that a
8769         COMPONENT_REF is built for each level as necessary.
8770
8771 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
8772
8773         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
8774         code that ensures that copy ctors are used if appropriate.
8775
8776 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8777
8778         * init.c (build_vec_delete): Only give an error if base isn't an
8779         error_mark_node.
8780
8781 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
8782
8783         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
8784         (yylex): If we see `new', keep slurping.
8785
8786 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
8787
8788         * class.c (finish_struct_1): Move code for handling anon unions...
8789         (finish_struct_anon): to here.  Fixup so that we do the offset
8790         calculations right, and so that the fields are physically moved to
8791         the containers's chain.
8792
8793 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8794
8795         * decl.c (grokdeclarator): Avoid trying to get an operand off an
8796         identifier node.
8797
8798 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
8799
8800         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
8801         POINTER_SIZE to agree with expr.c.
8802
8803 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
8804
8805         * search.c (lookup_field): Don't report ambiguities if protect is 0,
8806         instead return NULL_TREE.
8807
8808 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
8809
8810         * class.c (finish_struct_1): Call warn_hidden if we want warnings
8811         about overloaded virtual functions.
8812         (warn_hidden): New routine to warn of virtual functions that are
8813         hidden by other virtual functions, that are not overridden.
8814         (get_basefndecls): New routine, used by warn_hidden.
8815         (mark_overriders): New routine, used by warn_hidden.
8816         * search.c (get_matching_virtual): Remove old warning that just
8817         isn't very useful.
8818
8819 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8820
8821         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
8822
8823         * typeck.c (null_ptr_cst_p): Delete unused fn.
8824         (build_function_call_maybe): Delete unused fn.
8825
8826         * expr.c (extract_init): #if 0 the code after unconditional return 0
8827         for now.
8828
8829         Delete old cadillac code.
8830         * edsel.c: Remove file.
8831         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
8832         * Makefile.in (CXX_OBJS): Delete edsel.o.
8833         (edsel.o): Delete rule.
8834         * cp-tree.h (flag_cadillac): Delete var decl.
8835         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
8836         * decl2.c (flag_cadillac): Delete var definition.
8837         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
8838         (grokfield): Delete code depending on flag_cadillac.
8839         (finish_anon_union): Likewise.
8840         * class.c (finish_struct_1): Likewise.
8841         (pushclass): Likewise.
8842         (popclass): Likewise.
8843         (push_lang_context): Likewise.
8844         (pop_lang_context): Likewise.
8845         * decl.c (init_decl_processing): Likewise.
8846         (start_decl): Likewise.
8847         (cp_finish_decl): Likewise.
8848         (xref_tag): Likewise.
8849         (finish_enum): Likewise.
8850         (start_function): Likewise.
8851         (finish_function): Likewise.
8852         (finish_stmt): Likewise.
8853         * lex.c (lang_init): Likewise.
8854         (check_newline): Likewise.
8855
8856         * lex.c (do_pending_inlines): Delete synthesized method kludge.
8857
8858         Delete defunct, ancient garbage collection implementation.
8859         * rtti.c: New file with the RTTI stuff from gc.c.
8860         * gc.c: Removed file (moved the remaining stuff into rtti.c).
8861         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
8862         (rtti.o): New rule, replacing gc.o.
8863         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
8864         * cp-tree.h: Delete gc-related fn decls.
8865         (DECL_GC_OFFSET): Delete macro.
8866         (flag_gc): Delete extern decl.
8867         * decl.c (current_function_obstack_index): Delete var decl.
8868         (current_function_obstack_usage): Delete var decl.
8869         (start_function): Delete clearing of current_function_obstack_index
8870         and current_function_obstack_usage.
8871         (init_decl_processing): Delete code relying on -fgc.
8872         Delete call to init_gc_processing.
8873         (cp_finish_decl): Delete calls to build_static_gc_entry and
8874         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
8875         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
8876         and to expand_expr of a __gc_main call.
8877         (maybe_gc_cleanup): Delete var decl.
8878         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
8879         * decl2.c (flag_gc): Delete var decl.
8880         (lang_f_options): Delete offering of -fgc.
8881         (lang_decode_option): Delete -fgc and -fno-gc handling.
8882         (get_temp_regvar): Delete gc code.
8883         * init.c (build_new): Delete gc code.
8884         * lex.c (init_lex): Delete checking of flag_gc.
8885
8886         * typeck.c (convert_arguments): Delete gc code.
8887         (build_component_addr): Delete -fgc warning.
8888         (build_modify_expr): Delete gc code.
8889
8890         * decl2.c (build_push_scope): Delete fn.
8891         * cp-tree.h (build_push_scope): Delete decl.
8892
8893         * search.c (clear_search_slots): Delete fn.
8894         * cp-tree.h (clear_search_slots): Delete decl.
8895
8896         * search.c (tree_needs_constructor_p): Delete fn.
8897         * cp-tree.h (tree_needs_constructor_p): Delete decl.
8898
8899         * tree.c (id_cmp): Delete fn.
8900
8901         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
8902         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
8903
8904         * tree.c (decl_value_member): Delete fn.
8905         * cp-tree.h (decl_value_member): Delete decl.
8906
8907         * tree.c (list_hash_lookup_or_cons): Delete fn.
8908         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
8909
8910         * method.c (cplus_exception_name): Delete fn.
8911         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
8912
8913         * spew.c (shift_tokens): Delete fn.
8914
8915 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
8916
8917         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
8918         to cp_finish_decl.
8919         * parse.y: Likewise.
8920
8921 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8922
8923         * tree.c (build_cplus_staticfn_type): Delete function definition;
8924         never used.
8925         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
8926
8927         * tree.c (virtual_member): Delete function definition; never used.
8928         * cp-tree.h (virtual_member): Delete decl.
8929
8930 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
8931
8932         * typeck.c (build_component_ref): Handle getting vbase pointers
8933         out of complex multiple inheritance better.
8934
8935 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
8936
8937         * typeck.c (build_object_ref): Make sure we use the real type, not
8938         any reference type.
8939
8940 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
8941
8942         * tree.c (build_exception_variant): Don't create new types if we
8943         don't have to, also build new types on the right obstack.
8944
8945 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
8946
8947         * decl.c (store_bindings): Split out from push_to_top_level.
8948         (push_to_top_level): Call it for b->type_shadowed on class binding
8949         levels.
8950
8951 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
8952
8953         * search.c (expand_upcast_fixups): Fix so that offsets stored in
8954         vbase_offsets are always right.  Fixes a problem where virtual base
8955         upcasting and downcasting could be wrong during conversions on this
8956         during virtual function dispatch at ctor/dtor time when dynamic
8957         vtable fixups for deltas are needed.  This only sounds easier than
8958         it is.  :-)
8959         (fixup_virtual_upcast_offsets): Change to reflect new calling
8960         convention for expand_upcast_fixups.
8961
8962 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8963
8964         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
8965         check that it's usable as the bitfield width.
8966
8967 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8968
8969         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
8970         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
8971         only ever used for functions in it.
8972
8973 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
8974
8975         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
8976         (nested_type): Likewise.
8977         (nested_name_specifier): Use lastiddecl.
8978
8979         * decl.c (grokdeclarator): Adjust accordingly.
8980         * init.c (expand_member_init): Likewise.
8981         * parse.y (base_class): Likewise.
8982         * typeck2.c (build_functional_cast): Likewise.
8983
8984         * typeck2.c (build_functional_cast): Fill in name after we've
8985         checked for non-aggr type.
8986
8987 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
8988
8989         * decl2.c (warn_pointer_arith): Default to on.
8990
8991 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
8992
8993         * lex.c (is_rid): New function.
8994         * decl.c (grokdeclarator): Diagnose reserved words used as
8995         declarator-ids.
8996
8997 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
8998
8999         * tree.c (get_decl_list): Don't lose cv-quals.
9000
9001         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
9002         typespecs used as declarator-ids.
9003
9004 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
9005
9006         * decl.c (poplevel): When poping a level, don't give a warning for
9007         any subblocks that already exist.
9008
9009 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
9010
9011         * typeck.c (build_object_ref): Finish what I started.
9012
9013         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
9014
9015         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
9016
9017         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
9018         scope.
9019
9020 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
9021
9022         * decl.c (xref_tag): Handle passing a type in directly.
9023
9024         * parse.y (qualified_type_name): Pull out the type.
9025         (nested_type): Likewise.
9026         Take types directly instead of as identifiers.
9027         * call.c (build_scoped_method_call): Take types directly instead of
9028         as identifiers.
9029         * decl.c (xref_basetypes): Likewise.
9030         * init.c (expand_member_init): Likewise.
9031         (build_member_call): Likewise.
9032         (build_offset_ref): Likewise.
9033         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
9034         * method.c (do_build_assign_ref): Likewise.
9035         * decl.c (grokdeclarator): Handle a type appearing as the
9036         declarator-id for constructors.
9037         * method.c (do_build_copy_constructor): current_base_init_list now
9038         uses the types directly, not their names.
9039         * init.c (sort_base_init): Likewise.
9040         (expand_member_init): Likewise.
9041         * init.c (is_aggr_type): New function, like is_aggr_typedef.
9042
9043 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
9044
9045         * tree.c (layout_basetypes): Call build_lang_field_decl instead
9046         of build_lang_decl if first arg is a FIELD_DECL.
9047
9048 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
9049
9050         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
9051         non-empty.
9052         * except.c (expand_start_catch_block): Set TREE_USED to avoid
9053         warnings about the catch handler.
9054
9055 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
9056
9057         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
9058         expand_target_expr.
9059
9060 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
9061
9062         Fix access control to use trees rather than integers.
9063         * class.c (access_{default, public, protected, private,
9064         default_virtual, public_virtual, private_virtual}_node): Add
9065         definitions.
9066         (init_class_processing): Do creation of those nodes.
9067         * cp-tree.h (access_type): Delete enum decl.
9068         (access_{default, public, protected, private, default_virtual,
9069         public_virtual, private_virtual}_node): Add decls.
9070         (compute_access): Change return type.
9071         * search.c (compute_access): Have tree return type, instead of enum.
9072         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
9073         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
9074         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
9075         * parse.y (VISSPEC): Make ttype rather than itype.
9076         (base_class_access_list): Likewise.
9077         * *.[cy]: Change all refs of `access_public' to `access_public_node',
9078         etc.
9079         * call.c (build_method_call): Make ACCESS be a tree.
9080         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
9081         * cvt.c (convert_to_aggr): Likewise.
9082         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
9083         Likewise.
9084         * method.c (hack_identifier): Likewise.
9085         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
9086
9087 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
9088
9089         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
9090         frontend, and make it more consistent with respect to
9091         warn_pointer_arith.
9092
9093 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
9094
9095         * decl.c (pushdecl): Check for duplicate parameter names.
9096
9097 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
9098
9099         * decl.c (expand_static_init): Call assemble_external for atexit.
9100
9101 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
9102
9103         * except.c (do_unwind): Remove some generated dead code.
9104         (eh_outer_context): New routine, factor out some common code from
9105         expand_builtin_throw and end_eh_unwinder.  Add code to do return
9106         address masking for the PA.
9107         (expand_builtin_throw): Use eh_outer_context instead of open coding
9108         it here.
9109         (end_eh_unwinder): Likewise.
9110
9111 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
9112
9113         * except.c (expand_throw): Call assemble_external for __empty, if we
9114         use it.
9115
9116 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
9117
9118         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
9119         NORMAL_RETURN_ADDR_OFFSET.
9120         (end_eh_unwinder): Likewise.
9121
9122 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
9123
9124         * gc.c (build_dynamic_cast): Make sure we don't cast away const
9125         when dealing with references, and make sure we handle dynamic
9126         casting to a cv qualified reference.
9127
9128 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
9129
9130         * except.c (struct eh_context): New structure top hold eh context
9131         information.
9132         (push_eh_context): New routine.
9133         (pop_eh_context): Likewise.
9134         * decl.c (push_cp_function_context): Use them.
9135         (pop_cp_function_context): Likewise.
9136
9137 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
9138
9139         * decl2.c (finish_file): Also prune uninteresting functions in the
9140         inline emission loop.
9141
9142 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
9143
9144         * sig.c (build_signature_table_constructor): Mark functions
9145         in the signature as referenced.
9146
9147 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
9148
9149         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
9150         the inline emission stuff.
9151
9152 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
9153
9154         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
9155         weak symbols.   
9156         * lang-options.h: Add -f{no-,}weak.
9157         * decl.c (init_decl_processing): If the target does not support weak
9158         symbols, don't use them.
9159         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
9160
9161 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
9162
9163         * init.c (expand_member_init): warning for base init after members.
9164
9165 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
9166
9167         * cvt.c (build_expr_type_conversion): Don't convert to a reference
9168         type.
9169
9170 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
9171
9172         * method.c (report_type_mismatch): Improve wording for volatile
9173         mismatches.
9174
9175 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
9176
9177         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
9178         expand_assignment, as the later doesn't handle things that have
9179         copy constructors well.  The compiler would do bitwise copying,
9180         instead of ctor calling in some cases.
9181
9182 Wed Dec 13 17:05:54 PST 1995  Paul Eggert  <eggert@twinsun.com>
9183
9184         * g++.c (my_strerror): Return "cannot access" if errno is 0.
9185         (pfatal_with_name, perror_exec): Don't assume that
9186         the returned value from my_strerror contains no '%'s.
9187         (concat): Remove.
9188         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
9189
9190 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
9191
9192         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
9193         TYPE_METHODS/TREE_CHAIN mean what they used to. 
9194         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
9195         instead of TYPE_METHODS.
9196         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
9197         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
9198         * cp-tree.h (CLASSTYPE_METHODS): Lose.
9199         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
9200         TYPE_METHODS.
9201         (struct lang_decl): Lose next_method field.
9202         (DECL_NEXT_METHOD): Lose.
9203         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
9204         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
9205         anymore.
9206         (finish_struct_methods): Don't mess with the TREE_CHAINs in
9207         fn_fields.
9208
9209         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
9210         vector.
9211
9212         * call.c (build_method_call): Synthesize here even when not inlining.
9213         * typeck.c (build_function_call_real): Likewise.
9214
9215 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
9216
9217         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
9218         == DBX_DEBUG, call dbxout_start_new_source_file and
9219         dbxout_resume_previous_source_file when appropriate.
9220
9221 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
9222
9223         * except.c (start_anon_func): Push to the top level.
9224         (end_anon_func): Pop from the top level.
9225
9226 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
9227
9228         * cp-tree.h (build_cleanup): New routine to build cleanups.
9229         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
9230         call at ctor time and use atexit to run it later.
9231         * decl2.c (build_cleanup): New routine, taken from finish_file.
9232         (finish_file): Use build_cleanup instead, and don't put function
9233         local statics in global dtor list.
9234         
9235 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
9236
9237         * except.c (expand_throw): Ensure that we have cleanups, if we try
9238         and expand cleanups.
9239
9240 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
9241
9242         * except.c (expand_throw): Add logic to manage dynamic cleanups for
9243         the EH object.
9244         (expand_end_catch_block): Use the magic of expand_goto, instead of
9245         emit_jump so that we get the cleanup for any catch clause parameter
9246         and the cleanup for the exception object.  Update to reflect label
9247         changes.
9248         (push_eh_cleanup): New routine to register a cleanup for an
9249         exception object.
9250         (empty_fndecl): Used to default cleanup actions to
9251         nothing.
9252         (init_exception_processing): Setup empty_fndecl.  Setup
9253         saved_cleanup.
9254         (expand_start_catch_block): Update to reflect label changes.  Call
9255         push_eh_object to register the cleanup for the EH object.
9256         (start_anon_func): New routine to start building lambda expressions
9257         from trees.
9258         (end_anon_func): New routine to end them.
9259         (struct labelNode): Change so that we can use tree labels, or rtx
9260         labels.
9261         (saved_cleanup): Object to check for dynamic cleanups for the
9262         exception handling object.
9263         (push_label_entry): Change so that we can use tree labels, or rtx
9264         labels.
9265         (pop_label_entry): Likewise.
9266         (top_label_entry): Likewise.
9267         (expand_start_all_catch): Use tree label instead of rtx label, so
9268         that we can get the magic of expand_goto.
9269         (expand_end_all_catch): Update to reflect label changes.
9270
9271         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
9272         use UNSAVE_EXPRs.
9273         typeck.c (get_member_function_from_ptrfunc): Remove remnants of
9274         building_cleanup logic, as we now use UNSAVE_EXPRs.
9275         * cp-tree.h (unsave_expr): Declare it.
9276         * decl.c (building_cleanup): Remove.
9277         (maybe_build_cleanup): Remove building_cleanup logic, and use
9278         UNSAVE_EXPR instead.
9279
9280 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
9281
9282         * gc.c (build_t_desc): Update error message to say <typeinfo>.
9283
9284 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
9285
9286         * decl.c (pushdecl): Only warn about shadowing a local variable if
9287         warn_shadow is true.
9288
9289 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
9290
9291         * typeck.c (build_binary_op_nodefault): Added warning about
9292         comparisons between different enum types with -Wall, unless
9293         -fenum-int-equiv set.
9294
9295 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
9296
9297         * class.c (finish_struct_1): Skip down to the inner type in
9298         multidimensional arrays.  Ensures ctors will be made for types that
9299         need constructing.
9300
9301 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
9302
9303         * decl.c (last_dtor_insn): New to track the last compiler generated
9304         insn in a dtor.
9305         (store_parm_decls): Set it.
9306         (finish_function): Use it to see if the dtor is empty.  Avoid doing
9307         vtable setup all the time, if we can.
9308         (struct cp_function): Add last_dtor_insn.
9309         (push_cp_function_context): Save it.
9310         (pop_cp_function_context): Restore it.
9311
9312 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
9313
9314         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
9315         warnings.
9316
9317 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
9318
9319         * typeck.c (expand_target_expr): Make sure targets get put into the
9320         current temp_slot_level, so that the free_temp_slots call will reuse
9321         them.
9322
9323 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
9324
9325         * class.c (finish_struct_1): Delay delta fixups for virtual bases
9326         until after we have done the hard virtuals, to avoid a bogus `every
9327         virtual function must have a unique final overrider' for virtual
9328         functions that are only overridden by hard virtuals.
9329
9330 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
9331
9332         * pt.c (do_function_instantiation): Don't try to find a file-scope
9333         template for a member function.
9334
9335 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
9336
9337         * g++.c (main): Add handling of -nodefaultlibs.
9338
9339 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
9340
9341         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
9342         distinguish between direct bindings of reference variables, and
9343         indirect bindings of reference variables.
9344         * cvt.c (build_up_reference): Use it.
9345         * typeck.c (convert_arguments): Use it to indicate this is an
9346         indirect binding.
9347         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
9348         as they are unused.
9349         (expand_static_init): Likewise.
9350         (cplus_expand_expr_stmt): Likewise.
9351         * decl2.c (finish_file): Likewise.
9352         * init.c (perform_member_init): Likewise.
9353         (emit_base_init): Likewise.
9354         (expand_aggr_vbase_init_1): Likewise.
9355
9356 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
9357
9358         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
9359         get a DECL_LANG_SPECIFIC node.
9360         * cp-tree.h (lang_decl_flags): Add new member `level'.
9361         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
9362         decl_flags level member.
9363
9364 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
9365
9366         * call.c (build_method_call): Make sure instance has a
9367         TYPE_LANG_SPECIFIC node before we dive into it.  
9368
9369 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
9370
9371         * method.c (make_thunk): use TREE_SET_CODE to set thunk's tree code.
9372
9373 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
9374
9375         * decl.c (duplicate_decls): When smashing decls, smash staticness in
9376         the usual way.
9377
9378 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
9379
9380         * decl.c (poplevel): Handle the merging of subblocks of cleanups
9381         when finishing blocks that have already been created (usually due to
9382         the fixup goto code).  Fixes bad debugging information.
9383
9384 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
9385
9386         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
9387         that's not a list of overloaded functions.
9388
9389 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
9390
9391         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
9392         before trying to use DECL_ABSTRACT_VIRTUAL_P.
9393
9394 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
9395
9396         * decl2.c (mark_used): New function for hooking into setting of
9397         TREE_USED on decls.
9398         * call.c (build_method_call): Use it.
9399         * class.c (instantiate_type): Likewise.
9400         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
9401         for all like-named functions.
9402         * method.c (hack_identifier): Likewise.
9403         (emit_thunk): Don't call assemble_external.
9404         (make_thunk): Create thunk as a FUNCTION_DECL so that it
9405         gets the right mode and ENCODE_SECTION_INFO works.
9406         
9407         * parse.y: Use mark_used.  Pass operator names to do_identifier.
9408         * lex.c (do_identifier): Handle operator names.
9409
9410         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
9411
9412 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
9413
9414         * errfn.c: Include stdio.h.
9415         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
9416
9417 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
9418
9419         * typeck2.c (digest_init): Always convert initializers to the
9420         right type.
9421
9422 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
9423
9424         * init.c (member_init_ok_or_else): Don't allow member initializers
9425         for indirect members, as it is invalid.
9426
9427 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
9428
9429         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
9430
9431 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
9432
9433         * parse.y (for.init.statement): Catch compound statements inside for
9434         initializations, if we're being pedantic.
9435
9436 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
9437
9438         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
9439         looking for.
9440
9441 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
9442
9443         * error.c (dump_expr): Don't core dump when a boolean expression is
9444         used as a default argument.
9445
9446 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
9447
9448         * class.c (finish_struct_bits): Check aggregate_value_p instead of
9449         RETURN_IN_MEMORY.
9450
9451 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
9452
9453         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
9454         BLKmode type that would otherwise be returned in registers.
9455
9456 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
9457
9458         * g++.c (WITHLIBC): New macro.
9459         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
9460         saw_libc and pass it at the end if it was set.
9461
9462 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
9463
9464         * parse.y (fn.def1): Call split_specs_attrs in
9465         declmods notype_declarator case.
9466 \f
9467 Use a consistent time stamp format in ChangeLog entries.
9468 Not everyone has Emacs 20 yet, so stick with Emacs 19 format for now.
9469
9470 Local Variables:
9471 add-log-time-format: current-time-string
9472 End: