OSDN Git Service

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