* cp-tree.h (make_typename_type): Change prototype.
[official-gcc.git] / gcc / cp / ChangeLog
blobcee60ef10bd7c9fa092a1ae3be6f752f2d5ee081
1 1999-10-29  Mark Mitchell  <mark@codesourcery.com>
3         * cp-tree.h (make_typename_type): Change prototype.
4         * decl.c (make_typename_type): Only complain if so requested.
5         * parse.y (nested_name_specifier): Adjust calls.
6         (typename_sub0): Likewise.
7         (typename_sub1): Likewise.
8         * parse.c: Regenerated.
9         * pt.c (convert_template_argument): Pass complain to
10         make_typename_type.
11         (tsubst): Likewise.
12         
13 1999-10-28  Mark Mitchell  <mark@codesourcery.com>
15         * semantics.c (finish_handler): End the scope of the handler
16         before attaching it to the statement-tree.
18 1999-10-28  Ian Lance Taylor  <ian@zembu.com>
20         * rtti.c (build_dynamic_cast_1): Give a better error message for
21         an attempt to dynamic_cast from a non-polymorphic type.
23 1999-10-27  Mark Mitchell  <mark@codesourcery.com>
25         * cp-tree.h (make_temp_vec): Remove.
26         (make_scratch_vec): Likewise.
27         * call.c (add_function_candidate): Use make_tree_vec.
28         (add_conv_candidate): Likewise.
29         (build_builtin_candidate): Likewise.
30         (add_template_candidate_real): Likewise.
31         * class.c (resolve_address_of_overloaded_function): Likewise.
32         * decl.c (start_function): Don't fool with the momentary obstack.
33         (finish_function): Likewise.
34         * init.c (expand_direct_vtbls_init): Likewise.
35         (begin_init_stmts): Likewise.
36         (finish_init_stmts): Likewise.
37         * pt.c (add_to_template_args): Use make_tree_vec.
38         (check_explicit_specialization): Likewise.
39         (coerce_template_parms): Likewise.
40         (lookup_template_class): Don't fool with the momentary obstack.
41         (instantiate_class_template): Likewise.
42         (tsubst_template_arg_vector): Use make_tree_vec.
43         (tsubst_aggr_type): Don't fool with the momentary obstack.
44         (tsubst_decl): Likewise.  Use make_tree_vec.
45         (try_one_overload): Likewise.
46         (try_class_unification):  Don't fool with the momentary obstack.
47         (get_bindings_real): Use make_tree_vec.
48         (set_mangled_name_for_template_decl): Likewise.
49         * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
50         * semantics.c (finish_expr_stmt): Likewise.
51         (finish_do_stmt): Likewise.
52         (finish_for_expr): Likewise.
53         (finish_switch_cond): Likewise.
54         (do_pushlevel): Likewise.
55         (do_poplevel): Likewise.
56         * tree.c (make_temp_vec): Remove.
57         
58         * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs.  Dump
59         CLEANUP_P for a TRY_BLOCK.
60         * ir.texi: Document SAVE_EXPR.
62 Tue Oct 26 23:29:56 1999  Jeffrey A Law  (law@cygnus.com)
64         * call.c (build_over_call):  Check that the built-in function is
65         of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
66         * typeck.c (build_function_call_real): Similarly. 
68 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
70         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS.  Don't call
71         remember_end_note.
73 1999-10-24  Mark Mitchell  <mark@codesourcery.com>
75         * decl.c (push_overloaded_decl_1): Use pushdecl.
76         
77         * decl.c (auto_function): Replace #ifdef'd __inline with just
78         plain inline.
79         * lex.c (my_get_run_time): Likeise.
80         (yyprint): Likewise.
81         (identifier_type): Likewise.
82         * method.c (start_squangling): Likewise.
83         (end_squangling): Likewise.
84         (icat): Likewise.
85         (old_backref_index): Likewise.
86         (flush_repeats): Likewise.
87         (issue_ktype): Likewise.
88         * parse.y (empty_parms): Likewise.
89         * parse.c: Regenerated.
90         
91 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
93         * dump.c (dequeue_and_dump): Replace several uses of
94         queue_and_dump_index with dump_child.
96 1999-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
98         * expr.c: Include tm_p.h.
100 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
102         * cp-tree.h (SCOPE_PARTIAL_P): New macro.
103         (pushlevel_temporary): Remove.
104         (add_scope_stmt): New function.
105         * decl.c (pushlevel_temporary): Remove.
106         (poplevel): Use add_scope_stmt.
107         (start_decl_1): Likewise.
108         * semantics.c (add_scope_stmt): New function.
109         (do_pushlevel): Use it.
110         (do_poplevel): Use it.
111         (expand_stmt): Check SCOPE_PARTIAL_P.
112         
113         * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
114         * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
115         * expr.c (cplus_expand_expr): Expand it.
116         * ir.texi: Document EMPTY_CLASS_EXPR.
117         
118 1999-10-20  Mark Mitchell  <mark@codesourcery.com>
120         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
121         parameters as having namespace scope.
123 1999-10-19  Mark Mitchell  <mark@codesourcery.com>
125         * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
126         (mangling_flags): New type.
127         (build_overload_int): Change prototype.
128         (build_overload_value): Likewise.
129         (numeric_output_need_bar): Improve comment.
130         (mangle_expression): New function, broken out from ...
131         (build_overload_int): Here.
132         (build_overload_value): Adjust for use of mangling flags.  Don't
133         warn about real-valued template parameters here.  Do handle
134         complex expressions involving real-valued template parameters.
135         (build_template_parm_names): Encase non-type template parameters
136         in underscores, if necessary.
137         (process_overload_item): Remove conditional on
138         PARM_CAN_BE_ARRAY_TYPE.
140 1999-10-17  Mark Mitchell  <mark@codesourcery.com>
142         * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
144         * ir.texi: Clean up documentation of RETURN_INIT.
145         
146 1999-10-15  Greg McGary  <gkm@gnu.org>
148         * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
149         (lang_init): Set default for flag_bounds_check if still "unspecified".
151 1999-10-13  Andrew Haley  <aph@cygnus.com>
153         * class.c (finish_struct_1): Force alignment of non-bitfields to
154         BITS_PER_UNIT.
156 Wed Oct 13 22:01:35 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
158         * typeck2.c (process_init_constructor): Handle empty constructors.
160 1999-10-13  Jason Merrill  <jason@yorick.cygnus.com>
162         * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
164         * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
165         array error.
167 1999-10-13  Mark Mitchell  <mark@codesourcery.com>
169         * decl.c (make_rtl_for_local_static): Don't create register RTL
170         for addressable constants.
172 1999-10-13  Nathan Sidwell  <nathan@acm.org>
174         * cp-tree.h (build_x_va_arg): Prototype new function.
175         * call.c (build_x_va_arg): Define it.
176         * parse.y (unary_expr): Call build_x_va_arg.
177         
178         * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
179         * call.c (convert_type_from_ellipsis): Define it.
180         * decl.c (init_decl_processing): Set lang_type_promotes_to.
182         * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
184 1999-10-11  Jason Merrill  <jason@yorick.cygnus.com>
186         * class.c (fixed_type_or_null): Always set *nonnull.
188 1999-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
190         * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
191         __GNUC__ and __GNUC_MINOR__.
193 1999-10-09  Mark Mitchell  <mark@codesourcery.com>
195         * cp-tree.h (make_rtl_for_local_static): New function.  
196         * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
197         local statics ...
198         (make_rtl_for_local_static): Here.
199         * semantics.c (expand_stmt): Use make_rtl_for_local_static.
200         
201 1999-10-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
203         * method.c: Include tm_p.h.
205 1999-10-7   Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
207         * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
208         * lex.c (cp_make_lake_type): Likewise.
209         * tree.c (init_tree): Init make_lang_type_fn.
210         
211 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
213         * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
214         paramter.
215         
216         * semantics.c (expand_stmt): Don't pretend to have asmspecs for
217         local statics if we don't really have them.
219         * ir.texi: Improve documentation for STMT_EXPR.  Describe
220         CLEANUP_POINT_EXPR.
222 1999-10-07  Jason Merrill  <jason@yorick.cygnus.com>
224         * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
226 1999-10-07  Greg McGary  <gkm@gnu.org>
228         * class.c (finish_struct_1): Use simpler method of
229         removing elements of a singly-linked list which doesn't
230         lose for classes without data members.
232 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
234         * friend.c (make_friend_class): Robustify.
236         * semantics.c (finish_object_call_expr): Reject calls to template
237         types.
239 1999-10-06  Mark Mitchell  <mark@codesourcery.com>
241         * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
243         * cp-tree.h (CLASSTYPE_VFIELD): Remove.
244         * call.c (build_vfield_ref): Use TYPE_VFIELD, not
245         CLASSTYPE_VFIELD.
246         * class.c (get_vfield_offset): Likewise.
247         (finish_base_struct): Likewise.
248         (modify_one_vtable): Likewise.
249         (fixup_vtable_deltas): Likewise.
250         (finish_struct_1): Likewise.
251         * init.c (expand_virtual_init): Likewise.
252         * search.c (lookup_field_1): Likewise.
253         (expand_upcast_fixups): Likewise.
254         * typeck.c (build_component_ref): Likewise.
255         (build_binary_op_nodefault): Likewise.
256         
257         * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
258         * ir.texi: Document TYPE_VFIELD.
260 1999-10-06  Brendan Kehoe  <brendan@cygnus.com>
262         * decl.c (grokdeclarator): Only warn about non-zero arrays if
263         !in_system_header (linux socketbits.h can give this for
264         __cmsg_data, which is using a GNU extension).
266 1999-10-05  Mark Mitchell  <mark@codesourcery.com>
268         * decl2.c (start_static_storage_duration_function): Push the
269         function declaration so it ends up in namespace scope.
271         * dump.c (DUMP_CHILDREN): Remove.
272         (DUMP_BINFO): Adjust.
273         (struct dump_node_info): Remove dump_children_p.
274         (queue_and_dump_type): Remove dump_children_p parameter.
275         (queue): Don't set dump_children_p.
276         (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
277         queue_and_dump_index.
278         (dequeue_and_dump): Unconditionally print children.  Adjust calls
279         to functions mentioned above.
280         (dump_node):  Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
281         
282         * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
283         * dump.c (dequeue_and_dump): Dump them.
284         
285         * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
287         * decl.c (start_function): Set current_in_charge_parm for
288         constructors, too, where appropriate.
289         * search.c (fixup_all_virtual_upcast_offsets): New function.
290         (expand_indirect_vtbls_init): Use it.
291         
292 1999-10-04  Nathan Sidwell  <nathan@acm.org>
294         * decl2.c (grok_alignof): Don't decay lvalues.
295         
296         * init.c (build_new): Remove unused variable.
298 1999-10-04  Mark Mitchell  <mark@codesourcery.com>
300         * cp-tree.h (struct language_function): Remove static_labelno.
301         (static_labelno): Remove macro.
302         * method.c (build_overload_nested_name): Make static_labelno
303         static here.
304         
305         * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
306         to decide whether or not a function is defined.
308         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
309         situations where make_node will do it automatically.
310         * decl.c (grok_reference_init): Likewise.
311         (expand_static_init): Likewise.
312         (do_static_initialization): Likewise.
313         * init.c (perform_member_init): Likewise.
314         (expand_aggr_init_1): Likewise.
315         (build_new_1): Likewise.
316         * method.c (do_build_copy_constructor): Likewise.
317         (do_build_assign_ref): Likewise.
318         * search.c (expand_upcast_fixups): Likewise.
319         * semantics.c (finish_stmt_expr): Likewise.
320         * typeck.c (build_unary_op): Likewise.
321         (check_return_expr): Likewise.
323 1999-10-04  Jason Merrill  <jason@yorick.cygnus.com>
325         * init.c (build_vec_delete_1): Fold COND_EXPRs.
327 1999-10-03  Mark Mitchell  <mark@codesourcery.com>
329         * cp-tree.def (VEC_INIT_EXPR): Remove.
330         * cp-tree.h (struct stmt_tree): New type.
331         (struct saved_scope): Remove firstobj.  Add x_saved_tree,
332         x_stmt_tree.
333         (class_cache_firstobj): Remove.
334         (struct language_function): Remove stmts_are_full_exprs_p,
335         x_last_tree, and x_last_expr_type.  Add x_stmt_tree.
336         (current_stmt_tree): New macro.
337         (last_tree): Adjust.
338         (last_expr_type): Likewise.
339         (doing_semantic_analysis_p): Simplify.
340         (stmts_are_full_exprs_p): Adjust.
341         (begin_tree): Remove prototype.
342         (end_tree): Likewise.
343         (begin_stmt_tree): Change prototype.
344         (finish_stmt_tree): Likewise.
345         (building_stmt_tree): Simplify.
346         * decl.c (mark_stmt_tree): New function.
347         (mark_saved_scope): Use it.
348         (start_function): Rearrange slightly to call begin_stmt_tree 
349         earlier.
350         (save_function_data): Tweak.
351         (finish_function): Adjust call to finish_stmt_tree.
352         (mark_lang_function): Use mark_stmt_tree.
353         * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
354         * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
355         (build_vec_init): Remove creation of stand-in intializer.
356         * pt.c (begin_tree): Remove.
357         (end_tree): Likewise.
358         * semantics.c (SET_LAST_STMT): New macro.  Use it throughout.
359         (begin_compound_stmt): Handle a compound-statement outside of a
360         function.
361         (begin_stmt_expr): Handle a statement-expression outsidef of a
362         function.
363         (finish_stmt_expr): Likewise.
364         (begin_class_definition): Don't call begin_tree.
365         (finish_inline_definitions): Don't call end_tree.
366         (begin_stmt_tree): Take a pointer to tree, not a function as input.
367         (finish_stmt_tree): Likewise.
368         * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
369         (mapcar): Likewise.
370         
371         * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
372         * parse.c: Regenerated.
373         
374         * dump.c (dqueue_and_dump): Dump bitfieldness.
375         
376         * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
377         bitfields, rather than DECL_BIT_FIELD.
378         * ir.texi: Document how to tell whether or not a field is a
379         bitfield.
380         
381         * lex.c (make_lang_type): Fix typo in comment.
383 1999-10-01  Jason Merrill  <jason@yorick.cygnus.com>
385         * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
387 1999-10-01  Mark Mitchell  <mark@codesourcery.com>
389         * pt.c (tsubst_decl): If the type of a template instantiation is
390         bogus, so is the whole instantiation.
392 1999-09-30  Mark Mitchell  <mark@codesourcery.com>
394         * decl.c (initialize_local_var): Handle static variables here.
395         (cp_finish_decl): Tweak handling of function-scope static
396         variables.
397         * semantics.c (expand_stmt): Handle DECL_STMTs for static
398         variables.
400         * method.c (emit_thunk): Don't crash when -fsyntax-only.
402         * cp-tree.h (lang_decl_flags): Add global_ctor_p and
403         global_dtor_p.  Add init_priority.
404         (DECL_ACCESS): Adjust accordingly.
405         (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
406         (GLOBAL_INIT_PRIORITY): Likewise.
407         * decl.c (lang_mark_tree): Adjust accordingly.
408         (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 
409         and GLOBAL_INIT_PRIORITY.
410         * dump.c (dequeue_and_dump): Print them.
411         * ir.texi: Document them.
413         * decl2.c (struct priority_info_s): Remove initialization_sequence
414         and destruction_sequence.
415         (start_static_storage_duration_function): Return the body of the
416         function.  Convert for function-at-a-time mode.
417         (generate_inits_for_priority): Remove.
418         (finish_static_storage_duration_function): Change prototype.
419         Adjust for function-at-a-time mode.
420         (do_static_initialization): Likewise.
421         (do_static_destruction): Likewise.
422         (do_static_initialization_and_destruction): Remove.
423         (start_static_initialization_or_destruction): New function.
424         (finish_static_initialization_or_destruction): Likewise.
425         (get_priority_info): Don't manipulation initialization_sequence or
426         destruction_sequence.
427         (prune_vars_needing_no_initialization): New function.
428         (write_out_vars): Likewise.
429         (finish_file): Use the various new functions instead of the old.
430         
431 Thu Sep 30 00:13:27 1999  Dirk Zoller  <duz@rtsffm.com>
433         * cp-tree.h (warn_float_equal): Declare.
434         * decl2.c (warn_float_equal): Define.
435         (lang_decode_option): Recognize -W[no-]float-equal.
436         * typeck.c (build_binary_op_nodefault): Conditionally warn
437         about equality tests of floating point types.
439 1999-09-29  Jason Merrill  <jason@yorick.cygnus.com>
441         Support normal type_info-based EH mechanisms with -fno-rtti.
442         * except.c (build_eh_type_type): Remove special -fno-rtti handling.
443         (build_eh_type_type_ref): Likewise.
444         (build_eh_type): Remove.
445         (expand_throw): Call build_eh_type_type, not build_eh_type.
446         * decl2.c (import_export_decl): Don't associate the tinfo fn with
447         the vtable if -fno-rtti.
448         * decl.c (init_decl_processing): Always init_rtti_processing.
450         * rtti.c (get_typeid): Don't complain about -fno-rtti.
452         * class.c (class_cache_obstack, class_obstack): Remove.
453         (init_class_processing): Don't initialize class_obstack.
454         (push_cache_obstack): Remove.
455         (pushclass): Don't call it.
456         * cp-tree.h: Remove prototype for push_cache_obstack.
457         * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
458         (pushlevel_class): Don't push_decl_level.
459         (poplevel_class): Don't pop_stack_level.
460         (push_class_level_binding): Don't push_cache_obstack.
461         (init_decl_processing): Don't intialize decl_obstack.
462         * search.c (push_class_decls): Don't push_cache_obstack.
463         * tree.c (list_hash_add): Put hash node on permanent_obstack.
464         (hash_tree_cons): Don't mess with obstacks.
465         (print_lang_statistics): Don't print stats for class_obstack and
466         decl_obstack.
468 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
470         * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
471         * ir.texi: Document DECL_EXTERNAL.
473         * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
474         * ir.texi: Document THUNK_DECLs.
476         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
477         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
478         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
479         * error.c (dump_template_bindings): Remove unused parameter.
480         Handle multiple levels of template parameters.
481         (dump_template_decl): Use `parms', not `args', for template
482         parameters.  Fix thinko.
483         (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION.  Don't pass
484         flags to dump_template_bindings.
485         * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
486         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
487         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
488         (tsubst_copy): Clarify variable name.
489         (most_general_template): Robustify.
490         
491 1999-09-29  Nathan Sidwell  <nathan@acm.org>
493         * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
494         to change primary template rendering.
496 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
498         * cp-tree.h (UPT_TEMPLATE): Remove.
499         (UPT_PARMS): Likewise.
500         (DECL_NEEDED_P): New macro.
501         * decl2.c (finish_vtable_vardecl): Use it.
502         (finish_objects): Don't crash with -fsyntax-only.
503         (finish_file): Use DECL_NEEDED_P.  Don't prune vtables when
504         -fsyntax-only.
505         * pt.c (tsubst_friend_function): Remove FIXME that talks about
506         obstacks.
507         (tsubst_expr): Correct handling of function try-blocks.
508         * semantics.c: Include flags.h.
509         (expand_body): Don't do RTL generation if -fsyntax-only.
510         * Makefile.in (semantics.o): Depends on flags.h.
511         
512 1999-09-28  Gabriel Dos Reis  <gdr@codesourcery.com>
514         * pt.c (most_general_template): Adjust declaration.
516         * cp-tree.h: (most_general_template): Declare.
518         * error.c (dump_template_value): Rename to ...
519         (dump_template_argument): This.
520         (dump_template_argument_list): New function.
521         (dump_type): Use it.
522         (dump_template_parameter): New function.
523         (dump_template_decl): Use it.
524         (dump_template_bindings): New function.
525         (dump_function_decl): Use it. Pretty print function template
526         instantiations.
528 1999-09-28  Nathan Sidwell  <nathan@acm.org>
530         * decl.c (grokdeclarator): Distinguish parameter context for
531         diagnostics. Tidy up missing type diagnostic.
532         Diagnose `explicit' in one place. Diagnose `mutable' in one place.
534 1999-09-28  Mark Mitchell  <mark@codesourcery.com>
536         * ir.texi: Improve documentation for TARGET_EXPR.
538 1999-09-27  Nathan Sidwell  <nathan@acm.org>
540         Augment stringification of trees.
541         * cp-tree.h (tree_string_flags): New error stringifying enumeration.
542         (fndecl_as_string, type_as_string_real, args_as_string,
543         code_as_string, language_as_string, parm_as_string,
544         op_as_string, assop_as_string, cv_as_string): Remove.
545         (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
546         (context_as_string): Declare new function.
547         * error.c (cp_printers): Move definition.
548         (OB_UNPUT): Remove.
549         (OB_END_TEMPLATE_ID): Adjust.
550         (interesting_scope_p): Remove.
551         (dump_scope): New static function.
552         (dump_qualifiers): Adjust prototype, reimplement.
553         (dump_template_value): Use tree_string_flags.
554         (dump_type_real): Move back to dump_type.
555         (dump_type): Adjust prototype. Use tree_string_flags.
556         (dump_aggr_type): Likewise. Use dump_template_parms.
557         (dump_type_prefix): Adjust prototype. Use tree_string_flags.
558         Return pad flag.
559         (dump_type_suffix): Adjust prototype. Use tree_string_flags.
560         (dump_simple_decl): Likewise.
561         (dump_decl): Likewise. Use dump_template_decl.
562         (dump_template_decl): New static function broken out of dump_decl.
563         (dump_function_decl): Adjust prototype. Use tree_string_flags.
564         (dump_parameters): Likewise. Prefix space.
565         (dump_exception_spec): Adjust prototype. Use tree_string_flags.
566         (dump_function_name): Likewise. Use dump_template_parms.
567         (dump_template_parms): New static function broken out of
568         dump_function_name.
569         (dump_expr_list): Adjust prototype. Use tree_string_flags.
570         (dump_expr): Likewise.
571         (fndecl_as_string): Removed
572         (type_as_string_real): Removed
573         (dump_binary_op): Adjust prototype. Use tree_string_flags.
574         (dump_unary_op): Likewise.
575         (type_as_string): Likewise.
576         (expr_as_string): Likewise.
577         (decl_as_string): Likewise.
578         (context_as_string): New function.
579         (lang_decl_name): Adjust.
580         (decl_to_string): New static print callback.
581         (expr_to_string): Likewise.
582         (fndecl_to_string): Likewise.
583         (code_as_string): Renamed to ...
584         (code_to_string): ... here. Adjust.
585         (language_as_string): Renamed to ...
586         (language_to_string): ... here. Adjust.
587         (parm_as_string): Renamed to ...
588         (parm_to_string): ... here.
589         (op_as_string): Renamed to ...
590         (op_to_string): ... here.
591         (assop_as_string): Renamed to ...
592         (assop_to_string): ... here.
593         (type_to_string): New static print callback.
594         (args_as_string): Renamed to ...
595         (args_to_string): ... here. Adjust.
596         (cv_as_string): Renamed to ...
597         (cv_to_string): ... here. Adjust.
598         * pt.c (mangle_class_name_for_template): Use tree_string_flags.
599         (print_template_context): Likewise.
601 1999-09-26  Mark Mitchell  <mark@codesourcery.com>
603         * cp-tree.h (expand_throw): Remove prototype.
604         * except.c (expand_throw): Make it static.  Use tree-generation
605         functions, rather than RTL-generation functions.
606         (build_throw): Use it.
607         * expr.c: Include except.h.
608         (cplus_expand_expr): Don't call expand_throw here.
609         * Makefile.in (expr.o): Depend on except.h.
610         * ir.texi: Update documentation for THROW_EXPR.
611         
612         * decl.c (start_function): Set x_dont_save_pending_sizes rather
613         than calling get_pending_sizes.
614         * init.c (build_new): Don't save and restore
615         immediate_size_expand; instead, assert that it has the expected
616         value already.
618 1999-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
620         * lex.c (compiler_error): Add missing call to va_end().
622 1999-09-25  Mark Mitchell  <mark@codesourcery.com>
624         * dump.c (dequeue_and_dump): Handle RESULT_DECL.
625         * ir.texi: Document RESULT_DECL and DECL_RESULT.
627         * cp-tree.h (check_return_expr): New function.
628         * decl.c (finish_constructor_body): New function.
629         (pushdecl): Put global friend functions in namespace binding
630         level, not the class binding level.
631         (finish_destructor_body): Make sure the dtor_label is always
632         defined.  Fix typo in comment.
633         (finish_function): Move generation of constructor-termination code
634         to semantic-analysis time.  Move generation of implicit `main'
635         return value to semantic-analysis time.
636         * semantics.c (finish_return_stmt): Generate goto's to
637         ctor_label/dtor_label here.  Use check_return_expr to do semantic
638         analysis on the returned expression.
639         * typeck.c (maybe_warn_about_returning_address_of_local): New
640         function split out from c_expand_return.
641         (check_return_expr): Likewise.
642         (c_expand_return): Just generate the RTL for the return.
643         
644 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
646         * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
647         (cleanup_type): Likewise.
648         (search_tree): Change prototype.
649         * decl.c (local_variable_p): Adjust for new interface to
650         search_tree.
651         (check_default_argument): Likewise.
652         * error.c (dump_expr): Handle INIT_EXPR.
653         * except.c (expand_throw): Don't make cleanup_type a local static.
654         * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
655         * init.c (build_new): Call build_new_1 directly, rather than
656         building a NEW_EXPR.
657         (build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
658         processing file-scope initializers.
659         * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
660         * tree.c: Include splay-tree.h
661         (no_linkage_helper): Adjust for new interface to search_tree.
662         (search_tree): Pass around pointers to tree nodes, rather than the
663         nodes themselves.  Handle VEC_INIT_EXPR.
664         (no_linkage_check): Adjust for new interface to search_tree.
665         (mapcar): Handle VEC_INIT_EXPR.
666         (target_remap): New variable.
667         (bot_manip): Use it.
668         (bot_replace): New function.
669         (break_out_target_exprs): Use it to remap all variables used in a
670         default argument expression.
671         * typeck.c (build_modify_expr): Don't crash when outside a
672         function and presented with an INIT_EXPR assignment
673         * Makefile.in (tree.o): Depend on splay-tree.h.
675 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
677         * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
678         DECL_BUILT_IN.
679         (builtin_function): New arg CLASS.  Arg CODE now of type int.  All
680         callers changed.
681         Set the builtin's DECL_BUILT_IN_CLASS.
683 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
685         * decl.c (pushdecl): Don't make local declarations of extern
686         variables give the variable a DECL_CONTEXT for the function.
687         (make_rtl_for_nonlocal_decl): Don't fuss with obstacks.  Simplify.
688         Don't accidentally make RTL for local declarations.
689         (emit_local_var): Handle declarations with asm-specifiers here.
690         
691 1999-09-23  Mark Mitchell  <mark@codesourcery.com>
693         * ir.texi: Improve documentation for TARGET_EXPRs.  Discuss
694         STMT_IS_FULL_EXPR_P.
696         * cp-tree.h (language_function): Add cannot_inline.
697         * decl.c (start_function): Restore current_function_cannot_inline
698         from the saved value.
699         (save_function_data): Save current_function_cannot_inline.
700         * decl2.c (start_objects): Change prototype.  Build the function
701         in function-at-a-time mode.
702         (finish_objects): Likewise.
703         (generate_ctor_or_dtor_function): Adjust accordingly.
704         
705         * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
706         * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
707         Don't call expand_anon_union_decl here
708         * semantics.c (exapnd_stmt): Call it here, instead.
709         * typeck.c (mark_addressable): Addressed variables are implicitly
710         used.
711         
712 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
714         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
715         (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
716         (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
717         * cp-tree.h: Add tree checking macros to various tree access
718         macros. 
719         * ptree.c (print_lang_decl): Test for function or variable
720         before accessing template info.
722 1999-09-23  Jason Merrill  <jason@yorick.cygnus.com>
724         * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
725         * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
726         * decl2.c (lang_f_options): Add -fshort-wchar.
727         * cp-tree.h: Declare flag_short_wchar.
728         * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 
729         int' for wchar_t.
731 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
733         * ir.texi: Fix formatting errors and typos.
735 1999-09-22  Mark Mitchell  <mark@codesourcery.com>
737         * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
739         * decl.c (pushdecl): Do create a binding for extern "C" functions,
740         but not for their DECL_ASSEMBLER_NAMEs.
741         (lookup_name_current_level): Fix formatting.
742         (xref_tag): Likewise.
743         * decl2.c (start_objects): Mark static constructors and
744         destructors as used.
746 1999-09-22  Jason Merrill  <jason@yorick.cygnus.com>
748         * decl.c (define_case_label): Don't crash if we're not in a switch.
750         * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
751         * lang-options.h: Restore -fthis-is-variable.  Remove help strings
752         for unsupported flags.
754 1999-09-21  Jason Merrill  <jason@yorick.cygnus.com>
756         * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
757         Accept and warn about -fthis-is-variable.
759 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
761         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
762         CLEANUP_STMT, and SCOPE_STMT.
764         * decl2.c (lang_decode_option): Adjust, in the wake of recent
765         changes to option processing.
767 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
769         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
770         function pointer from pmfs with no object given.
771         (convert_for_assignment): Do not return error when converting
772         pmfs.
774 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
776         * lex.c (internal_filename): New variable.
777         (INTERNAL_FILENAME): New macro.
778         (init_parse): Allocate internal_filename and mark as root.  Use it
779         instead of a string constant.
781 1999-09-21  Nathan Sidwell  <nathan@acm.org>
783         Reimplement dynamic cast and catch matching.
784         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
785         * search.c (dynamic_cast_base_recurse): New function.
786         (get_dynamic_cast_base_type): New function for dynamic cast.
787         * rtti.c (build_dynamic_cast_1): Determine source and target
788         class relationship. Call __dynamic_cast_2.
789         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
790         (__user_type_info::dyncast): New dynamic cast dispatcher.
791         (__user_type_info::sub_kind): New nested enumeration.
792         (__user_type_info::contained_p): sub_kind predicate.
793         (__user_type_info::contained_public_p): Likewise.
794         (__user_type_info::contained_nonpublic_p): Likewise.
795         (__user_type_info::contained_nonvirtual_p: Likewise.
796         (__user_type_info::upcast_result): New nested struct.
797         (__user_type_info::dyncast_result): New nested struct.
798         (*::do_upcast): New catch function.
799         (*::do_dyncast): New dynamic cast function.
800         (__user_type_info::find_public_subobj): New dynamic cast
801         helper dispatcher.
802         (*::do_find_public_subobj): New dynamic cast helper function.
803         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
804         (__user_type_info::dyncast): Define dynamic cast dispatcher.
805         (*::do_upcast): Define catch function.
806         (*::do_dyncast): Define dynamic cast function.
807         (*::do_find_public_subobj): Define dynamic cast helper function.
808         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
809         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
810         (__dynamic_cast_2): New dynamic cast runtime.
812 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
814         * cp-tree.h (finish_stmt_expr): Change prototype.
815         * expr.c (cplus_expand_expr): Adjust call accordingly.
816         * init.c (finish_init_stmts): Likewise.
817         * parse.y (primary): Likewise.
818         * pt.c (tsubst_copy): Likewise.
819         * semantics.c (finish_stmt_expr): Don't take two parameters.
820         Don't remove generated BLOCKs from the block-tree.
822         Remove support for assigning to `this'.
823         * NEWS: Note that fact.
824         * class.c (build_vbase_path): Don't check flag_this_is_variable.
825         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
826         (language_function): Remove assigns_this, just_assigned_this, and
827         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
828         (base_init_expr): Remove.
829         (current_vcalls_possible_p): New macro.
830         (vtbls_set_up_p): Likewise.
831         (emit_base_init): Change prototype.
832         * decl.c (finish_destructor_body): New function, split out from
833         finish_function.
834         (current_function_assigns_this): Remove.
835         (current_function_just_assigned_this): Likewise.
836         (start_function): Don't set them.
837         (finish_function): Don't check them.  Don't emit
838         base-initialization code here.  Generate code for destructors when
839         doing semantic analysis.
840         (finish_stmt): Don't check current_function_just_assigned_this.
841         * decl2.c (lang_f_options): Remove this-is-variable.
842         (lang_decode_option): Likewise.
843         (grokclassfn): Don't check flag_this_is_variable.
844         * init.c (emit_base_init): Return the expression generated.
845         (construct_virtual_bases): Don't push/pop obstacks.  Fix
846         typo.
847         (build_new_1): Don't check flag_this_is_variable.
848         (get_temp_regvar): Don't set DECL_REGISTER.
849         (build_vec_init): Don't call use_variable.
850         * lang-options.h: Remove "-fthis-is-variable" and
851         "-fno-this-is-variable".
852         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
853         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
854         expand_expr_stmt.
855         * semantics.c (finish_expr_stmt_real): Rename to ...
856         (finish_expr_stmt): This.  Remove assigned_this parameter.
857         (begin_if_stmt): Call do_pushlevel before starting the statement.
858         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
859         blocks.
860         (setup_vtbl_ptr): Emit initialization code for bases and members
861         at semantic-analysis time.  Emit code to initialize vtables in
862         destructors here.
863         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
864         Don't handle CTOR_INITIALIZER any more.
865         * typeck.c (build_modify_expr): Don't check for assignments to
866         this.
867         (c_expand_return): Don't suggest assigning to `this'.
868         
869         * Makefile.in (decl.o): Depend on RTL_H.
870         (decl2.o): Likewise.
871         (class.o): Likewise.
872         (call.o): Likewise.
873         (method.o): Likewise.
874         (search.o): Likewise.
875         (tree.o): Likewise.
876         (pt.o): Likewise.
878         * decl.c (duplicate_decls): When a builtin function is redeclared
879         as static, make sure it is mangled correctly.
881         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
882         detail about the statement-tree.
883         
884 1999-09-20  Nathan Sidwell  <nathan@acm.org>
886         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
888 1999-09-20  Nick Clifton  <nickc@cygnus.com>
890         * decl2.c (lang_decode_option): Extend comment.
892 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
894         * typeck.c: Include "tm_p.h".
896 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
898         * ir.texi: New file.
900 1999-09-19  Paul Burchard <burchard@pobox.com>
902         * semantics.c (expand_stmt): Initialize return value.
904 1999-09-18  Paul Burchard <burchard@pobox.com>
906         * gxxint.texi: G++ now implements namespaces.
907         
908 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
910         * decl.c (pop_label): Don't warn about unused labels more than
911         once.
912         * semantics.c (finish_goto_stmt): Always marked used labels as
913         used.
915         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
916         even when the declaration is external.
917         (cp_finish_decl): Adjust call to layout_var_decl.
918         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
920 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
922         * typeck.c (get_member_function_from_ptrfunc): Always consider
923         virtuality inside member pointer.
925 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
927         Turn on function-at-a-time processing.  
928         * cp-tree.h (doing_semantic_analysis_p): New macro.
929         (SF_DEFAULT): Define to zero, not SF_EXPAND.
930         (start_handler_parms): Change prototype.
931         (expand_start_catch_block): Likewise.
932         (expand_end_catch_block): Likewise.
933         (expand_start_eh_spec): Likewise.
934         (expand_end_eh_spec): Declare.
935         (finish_handler_parms): Change prototype.
936         (begin_catch_block): Declare.
937         (finish_handler): Change prototype.
938         (do_pushlevel): Declare.
939         (do_poplevel): Likewise.  
940         * decl.c (pushlevel): Don't create
941         binding levels when not doing semantic analysis.
942         (poplevel): Don't pop them.
943         (pushdecl): Assert that we are never called when not doing
944         semantic analysis.
945         (pushdecl_top_level): Use push_to_top_level.
946         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
947         label when expanding.
948         (cp_finish_decl): Only inject for-scope variables when doing
949         semantic analysis.  Add comments.
950         (start_handler_parms): Return the handler parm.
951         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
952         already set.  Reinitialize from saved function data if available.
953         Don't pushlevel when not doing semantic analysis.
954         (store_parm_decls): Only generate RTL when expanding.  Only
955         pushdecl when doing semantic analysis.  Set
956         current_eh_spec_try_block if appropriate.
957         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
958         Combine common code.  Don't poplevel when not doing semantic
959         analysis.
960         (push_cp_function_context): Don't expand functions without an
961         explicit call to expand_body.
962         (mark_lang_function): Make eh_spec_try_block and
963         x_scope_stmt_stack.  
964         * except.c (expand_end_eh_spec): Don't
965         declare.
966         (process_start_catch_block): Likewise.
967         (push_eh_cleanup): Use finish_decl_cleanup.
968         (initialize_handler_parm): New function.
969         (expand_start_catch_block): Use it.
970         (expand_end_catch_block): Use tree-generation functions, not
971         RTL-generation functions.
972         (expand_start_eh_spec): Likewise.
973         (expand_end_eh_spec): Likewise.
974         (expand_exception_blocks): Simplify.
975         (start_anon_func): Use do_pushlevel.
976         (end_anon_func): Use do_poplvel.  Call expand_body for the
977         function.  
978         * expr.c (do_case): Don't call define_case_label.  
979         * init.c (create_temporary_var): Set DECL_CONTEXT for local
980         variables.  
981         * method.c (emit_thunk): Call expand_body for the
982         thunk.
983         (sythesize_method): Likewise.  
984         * parse.y (handler_args): Give it ttype.
985         (eat_saved_input): Call expand_body.
986         (base_init): Use do_pushlevel.
987         (pending_inline): Call expand_body.
988         (handler): Adjust calls to finish_handler_parms and
989         finish_handler.
990         (handler_args): Don't call expand_start_catch_block.  Return the
991         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
992         * parse.c: Regenerated.
993         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
994         * semantics.c (do_pushlevel): Give it external linkage.  Build
995         SCOPE_STMTs.
996         (do_poplevel): Likewise.
997         (finish_case_label): Call define_case_label when doing semantic
998         analysis.
999         (finish_goto_stmt): Create RTL for labels.
1000         (finish_function_try_block): Set in_function_try_handler
1001         unconditionally.
1002         (finish_function_handler_sequence): Unset it.
1003         (finish_handler_parms): Use expand_start_catch_block even when
1004         building a statement-tree.
1005         (begin_catch_block): New function.
1006         (finish_handler): Move a little RTL-generation logic here.
1007         (finish_decl_cleanup): Allow cleanups for empty declarations.
1008         (finish_named_return_value): Don't pushdecl when not doing
1009         semantic analysis.
1010         (expand_stmt): Don't do semantic analysis for variable
1011         declarations.  Handle START_CATCH_STMT.  Call expand_label
1012         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
1013         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
1014         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
1015         RETURN_INIT and function try blocks.
1016         
1017         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
1018         x_scope_stmt_stack.  Add x_in_charge_parm.
1019         (current_eh_spec_try_block): New macro.
1020         (current_scope_stmt_stack): Likewise.
1021         (current_in_charge_parm): Likewise.
1022         * decl.c (start_function): Initialize current_in_charge_parm.
1023         (finish_function): Use current_in_charge_parm rather than looking
1024         up __in_chrg.
1025         * search.c (expand_indirect_vtbls_init): Likewise.
1027         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
1028         (TRY_BLOCK): Likewise.
1029         (HANDLER): Likewise.
1030         (START_CATCH_STMT): New tree node.
1031         (SCOPE_STMT): Likewise.
1032         * cp-tree.h (SCOPE_BEGIN_P): New macro.
1033         (SCOPE_NULLIFIED_P): Likewise.
1034         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
1035         (struct lang_decl): Add saved_language_function.
1036         (DECL_PENDING_INLINE_INFO): Adjust documentation.
1037         (DECL_PENDING_INLINE_P): New macro.
1038         (TYPE_TI_ARGS): Fix typo in comment.
1039         (DECL_SAVED_TREE): Add to documentation.
1040         (DECL_SAVED_FUNCTION_DATA): New macro.
1041         (START_CATCH_TYPE): Likewise.
1042         (SCOPE_END_P): New macro.
1043         (declare_parm_level): Don't declare.
1044         * decl.c (mark_lang_function): New function, split out from
1045         mark_cp_function_context.
1046         (save_function_data): New function.
1047         (declare_parm_level): Remove.
1048         (finish_function): Use save_function_data to squirrel away
1049         important stuff for later use.
1050         (mark_cp_function_context): Use mark_function_data.
1051         (lang_mark_tree): Likewise.
1052         * lex.c (begin_definition_of_inclass_inline): Set
1053         DECL_PENDING_INLINE_P.
1054         (store_pending_inline): Clear it.
1055         * pt.c (tsubst_decl): Likewise.
1057 1999-09-17  Nathan Sidwell  <nathan@acm.org>
1059         * call.c (perform_implicit_conversion): Deal with error_mark_node.
1061 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
1063         * decl.c (warn_extern_redeclared_static): Don't get confused by
1064         static member functions.
1065         (duplicate_decls): Merge DECL_THIS_STATIC.
1067         * decl.c (expand_static_init): Make sure assignments to local
1068         statics actually occur.
1070 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
1072         * cp-tree.h (poplevel_class): Declare.
1073         * class.c (popclass): Use poplevel_class, not poplevel.
1074         * decl.c (poplevel_class): Don't make it static.  Don't return a
1075         value.
1076         (poplevel): Don't call poplevel_class; abort in a class
1077         binding level is seen.
1078         * semantics.c (finish_translation_unit): Use pop_everything.
1079         * parse.y (member_init): Allow errors.
1080         (pending_inline): Call finish_function.
1081         * parse.c: Regenerated.
1082         * Makefile.in (CONFLICTS): Adjust.
1084 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
1085         
1086         * error.c: Reduce code duplication.
1087         (dump_template_value): New function.
1088         (dump_type_real): Use it.
1089         (dump_decl): Likewise.
1090         (dump_function_name): Likewise.
1091         (dump_function_decl): Don't be too talkative about function return
1092         type variety.
1094 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1096         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
1098         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
1100 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
1102         * decl2.c (finish_file): Also call check_global_declarations for
1103         the pending_statics list.
1105 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
1107         * lex.c (cp_pragma_implementation): Allow #pragma implementation
1108         in header files.
1110 1999-09-15  Richard Henderson  <rth@cygnus.com>
1112         * lex.c (mark_impl_file_chain): Follow the next chain.
1114 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
1116         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
1117         problems with extern "C" functions redeclared as static.
1118         (duplicate_decls): When a builtin is redeclared static, make the
1119         new function have internal linkage.
1120         
1121 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
1123         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
1124         * pt.c (tsubst_copy): Likewise.
1125         * tree.c (search_tree): Likewise.
1126         (mapcar): Likewise.
1128 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1130         * typeck2.c (ack): Don't declare progname.
1132 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
1134         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
1135         filenames with ggc_alloc_string.
1137 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
1139         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
1140         TARGET_EXPR.
1141         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
1142         the TARGET_EXPR.
1143         * cvt.c (build_up_reference): Likewise.
1144         * tree.c (build_cplus_new): Likewise.
1145         (get_target_expr): Likewise.
1146         
1147 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
1149         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
1151 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
1153         * cp-tree.h (build_target_expr): New function.
1154         * call.c (build_conditional_expr): Use build_target_expr.
1155         (convert_like): Likewise.
1156         (build_over_call): Likewise.
1157         * cvt.c (build_up_reference): Likewise.
1158         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
1159         (destroy_local_var): Here.
1160         (build_target_expr): New function.
1161         * tree.c (build_cplus_new): Use it.
1162         (get_target_expr): Likewise.
1164 1999-09-13  Nathan Sidwell  <nathan@acm.org>
1166         * typeck.c (expr_sizeof): Don't decay arrays and functions.
1167         Remove misleading comment.
1168         (build_compound_expr): Don't decay arrays.
1170 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
1172         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
1173         class rvalues again.
1175 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1177         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
1179         * g++spec.c: Include gcc.h.
1180         (lang_specific_driver): Constify a char*.  Call xcalloc, not
1181         xmalloc/bzero.  All calls to the function pointer parameter now
1182         explicitly call `fatal'.
1184 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
1186         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
1187         * cvt.c (ocp_convert): Complete the from and destination types.
1188         Adjust warning about functions always being `true' in conditionals.
1189         * decl.c (duplicate_decls): Don't play funny games with abort.
1190         * error.c (dump_expr): Handle OVERLOADs.
1191         * spew.c (probe_obstack): Remove.
1192         * typeck.c (condition_conversion): Use perform_implicit_conversion.
1193         
1194 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
1196         * cp-tree.h (auto_function, define_function): Adjust prototypes.
1197         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
1198         changed.
1199         (auto_function): Likewise, for CODE arg.
1200         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
1201         (builtin_function): ... here.
1203 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
1205         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
1206         (init_decl_processing): Don't set TREE_PERMANENT for the
1207         error_mark_node.
1208         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
1209         (grokdeclarator): Likewise.
1210         (grokparms): Don't check TREE_PERMANENT when building up lists.
1211         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
1212         (mark_inline_for_output): Likewise.
1213         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
1214         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
1215         * lex.c (check_newline): Don't check ggc_p; it is always one.
1216         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
1217         * spew.c (yylex): Don't copy_node or probe_obstacks for
1218         non-permanent CONSTANTs and STRINGs.
1219         * tree.c (build_cplus_array_type_1): Don't fuss with
1220         TREE_PERMANENT on ARRAY_TYPEs.
1221         
1222         * cp-tree.def (CLEANUP_STMT): New node.
1223         * cp-tree.h (language_function): Add name_declared.
1224         (current_function_name_declared): New macro.
1225         (CLEANUP_DECL): New macro.
1226         (CLEANUP_EXPR): Likewise.
1227         (emit_local_var): Likewise.
1228         (finish_decl_cleanup): New function.
1229         * cvt.c (build_up_reference): Simplify.
1230         (ocp_convert): Remove dead code.
1231         * decl.c (start_decl): Remove call to add_decl_stmt.
1232         (grok_reference_init): Adjust, to handle bindings temporaries to
1233         references.  Remove dead code.
1234         (initialize_local_var): Don't generate RTL for
1235         declarations here, or build cleanups here.  Don't fuss with
1236         obstacks.  Replace expand_start_target_temps calls with explicit
1237         setting of stms_are_full_exprs_p.
1238         (destroy_local_var): New function.
1239         (emit_local_var): Likewise.
1240         (cp_finish_decl): Use them, as appropriate.
1241         (start_function): Announce template functions.
1242         (store_parm_decls): Don't call declare_function_name here.
1243         (finish_stmt): Don't start emit base-initialization code when just
1244         building the statement-tree.
1245         * init.c (create_temporary_var): Move add_decl_stmt call ...
1246         (get_temp_regvar): Here.
1247         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
1248         cp_finish_decl would expect.  Don't call add_decl_stmt.
1249         * semantics.c (begin_compound_stmt): Call declare_function_name,
1250         if appropriate.
1251         (finish_decl_cleanup): New function.
1252         (expand_stmt): Use emit_local_var to output variables.          
1253         (expand_body): Set current_funtion_name_declared.
1254         
1255 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
1257         * cp-tree.h (finish_cleanup_try_block): New function.
1258         * semantics.c (finish_cleanup_try_block): Add comment.
1260 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
1262         * cp-tree.h: Delete declarations for all tree nodes now moved to
1263         global_trees.
1264         * decl.c: Delete their definitions.
1265         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
1266         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
1267         provide defaults.
1268         (init_decl_processing): Call build_common_tree_nodes and
1269         build_common_tree_nodes_2 instead of building their nodes here.
1270         Don't add gc roots for them.
1272 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
1274         * cp-tree.h (language_function): Rename expanding_p to
1275         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
1276         (expanding_p): Adjust accordingly.
1277         (TREE_VIA_PRIVATE): Fix typo in comment.
1278         (DECL_REFERENCE_SLOT): Remove.
1279         (SET_DECL_REFERENCE_SLOT): Likewise.
1280         * decl.c (named_label_uses): Adjust. Remove chicken comment.
1281         (push_overloaded_decl): Don't truncate the chain of bindings when
1282         adding an overloaded function.
1283         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
1284         (initialize_local_var): Fix typo in comment.
1285         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
1286         * decl2.c (start_objects): Make the fact that we are expanding
1287         the generated function right away explicit.
1288         (start_static_storage_duration_function): Likewise.
1289         (finish_file): Fix typo in comment.
1290         * init.c (build_vec_init): Correct bugs in handling cleanups.
1291         * semantics.c (maybe_convert_cond): New function.
1292         (FINISH_COND): Always store the condition, even if there's
1293         a declaration.
1294         (finish_if_stmt_cond): Use maybe_convert_cond.
1295         (finish_while_stmt_cond): Likewise.
1296         (finish_do_stmt): Likewise.
1297         (finish_for_cond): Likewise.
1298         (expand_cond): Adjust.
1299         
1300         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
1301         * init.c (perform_member_init): Remove obstack machinations.
1302         (expand_cleanup_for_base): Likewise.
1303         (finish_init_stmts): Mark the statement-expression as used.
1304         * method.c (emit_thunk): Use tree-generating functions, not
1305         RTL.
1306         (do_build_copy_constructor): Likewise.
1307         (do_build_assign_ref): Likewise.
1308         (synthesize_method): Likewise.  Keep track of line numbers.
1309         * pt.c (tsubst_expr): Handle various kinds of try blocks.
1310         * semantics.c (expand_stmts): Remove.
1311         (begin_function_try_block): Set FN_TRY_BLOCK_P.
1312         (finish_function_try_block): Be careful rechaining 
1313         function try blocks.
1314         (expand_stmt): Loop through all the statements at a given level.
1315         (exapnd_body): Be careful with line-numbers here too.  Prepare for
1316         being called directly from the parser.
1318         * cp-tree.h (finish_function): Adjust prototype.
1319         * decl.c (finish_function): Return the function compiled.
1320         * pt.c (instantiate_decl): Don't play games with obstacks.
1321         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
1322         (search_tree): Likewise.
1323         * typeck.c: Fix typo in comment.
1324         * typeck2.c (store_init_value): Add comment.
1326         * cp-tree.h (CPTI_ATEXIT): New macro.
1327         (atexit_node): Likewise.
1328         * decl.c (destroy_local_static): New function, broken out from ...
1329         (expand_static_init): Here.
1331         * rtti.c (get_tinfo_var): These should always be global
1332         (expand_si_desc): Use tree, not RTL, functions to generate code.
1333         (expand_class_desc): Likewise.
1334         (expand_ptr_desc): Likewise.
1335         (expand_attr_desc): Likewise.
1336         (expand_generic_desc): Likewise.
1337         (synthesize_tinfo_fn): Likewise.
1339 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
1341         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
1342         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
1343         RECHAIN_STMTS. 
1344         (RECHAIN_STMST_FROM_CHAIN): Likewise.
1346         * parse.y (simple_stmt): Fix typo in last change.
1348         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
1349         (STMT_IS_FULL_EXPR_P): Likewise.
1350         (STMT_LINENO_FOR_FN_P): Likewise.
1351         (prep_stmt): New function.
1352         (building_stmt_tree): Tweak for safety.
1353         * pt.c (tsubst_expr): Use prep_stmt throughout.
1354         (add_tree): Move it to semantics.c
1355         * semantics.c (add_tree): Move it here.
1356         (finish_expr_stmt_real): New function.
1357         (finish_expr_stmt): Use it.
1358         (finish_if_stmt_cond): Use FINISH_COND.
1359         (finish_while_stmt_cond): Likewise.
1360         (finish_for_cond): Likewise.
1361         (finish_stmt_tree): Tweak line-number handling.
1362         (prep_stmt): New function.
1363         (expand_stmt): Use it.
1364         
1365         * cp-tree.h (begin_switch_stmt): Adjust prototype.
1366         (finish_switch_cond): Likewise.
1367         * parse.y (simple_stmt): Adjust accordingly.
1368         * parse.c: Regenerated.
1369         * pt.c (tsubst_expr): Adjust accordingly.
1370         * semantics.c (expand_cond): New function.
1371         (FINISH_COND): New macro.
1372         (begin_switch_stmt): Build the SWITCH_STMT here.
1373         (finish_switch_stmt_cond): Not here.
1374         (expand_stmt): Adjust calls to begin_switch_stmt and
1375         finish_switch_cond.  Use expand_cond throughout.
1377         * dump.c (dequeue_and_dump): Dump types for constants.
1378         Describe DECL_ARG_TYPE more intuitively.
1379         Handle ARRAY_REF.
1381         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
1382         (lang_cleanup_tree): Remove.
1383         * lex.c (make_lang_type): Use ggc_alloc to allocate
1384         TYPE_LANG_SPECIFIC.
1386         Reorganize per-function data.
1387         * cp-tree.h (saved_scope): Add function_decl, bindings.
1388         (language_function): Rename binding_level to bindings.
1389         (cp_function_chain): Use the current_function, not the
1390         outer_function_chain.
1391         (current_class_ptr): Make it work, even when there's no 
1392         current function.
1393         (current_class_ref): Likewise.
1394         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
1395         macros.
1396         (clear_temp_name): Remove.
1397         * decl.c (check_function_type): New function, broken out from
1398         start_function.
1399         (current_binding_level): Adjust definition.
1400         (pushlevel): Simplify.
1401         (poplevel): Don't use named_label_uses when we're outside
1402         a function scope.
1403         (mark_saved_scope): Mark function_decl and bindings.
1404         (maybe_push_to_top_level): Don't unconditionally push a new
1405         function context.  Save bindings and the current_function_decl.
1406         Don't clear named_labels.
1407         (pop_from_top_level): Pop function context if appropriate.
1408         (init_decl_processing): Set init_lang_status and free_lang_status,
1409         rather than save_lang_status and restore_lang_status.
1410         (start_function): Take SF_* flags.  Don't clear per-function data.
1411         Reorder and simplify to use new per-function data code.  Add
1412         asserts.
1413         (store_parm_decls): Don't call init_function_start here.
1414         (finish_function): Adjust for new handling of per-function data.
1415         (push_cp_function_context): Simplify.
1416         (mark_cp_function_context): Change binding_level to bindings.
1417         * decl2.c (clear_temp_name): Remove.
1418         (start_objects): Use SF flags to start_function.
1419         (start_static_storage_duration_function): Likewise.
1420         * except.c (start_anon_func): Remove redundant calls to 
1421         push_function_context_to.  Use SF flags to start function.
1422         (end_anon_func): Remove redundant call to pop_function_context
1423         from.
1424         * lex.c (reinit_parse_for_function): Don't initialize per-function 
1425         data.
1426         * method.c (emit_thunk): Clear current_function after calling
1427         assemble_end_function.  Use SF flags for start_function.
1428         (synthesize_method): Use SF flags for start_function.
1429         * parse.c: Regenerated.
1430         * parse.y (fn.defpen): Likewise.
1431         (pending_inline): Clear current_function, even if something goes
1432         wrong.
1433         * pt.c (instantiate_decl): Use SF flags to start_function.
1434         Don't save and restore expanding_p.
1435         (add_tree): Handle the case where we are outside any function.
1436         (end_tree): Likewise.
1437         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
1438         * semantics.c (begin_function_definition): Likewise.
1439         (expand_body): Likewise.
1440         
1441 1999-09-09  Nathan Sidwell  <nathan@acm.org>
1443         * cp-tree.h (convert_to_void): Prototype new function.
1444         (require_complete_type_in_void): Remove prototype.
1445         * cvt.c (convert_to_void): New function.
1446         (ocp_convert): Use convert_to_void.
1447         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
1448         expressions.
1449         * typeck.c (require_complete_type_in_void): Remove function.
1450         (build_compound_expr): Use convert_to_void.
1451         (build_static_cast): Likewise.
1452         (build_c_cast): Likewise.
1453         * semantics.c (finish_expr_stmt): Do not decay full expressions.
1454         
1455         * typeck.c (build_x_compound_expr): Add FIXME.
1457 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
1459         * cp-tree.h (scratch_tree_cons): Remove.
1460         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
1461         and perm_tree_cons with plain tree_cons.
1462         * class.c: Likewise.
1463         * decl.c: Likewise.
1464         * decl2.c: Likewise.
1465         * except.c: Likewise.
1466         * expr.c: Likewise.
1467         * init.c: Likewise.
1468         * lex.c: Likewise.
1469         * method.c: Likewise.
1470         * parse.y: Likewise.
1471         * pt.c: Likewise.
1472         * repo.c: Likewise.
1473         * rtti.c: Likewise.
1474         * search.c: Likewise.
1475         * typeck.c: Likewise.
1476         * parse.c: Regenerated.
1477         * tree.c (build_srcloc): Simplify.
1478         
1479 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
1481         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
1482         Remove next.
1483         (LANG_DECL_PERMANENT): Remove.
1484         * decl.c (duplicate_decls): Don't mess about with obstacks trying
1485         to free memory.
1486         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
1487         * lex.c (free_lang_decl_chain): Remove.
1488         (build_lang_decl): Don't use obstacks.
1489         (retrofit_lang_decl): Likewise.
1490         (copy_lang_decl): Likewise.
1492         * cp-tree.h (saved_scope): Remove old_binding_level and 
1493         function_decl.  Tidy up.
1494         * decl.c (mark_saved_scope): Don't set them.
1495         (maybe_push_to_top_level): Clear memory.
1497         * decl.c (layout_var_decl): Change prototype.  Don't complete
1498         types for external objects.
1499         (check_initializer): Likewise.  Tidy.
1500         (initialize_local_var): Complete types here.
1501         (cp_finish_decl): Not here.  Reorganize a little.
1502         (grokvardecl): Don't complete types here.
1504         * decl.c (start_function): Clear last_dtor_insn and
1505         last_parm_cleanup_insn. 
1506         (push_cp_function_context): Just copy over a little of
1507         the old context, not all of it.
1509         * cp-tree.h (copy_to_permanent): Remove.
1510         (permanent_p): Likewise.
1511         * decl.c (building_typename_type): Don't use copy_to_permanent.
1512         (start_decl): Likewise.
1513         (grok_reference_init): Likewise.
1514         (cp_finish_decl): Likewise.
1515         * init.c (build_new_1): Don't use mapcar.
1516         (build_vec_delete_1): Don't use copy_to_permanent.
1517         (build_vec_init): Likewise.
1518         * parse.y (primary): Likewise.
1519         * parse.c: Regenerated.
1520         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
1521         (lookup_template_class): Likewise.
1522         (tsubst_friend_function): Likewise.
1523         (instantiate_class_template): Likewise.
1524         (tsubst_decl): Likewise.
1525         (tsubst): Likewise.
1526         (instantiate_template): Likewise.
1527         (unify): Likewise.
1528         * rtti.c (get_tinfo_fn): Likewise.
1529         (build_dynamic_cast): Likewise.
1530         * semantics.c (finish_if_stmt_cond): Likewise.
1531         (finish_while_stmt_cond): Likewise.
1532         (finish_do_stmt): Likewise.
1533         (finish_for_cond): Likewise.
1534         (finish_for_expr): Likewise.
1535         (finish_cleanup): Likewise.
1536         (add_decl_stmt): Likewise.
1537         (finish_named_return_value): Likewise.
1538         (finish_qualified_call_expr): Likewise.
1539         * tree.c (perm_manip): Remove.
1540         (build_exception_variant): Don't use copy_to_permanent.
1541         (permanent_p): Remove.
1542         (copy_to_permament): Remove.
1543         (build_min_nt): Don't use copy_to_permanent.
1544         (build_min): Likewise.
1545         (min_tree_cons): Likewise.
1546         * typeckc.c (build_static_cast): Likewise.
1547         (build_reinterpret_cast): Likewise.
1548         (build_const_cast): Likewise.
1549         
1550 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
1552         * decl.c (ggc_p): Set it to 1.
1553         (mark_saved_scope): Add prototype.
1555 1999-09-07  Richard Henderson  <rth@cygnus.com>
1557         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
1558         * typeck.c (self_promoting_args_p): Delete.
1560 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
1562         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
1563         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
1565 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
1567         * Makefile.in (tree.o): Depend on ggc.h.
1568         * class.c (make_method_vec): Remove.
1569         (free_method_vec): Likewise.
1570         (free_method_vecs): Remove.
1571         (add_method): Don't use them.
1572         * cp-tree.def (PTRMEM_CST): Make it longer.
1573         (TEMPLATE_PARM_INDEX): Make it shorter.
1574         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
1575         (template_parm_index): Remove RTL field.
1576         (ptrmem_cst): Add RTL field.
1577         (finish_function): Removed parameter.
1578         (process_next_inline): Change prototype.
1579         (init_cplus_unsave): Rename to init_tree.
1580         (binding_init): Remove.
1581         * decl.c (free_binding_nodes): Remove.
1582         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
1583         (pop_binding): Don't use free_binding_nodes.
1584         (free_binding_vecs): Remove.
1585         (store_bindings): Don't use them.
1586         (pop_from_top_level): Likewise.
1587         (lookup_namespace_name): Simplify.
1588         (build_typename_type): Don't use obstack_free.
1589         (unqualified_namespace_lookup): Simplify.
1590         (lookup_name_real): Simplify.
1591         (start_function): Remove comment about leaks.
1592         (finish_function): Removed nested parameter.  Call
1593         expand_end_bindings even when building_stmt_tree.
1594         Call ggc_push_context and ggc_pop_context around
1595         rest_of_compilation, if necessary.
1596         (mark_cp_function_context): Handle a NULL language-context.
1597         (lang_mark_false_label_stack): Fix typo.
1598         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
1599         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
1600         pointer to method types.
1601         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
1602         * decl2.c (finish_objects): Adjust call to finish_function.
1603         (finish_static_store_duration_function): Likewise.
1604         (do_nonmember_using_decl): Remove call to binding_init.
1605         * except.c (end_anon_func): Adjust call to finish_function.
1606         * lex.c (mark_impl_file_chain): New function.
1607         (init_parse): Call init_tree, not init_cplus_unsave.
1608         Add GC roots.
1609         (cp_pramga_interface): Use xmalloc, not permalloc.
1610         (cp_pragma_implementation): Likewise.
1611         (begin_definition_of_inclass_inline): Simplify.
1612         (process_next_inline): Adjust prototype.
1613         (do_scoped_id): Don't call binding_init.
1614         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
1615         * method.c (emit_thunk): Adjust call to finish_function.
1616         (synthesize_method): Likewise.
1617         * parse.y (%union): Add a new `pi' variant.
1618         (PRE_PARSED_FUNCTION_DECL): Use it.
1619         (fn.defpen): Likewise.
1620         (fndef): Adjust call to finish_function.
1621         * pt.c (instantiate_decl): Likewise.
1622         * rtti.c (syntheisze_tinfo_fn): Likewise.
1623         * semantics.c (expand_body): Likewise.
1624         * tree.c: Include ggc.h.
1625         (mark_list_hash): New function.
1626         (binding_init): Remove.
1627         (init_cplus_unsave): Rename to ...
1628         (init_tree): This.  Add GC roots.
1629         
1630 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
1632         Get ready for garbage collection.
1633         * Makefile.in (CXX_TREE_H): Add varray.h
1634         (lex.o): Depend on ggc.h.
1635         (decl.o): Likewise.
1636         (decl2.o): Likewise.
1637         (method.o): Likewise.
1638         (search.o): Likewise.
1639         (pt.o): Likewise.
1640         (repo.o): Likewise.
1641         * class.c: Include ggc.h.
1642         (current_class_name): Remove.
1643         (current_class_type): Likewise.
1644         (current_access_specifier): Likewise.
1645         (previous_class_type): Likewise.
1646         (previous_class_values): Likewise.
1647         (class_cache_firstobj): Likewise.
1648         (current_lang_base): Likewise.
1649         (current_lang_stack): Likewise.
1650         (current_lang_stacksize): Likewise.
1651         (lang_name_c): Likewise.
1652         (lang_name_cplusplus): Likewise.
1653         (lang_name_java): Likewise.
1654         (current_lang_name): Likewise.
1655         (base_layout_decl): Likewise.
1656         (access_default_node): Likewise.
1657         (access_public_node): Likewise.
1658         (access_protected_node): Likewise.
1659         (access_private_node): Likewise.
1660         (access_default_virtual_node): Likewise.
1661         (access_public_virtual_node): Likewise.
1662         (access_protected_virtual_node): Likewise.
1663         (access_private_virtual_node): Likewise.
1664         (signed_zero_node): Likewise.
1665         (init_class_processing): Don't build base_layout_decl.
1666         (push_lang_context): Adjust now that current_lang_base is a varray.
1667         (pop_lang_context): Likewise.
1668         * cp-tree.h: Include varray.h.
1669         (cp_global_trees): Add access_default, access_public,
1670         access_protected, access_private, access_default_virtual,
1671         access_public_virtual, access_protected_virtual,
1672         access_private_virtual, ctor_identifier, delta2_identifier, 
1673         delta_identifier, dtor_identifier, in_charge_identifier,
1674         index_identifier, nelts_identifier, this_identifier,
1675         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
1676         lang_name_c, lang_name_cplusplus, lang_name_java,
1677         empty_except_spec, null, jclass, minus_one, terminate.
1678         (saved_scope): Move here from decl.c.  Define globals in terms of
1679         saved_scope: current_namespace, current_class_name,
1680         current_class_type, current_access_specifier, current_lang_stack,
1681         current_lang_base, current_lang_name, current_function_parms,
1682         current_template_parms, processing_template_decl,
1683         processing_specialization, processing_explicit_instantiation,
1684         previous_class_type, previous_class_values, class_cache_firstobj.
1685         (scope_chain): New variable.
1686         (init_pt): New function.
1687         * decl.c (current_namespace): Remove.
1688         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
1689         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
1690         (delta_identifier, delta2_identifier): Likewise.
1691         (pfn_or_delta2_identifier, tag_identifier): Likewise
1692         (vt_off_identifier, empty_except_spec, null_node): Likewise.
1693         (current_function_parms, current_lang_base): Remove.
1694         (current_lang_stack, previous_class_values): Remove.
1695         (class_binding_level): Macroize.
1696         (saved_scope): Remove.
1697         (current_saved_scope): Rename to scope_chain.
1698         (mark_saved_scope): Adjust for new scope structure.
1699         (maybe_push_to_top_level): Likewise.
1700         (pop_from_top_level): Likewise.
1701         (duplicate_decls): Adjust now that current_lang_base is a varray.
1702         (build_typename_type): Call ggc_add_tree_hash_table_root.
1703         (init_decl_processing): Call init_pt.  Call push_to_top_level to
1704         set up globals.  Add GC roots.
1705         (xref_basetypes): Adjust now that current_lang_base is a varray.
1706         * decl.h (this_identifier): Remove.
1707         (in_charge_identifier): Likewise.
1708         * decl2.c: Don't include varray.h.
1709         (current_namespace): Remove.
1710         (init_decl2): Add GC roots.
1711         * except.c (Terminate): Remove. 
1712         (init_exception_processing): Use terminate_node instead.
1713         (build_terminate_handler): Likewise.
1714         * init.c (nc_nelts_field_id): Remove.
1715         (minus_one): Likewise.
1716         (init_init_processing): Use minus_one_node and nelts_identifier
1717         instead.  Add GC roots.
1718         (jclass_node): Remove.
1719         (build_new_1): Use nelts_identifier.
1720         (build_vec_init): Likewise.
1721         (build_vec_delete): Likewise.
1722         * lex.c: Include ggc.h.
1723         (defarg_fn): Move declaration early.
1724         (defarg_parms): Likewise.
1725         (init_parse): Add GC roots.
1726         (handle_cp_pragma): Remove redundant declaration of
1727         pending_vtables.
1728         * method.c: Include ggc.h.
1729         (btypelist): Make it a varray.  All uses changed.
1730         (ktypelist): Likewise.
1731         (init_method): Add GC roots.
1732         * pt.c: Don't include varray.h.  Include ggc.h.
1733         (current_template_parms): Remove.
1734         (processing_template_decl): Likewise.
1735         (processing_specialization): Likewise.
1736         (processing_explicit_instantiation): Likewise.
1737         (init_pt): New function.
1738         * repo.c: Include ggc.h.
1739         (init_repo): Add GC roots.
1740         * search.c: Don't include varray.h.
1741         (_vptr_name): Remove.
1742         (lookup_field_1): Use vtpr_identifier instead.
1743         (expand_indirect_vtbls_init): Remove redundant declaration of
1744         in_charge_identifier.
1745         (init_search_processing): Use vptr_identifier.
1746         
1747 1999-09-05  Richard Henderson  <rth@cygnus.com>
1748             Bernd Schmidt <bernds@cygnus.co.uk>
1749             Mark Mitchell  <mark@codesourcery.com>
1751         * Makefile.in (parse.o): Depend on ggc.h.
1752         (decl2.o): Depend on ggc.h.
1753         (init.o): Depend on ggc.h.
1754         * cp-tree.h (init_decl2): Declare.
1755         (cp_parse_init): Likewise.
1756         * decl.c (ggc_p): Define to zero.
1757         (mark_saved_scope): New function.
1758         (init_decl_processing): Call cp_parse_init, and cp_decl2.
1759         Register GC roots.
1760         (expand_static_init): Add GC roots.
1761         * decl2.c: Include ggc.h.
1762         (init_decl2): New function.
1763         * init.c: Include ggc.h.
1764         (init_init_processing): Add GC roots.
1765         * parse.y: Include ggc.h.
1766         (cp_parse_init): New function.
1767         
1768 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
1770         * decl.c (init_decl_processing): Set mark_lang_status.
1771         (lang_mark_false_label_stack): Adjust prototype.
1772         * decl2.c (grok_function_init): Remove extraneous declaration of
1773         abort_fndecl.
1775         * Make-lang.in (cc1plus): Remove dependency on GGC.
1776         * Makefile.in (OBJS): Don't mention ggc-simple.o.
1777         (OBJDEPS): Don't mention ggc-simple.o.
1779         * Make-lang.in (cc1plus): Depend on $(GGC).
1780         * Makefile.in (OBJS): Add ggc-simple.o.
1781         (OBJDEPS): Likewise.
1782         * cp-tree.h (language_function): Rename members to `x_' versions;
1783         we now have x_named_labels, x_ctor_label, x_dtor_label,
1784         x_base_init_list, x_member_init_list, x_base_init_expr,
1785         x_current_class_ptr, x_current_class_ref, x_last_tree,
1786         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
1787         x_result_rtx. 
1788         (dtor_label, ctor_label, current_base_init_list,
1789         current_member_init_list, base_init_expr, current_class_ptr,
1790         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
1791         * decl.c: Include ggc.h.
1792         (last_dtor_insn): Adjust to use x_ names.
1793         (last_parm_cleanup_insn): Likewise.
1794         (original_result_rtx): Likewise.
1795         (named_labels): Likewise.
1796         (mark_binding_level): New function.
1797         (mark_cp_function_context): Likewise.
1798         (mark_false_label_stack): Likewise.
1799         (lang_mark_tree): Likewise.
1800         (lang_cleanup_tree): Likewise.
1801         
1802 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
1804         * Makefile.in (CXX_TREE_H): Include function.h.
1805         (decl.o): Don't depend on function.h.
1806         (decl2.o): Likewise.
1807         (typeck.o): Likewise.
1808         (init.o): Likewise.
1809         (method.o): Likewise.
1810         * cp-tree.h: Include function.h.
1811         (cp_function): Rename to language_function.  Remove next.
1812         (cp_function_chain): Make it a macro, not a variable.
1813         (push_cp_function_context): Don't declare.
1814         (pop_cp_function_context): Likewise.
1815         * decl.c: Don't include function.h.
1816         (push_cp_function_context): Make it static.  Make it suitable for
1817         a save_lang_status callback.
1818         (pop_cp_function_context): Likewise.
1819         (maybe_push_to_top_level): Call push_function_context_to, not
1820         push_cp_function_context.
1821         (pop_from_top_level): Call pop_function_context_from, not
1822         pop_cp_function_context.
1823         (init_decl_processing):  Set save_lang_status and
1824         restore_lang_status.  Call push_function_context_to, not
1825         push_cp_function_context.
1826         (cp_function_chain): Remove.
1827         * decl2.c: Don't include function.h.
1828         * except.c: Don't include function.h.
1829         (start_anon_func): Call push_function_context_to, not
1830         push_cp_function_context.
1831         (end_anon_func):  Call pop_function_context_from, not
1832         pop_cp_function_context.
1833         * init.c: Don't include function.h.
1834         * lex.c (begin_definition_of_inclass_inline): Call
1835         push_function_context_to, not push_cp_function_context. 
1836         (process_next_inline):  Call pop_function_context_from, not
1837         pop_cp_function_context.
1838         * method.c: Don't include function.h.
1839         (synthesize_method): Call push_function_context_to, not
1840         push_cp_function_context.  Call pop_function_context_from, not
1841         pop_cp_function_context.
1842         * typeck.c: Don't include function.h.
1843         
1844         * decl.c (expand_static_init): Tweak handling of static
1845         initializations for objects without constructors.
1847 1999-09-03  Nathan Sidwell  <nathan@acm.org>
1849         * typeck.c (build_indirect_ref): Reject dereference of pointer to
1850         void.
1852 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
1854         * cp-tree.h (cp_function): Move here, from decl.c.
1855         (cp_function_chain): Declare.
1856         (dtor_label): New macro, instead of variable.
1857         (ctor_label): Likewise.
1858         (current_base_init_list): Likewise.
1859         (current_member_init_list): Likewise.
1860         (base_init_expr): Likewise.
1861         (current_class_ptr): Likewise.
1862         (current_class_ref): Likewise.
1863         (last_tree): Likewise.
1864         (last_expr_type): Likewise.
1865         (current_function_returns_value): Likewise.
1866         (current_function_returns_null): Likewise.
1867         (current_function_just_assigned_this): Likewise.
1868         (current_function_parms_stored): Likewise.
1869         (temp_name_counter): Likewise.
1870         (static_labelno): Likewise.
1871         (expanding_p): Likewise.
1872         (stmts_are_full_exprs_p): Likewise.
1873         (in_function_try_handler): Likewise.
1874         (lang_type): Remove nested type_flags.  All uses changed.
1875         * call.c (ctor_label): Remove.
1876         (dtor_label): Likewise.
1877         * class.c (current_class_ptr): Remove.
1878         (current_class_ref): Likewise.
1879         * decl.c (static_labelno): Remove.
1880         (dtor_label): Likewise.
1881         (last_dtor_insn): New macro, instead of variable.
1882         (last_parm_cleanup_insn): Likewise.
1883         (original_result_rtx): Likewise.
1884         (in_function_try_handler): Remove.
1885         (named_label_uses): New macro, instead of variable.
1886         (named_labels): Likewise.
1887         (current_function_returns_value): Remove.
1888         (current_function_returns_null): Likewise.
1889         (current_function_assigns_this): New macro, instead of variable.
1890         (current_function_just_assigned_this): Likewise.
1891         (current_binding_level): Likewise.
1892         (init_decl_processing): Call push_cp_function_context.
1893         (cp_function): Move to cp-tree.h
1894         (cp_function_chain): Make it global.
1895         (temp_name_counter): Remove.
1896         (push_cp_function_context): Simplify.
1897         (pop_cp_function_context): Likewise.
1898         * decl2.c (temp_name_counter): Remove.
1899         * init_c (current_base_init_list): Likewise.
1900         (current_member_init_list): Likewise.
1901         (base_init_expr): Likewise.
1902         * method.c (static_labelno): Likewise.
1903         * pt.c (last_tree): Likewise.
1904         * semantics.c (expanding_p): Likewise.
1905         (stmts_are_full_exprs_p): Likewise.
1906         (last_expr_type): Likewise.
1907         * typeck.c (dtor_label): Likewise.
1908         (ctor_label): Likewise.
1909         
1910 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
1912         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
1913         (arg_assoc_class): Use arg_assoc_template_arg for template
1914         arguments. 
1915         (arg_assoc): Likewise.
1916         * pt.c (mangle_class_name_for_template): Allow member template
1917         template arguments.
1919 1999-09-02  Nathan Sidwell  <nathan@acm.org>
1921         * call.c (build_conditional_expr): Warn on enum mismatches.
1922         (convert_arg_to_ellipsis): Move non-pod check to after
1923         conversion.
1925 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1927         * gxx.gperf (hash, is_reserved_word): Add prototypes.
1929         * init.c (build_vec_init): Initialize variable `try_block'.
1931         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
1932         Likewise for bzero/memset.
1933         (token_getch, token_put_back): Add static prototypes.  Remove
1934         `inline' from the definitions.
1935         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
1937 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
1939         * cp-tree.h (lang_type): Move align into type_flags.
1940         (CLASSTYPE_ALIGN): Adjust accordingly.
1941         * call.c (direct_reference_binding): Remove misleading comment.
1943 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1945         * parse.y (language_string): Constify.
1947 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1949         * repo.c (getpwd): Don't prototype.
1950         * xref.c (getpwd): Likewise
1952 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1954         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
1955         Remove hacks for stuff which now comes from libiberty.
1957 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
1959         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
1961 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
1963         * cp-tree.h (begin_init_stmts): Declare.
1964         (finish_init_stmts): Likewise.
1965         * cvt.c (build_up_reference): Wrap the declaration of a temporary
1966         in a statement-expression so that we will see it when expanding
1967         tree structure later.
1968         * init.c (begin_init_stmts): Don't make it static.
1969         (finish_init_stmts): Likewise.
1971         * cp-tree.h (start_handler_parms): New function.
1972         (expand_start_catch_block): Take only one parameter.
1973         (start_handler_parms): New function.
1974         * decl.c (start_handler_parms): Define it.
1975         * except.c (process_start_catch_block): Take only one parameter.
1976         Don't call grokdeclarator here.
1977         (expand_start_catch_block): Don't call grokdeclarator here,
1978         either.
1979         * parse.y (handler_args): Adjust call to
1980         expand_start_catch_block.  Use start_handler_parms.
1981         * pt.c (push_template_decl_real): Make permanent lists have
1982         permanent elements.
1983         (tsubst_expr): Adjust calls to expand_start_catch_block
1984         appropriately.
1985         * semantics.c (expand_stmt): Likewise.
1986         
1987 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
1989         * pt.c (push_template_decl_real): Use template declaration from
1990         class type if it exists.
1992 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
1994         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
1995         (maybe_inject_for_scope_var): Declare it.
1996         (initialize_local_var): Likewise.
1997         * decl.c (maybe_inject_for_scope_var): Make it global.
1998         (initialize_local_var): Likewise.  Move cleanup handling here,
1999         from cp_finish_decl.
2000         (make_rtl_for_nonlocal_decl): Use
2001         push_obstacks_nochange/pop_obstacks, rather than
2002         end_temporary_allocation/resume_temporary_allocation.
2003         (cp_finish_decl): Try to complete the type of a variable when it
2004         is declared.  Move cleanup-handling to initialize_local_var.
2005         (expand_static_init): Use tree-building code, rather than
2006         RTL-building code.
2007         * decl2.c (get_temp_name): Assert non-initializedness of
2008         temporaries.
2009         * init.c (create_temporary_var): Move RTL-assigning code to ...
2010         (get_temp_regvar): Here.
2011         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
2012         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
2013         call initialize_local_var to generate initialization code.
2014         
2015 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2017         * cp-tree.h (fndecl_as_string, type_as_string,
2018         type_as_string_real, args_as_string, decl_as_string,
2019         expr_as_string, code_as_string, language_as_string,
2020         parm_as_string, op_as_string, assop_as_string, cv_as_string,
2021         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
2023         * errfn.c (cp_printer): Likewise.
2025         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
2026         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
2027         cp_file_of, code_as_string, language_as_string, parm_as_string,
2028         op_as_string, assop_as_string, args_as_string, cv_as_string):
2029         Likewise.
2031         * tree.c (lang_printable_name): Likewise.
2033 1999-08-28  Richard Henderson  <rth@cygnus.com>
2035         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
2037 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
2039         * cp-tree.h (strip_array_types): New function.
2040         * decl.c (maybe_deduce_size_from_array_init): New function, split
2041         out from cp_finish_decl.
2042         (layout_var_decl): Likewise.
2043         (maybe_commonize_var): Likewise.
2044         (maybe_inject_for_scope_var): Likewise.
2045         (initialize_local_var): Likewise.
2046         (build_cleanup_on_safe_obstack): Likewise.
2047         (check_initializer): Likewise.
2048         (make_rtl_for_nonlocal_decl): Likewise.
2049         (cp_finish_decl): Use them.
2050         * typeck.c (strip_array_types): New function.
2051         
2052         * cp-tree.def (LABEL_STMT): New tree node.
2053         * cp-tree.h (LABEL_STMT_LABEL): New macro.
2054         (shadow_label): Remove.
2055         (declare_local_label): New function.
2056         (finish_label_decl): Likewise.
2057         * decl.c (make_label_decl): New function, split out from
2058         lookup_label.
2059         (shadowed_labels): Remove.
2060         (binding_level): Add shadowed_labels.
2061         (clear_binding_level): Remove.
2062         (push_binding_level): Just bzero the new binding level.
2063         (pushlevel): Fix indentation.
2064         (pop_label): New function.
2065         (pop_labels): Likewise, split out from poplevel.
2066         (poplevel): Pop local labels.  Use pop_labels.
2067         (maybe_push_to_top_level): Don't clear shadowed_labels.
2068         (lookup_label): Use make_label_decl.
2069         (shadow_label): Remove.
2070         (declare_local_label): New function.
2071         (define_label): Simplify.
2072         (start_function): Don't clear shadowed_labels.
2073         (cp_function): Remove shadowed_labels.
2074         (push_cp_function_context): Don't save shadowed_labels.
2075         (pop_cp_function_context): Don't restore it.
2076         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
2077         * parse.y (label_decl): Use finish_label_decl.
2078         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
2079         declarations.
2080         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
2081         building_stmt_tree.
2082         (finish_label_decl): New function.
2083         (expand_stmt): Handle LABEL_STMTs and local label declarations.
2084         
2085 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
2087         * decl.c (lookup_label): Build labels on the permanent obstack
2088         when building statement trees.  Don't build RTL for labels when
2089         building statement trees.
2090         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
2091         building statement trees.
2092         (finish_label_stmt): Likewise.
2093         (expand_stmt): Adjust accordingly.
2094         * pt.c (tsubst_expr); Likewise.
2095         (do_decl_instantiation): Robustify.
2096         
2097         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
2098         * tree.c (build_cplus_new): Set it.
2099         * expr.c (cplus_expand_expr): Use it.
2100         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
2101         
2102         * decl.c (store_parm_decls): Reset immediate_size_expand.
2103         (finish_function): Likewise.
2104         
2105         * tree.c (cplus_unsave_expr_now): Don't return a value.
2107         * semantics.c (do_poplevel): Always initialize the return value.
2109 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
2111         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
2112         * tree.h (cplus_unsave_expr_now) : Same.
2114 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
2116         * decl.c (grokdeclarator): Amend comment.
2117         * except.c (expand_start_catch_block): Call push_template_decl for
2118         catch-block parameters.
2119         * method.c (synthesize_method): Build an empty compound statement
2120         for the body of a constructor.
2122 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
2124         * tree.c (cp_build_qualified_type_real): If we're asking for the
2125         same quals we already have, just return.
2127 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
2129         * cp-tree.def (SUBOBJECT): New tree node.
2130         * cp-tree.h (CLEANUP_P): New macro.
2131         (SUBOBJECT_CLEANUP): Likewise.
2132         (keep_next_level): Add parameter.
2133         (get_temp_regvar): Don't declare.
2134         (emit_base_init): Remove parameter.
2135         (expand_aggr_init): Rename to build_aggr_init.
2136         (expand_vec_init): Rename to build_vec_init.
2137         (do_pushlevel): Remove.
2138         (do_poplevel): Likewise.
2139         (finish_cleanup): New function.
2140         (finish_subobject): Likewise.
2141         (stmts_are_full_exprs_p): New variable.
2142         * decl.c (keep_next_level): Add parameter.
2143         (cp_finish_decl): Use build_aggr_init, not
2144         expand_aggr_init.  Use finish_expr_stmt to expand the code.
2145         (expand_static_init): Use tree-generating, not RTL-generating,
2146         functions to handle the initialization.
2147         (start_function): Remove dead code.  Always have a momentary
2148         obstack inside the function, even before hitting the first curly
2149         brace.
2150         (cplus_expand_expr_stmt): Move calls to
2151         expand_{start,end}_target_temps into semantics.c.
2152         (cp_function): Add stmts_are_full_exprs_p.
2153         (push_cp_function_context): Save it.
2154         (pop_cp_function_context): Restore it.
2155         * decl2.c (get_temp_regvar): Move to init.c.
2156         (do_static_initialization): Use build_{aggr,vec}_init.
2157         (do_static_destruction): Fix typo in comment.
2158         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
2159         * except.c (expand_throw): Use create_temporary_var.
2160         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
2161         * init.c (expand_vec_init_try_block): Remove.
2162         (expand_vec_init_catch_clause): Likewise.
2163         (get_temp_regvar): New function.
2164         (begin_init_stmts): Likewise.
2165         (finish_init_stmts): Likewise.
2166         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
2167         structure here.
2168         (emit_base_init): Likewise.  Remove unused parameter.
2169         (expand_virtual_init): Likewise.
2170         (expand_cleanup_for_base): Use finish_subobject.
2171         (expand_aggr_vbase_init_1): Simplify.
2172         (construct_virtual_bases): Use tree-generating functions to build
2173         up initialization.
2174         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
2175         (expand_default_init): Likewise.
2176         (expand_aggr_init_1): Likewise.
2177         (expand_vec_init): Rename to build_vec_init.
2178         * method.c (do_build_copy_constructor): Use tree-generating
2179         functions.  Don't call clear_last_expr.
2180         (do_build_assign_ref): Likewise.
2181         (synthesize_method): Call clear_last_expr here.
2182         * parse.y (base_init): Don't call clear_last_expr here.
2183         (nodecls): Likewise.
2184         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
2185         * semantics.c (do_pushlevel): Move to here.
2186         (do_poplevel): Likewise.
2187         (stmts_are_full_exprs_p): New variable.
2188         (finish_expr_stmt): Handle logic for temoprary cleanup here.
2189         (finish_for_stmt): Use finish_expr_stmt.
2190         (finish_cleanup): New function.
2191         (finish_function_try_block): Fix indentation.
2192         (finish_subobject): New function.
2193         (setup_vtbl_ptr): Call keep_next_level here.
2194         (finish_stmt_expr): Handle a block with no scope inside the
2195         statement-expression.
2196         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
2197         SUBOBJECT.
2198         * tree.c (search_tree): Handle INIT_EXPR.
2199         (mapcar): Likewise.
2200         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
2201         * typeck2.c (store_init_value): Change expand_aggr_init to
2202         build_aggr_init in comment.
2203         
2204 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
2206         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
2208 1999-08-25  Nathan Sidwell  <nathan@acm.org>
2210         * decl2.c (handle_class_head): Be graceful about additional
2211         scope qualifiers. Adjust comments to reflect reality.
2213 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
2215         * call.c (build_conditional_expr): Fix typo.
2216         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
2217         lvalue before trying to mess with the sides.
2219         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
2221 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
2223         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
2225 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
2227         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
2228         Return arbitrary pointer or NULL.
2229         (check_eh_spec): Call __throw_type_match_rtti_2.
2230         * tinfo.h (*::dcast): Return int.  Add valp parm.
2231         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
2232         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
2233         (__throw_type_match_rtti): Now just a wrapper.
2235         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
2236         (init_exception_processing): Don't initialize them.
2238 1999-08-23  Paul Burchard <burchard@pobox.com>
2240         * decl.c (check_default_argument): Fix typo.
2242 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
2244         * cp-tree.def (STMT_EXPR): Fix typo in node name.
2246         * dump.c (dump_next_stmt): New function.
2247         (dequeue_and_dump): Use it.
2248         
2249         * pt.c (tsubst_copy): Make sure to initialize return value for a
2250         STMT_EXPR, even when processing_template_decl.
2251         * semantics.c (finish_stmt_expr): A statement-expression whose
2252         last statement is not an expression-statement has type `void'.  
2253         
2254 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
2256         * semantics.c (finish_stmt_expr): Fix typo in comment.
2257         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
2258         (mapcar): Likewise.
2259         * init.c (build_vec_delete_1): Make the children of a permanent
2260         BIND_EXPR permanent.
2261         * pt.c (register_specialization): Don't register a specialization
2262         more than once.
2263         
2264 1999-08-18  Andrew Haley  <aph@cygnus.com>
2266         * method.c (process_overload_item): Call build_mangled_C9x_name ()
2267         for all integer parameter types larger than long long.
2269 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
2271         * pt.c (redeclare_class_template): Merge default template
2272         arguments in both directions.
2274         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
2275         compiler_error message.
2277 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
2279         * cp-tree.h: Declare flag_use_repository.
2280         * pt.c (do_decl_instantiation): Don't complain about duplicate
2281         instantiation with -frepo.
2282         (do_type_instantiation): Likewise.
2284         * pt.c (push_template_decl_real): Complain about everything
2285         that isn't a valid template.
2287         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
2288         affect inlines.
2290 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
2292         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
2293         * decl2.c (build_expr_from_tree): Handle it.
2294         * error.c (dump_expr): Likewise.
2295         * pt.c (for_each_template_parm): Likewise.
2296         (tsubst_copy): Likewise.
2297         * tree.c (search_tree): Likewise.
2298         * semantics.c (finish_pseudo_destructor_call): Create it.
2299         
2300 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
2302         * search.c (setup_class_bindings): Robustify.
2303         * typeck.c (common_type): Use same_type_p, not pointer equality,
2304         to compare types.
2306         * cp-tree.h (build_lang_field_decl): Remove.
2307         * class.c (build_vtable): Replace calls to build_lang_field_decl
2308         with build_lang_decl.
2309         (prepare_fresh_vtable): Likewise.
2310         (finish_struct_1): Likewise.
2311         (init_class_processing): Likewise.
2312         * decl.c (push_using_decl): Likewise.
2313         (init_decl_processsing): Likewise.
2314         (grokvardecl): Likewise.
2315         (build_ptrmemfunc_type): Likewise.
2316         (grokdeclarator): Likewise.
2317         (build_enumerator): Likewise.
2318         * decl2.c (grok_x_components): Likewise.
2319         (do_class_using_decl): Likewise.
2320         * except.c (call_eh_info): Likewise.
2321         * init.c (init_init_processing): Likewise.
2322         * rtti.c (expand_class_decl): Likewise.
2323         * tree.c (build_base_fields): Likewise.
2324         (build_vbase_pointer_fields): Likewise.
2325         * lex.c (build_lang_decl): Build declarations on the permanent
2326         obstack if we're building statmeent trees.
2327         (retrofit_lang_decl): Handle both the full lang_decl and also the
2328         smaller lang_decl_flags here.
2329         (build_lang_field_decl): Remove.
2330         * pt.c (push_template_decl_real): Issue errors for variable
2331         declarations that are not static members.
2333 1999-08-18  Richard Henderson  <rth@cygnus.com>
2335         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
2336         (mapcar): Likewise.
2338 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
2340         * cp-tree.h (back_end_hook): New variable.
2341         * decl2.c (back_end_hook): Define it.
2342         (finish_file): If it's non-NULL, call it.
2344         * decl.c (add_decl_to_level): New function.
2345         (push_local_binding): Use it.
2346         (find_binding): Fix typo in comment.
2347         (pushdecl): Use add_decl_to_level.  Put templates on the
2348         corresponding namespace-scope binding levels.
2349         * dump.c (dequeue_and_dump): Print the specializations of a
2350         template.
2351         * pt.c (push_template_decl_real): Don't push a template multiple
2352         times.
2354 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
2356         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
2357         (CALL_DECLARATOR_QUALS): Likewise.
2358         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
2359         * decl.c (grokdeclarator): Adjust to use them.
2360         * decl2.c (grokfield): Likewise.
2361         (reparse_absdcl_as_casts): Likewise.
2362         * lex.c (make_call_declarator): Likewise.
2363         (set_quals_and_spec): Likewise.
2364         * pt.c (tsubst): Likewise.
2365         * tree.c (mapcar): Remove special hack to handle third operand of
2366         a CALL_EXPR.
2368 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
2370         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
2371         * class.c (build_vtable): Use build_lang_field_decl to build the
2372         VAR_DECLs for vtables.
2373         (prepare_fresh_vtable): Likewise.
2374         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
2375         CAN_HAVE_FULL_LANG_DECL_P.
2376         (push_using_decl): Use build_lang_decl to build USING_DECLs.
2377         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
2378         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
2379         (build_lang_field_decl): Likewise.
2380         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
2381         to copy.
2382         
2383         * cp-tree.def (STMT_EXPR): New tree node.
2384         * cp-tree.h (STMT_EXPR_STMT): New macro.
2385         (store_return_init): Change prototype.
2386         (finish_named_return_value): New function.
2387         (expand_stmt): Likewise.
2388         (expand_body): Likewise.
2389         (begin_stmt_tree): Likewise.
2390         (finish_stmt_tree): Likewise.
2391         (expanding_p): New variable.
2392         (last_expr_type): Likewise.
2393         (building_stmt_tree): New macro.
2394         * decl.c (start_function): Use building_stmt_tree, not
2395         processing_template_decl, where appropriate.
2396         (store_parm_decls): Likewise.
2397         (store_return_init): Move most of the body to semantics.c.
2398         (finish_function): Use building_stmt_tree.
2399         (finish_stmt): Clear last_expr_type here.
2400         (cp_function): Add expanding_p, last_tree, last_expr_type.
2401         (push_cp_function_context): Save them.
2402         (pop_cp_function_context): Restore them.
2403         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
2404         * error.c (dump_expr): Handle STMT_EXPR.
2405         * except.c (expand_start_catch_block): Use building_stmt_tree.
2406         Use add_decl_stmt.
2407         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
2408         (do_case): Move add_tree call to semantics.c.
2409         * parse.y (return_init): Use finish_named_return_value.
2410         (for.init.statement): Use finish_expr_stmt.
2411         * parse.c: Regenerated.
2412         * pt.c (do_pushlevel): Move to semantics.c.
2413         (do_poplevel): Likewise.
2414         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
2415         (tsubst_expr): Don't expand all the way to RTL here.  Handle
2416         RETURN_INIT and CTOR_INITIALIZER.
2417         (instantiate_decl): Call expand_body after tsubst'ing into
2418         DECL_SAVED_TREE.
2419         * semantics.c (expand_stmts): New function.
2420         (expanding_p): New variable.
2421         (last_expr_type): Likewise.
2422         (finish_expr_stmt): Use building_stmt_tree.
2423         (begin_if_stmt): Likewise.
2424         (finish_if_stmt_cond): Likewise.
2425         (finish_then_clause): Likewise.
2426         (begin_else_clause): Likewise.
2427         (finish_else_clause): Likewise.
2428         (begin_while_stmt): Likewise.
2429         (finish_while_stmt_cond): Likewise.
2430         (finish_while_stmt): Likewise.
2431         (finish_do_body): Likewise.
2432         (finish_do_stmt): Likewise.
2433         (finish_return_stmt): Likewise.
2434         (begin_for_stmt): Likewise.
2435         (fnish_for_init_stmt): Likewise.
2436         (finish_for_cond): Likewise.
2437         (finish_for_expr): Likewise.
2438         (finish_for_stmt): Likewise.
2439         (finish_break_stmt): Likewise.
2440         (finish_continue_stmt): Likewise.
2441         (finish_switch_cond): Likewise.
2442         (finish_switch_stmt): Likewise.
2443         (finish_case_label): Call add_tree here if necessary.
2444         (finish_goto_statement): Use building_stmt_tree.
2445         (begin_try_block): Likewise.
2446         (begin_function_try_block): Likewise.
2447         (finish_try_block): Likewise.
2448         (finish_function_try_block): Likewise.
2449         (finish_handler_sequence): Likewise.
2450         (finish_function_handler_sequence): Likewise.
2451         (begin_handler): Likewise.
2452         (finish_handler_parms): Likewise.
2453         (finish_handler): Likewise.
2454         (begin_compound_stmt): Likewise.
2455         (finish_compound_stmt): Likewise.
2456         (finish_asm_stmt): Likewise.
2457         (finish_label_stmt): Likewise.
2458         (finish_named_return_value): New function.
2459         (setup_vtbl_ptr): Moved here from decl2.c.
2460         (do_pushlevel): Moved here from pt.c.
2461         (do_poplevel): Likewise.
2462         (begin_stmt_expr): Use building_stmt_tree.
2463         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
2464         when building_stmt_tree.
2465         (begin_stmt_tree): New function.
2466         (finish_stmt_tree): Likewise.
2467         (expand_stmt): Likewise.
2468         (expand_body): Likewise.
2469         * tree.c (build_cplus_method_type): Make sure the argument types
2470         end up on the same obstack as the METHOD_TYPE.
2471         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
2472         THROW_EXPR, STMT_EXPR.
2473         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
2474         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
2475         sorry, if an unsupported node is encountered.
2476         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
2477         (c_expand_return): Don't call add_tree here.
2478         
2479 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
2481         * pt.c (check_default_tmpl_args): Don't check in local scopes.
2482         (tsubst_decl): Make sure the declaration is on a saveable
2483         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
2484         variable.
2485         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
2486         
2487 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
2489         Speed up Koenig lookup.
2490         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
2491         to return namespaces we've looked at.
2492         * decl2.c (lookup_using_namespace): Likewise.
2493         (add_function): Don't call ovl_member.
2494         (lookup_arg_dependent): Initialize k.namespaces to the list of 
2495         namespaces seen in unqualified lookup.
2496         * call.c (equal_functions): Move here from tree.c.
2497         (joust): Use it to handle duplicate candidates.
2498         * tree.c (ovl_member): Use ==.
2500 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
2502         * cp-tree.def (DECL_STMT): Make it smaller.
2503         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
2504         (lang_decl): ... here.  Add next.
2505         (DECL_SAVED_TREE): Adjust accordingly.
2506         (DECL_IMPLICIT_TYPEDEF_P): New macro.
2507         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
2508         (DECL_STMT_DECL): Likewise.
2509         (create_implicit_typedef): New function.
2510         (maybe_push_decl): Likewise.
2511         (tsubst_default_argument): New function.
2512         (at_function_scope_p): Likewise.
2513         (add_decl_stmt): Likewise.
2514         (push_permanent_obstack): Likewise.
2515         * call.c (convert_default_arg): Use tsubst_default_argument.
2516         * class.c (add_method): Use push_permanent_obstack.
2517         (build_self_reference): Create a TEMPLATE_DECL for the
2518         self-reference, if necessary.
2519         * decl.c (pseudo_global_level_p): Only look at the current binding
2520         level.
2521         (push_binding): Use push_permanent_obstack.
2522         (create_implicit_typedef): New function.
2523         (pushtag): Use it.
2524         (duplicate_decls): Use push_permanent_obstack.
2525         (maybe_push_decl): New function.
2526         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
2527         (start_decl_1): Remove dead code.
2528         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
2529         pseudo_global_level_p.
2530         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
2531         template.
2532         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
2533         pseudo_global_level_p.
2534         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
2535         a template.
2536         (get_sentry): Use push_permanent_obstack.
2537         * dump.c (dequeue_and_dump): Enable DECL_STMT.
2538         * except.c (call_eh_info): Use push_permanent_obstack.
2539         (build_eh_type_ref): Likewise.
2540         (do_pop_exception): Likewise.
2541         (expand_eh_spec): Likewise.
2542         (alloc_eh_object): Likewise.
2543         (expand_throw): Likewise.
2544         * init.c (build_java_class_ref): Likewise.
2545         * lex.c (get_time_identifier): Likewise.
2546         (free_lang_decl_chain): Correct type.
2547         (retrofit_lang_decl): Adjust accordingly.
2548         (build_lang_field_decl): Likewise.
2549         * lex.h (free_lang_decl_chain): Likewise.
2550         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
2551         * parse.c: Regenerated.
2552         * pt.c (tsubst_default_arguments): New function.
2553         (retrieve_local_specialization): Likewise.
2554         (register_local_specialization): Likewise.
2555         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
2556         pseudo_global_level_p to determine whether or not a template is
2557         primary.
2558         (lookup_template_class): Likewise.  Use create_implicit_typedef.
2559         (instantiate_class_template): Call tsubst_default_arguments for
2560         member functions, if appropriate.
2561         (tsubst_default_argument): New function.
2562         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
2563         * search.c (at_function_scope_p): New function.
2564         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
2565         (finish_label_stmt): Likewise.
2566         (add_decl_stmt): New function.
2567         (begin_class_definition): Likewise.
2568         (finish_typeof): Likewise.
2569         * tree.c (copy_template_template_parm): Likewise.
2570         (copy_to_permanent): Likewise.
2571         (push_permanent_obstack): Define.
2572         (mark_addressable): Use it.
2573         * typeck.c (mark_addressable): Likewise.
2574         
2575 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
2577         * cp-tree.h (init_cplus_unsave): New.
2578         (cplus_unsave_expr_now): New.
2579         * lex.c (init_parse): Call init_cplus_unsave.
2580         * tree.c (init_cplus_unsave): New.
2581         (cplus_unsave_expr_now): New.
2583 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
2585         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
2586         decl_constant_value to simplify array bounds.
2588 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
2590         * lang-options.h: Add -fms-extensions.
2591         * cp-tree.h: Declare flag_ms_extensions.
2592         * decl2.c: Define it.
2593         * class.c (instantiate_type): Don't complain about taking the address
2594         of a bound member function if -fms-extensions.
2595         * typeck.c (build_unary_op): Likewise.
2596         * decl.c (grokdeclarator): Or about implicit int.
2597         * init.c (resolve_offset_ref): Or about implicit '&'.
2599 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
2601         * cp-tree.h (minimal_parse_mode): Remove.
2602         (finish_label_stmt): New function.
2603         * decl.c (saved_scope): Remove minimal parse mode.
2604         (maybe_push_to_top_level): Don't save it.
2605         (pop_from_top_level): Don't restore it.
2606         (define_label): Split out template-handling code to semantics.c.
2607         (start_decl): Don't use minimal_parse_mode.
2608         (cp_finish_decl): Likewise.
2609         (start_function): Don't increment it.
2610         (store_return_init): Don't use it.
2611         (finish_function): Don't decrement it.
2612         * parse.y (label_colon): Use finish_label_stmt throughout.
2613         * parse.c: Regenerated.
2614         * pt.c (minimal_parse_mode): Don't define it.
2615         (tsubst_expr): Use finish_label_stmt.
2616         * semantics.c (finish_label_stmt): New function.
2618         * dump.c (queue): Be careful when computing bitmasks.
2619         (dequeue_and_dump): Describe binfos as binfos, not as
2620         vectors.
2621         
2622         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
2623         throughout.     
2624         * parse.c: Regenerated.
2625         
2626         * Make-lang.in (CXX_SRCS): Remove sig.c.
2627         * Makefile.in (CXX_OBJS): Remove sig.o.
2628         (sig.o): Remove.
2629         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
2630         (CPTI_SIGNATURE_TYPE): Likewise.
2631         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
2632         (opaque_type_node): Likewise.
2633         (signature_type_node): Likewise.
2634         (sigtable_entry_type): Likewise.
2635         (flag_handle_signatures): Likewise.
2636         (lang_type): Remove is_signature, is_signature_pointer,
2637         is_signature_reference, has_opaque_typedecls,
2638         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
2639         signature_pointer_to, signature_reference_to.
2640         (IS_SIGNATURE): Remove.
2641         (SET_SIGNATURE): Remove.
2642         (CLEAR_SIGNATURE): Remove.
2643         (IS_SIGNATURE_POINTER): Remove.
2644         (IS_SIGNATURE_REFERENCE): Remove.
2645         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
2646         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
2647         (CLASSTYPE_SIGNATURE): Remove.
2648         (SIGNATURE_TYPE): Remove.
2649         (SIGNATURE_METHOD_VEC): Remove.
2650         (SIGNATURE_POINTER_TO): Remove.
2651         (SIGNATURE_REFERENCE_TO): Remove.
2652         (lang_decl_flags): Remove is_default_implementation.  Rename
2653         memfunc_pointer_to to saved_tree.
2654         (IS_DEFAULT_IMPLEMENTATION): Remove.
2655         (DECL_MEMFUNC_POINTER_TO): Remove.
2656         (DECL_MEMFUNC_POINTING_TO): Remove.
2657         (DECL_SAVED_TREE): Adjust definition.
2658         (tag_types): Remove signature_type_node.
2659         (SIGNATURE_FIELD_NAME): Remove.
2660         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
2661         (SIGNATURE_OPTR_NAME): Likewise.
2662         (SIGNATURE_SPTR_NAME): Likewise.
2663         (SIGNATURE_POINTER_NAME): Likewise.
2664         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
2665         (SIGNATURE_REFERENCE_NAME): Likewise.
2666         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
2667         (SIGTABLE_PTR_TYPE): Likewise.
2668         (SIGTABLE_NAME_FORMAT): Likewise.
2669         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
2670         (SIGTABLE_TAG_NAME): Likewise.
2671         (SIGTABLE_VB_OFF_NAME): Likewise.
2672         (SIGTABLE_VT_OFF_NAME): Likewise.
2673         (finish_base_specifiers): Change prototype.
2674         (build_signature_pointer_type): Remove.
2675         (build_signature_reference_type): Remove.
2676         (build_signature_pointer_constructor): Remove.
2677         (build_signature_method_call): Remove.
2678         (build_optr_ref): Likewise.
2679         (append_signature_fields): Likewise.
2680         (signature_error): Likewise.
2681         * call.c (build_this): Remove signature support.
2682         (build_over_call): Likewise.
2683         (build_new_method_call): Likewise.
2684         * class.c (add_implicitly_declared_members): Likewise.
2685         (finish_struct_1): Likewise.
2686         (finish_struct): Likewise.
2687         * cvt.c (cp_convert_to_pointer): Likewise.
2688         (convert_to_pointer_force): Likewise.
2689         (ocp_convert): Likewise.
2690         * decl.c (sigtable_decl_p): Remove.
2691         (init_decl_processing): Remove support for signatures.
2692         (cp_finish_decl): Likewise.
2693         (grokdeclarator): Likewise.
2694         (grokparms): Likewise.
2695         (xref_tag): Likewise.
2696         (start_function): Likewise.
2697         (start_method): Likewise.
2698         * decl2.c (finish_sigtable_vardecl): Remove.
2699         (flag_handle_signatures): Remove.
2700         (lang_f_options): Remove handle-signatures.
2701         (grokfield): Remove support for signatures.
2702         (grokbitfield): Likewise.
2703         (finish_file): Likewise.
2704         (reparse_absdcl_as_casts): Likewise.
2705         * error.c (dump_type_real): Likewise.
2706         (dump_function_decl): Likewise.
2707         * friend.c (make_friend_class): Likewise.
2708         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
2709         * hash.h: Regenerated.
2710         * init.c (build_new_1): Remove support for signatures.
2711         * lang-options.h: Remove -fhandle-signatures,
2712         -fno-handle-signatures. 
2713         * lex.c (init_parse): Remove support for signatures.
2714         (yyprint): Likewise.
2715         * lex.h (rid): Remove RID_SIGNATURE.
2716         * method.c (build_decl_overload_real): Remove support for
2717         signatures. 
2718         (hack_identifier): Likewise.
2719         * parse.y (base_class): Likewise.
2720         (base_class.1): Likewise.
2721         (access_specifier): Likewise.
2722         * search.c (lookup_member): Likewise.
2723         * semantics.c (finish_qualified_object_call_expr): Likewise.
2724         (finish_template_type_parm): Likewise.
2725         (begin_class_definition): Likewise.
2726         (finish_base_specifier): Likewise.
2727         * sig.c: Remove.
2728         * tree.c (build_cplus_method_type): Remove support for signatures.
2729         * typeck.c (require_complete_type): Likewise.
2730         (c_sizeof): Likewise.
2731         (c_alignof): Likewise.
2732         (build_object_ref): Likewise.
2733         (build_component_ref): Likewise.
2734         (build_indirect_ref): Likewise.
2735         (build_c_cast): Likewise.
2736         (build_modify_expr): Likewise.
2737         (convert_for_initialization): Likewise.
2738         * typeck2.c (signature_error): Remove.
2739         (store_init_value): Remove support for signatures.
2740         (digest_init): Likewise.
2741         (build_x_arrow): Likewise.
2742         (build_functional_cast): Likewise.
2743         * xref.c (GNU_xref_decl): Likewise.
2744         
2745 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
2747         * lex.c (do_identifier): Remove unnecessary lookup of class field.
2749 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
2751         * decl2.c (set_decl_namespace): Do not complain about non-matching
2752         decls if processing a template.
2754 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
2756         * decl.c (build_ptrmemfunc_type): Handle qualified
2757         pointer-to-member types here.
2758         * tree.c (cp_build_qualified_type_real): Simplify handling here.
2760 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2762         * lex.c (lang_identify): Likewise.
2764 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
2766         * Makefile.in: Update dependencies.
2767         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
2768         NULL_RTX.
2769         * decl.c: Include "function.h"
2770         (cleanup_label, return_label): Delete declarations.
2771         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
2772         (finish_function): Rename last_parm_insn variable to
2773         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
2774         * decl2.c: Include "function.h".
2775         (rtl_expr_chain): Delete declaration.
2776         * method.c: Include "function.h"
2777         * tree.c (build_vbase_pointer_fields): Don't initialize
2778         DECL_SAVED_INSNS with NULL_RTX.
2779         * typeck.c: Include "function.h"
2781 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
2783         * semantics.c (begin_function_try_block, finish_function_try_block,
2784         finish_function_handler_sequence): New fns.
2785         * parse.y (function_try_block): Use them.
2786         * pt.c (instantiate_decl): Likewise.
2788         * cp-tree.h: Declare in_function_try_handler.
2789         * decl.c: Define it.
2790         (start_function): Clear it.
2791         (struct cp_function, push_cp_function_context): Save it.
2792         (pop_cp_function_context): Restore it.
2793         * parse.y (function_try_block): Set and clear it.
2794         * except.c (expand_end_catch_block): Rethrow if we reach the end
2795         of a function-try-block handler in a ctor or dtor.
2796         * typeck.c (c_expand_return): Complain about returning from a
2797         function-try-block handler of a ctor.
2799         * parse.y (function_try_block): Call end_protect_partials
2800         before expand_start_all_catch.
2802 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
2804         * decl.c (struct binding_level): Add eh_region field.
2805         (push_binding_level): Set it.
2806         (define_label): Complain about jumping into an EH block.
2808         * ptree.c (print_lang_type): Print the real type of a PMF.
2809         Print what exceptions a fn type throws.
2811 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2813         * class.c (count_fields, add_fields_to_vec): Add static prototype.
2815         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
2816         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
2817         char*.
2819         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
2820         Constify a char*.
2822         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
2823         char*.
2825         * dump.c (queue_and_dump_index, dump_int, dump_string,
2826         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
2827         a char*.
2828         (dump_stmt): Add static prototype.
2830         * errfn.c (cp_thing): Constify a char*.
2832         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
2833         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
2834         dump_expr): Constify a char*.
2836         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
2837         read_line_number): Add static prototype.
2838         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
2839         (real_yylex): Move label `letter' into the scope where it is used.
2841         * method.c (build_mangled_template_parm_index, build_overload_int,
2842         build_decl_overload_real, get_id_2): Constify a char*.
2844         * search.c (check_final_overrider): Make static.
2846         * typeck.c (composite_pointer_type): Constify a char*.
2848 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
2850         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
2851         we're looking at a class.
2853         * decl.c (lookup_name_real): Set the complain flag if we're
2854         looking for a namespace member.
2856         * lex.c (real_yylex): We can have a number with no digits.
2858         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
2860         * search.c (binfo_from_vbase): New fn.
2861         * cp-tree.h: Declare it.
2862         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
2863         from pointer to member of virtual base.  
2864         * typeck.c (get_delta_difference): Likewise.
2866 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
2868         * pt.c (tsubst): Use build_index_type to build in-template array
2869         index type.  Fixes g++.oliva/dwarf1.C.
2870         * decl.c (grokdeclarator): Likewise, just for consistency, as it
2871         doesn't seem to trigger the bug without it.
2873 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
2875         * typeck2.c (add_exception_specifier): Use complete_type.
2877 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
2879         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
2880         (dump_binary_op): Bulletproof.
2881         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
2882         * tree.c (search_tree): Don't enumerate all the nodes of classes
2883         `1', `2', and `<'; handle them generically.  Don't be sorry about
2884         "unrecognized tree codes"; just abort.
2885         (no_linkage_check): Don't do linkage checks for templates.
2886         
2887         * tree.c (cp_build_qualified_type_real): Handle
2888         pointer-to-member-function types correctly.
2890 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
2892         * decl.c (pushdecl): Only give an error for shadowing a parm 
2893         from *this* function.
2895 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
2897         * typeck2.c: Update URLs and mail addresses.
2899 1999-08-04  Nathan Sidwell  <nathan@acm.org>
2901         * cp-tree.h (empty_except_spec): New global var.
2902         (compexcepttypes): Remove prototype.
2903         (comp_except_specs): Prototype new global function.
2904         (add_exception_specifier): Prototype new global function.
2905         * decl.c (empty_except_spec): Define new global var.
2906         (duplicate_decls): Use comp_except_specs, reword error message.
2907         (init_decl_processing): Initialize empty_except_spec.
2908         Adjust build_exception_variant calls.
2909         * parse.y (exception_specification_opt): Use empty_except_spec.
2910         (ansi_raise_identifier): Call check_for_new_type.
2911         (ansi_raise_identifiers): Use add_exception_specifier.
2912         * pt.c (tsubst): Use add_exception_specifier to build exception
2913         specifier.
2914         * search.c (check_final_overrider): New static function, broken
2915         out of get_matching_virtual. Check throw specifiers, reword
2916         diagnostics.
2917         (get_matching_virtual): Use check_final_overrider.
2918         * tree.c (build_exception_variant): Use comp_except_specs.
2919         * typeck.c (compexcepttypes): Remove.
2920         (comp_except_types): New static function, helper for
2921         comp_except_specs. Compare two types as exception specifiers.
2922         (comp_except_specs): New global function, compare two exception
2923         specifiers.
2924         (comptypes): Adjust for comp_except_specs.
2925         * typeck2.c (add_exception_specifier): New global function.
2926         
2927         * class.c (check_for_override): Reword error message.
2929 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2931         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
2932         * cp-tree.h (struct lang_type): Added non_pod_class flag.
2933         (CLASSTYPE_NON_POD_P): New macro to access it.
2934         * class.c (finish_struct_1): Determine non-PODness.
2935         Check for arrays of pointers (-Weffc++).
2936         Remove array inspection duplicated code.
2937         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
2938         Use CLASSTYPE_NON_POD_P.
2940 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2942         * class.c (duplicate_tag_error): Preserve template information.
2944 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2946         * decl.c (start_enum): Show location of previous definition.
2947         * parse.y (enumlist_opt): New reduction.
2948         (structsp): Simplify enum rules to use enumlist_opt.
2950 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
2952         * lex.c (yyprint): Handle PFUNCNAME.
2954         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
2955         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
2957 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
2959         * decl.c (start_decl): Set attributes before duplicate_decls call.
2961 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
2963         * Make-lang.in (CXX_SRCS): Add dump.c.
2964         * Makefile.in (CXX_OBJS): Add dump.o.
2965         (dump.o): New target.
2966         * cp-tree.h (DECL_CONV_FN_P): Document.
2967         (DECL_OVERLOADED_OPERATOR_P): New function.
2968         (TYPE_PTRMEM_CLASS_TYPE): New macro.
2969         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2970         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
2971         (ASM_VOLATILE_P): New macro.
2972         (STMT_LINENO): Likewise.
2973         (cp_namespace_decls): New function.
2974         (dump_node_to_file): New function.
2975         * decl.c (cp_namespace_decls): New function.
2976         (walk_namespaces_r): Use it.
2977         (wrapup_globals_for_namespace): Likewise.
2978         * decl2.c (flag_dump_translation_unit): New variable.
2979         (lang_decode_option): Handle -fdump-translation-unit.
2980         (finish_file): If flag_dump_translation_unit is set, dump the
2981         translation unit.
2982         * dump.c: New file.
2983         * lang-options.h: Add -fdump-translation-unit.
2984         * pt.c (tsubst_template_parms): Robustify.
2985         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
2986         (tsubst_expr): Use STMT_LINENO.
2987         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
2988         for invalid cv-qualifiers even while building templates.
2989         
2990 1999-08-02  Richard Henderson  <rth@cygnus.com>
2992         * call.c: Include defaults.h instead of expr.h.
2993         * decl.c: Likewise.
2994         * pt.c: Likewise.
2995         * typeck.c: Include defaults.h.
2997 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
2999         * lex.c (errorcount, sorrycount): Don't declare.
3000         * repo.c (errorcount, sorrycount): Likewise.
3001         * typeck2.c (errorcount, sorrycount): Likewise.
3003 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
3005         * call.c (convert_default_arg, build_over_call): Change all uses of
3006         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
3007         Ensure expr.h is included.
3008         * decl.c (grokparams): Ditto.
3009         * pt.c (tsubst_decl): Ditto.
3010         * typeck.c (convert_arguments): Ditto.
3012 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
3014         * class.c (mark_overriders): Fix order of args to overrides.
3015         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
3016         functions with the same name.
3018 1999-08-02  Richard Henderson  <rth@cygnus.com>
3020         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
3022 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
3024         * call.c (build_conditional_expr): Fix typo in comment.
3026 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
3028         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
3029         case_stack; use in_control_zone_p.
3030         * typeck.c (c_expand_return): Likewise.
3032 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
3034         * except.c (catch_clauses): Delete declaration.
3036 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
3038         * call.c (build_conditional_expr): Call convert_from_reference to
3039         avoid reference/non-reference type confusion.  Fix typo.
3041 1999-07-30  Richard Henderson  <rth@cygnus.com>
3043         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
3044         * cp-tree.h (initializer_constant_valid_p): Remove.
3046 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
3048         * call.c (conditional_conversion): Don't build BASE_CONVs for
3049         conversions between things that have the same type.
3050         (build_conditional_expr): Tweak.
3051         (convert_like): Some BASE_CONVs really do require the generation
3052         of code.
3053         
3054         * init.c (perform_member_init): Don't go through build_modify_expr
3055         for simple initializations.
3057 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
3059         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
3060         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
3061         virtual functions and MI.  Simplify.
3063         * method.c: Remove prototype for largest_union_member.
3064         * pt.c (determine_specialization): Fix uninitialized warning.
3065         * lex.c (real_yylex): Likewise.
3067 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
3069         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
3070         here too.
3072         * cp-tree.h (BINFO_VIRTUALS): Document new format.
3073         * class.c (modify_one_vtable): Change prototype accordingly.
3074         (modify_all_vtables): Likewise.
3075         (modify_all_direct_vtables): Likewise.
3076         (modify_all_indirect_vtables): Likewise.
3077         (build_vtable_entry_for_fn): New function.
3078         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
3079         (modify_vtable_entry): Likewise.
3080         (add_virtual_function): Likewise.
3081         (build_vtbl_initializer): New function.
3082         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
3083         (fixup_vtable_deltas1): Likewise.
3084         (fixup_vtable_deltas): Likewise.
3085         (override_one_vtable): Likewise.
3086         (finish_struct_1): Likewise.
3088         * error.c (dump_expr): Likewise.
3089         * search.c (get_abstract_virtuals_1): Likewise.
3090         (get_abstract_virtuals): Likewise.
3091         (expand_upcast_fixups): Likewise.
3092         * tree.c (debug_binfo): Likewise.
3093         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
3094         __pure_virtual here.
3095         
3096 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
3098         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
3099         as per 1999-07-26 change.
3101         * typeck.c (c_sizeof): Don't allow non-static data members.
3102         (expr_sizeof): Likewise.
3104 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
3106         * input.c (feed_input): Only touch lineno and input_filename
3107         if !USE_CPPLIB.  Save the old values before setting the new ones.
3109         * input.c (feed_input): Add file, line parms.
3110         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
3111         (real_yylex): Check linemode before input_redirected().
3113         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
3114         from op new to warning.
3116 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
3118         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
3119         * call.c: All uses changed.
3120         * typeck.c: Likewise.
3122 1999-07-26  Nathan Sidwell  <nathan@acm.org>
3124         * exception.cc (__cplus_type_matcher): Match __eh_matcher
3125         prototype.
3127 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
3129         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
3130         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
3131         (strip_top_quals): Declare.
3132         (ncp_convert): Likewise.
3133         (type_after_usual_arithmetic_converions): Likewise.
3134         (composite_pointer_type): Likewise.
3135         * call.c (strip_top_quals): Don't make it static.
3136         (promoted_arithmetic_type_p): New function.
3137         (conditional_conversion): Likewise.
3138         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
3139         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
3140         for converting a type to itself.
3141         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
3142         (implicit_conversion): Make sure the from and to types are
3143         complete.
3144         (add_builtin_candidate): Correct handling of ?: operator.
3145         (add_builtin_candidates): Improve documentation.
3146         (build_conditional_expr): New function.
3147         (can_convert): Implement in terms of can_convert_arg.
3148         (ncp_convert): New function.
3149         * typeck.c (type_after_usual_arithmetic_conversions): New
3150         function, split out from common_type.
3151         (composite_pointer_type): New function, split out from
3152         build_conditional_expr.
3153         (common_type): Use type_after_usual_arithmetic_conversions.
3154         Remove redundant attribute merging.
3155         (comptypes): Tidy.  Handle COMPLEX_TYPE.
3156         (build_binary_op_nodefault): Use null_ptr_cst_p.
3157         (build_conditional_expr): Remove.
3158         (convert_for_assignment): Use new conversion functions.
3159         
3160         * cp-tree.h (abstract_virtuals_error): Change declaration.
3161         * typeck2.c (abstract_virtuals_error): Check to see if an error
3162         ocurred, and return a boolean value accordingly.
3163         (build_functional_cast): Adjust accordingly.
3164         * class.c (finish_struct_1): Likewise.
3165         * cvt.c (ocp_convert): Likewise.
3166         * decl.c (cp_finish_decl): Likewise.
3167         (grokparams): Likewise.
3168         (grok_op_properties): Likewise.
3169         (start_function): Likewise.
3170         * init.c (build_new_1): Likewise.
3172         * pt.c (unify): Don't get confused by pointers-to-member functions.
3174         * search.c (build_cplus_new): Robustify.
3175         
3176 1999-07-24  Richard Henderson  <rth@cygnus.com>
3178         * gxx.gperf (__builtin_va_arg): New.
3179         * parse.y (VA_ARG): New token.
3180         (unary_expr): Recognize it.
3182 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
3184         * g++FAQ.texi: Deleted per Joe Buck's request.
3185         * Makefile.in: Corresponding changes.
3187 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
3189         * lex.c: Sync with C frontend.
3190         (whitespace_cr): New fn.
3191         (skip_white_space): Use it.
3192         (init_parse): Reorder.
3193         (yyprint): Support CONSTANT.
3194         (pragma_getc, pragma_ungetc): Bring back.
3195         (read_line_number): Change in_system_header directly.
3196         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
3197         (parse_float): Update to C version.
3198         (yylex): Handle '$' under the letter case.
3199         Remove looking_for_typename handling.
3200         Support hex floating point constants.
3201         Follow C's lead for choosing type of integer constants.
3202         Rearrange stuff to match C frontend.
3203         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
3204         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
3206 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
3208         * call.c (reference_binding): Tweak.
3209         (mayble_handle_implicit_object): Use direct_reference_binding to
3210         create the right implicit conversion sequence.
3212 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
3214         * pt.c (convert_nontype_argument): Don't call decl_constant_value
3215         if we're converting to a reference type.
3217         * call.c (NEED_TEMPORARY_P): New macro.
3218         (standard_conversion): Set it, for derived-to-base conversions.
3219         (reference_related_p): New function.
3220         (reference_compatible_p): Likewise.
3221         (convert_class_to_reference): Likewise.
3222         (direct_reference_binding): Likewise.
3223         (reference_binding): Rework for standards-compliance.
3224         (convert_like): Adjust accordingly.
3225         (maybe_handle_ref_bind): Simplify; the right conversion sequences
3226         are now built up in reference_binding.
3227         (initialize_reference): New function.
3228         * cp-tree.h (ICS_USER_FLAG): Document.
3229         (ICS_THIS_FLAG): Likewise.
3230         (ICS_BAD_FLAG): Likewise.
3231         (NEED_TEMPORARY_P): Likewise.
3232         (cp_lvalue_kind): New type.
3233         (real_lvalue_p): Return it.
3234         * error.c (dump_expr): Provide more accurate representation for
3235         AGGR_INIT_EXPRs.
3236         * init.c (expand_default_init): Do not try to perform implicit
3237         conversions for a brace-enclosed initializer.
3238         * search.c (lookup_conversions): Document.
3239         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
3240         appropriately.
3241         (real_lvalue_p): Adjust accordingly.
3242         (lvalue_p): Likewise.
3243         (build_cplus_new): Don't allow the creation of an abstract class.
3244         * typeck.c (convert_for_initialization): Use initialize_reference.
3245         
3246 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
3248         * lex.c (real_yylex) : Correct the test for overflow when lexing
3249         integer literals.
3251 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
3253         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
3254         not DECL_BUILT_IN, to determine if a function is internally declared.
3255         (duplicate_decls): Likewise.  Improve handling of builtins.
3256         (push_overloaded_decl): Remove special handling of builtins.
3258         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
3260         * decl.c (grokdeclarator): Pull out decl_constant_value in
3261         templates, too.
3263         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
3264         * cp-tree.h, pt.c, semantics.c: Adjust.
3265         * method.c (largest_union_member): Remove.
3267         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
3269         * lex.c (token_getch, token_put_back): New fns.
3270         (real_yylex): Use them.
3272         * lex.c (lang_init): Generalize.
3273         (lang_init_options): Tell cpplib this is C++.
3274         (nextchar): Remove.  Replace uses with put_back.
3275         (skip_white_space): Handle linemode here.  Optimize for cpplib.
3276         (extend_token_buffer_to): New fn.
3277         (extend_token_buffer): Use it.
3278         (read_line_number, check_newline): Just deal with tokens.
3279         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
3280         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
3281         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
3282         * parse.y (PAREN_STAR_PAREN): Remove.
3283         * input.c: Don't use the putback machinery with cpplib.
3284         (sub_getch): Fold back into getch.
3285         (getch): Don't handle linemode here.
3286         (feed_input): Unget any text in the token buffer.
3288         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
3289         nextyychar, nextyylval): Remove.
3291 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
3292             Jason Merrill  <jason@yorick.cygnus.com>
3294         * lex.c (indent_level): New variable.
3295         (init_parse): Set cpp_token to CPP_DIRECTIVE.
3296         (consume_string): Make this smart about USE_CPPLIB.
3297         (yyungetc): Use put_back function.
3298         (pragma_getc, pragma_ungetc): Functions deleted.
3299         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
3300         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
3301         pragma_ungetc.
3302         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
3303         Also, clean up cases where we redundantly set token_buffer[0].
3304         (read_line_number): New fn.
3305         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
3306         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
3307         (sub_getch): Conditionalize out code that's not appropriate if
3308         USE_CPPLIB.
3309         (put_back): Rewrite in case USE_CPPLIB is defined.
3310         (input_redirected): Ditto.
3312 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
3314         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
3315         c_global_trees and accessor macros defined in c-common.h.
3316         (cp_tree_index): New enumeration.
3317         (cp_global_trees): Declare new array.  Add accessor macros for it, and
3318         delete declarations of tree nodes replaced by it.
3319         (builtin_function): Delete macro, add declaration for new function.
3320         Include c-common.h.
3321         * decl.c: Delete definitions for tree nodes that were replaced by
3322         cp_global_trees and c_global_trees.
3323         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
3324         to generate the common builtins here.
3325         (builtin_function): New function.
3326         * decl2.c (abort_fndecl): Delete declaration.
3327         * except.c (expand_builtin_return_address): Delete declaration.
3328         (builtin_return_address_fndecl): Delete variable.
3329         (const_ptr_type_node): Delete declaration.
3330         * lex.c (cons_up_default_function): Delete declaration of
3331         void_list_node.
3332         * parse.y (void_list_node): Delete declaration.
3333         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
3334         Delete variables.
3335         (const_string_type_node): Delete declaration.
3336         * search.c (abort_fndecl): Delete declaration.
3337         * Makefile.in: Update dependencies.
3339 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
3341         * pt.c (check_default_tmpl_args): Move test for missing default
3342         arguments here, from ...
3343         (end_template_parm_list): Here.
3345 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
3347         * decl.c (lookup_nested_type): Remove.
3348         (pushtag): Don't call it.
3350 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
3352         * Makefile.in (INTERFACE): Bump to 2.
3354 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
3355         
3356         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
3357         instructions to gcc.gnu.org.  Removed e-mail address.
3359 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
3361         * pt.c (determine_specialization): Tighten error-checking.
3362         (end_template_parm_list): Likewise.
3364 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
3366         * pt.c (check_default_tmpl_args): Handle friends defined in the
3367         class just like member functions defined in the class.
3369 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
3370             Jason Merrill  <jason@yorick.cygnus.com>
3372         * cp-tree.h (struct lang_decl): Added field for storing sorted
3373         FIELD_DECLs (used in TYPE_DECLs).
3374         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
3375         (DECL_SORTED_FIELDS): New macro.
3376         * class.c (method_name_cmp): New function.
3377         (finish_struct_methods): Modified to support sorting and searching
3378         methods.
3379         (finish_struct_anon): Changed code in inner loop to use ELT rather 
3380         than UELT (which required an extra indirection for every reference).
3381         (field_decl_cmp): New function to support sorting FIELD_DECLs.
3382         (finish_struct_1): Sort fields.
3383         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
3384         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
3385         Also, switch to using array indexing rather than a changing pointer.
3386         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
3387         DECL_SORTED_FIELDS.
3389 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
3391         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
3392         casts in system headers or extern "C" blocks.
3394         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
3395         errors to pedwarn.
3397 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
3399         * decl2.c (write_virtuals): Deleted declaration.
3400         * cp-tree.h (write_virtuals): Deleted extern declaration.
3401         * class.c (finish_struct_1): Removed #if 0'd code that mentions
3402         write_virtuals.
3403         * semantics.c (begin_class_definition): Rewrite code to not depend
3404         on write_virtuals.
3406         * lex.c (cp_pragma_interface): New function.
3407         (cp_pragma_implementation): Likewise.
3408         (handle_cp_pragma): Call them.
3410         * typeck.c (comptypes): Simplify C code in look_hard.
3412         * xref.c (PALLOC): Use xcalloc, not calloc.
3413         (SALLOC): Use xmalloc, not malloc.
3415         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
3417         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
3418         is NO_DEBUG.
3420         * decl.c (duplicate_decls): If a redeclaration doesn't match the
3421         initial declaration, then don't save the inline info and by all
3422         means don't mark the function as a builtin function.
3424         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
3425         CURRENT_CLASS_TYPE is 0.
3427         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
3428         NULL_TREE.
3430         * ptree.c (print_lang_type): Added vtable-needs-writing.
3432 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
3434         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
3436 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
3438         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
3439         Merged into c-common.
3441 1999-07-05  Dave Brolley  <brolley@cygnus.com>
3443         * lex.c (errorcount): Declare it.
3444         (finish_parse): Update errorcount for when using CPPLIB.
3446 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
3448         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
3449         parameters.
3450         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
3451         * decl.c (push_class_binding): Use it.
3452         (lookup_name_real): Likewise.
3454 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
3456         * cp-tree.h (widest_integer_literal_type_node,
3457         widest_unsigned_literal_type) : New.
3458         * decl.c (widest_integer_literal_type_node,
3459         widest_unsigned_literal_type) : New.
3460         (init_decl_processing): Handle/use the two new types.
3461         * lex.c (real_yylex): Same.
3462         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
3463         Same. 
3465 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
3467         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
3468         to anonymous cv-qualified types.
3470 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
3472         * lex.c (real_yylex) : Change integer literal overflow handling to
3473         be like c-lex.c.
3475         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
3477 1999-06-28  Richard Henderson  <rth@cygnus.com>
3479         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
3481 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
3483         * error.c (dump_type_real): Handle TREE_LIST again.
3485         * typeck.c (comp_target_parms): Don't complain about 
3486         converting from () to (...) if !flag_strict_prototype.
3488         * decl.c (grokdeclarator): Update the names of all variants when
3489         de-anonymizing.
3491 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
3493         * init.c (expand_aggr_vbase_init): Rename to
3494         construct_virtual_bases.  Conditionalize construction here, 
3495         rather than ...
3496         (emit_base_init): Here.
3498 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
3500         * semantics.c (finish_asm_statement): Apply decay conversions to
3501         input operands.
3503         * decl.c (expand_static_init): When building an anonymous function
3504         for use with atexit, compute its body before and after entering
3505         the function.
3507         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
3508         EXIT_EXPR.
3509         
3510 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
3512         * init.c (expand_aggr_vbase_init): Add flag parameter.
3513         (build_partial_cleanup_for): Remove, inlining into ..
3514         (expand_cleanup_for_base): ... here.  Take flag parameter.
3515         (emit_base_init): Pass the in_chrg parameter to
3516         emit_aggr_vbase_init. 
3517         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
3518         
3519 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
3521         * decl2.c (import_export_decl): Use same_type_p, rather than
3522         relying on pointer-equality for types.
3524         * method.c (do_build_copy_constructor): Simplify.
3526         * call.c (build_method_call): Remove bogus code for two-argument
3527         delete.
3528         * init.c (build_new_1): Expand on comment, and remove dead code.
3530         * init.c (expand_cleanup_for_base): New function, split out
3531         from ...
3532         (emit_base_init): Here.
3533         (expand_aggr_vbase_init): Use it.
3535 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
3537         * cp-tree.h (class_cache_firstobj): Declare.
3538         (maybe_push_cache_obstack): Rename to push_cache_obstack.
3539         * class.c (permanent_obstack): Remove declaration.
3540         (class_cache_firstobj): Make it global.
3541         (add_method): Don't use permanent_obstack directly.
3542         (pushclass): Only free the class_cache_obstack if we know how far
3543         back to free it.
3544         (maybe_push_cache_obstack): Rename to push_cache_obstack.
3545         * decl.c: Remove dead comment.
3546         (saved_scope): Add class_cache_firstobj.
3547         (push_to_top_level): Save it.
3548         (pop_from_top_level): Restore it.
3549         (push_class_level_binding): Use push_cache_obstack, not
3550         maybe_push_cache_obstack.
3551         * search.c (push_class_decls): Likewise.
3552         
3553 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3555         * pt.c (tsubst_friend_function): Push into namespace of friend
3556         function before pushdecl'ing it.
3558 1999-06-14  Nathan Sidwell  <nathan@acm.org>
3560         * call.c (build_new_op): Remove REF_BIND from all operands.
3562 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
3564         * init.c (build_new_1): Look up operator delete even if there was
3565         no explicit new placement.
3567 1999-06-08  Nathan Sidwell  <nathan@acm.org>
3569         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
3570         of ...
3571         (build_throw): ... here. Call it.
3572         (process_start_catch_block): Call it.
3574 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
3576         * search.c (convert_pointer_to_single_level): Reimplement without
3577         using get_binfo.
3579 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
3581         * method.c (is_back_referenceable_type): Back-reference bools when
3582         not squangling.
3584 1999-06-07  Dave Brolley  <brolley@cygnus.com>
3586         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
3587         * input.c (putback_buffer): New structure type.
3588         (putback): Replaces putback_char member.
3589         (putback): Replaces putback_char static variable.
3590         (feed_input): Use putback.
3591         (end_input): Use putback.
3592         (sub_getch): Use putback.
3593         (put_back): Use putback.
3595 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
3597         * decl.c (grokdeclarator): Fix typo in last change.
3599 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
3601         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
3602         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
3604 1999-06-04  Nathan Sidwell  <nathan@acm.org>
3606         * except.c (build_throw): Check throw expression validity.
3608 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
3610         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
3611         just because flag_signed_bitfields is false.
3613 1999-06-03  Nathan Sidwell  <nathan@acm.org>
3615         * semantics.c (begin_class_definition): Update the struct's
3616         location here ...
3617         * class.c (finish_struct): ... rather than here.
3619         * decl.c (make_typename_type): Don't rely on uninitialized
3620         variable.
3622 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3624         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
3626 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
3628         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
3629         and friends rather than messing with current_obstack directly.
3630         (cp_build_qualified_type_real): Rework ARRAY_TYPE
3631         allocation to match practice throughout the rest of the 
3632         compiler.
3634 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
3636         * lex.c (make_lang_type): Create TYPE_BINFO for
3637         TEMPLATE_TYPE_PARMs just like for non-template types.
3639         * decl.c (start_decl): Move checks on initialization to ...
3640         (cp_finish_decl): Here.  Tidy formatting slightly.
3642 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
3644         * decl.c (add_binding): Don't complain about a redeclaration of a
3645         semantically identical typedef in a local scope.
3647 1999-05-28  Nathan Sidwell  <nathan@acm.org>
3649         * decl.c (complete_array_type): Allocate off same obstack. Fix
3650         DO_DEFAULT comment to match reality.
3652         * friend.c (make_friend_class): Fix diagnostic typo.
3654 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
3656         * decl.c (lookup_namespace_name): Handle getting a
3657         TEMPLATE_ID_EXPR.
3658         (expand_static_init): Don't call pushdecl for implicitly declared
3659         `atexit' used to register destructors.
3661 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
3663         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
3664         intialize a vtable.
3666         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
3667         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
3668         by combining TEMPLATE_INFO and LEVEL into a single union.
3669         (DECL_TEMPLATE_INFO): Reformat.
3670         (DECL_SAVED_TREE): Document.
3671         (DECL_TEMPLATE_INJECT): Remove.
3672         * class.c (finish_struct): Remove code to deal with
3673         DECL_TEMPLATE_INJECT. 
3675         * decl.c (maybe_process_template_type_declaration): Handle all new
3676         types in templates uniformly.
3677         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
3678         DECL_CONTEXT.
3679         * pt.c (lookup_template_class): Inject template instantiations of
3680         forward-declarations.
3681         (instantiate_class_template): Remove code processing
3682         DECL_TEMPLATE_INJECT.
3683         
3684         * pt.c (lookup_template_class): Tweak lookup to find member
3685         templates.
3687         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
3688         ASM_CV_QUAL.
3689         * semantics.c (finish_asm_stmt): Make strings permanent if they're
3690         used in a template.
3691         
3692 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
3694         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
3695         parts of pointer to data member types.
3697 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
3699         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
3700         and then make it look like `abort'.  Just use `abort' instead.
3701         
3702         * typeck.c (build_static_cast): Don't allow static_casts that cast
3703         away constness.
3704         (casts_away_constness_r): New function.
3705         (casts_away_constness): Likewise.
3707         * decl.c (lookup_tag): Remove code no longer needed after
3708         name-lookup improvements.
3709         * decl2.c (handle_class_head): Make error-recovery more robust.
3710         * friend.c (make_friend_class): Reject templated typename types.
3711         * lex.c (is_global): A template parameter isn't global.
3712         * parse.y (class_head): Robustify.
3713         * parse.c: Regenerated.
3714         
3715 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
3717         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
3718         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
3719         
3720         * cp-tree.h (push_nested_namespace): Declare.
3721         (pop_nested_namespace): Likewise.
3722         * decl.c (push_nested_namespace): New function.
3723         (pop_nested_namespace): Likewise.
3724         * pt.c (instantiate_class_template): Use them.
3726         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
3728         * cp-tree.h (cplus_expand_constant): Declare.
3729         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
3730         converted from one pointer-to-object type to another.
3731         * expr.c (cplus_expand_constant): Don't make it static.
3732         * typeck.c (build_component_ref): Don't crash when presented with
3733         a component which is a TEMPLATE_DECL.
3734         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
3735         cast from a pointer-to-member constant to its own type does not
3736         result in a valid non-type template argument.
3738 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
3739             Nathan Sidwell  <nathan@acm.org>
3740         
3741         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
3742         * cp-tree.h: Fix typo in documentation on pointers-to-members.
3743         (cp_build_qualified_type): Make it a macro.
3744         (cp_build_qualified_type_real): Declare.
3745         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
3746         problem with template parameters and restrict-qualification.
3747         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
3748         * hash.h: Regenerated.
3749         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
3750         the enumeration.
3751         (NORID): Remove definition.
3752         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
3753         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
3754         (fn_type_unification): Check that the function type resulting from
3755         the deduction is legal.
3756         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
3757         (unify): Use cp_build_qualified_type_real.
3758         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
3759         (cp_build_qualified_type): Rename to ...
3760         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
3761         and modify appropriately.
3762         
3763         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
3764         reveal optimization opportunities.
3766         * pt.c (tsubst): Don't issue error messages when we're not
3767         complaining, even if we see a qualified function type.
3768         (check_cv_quals_for_unify): Don't allow a qualified function
3769         type.
3771 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
3773         * class.c (instantiate_type): Downgrade errors for object-dependent
3774         memfn refs to pedwarn.
3776 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
3778         * decl.c (grokdeclarator): Don't treat [] as indicating a
3779         zero-sized array in a typedef.
3781         * call.c (build_object_call): Don't look at DECL_NAME for a type.
3782         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
3783         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
3785         * pt.c (for_each_template_parm): Rework to match documentation.
3786         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
3788 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
3790         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
3792         * class.c (finish_base_struct): Allow non-COM bases for COM classes
3793         except at the leftmost position.
3794         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
3795         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
3796         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
3798         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
3799         (build_cplus_new): Make sure that what we return is of the right type.
3801 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
3803         * cp-tree.h (make_ptrmem_cst): New function.
3804         * expr.c (cplus_expand_constant): Split out from ...
3805         (cplus_expand_expr): Here.  Use cplus_expand_constant.
3806         (init_cplus_expand): Set lang_expand_constant.
3807         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
3809         * tree.c (make_ptrmem_cst): Define.
3810         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
3811         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
3813 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
3815         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
3817         * decl2.c (start_static_storage_duration_function): Fix comment.
3818         (finish_file): Create static storage duration functions lazily.
3820 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
3822         Implement anonymous structs.
3823         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
3824         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
3825         * class.c (finish_struct_1): Remove redundant check for anon struct.
3826         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
3827         (check_tag_decl): Check for anonymous struct here.
3828         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
3829         * init.c (sort_member_init, emit_base_init): Handle getting fields
3830         as well as names in current_member_init_list.
3831         (perform_member_init): Handle getting an anon aggr.
3832         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
3833         (do_build_copy_constructor): Likewise.
3835 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
3837         * tree.c (cp_build_qualified_type): Don't allow qualified function
3838         types.
3840 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
3842         * gxxint.texi: Fix typo.
3844 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
3846         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
3847         * class.c (finish_struct_1): Use CLASS_TYPE_P.
3848         * ptree.c (print_lang_type): Likewise.
3849         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
3850         IS_AGGR_TYPE_CODE.
3851         * typeck2.c (digest_init): Likewise.
3853 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
3855         * call.c (joust): Compare the types of the conv ops, not the
3856         target types of the conversions.
3858 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
3860         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
3861         was not given.
3863 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
3865         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
3866         * decl.c (grokfndecl): Don't allow inline declarations of friend
3867         template specializations, or friend template specializations with
3868         default arguments.
3869         * pt.c (tsubst): Handle substitution into array types that does
3870         not yield a fixed upper bound, even when not processing a
3871         template.
3872         (tsubst_copy): Deal with the fact that the second operand to a
3873         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
3874         * search.c (marked_pushdecls_p): Don't descend into
3875         TEMPLATE_TYPE_PARMs and the like.
3876         (unmarked_pushdecls_p): Likewise.
3877         
3878         * call.c (build_over_call): Don't throw away
3879         initializations/copies of empty classes; use MODIFY_EXPR and
3880         INIT_EXPR as for non-empty classes.
3881         * class.c (finish_struct_1): Put the padding byte for an empty
3882         class on the TYPE_NONCOPIED_PARTS list for the class.
3884 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
3886         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
3887         indicate a reference to a field that is a qualified name.
3889 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
3891         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
3892         ASM_OUTPUT_CONSTRUCTOR.
3894         * friend.c (do_friend): Add attrlist arg.  Remove support for
3895         getting a non-decl as 'decl'.
3896         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
3897         rtl.
3898         (grokdeclarator): Adjust.
3899         * cp-tree.h: Adjust.
3901 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
3903         * cp-tree.h (permanent_p): New function.
3904         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
3905         possibly complex tree node.
3906         * tree.c (mapcar): Adjust comments, and follow coding standards in
3907         conditional.
3908         (permanent_p): New function.
3910 1999-05-13  Per Bothner  <bothner@cygnus.com>
3912         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
3913         primitive Java types, if we actually see `extern "Java"'.
3915 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
3917         * lang-specs.h: Pass -$ to the preprocessor.
3919 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
3921         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
3922         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
3923         (resolve_offset_ref): Don't handle a raw baselink.
3924         * cvt.c (build_expr_type_conversion): Likewise.
3925         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
3926         convert_for_initialization): Likewise.
3927         * class.c (instantiate_type): Handle seeing a baselink under an
3928         OFFSET_REF.
3929         * error.c (dump_expr): Likewise.        
3930         * pt.c (for_each_template_parm): Likewise.
3931         (resolve_overloaded_unification): Likewise.
3932         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
3933         * typeck.c (expr_sizeof): Also complain about other permutations
3934         of overloaded functions.
3936 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
3938         * init.c (resolve_offset_ref): Don't return a raw method.
3939         Use BASELINK_P.
3940         * typeck.c (decay_conversion): Don't handle a raw method.
3941         Resolve all OFFSET_REFs.
3942         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
3943         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
3944         same_type_p for pmf bits.  Don't use build_binary_op to compare
3945         raw pointers to methods.
3946         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
3947         to decide when to call resolve_offset_ref.
3948         (build_c_cast, convert_for_initialization): Likewise.
3949         * cvt.c (build_expr_type_conversion): Likewise.
3951 1999-05-06  Nathan Sidwell  <nathan@acm.org>
3953         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
3955 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
3957         * decl2.c (start_objects): Don't let static constructors and
3958         destructors get inlined.
3960         * parse.y (nested_name_specifier): Make sure ordinary types are
3961         complete, just like template types.
3962         * parse.c: Regenerated.
3964         * pt.c (check_explicit_specialization): Improve error messages.
3966 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3968         * typeck.c (string_conv_p): Use same_type_p to check whether we
3969         try to convert between char and wchar_t.
3971 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
3973         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
3974         lookup to error_mark_node here.
3975         (lookup_member): Revise documentation.  Add comments.  Don't set
3976         the TREE_TYPE to error_mark_node here, and don't build up an extra
3977         TREE_LIST for ambiguous lookups.
3978         (setup_class_bindings): Adjust accordingly.
3979         (push_class_decls): Revise out-of-date comments.
3980         
3981         * typeck.c (build_const_cast): Tighten checks for legality.
3983 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3985         * init.c (build_member_call): Lookup names coming from
3986         namespace-scoped LOOKUP_EXPR.
3988 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
3990         * gxxint.texi: Add documentation for 'I'.
3992 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3994         * tinfo.cc (operator==): Qualify type_info with std::.
3996 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
3998         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
3999         (DECL_COMDAT): Remove definition.
4001 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
4003         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
4004         change.
4006 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
4008         * class.c (build_vtable): Use build_lang_decl when building
4009         vtables, not just build_decl.
4010         (prepare_fresh_vtable): Likewise.
4011         * decl.c (wrapup_globals_for_namespace): Mark vtables as
4012         DECL_EXTERNAL when calling wrapup_global_declarations.
4013         * decl2.c (priority_info_s): Add initializations_p and
4014         destructions_p members.
4015         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
4016         when deciding what vtables to write out.
4017         (ssdf_decls): New variable.
4018         (ssdf_decls_used): Likewise.
4019         (start_static_storage_duration_function): Deal with being called
4020         multiple times.  Avoid inlining this function.
4021         (generate_inits_for_priority): Deal with reuse of priority map.
4022         (get_priority_info): Clear initializations_p and destructions_p.
4023         (do_static_initialization): Tweak comment.
4024         (do_static_destruction): Likewise.  Fix condition on sentries for
4025         destruction.
4026         (generate_ctor_or_dtor_function): Call all of the static storage
4027         duration functions.
4028         (generate_ctor_or_dtor_function_for_priority): Check
4029         initializations_p and destructions_p to see what priorities need
4030         initialization functions.
4031         (finish_file): Rework to generate multiple static storage duration
4032         functions, rather than just one.
4034         * typeck.c (build_const_cast): Tweak last change to handle
4035         templates correctly.
4037         * typeck.c (build_const_cast): Disallow use of const_cast to
4038         anything but a pointer or reference type.
4040 1999-04-30  Nathan Sidwell  <nathan@acm.org>
4042         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
4043         signature type.
4045 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
4047         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
4048         (finish_file): Indent comments properly.
4050 1999-04-29  Richard Henderson  <rth@cygnus.com>
4052         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
4053         (do_static_destruction): Likewise.
4055 1999-04-29  Nathan Sidwell  <nathan@acm.org>
4057         * cp-tree.h (TYPE_NOTHROW_P): New macro.
4058         * decl2.c (delete_sanity): Warn on deleting void *.
4059         * init.c (build_new_1): Use TYPE_NOTHROW_P.
4060         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
4061         throwing operator new.
4063 1999-04-28  Nathan Sidwell  <nathan@acm.org>
4065         * cp-tree.h (build_component_addr): Remove prototype.
4066         * typeck.c (build_component_addr): Make static. Remove MSG
4067         argument.
4068         (build_component_addr): Remove MSG parameter, clean up
4069         comment.
4070         (build_x_function_call): Use cp_error.
4071         (build_unary_op): Adjust call of build_component_addr.
4073 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
4075         * pt.c (tsubst_friend_class): Check for NULL.
4077 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
4079         * search.c (binfo_for_vtable): Initialize bfvi.var.
4081 1999-04-27  Nathan Sidwell  <nathan@acm.org>
4083         * rtti.c (build_x_typeid): Check rtti is enabled.
4085 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
4087         * search.c (is_subobject_of_p): Make sure we're looking at the
4088         right baseclasses.
4090 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
4092         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
4094 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
4096         * decl2.c (finish_file): Tweak handling of extern inlines so that
4097         they are not unnecessarily put out.
4099         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
4100         such as base classes.
4102 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
4104         * tree.c (build_exception_variant): Fix typo: use the chain of U,
4105         not trying V, while cycling through U.
4107 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
4109         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
4110         preserves_first_arg.  Enlarge dummy accordingly.
4111         (DECL_TINFO_FN_P): New macro.
4112         (SET_DECL_TINFO_FN_P): Likeiwse.
4113         (DECL_RETURNS_FIRST_ARG): Remove.
4114         (DECL_PRESERVES_THIS): Likewise.
4115         (DECL_INIT_PRIORITY): New macro.
4116         (finish_struct_1): Change prototype.
4117         (cat_namespace_levels): Remove prototype.
4118         (vtable_decl_p): New prototype.
4119         (vtype_decl_p): Likewise.
4120         (sigtable_decl_p): Likewise.
4121         (walk_globals_pred): New typedef.
4122         (walk_globals_fn): Likewise.
4123         (walk_globals): New prototype.
4124         (walk_namespaces_fn): New typedef.
4125         (walk_namespaces): New prototype.
4126         (wrapup_globals_for_namespace): Likewise.
4127         (walk_vtables): Remove prototype.
4128         (walk_sigtables): Likewise.
4129         (instantiate_pending_templates): New prototype.
4130         * class.c (finish_struct_1): Don't return a value.
4131         * decl.h (pending_statics): Remove declaration.
4132         * decl.c (walk_namespaces_r): New function.
4133         (walk_globals_r): Likewise.
4134         (vtable_decl_p): Likewise.
4135         (vtype_decl_p): Likewise.
4136         (sigtable_decl_p): Likewise.
4137         (walk_namespaces): Likewise.
4138         (walk_globals_data): New type.
4139         (walk_globals): New function.
4140         (wrapup_globals_for_namespace): Likewise.
4141         (expand_static_init): Remove assertion.  Remove redundancy in
4142         conditional.  Don't put static data members in static_aggregates
4143         Tidy.
4144         (finish_function): Remove redundancy in conditional.  Don't set
4145         DECL_RETURNS_FIRST_ARG.
4146         (cat_namespace_levels): Remove.
4147         * decl2.c: Include splay-tree.h and varray.h.
4148         (priority_info_s): New structure.
4149         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
4150         conventions.
4151         (prune_vtable_vardecl): Likewise.
4152         (finish_sigtable_vardecl): Likewise.
4153         (setup_initp): Remove.
4154         (do_dtors): Remove.
4155         (do_ctors): Remove.
4156         (start_static_storage_duration_function): New function.
4157         (generate_inits_for_priority): Likewise.
4158         (finish_static_storage_duration_function): Likewise.
4159         (get_priority_info): Likewise.
4160         (do_static_initialization): Likewise.
4161         (do_static_destruction): Likewise.
4162         (do_static_initialization_and_destruction): Likewise.
4163         (generate_ctor_or_dtor_function): Likewise.
4164         (generate_ctor_and_dtor_functions_for_priority): Likewise.
4165         (pending_statics): Make it a varray.
4166         (pending_statics_used): New variable.
4167         (saved_inlines): Make it a varray.
4168         (saved_inlines_used): New variable.
4169         (finish_static_data_member): Change method of updating
4170         pending_statics.
4171         (mark_inline_for_output): Remove #if 0'd code.  Change method of
4172         updating saved_inlines.
4173         (walk_vtables): Remove.
4174         (walk_sigtables): Likewise.
4175         (import_export_decl): Use DECL_TINFO_FN_P.
4176         (pending_templates): Remove declaration.
4177         (maybe_templates): Likewise.
4178         (static_aggregates_initp): Likewise.
4179         (setup_initp): Likewise.
4180         (finish_objects): Simplify.
4181         (INITIALIZE_P_IDENTIFIER): New macro.
4182         (PRIORITY_IDENTIFIER): New macro.
4183         (SSDF_IDENTIFIER): New macro.
4184         (initialize_p_decl): New variable.
4185         (priority_decl): Likewise.
4186         (ssdf_decl): Likewise.
4187         (priority_info_map): Likewise.
4188         (finish_file): Recode output of static intializers and other
4189         file-scope finalization tasks.
4190         * error.c (OB_END_TEMPLATE_ID): New macro.
4191         (dump_type_real): Use it.
4192         (dump_decl): Likewise.
4193         (dump_function_name): Likewise.
4194         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
4195         interface.
4196         (check_newline): Use walk_globals, not walk_vtables.
4197         * pt.c (pending_tempalte_expansions): Remove.
4198         (set_vardecl_interface_info): Likewise.
4199         (pending_templates): Make static.
4200         (maybe_templates): Likewise.
4201         (instantiate_class_template): Adjust call to finish_struct_1.
4202         (instantiate_pending_templates): New function.
4203         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
4204         * tree.c (static_aggregates_initp): Remove.
4205         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
4206         instead.
4207         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
4209         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
4210         with the RTL code RETURN.
4211         * hash.h: Regenerated.
4212         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
4213         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
4214         * parse.c: Regenerated.
4215         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
4216         it.
4217         (inline_parm_levels): New variable.
4218         (inline_parm_levels_used): Likewise.
4219         (maybe_begin_member_template_processing): Update them.
4220         (maybe_end_member_template_processing): Use them, rather than
4221         guessing how many levels to pop.
4223         * decl.c (make_typename_type): Tighten error-checking.
4225 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
4227         * cp-tree.h (build_binary_op): Remove unneeded parameter.
4228         * class.c (build_vrable_entry_ref): Adjust call to
4229         build_binary_op.
4230         * decl.c (expand_static_init): Likewise.
4231         (grokdeclarator): Likewise.
4232         (finish_function): Likewise.
4233         * decl2.c (delete_sanity): Likewise.
4234         (do_dtors): Likewise.
4235         (do_ctors): Likewise.
4236         * error.c (dump_type_suffix): Likewise.
4237         * expr.c (cplus_expand_expr): Likewise.
4238         * init.c (resolve_offset_ref): Likewise.
4239         (build_new): Likewise.
4240         (build_new_1): Likewise.
4241         (build_vec_delete_1): Likewise.
4242         (expand_vec_init_catch_clause): Likewise.
4243         (build_delete): Likewise.
4244         * pt.c (tsubst): Likewise.
4245         * rtti.c (synthesize_tinfo_fn): Likewise.
4246         * search.c (expand_upcast_fixups): Likewise.
4247         (expand_direct_vtbls_init): Likewise.
4248         * typeck.c (get_member_function_from_ptrfunc): Likewise.
4249         (build_binary_op_nodefault): Likewise.
4250         (point_int_sum): Likewise.
4251         (pointer_diff): Likewise.
4252         (build_unary_op): Likewise.
4253         (build_modify_expr): Likewise.
4254         (get_delta_difference): Likewise.
4255         (build_ptrmemfunc): Likewise.
4256         (expand_ptrmemfunc_cst): Likewise.
4258 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
4260         * decl.c (grokfndecl): Always call cplus_decl_attributes.
4261         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
4263 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
4265         * cp-tree.h (finish_static_data_member_decl): New function.
4266         * decl2.c (finish_static_data_member_decl): Split out from ...
4267         (grokfield): Here.
4268         * pt.c (instantiate_class_template): Use it here instead of
4269         trying to fake it.
4270         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
4271         finish_static_data_member_decl will do that.  Explicit set
4272         DECL_EXTERNAL to match non-template processing.
4274 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
4276         * cp-tree.h (finish_class_definition): Add parameter.
4277         * parse.y (structsp): Use it.  Don't call pop_scope here.
4278         * parse.c: Regenerated.
4279         * semantics.c (finish_class_definition): Pop it here.
4281 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
4283         * decl.c (xref_tag): Revise handling of nested template
4284         declarations.
4285         * pt.c (check_explicit_specialization): Tweak handling of friend
4286         templates in template classes.
4287         (tsubst_friend_class): Handle friend declarations for nested
4288         member template classes.
4290 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
4292         * class.c (finish_struct): Remove unused variable.
4293         (pushclass): Likewise.
4294         (invalidate_class_lookup_cache): Likewise.
4295         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
4296         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
4297         doesn't get obliterated.
4298         (make_typename_type): Handle template classes correctly.
4300         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
4301         (storetags): Declare.
4302         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
4303         (pushclass): Likewise.  Use storetags to install tag declarations,
4304         not pushtag.
4305         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
4306         * decl.c (storetags): Make it global.
4307         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
4308         implicit typename declaration.
4309         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
4310         * method.c (hack_identifier): Likewise.
4311         * search.c (lookup_member): Likewise.
4313         * decl.c (warn_about_implicit_typename_lookup): New function.
4314         (lookup_name_real): Use it.  Rework handling of implicit typename
4315         extension.
4317 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
4319         * cp-tree.h (lookup_nested_field): Remove.
4320         * class.c (push_nested_class): Handle UNION_TYPEs.
4321         (pop_nested_class): Likewise.
4322         * decl.c (lookup_name_real): Don't call lookup_nested_field.
4323         (start_decl): Use push_nested_class, not just pushclass.
4324         (cp_finish_decl): Use pop_nested_class, not just popclass.
4325         * search.c (lookup_nested_field): Remove.
4327         * cp-tree.h (lang_type): Add documentation.
4328         * decl2.c (handle_class_head): Create template declarations here,
4329         as appropriate.
4330         * parse.y (class_head): Return whether or not we entered a new
4331         scope, as well as the type named.
4332         (named_class_head): Likewise.
4333         (named_complex_class_head_sans_basetype): Likewise.
4334         (structsp): Adjust accordingly.  Pop scope when required.
4335         * parse.c: Regenerated.
4336         * pt.c (check_default_tmpl_args): Robustify.
4337         (redeclare_class_template): Likewise.
4338         (instantiate_class_template): An instantiation of an
4339         anonymous union is itself an anonymous union.
4340         * semantics.c (begin_class_definition): Don't create template
4341         declarations here.
4343 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
4345         * parse.y (after_type_declarator_intern): New nonterminal.
4346         (after_type_declarator): Use it.
4347         (direct_after_type_declarator): Likewise.  Move above
4348         nonnested_type to fix reduce/reduce conflict resolution.
4349         (declmods): Reducing from just 'attributes' has EMPTY precedence.
4350         * Makefile.in (CONFLICTS): Update.
4352         * decl.c (define_label): Downgrade error for jumping over a
4353         non-POD decl to pedwarn.
4355 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
4357         * cp-tree.h (popclass): Change declaration.
4358         (pop_nested_class): Likewise.
4359         (poplevel_class): Remove declaration.
4360         * call.c (convert_default_argument): Pass no arguments to
4361         popclass.
4362         * class.c (finish_struct_1): Likewise.
4363         (finish_struct): Likewise.
4364         (popclass): Remove argument.  Simplify code accordingly.
4365         (pop_nested_class): Likewise.
4366         * decl.c (poplevel_class): Declare it here, and make it static.
4367         (poplevel): Handle class scopes.
4368         (poplevel_class): Don't take an rgument.  Simplify.
4369         (pop_everything): Pass no arguments to pop_nested_class.
4370         (cp_finish_decl): Pass no arguments to popclass.
4371         (grokdeclarator): Pass no arguments to pop_nested_class.
4372         (finish_function): Likewise.
4373         * decl2.c (grokfield): Likewise.
4374         (pop_scope): Pass no arguments to popclass.
4375         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
4376         * pt.c (instantiate_class_template): Move call to pushclass, and
4377         document.  Pass no arguments to popclass.
4378         (regenerate_decl_from_template): Likewise.
4380 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
4382         * typeck.c (build_unary_op): Handle taking the address of a unique
4383         bound non-static member function.
4385 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4387         * lang-options.h (-Wdeprecated): New flag.
4388         * decl2.c (warn_deprecated): New flag.
4389         (lang_decode_option): Deprecated this-is-variable,
4390         external-templates, alt-external-templates.
4391         Support -Wdeprecated.
4392         * errfn.c (cp_deprecated): New function.
4394 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
4396         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
4397         of the decls themselves.
4399         * pt.c (tsubst_function_type): Copy attributes over.
4401         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
4402         and com_interface.
4403         * cp-tree.h: Add prototype.
4404         * decl.c (init_decl_processing): Set valid_lang_attribute.
4406 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
4408         * class.c (finish_struct_1): Look at the const-ness of the field's
4409         type, not the TREE_READONLY-ness of the declaration.
4410         * method.c (synthesize_method): Likewise.
4411         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
4412         creating new declarations.
4414 1999-04-13  Mike Stump  <mrs@wrs.com>
4416         * decl2.c (import_export_decl): Because vtables always reference
4417         virtual functions, even if they are inlined, don't allow
4418         -fno-implement-inlines to not emit them, instead, emit them with
4419         the vtable.
4420         * decl.c (start_function): Likewise.
4422 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
4424         * cp-tree.h (struct lang_type): Add com_interface.
4425         (CLASSTYPE_COM_INTERFACE): New macro.
4426         * class.c (set_rtti_entry): COM interface classes have no RTTI
4427         entries in their vtables; adjust.
4428         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
4429         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
4430         finish_struct_1): Likewise.
4431         * decl2.c (mark_vtable_entries): Likewise.
4432         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
4433         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
4434         expand_upcast_fixups): Likewise.
4435         * tree.c (debug_binfo): Likewise.
4437         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
4438         * typeck.c (comptypes): If we get it, ignore attributes.
4439         * class.c (instantiate_type): Use BASELINK_P.  Change complain
4440         parameter to flags; 2 means ignore attributes.
4441         * call.c (build_op_delete_call): Pass it.
4443         * decl.c (xref_tag): Only complain once about using a typedef-name
4444         with 'struct'.  Downgrade to pedwarn.
4446         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
4448         * parse.y (absdcl_intern): New nonterminal.
4449         (absdcl, direct_abstract_declarator): Use it.
4451         * pt.c (lookup_template_class): Look through implict typename.
4453 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
4455         * friend.c (add_friend): Deal gracefully with error_mark_node.
4456         * method.c (build_overload_value): Handle pointers-to-members as
4457         template parameters.
4459         * decl.c (push_binding): Fix typo in comment.
4461 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
4463         * error.c (dump_type_real): If a typename is a template-id, put
4464         out the template arguments.
4465         (dump_expr): Handle TEMPLATE_ID_EXPR.
4466         * pt.c (lookup_template_class): Now that full arguments are
4467         available everywhere, remove code that tried to guess them.
4469 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
4471         * decl.c (make_typename_type): Complain if we don't find a type
4472         when trying to make a typename type for a non-template type.
4474 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
4476         * decl.c (start_decl): Pass attributes to grokdeclarator.
4477         (grokdeclarator): Handle attributes on constructor-syntax
4478         initializers.
4480 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
4482         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
4483         don't have types.
4485         * search.c (template_self_reference_p): Tweak.
4487 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
4489         * init.c (build_offset_ref): Don't build yet another weird data
4490         structure to describe overloaded functions.
4492 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
4494         * cp-tree.h (BASELINK_P): New macro.
4495         (SET_BASELINK_P): Likewise.
4496         * init.c (build_member_call): Remove needless assignment in if
4497         statement.
4498         * search.c (lookup_field_r): Fix handling when we are looking
4499         specifically for a type; these are not hidden by functions and
4500         variables.
4501         (lookup_member): Use SET_BASELINK_P.
4502         * tree.c (is_overloaded_fn): Use BASELINK_P.
4503         (really_overloaed_fn): Likewise.
4504         (get_first_fn): Likewise.
4506 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
4508         * decl.c (lookup_name_current_level): Tweak, and improve
4509         documentation.
4511         * class.c (maybe_fixup_vptrs): Remove declaration.
4512         (build_class_init_list): Likewise.
4513         * decl.c (pushdecl_class_level): Call check_template_shadow here
4514         ...
4515         (push_class_level_binding): ... not here.
4516         * search.c (dfs_push_type_decls): Only avoid
4517         template-self-reference TYPE_DECLs if they are from base classes.
4519 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
4521         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
4522         nodes.  Tidy.
4524 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
4526         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
4527         (finish_struct_1): Don't call build_class_init_list.
4529 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
4531         * tinfo.h (__class_type_info): Fix illegal declaration.
4533         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
4534         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
4535         (IDENTIFIER_CLASS_VALUE): Improve documentation.
4536         (is_properly_derived_from): Declare.
4537         (invalidate_class_lookup_cache): Likewise.
4538         (maybe_maybe_note_name_used_in_class): Likewise.
4539         (note_name_declared_in_class): Likewise.
4540         (push_using_decl): Remove duplicate declaration.
4541         (id_in_current_class): Remove declaration.
4542         (push_class_binding): Change prototype.
4543         (clear_identitifer_class_values): Declare.
4544         * call.c (is_properly_derived_from): Make it global.
4545         (build_new_function_call): Be careful about updating candidates.
4546         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
4547         asked to make illegal calls.
4548         * class.c: Include splay-tree.h.
4549         (class_stack_node): Add names_used slot.
4550         (check_member_decl_is_same_in_complete_scope): Remove.
4551         (add_method): Fix comment.  Push the declaration into class
4552         scope.
4553         (finish_struct_1): When popping the class, pop the bindings too.
4554         Remove check for data member/function member conflict.
4555         (finish_struct): Remove calls to
4556         check_member_decl_is_same_in_complete_scope.  Change calls to
4557         popclass.
4558         (pushclass): Clear names_used in the class stack entry.
4559         Use invalidate_class_lookup_cache to remove cached entries, rather
4560         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
4561         before entering a new class.  Remove dead code.  Don't mess with
4562         current_function_decl when pushing declarations.
4563         (invalidate_class_lookup_cache): New function, split out from ...
4564         (popclass): Here.  Clean up names_used on our way out.
4565         (instantiate_type): Adjust.
4566         (build_self_reference): Don't push the declaration here.
4567         (maybe_note_name_used_in_class): New function.
4568         (note_name_declared_in_class): Likewise.
4569         * decl.c (add_binding): Change prototype.
4570         (find_class_binding_level): New function.
4571         (innermost_nonclass_level): Likewise.
4572         (current_binding_level): Update documentation.
4573         (inner_binding_level): Remove.  Replace with current_binding_level
4574         throughout.
4575         (push_binding_level): Remove special handling of
4576         class_binding_level.
4577         (pop_binding_level): Likewise.  Use find_class_binding_level.
4578         (suspend_binding_level): Likewise.
4579         (global_bindings_p): Use innermost_nonclass_level.
4580         (toplevel_bindings_p): Likewise.
4581         (namespace_bindings_p): Likewise.
4582         (pseudo_global_level_p): Likewise.
4583         (push_binding): Clear INHERITED_VALUE_BINDING_P.
4584         (add_binding): Check for illegal multiple declarations.  Return a
4585         value indicating whether or not the new binding was legal.
4586         (push_local_binding): Skip over class binding levels.  Check
4587         return value from add_binding.
4588         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
4589         note_name_declared_in_class.
4590         (pushlevel_class): Remove "fake out the rest of the compiler"
4591         code.
4592         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
4593         (clear_identifier_class_values): New function.
4594         (pop_from_top_level): Use it.
4595         (pop_everything): Tweak.
4596         (maybe_process_template_type_declaration): Don't push the
4597         declaration for the template here.
4598         (pushtag): Don't push tag declarations into class scope here.
4599         (pushdecl): Apply DeMorgan's law for readability.
4600         (pushdecl_class_level): Remove special-case code for
4601         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
4602         (push_class_level_bindng): Deal with inherited bindings.
4603         (lookup_name_real): Remove special-case code for
4604         TYPE_BEING_DEFINED, and some implicit typename magic.
4605         (grokdeclarator): Handle COMPONENT_REF for a template function.
4606         (build_enumerator): Don't call pushdecl_class_level here.
4607         (id_in_current_class): Remove.
4608         * decl2.c (grokfield): Don't call pushdecl_class_level or
4609         check_template_shadow.
4610         * errfn.c (cp_file_of): Don't declare.
4611         (cp_line_of): Likewise.
4612         * error.c (dump_decl): Handle an OVERLOAD.
4613         (cp_file_of): Likewise.
4614         (cp_line_of): Likewise.
4615         * init.c (build_member_call): Handle a COMPONENT_REF.
4616         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
4617         pushdecl_class_level.
4618         * method.c (hack_identifier): Build COMPONENT_REFs for references
4619         to member templates as well as member functions.  Remove dead
4620         code.
4621         * parse.y (left_curly): Remove.
4622         (nonnested_type): Call maybe_note_name_used_in_class, not
4623         pushdecl_class_level.
4624         * parse.c: Regenerated.
4625         (nested_name_specifier_1): Likewise.
4626         * pt.c (check_explicit_specialization): Adjust, for robustness.
4627         (check_template_shadow): Handle OVERLOADs.
4628         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
4629         TEMPLATE_DECL, if appropriate.
4630         * search.c (envelope_add_decl): Remove.
4631         (dfs_pushdecls): Likewise.
4632         (dfs_compress_decls): Likewise.
4633         (dfs_push_decls): New function.
4634         (dfs_push_type_decls): Likewise.
4635         (setup_class_bindings): Likewise.
4636         (template_self_reference_p): Likewise.
4637         (lookup_field_r): Use it.
4638         (looup_member): Remove old comment.  Deal with ambiguity.
4639         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
4640         and remove envelope processing.
4641         * semantics.c (begin_class_definition): Let pushclass push
4642         declarations for base classes.
4643         (finish_member_declaration): Push declarations into class scope.
4644         * typeck.c (build_component_ref): Just put an OVERLOAD into the
4645         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
4646         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
4647         * Makefile.in (class.o): Depend on splay-tree.h.
4649 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
4651         * cvt.c (convert_pointer_to_real): Use same_type_p.
4652         * typeck.c (comp_target_types): Use same_type_p.
4654 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
4656         * semantics.c (begin_inline_definitions,
4657         finish_inline_definitions): Rename from finish_default_args and
4658         begin_inline_definitions, respectively, to something that isn't a
4659         total lie.  :)
4660         * parse.y (structsp): Adjust.
4662         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
4663         (list_hash_lookup): Likewise.
4664         (hash_tree_chain): Adjust.
4665         * pt.c (tsubst): Adjust.
4666         (tsubst_arg_types): Use plain hash_tree_cons.
4667         * cp-tree.h (hash_tree_cons_simple): Lose.
4668         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
4670 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4672         * Makefile.in (hash.h): Generate using gperf language 'C', not
4673         'KR-C', so gperf uses the `const' keyword on strings.
4675         * gxx.gperf (resword): Const-ify a char*.
4677 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
4679         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
4680         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
4681         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
4682         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
4683         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
4684         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
4685         tree.c: Adjust.
4687 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
4689         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
4691 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
4693         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
4695 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
4697         * cp-tree.h (add_friend): Declare.
4698         (add_friends): Likewise.
4699         * friend.c (add_friend): Make it global.  Don't add to
4700         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
4701         (add_friends): Make it global.
4702         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
4703         befriending class is a template.
4704         * parse.y (component_decl_1): Fix typo in comment.
4705         * parse.c: Regenerated.
4706         * pt.c (instantiate_class_template): Use add_friend and
4707         add_friends rather that duplicating some of their functionality
4708         here.
4710 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
4712         * call.c (build_field_call): Unify 'this' and non-'this' cases.
4714         * typeck.c (build_indirect_ref): Check for 'this' sooner.
4716 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4718         * call.c (op_error): Const-ify a char*.
4719         (add_candidate, source_type, add_warning): Add static prototype.
4720         (print_z_candidates): Const-ify a char*.
4722         * class.c (resolve_address_of_overloaded_function,
4723         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
4724         (get_vtable_name, finish_struct_1): Const-ify a char*.
4726         * cvt.c (convert_to_reference): Likewise.
4728         * decl.c (redeclaration_error_message, record_builtin_type,
4729         record_unknown_type, member_function_or_else, bad_specifiers):
4730         Likewise.
4731         (find_binding, select_decl, unqualified_namespace_lookup,
4732         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
4733         Add static prototype.
4734         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
4735         implicitly_declare, record_builtin_java_type, define_function,
4736         grok_op_properties, tag_name): Const-ify a char*.
4738         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
4739         (define_function, finish_builtin_type): Const-ify a char*.
4740         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
4741         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
4742         (file_name_nondirectory): Const-ify a char*.
4743         (init_filename_times): Don't prototype.
4744         (compiler_error): Prototype.
4745         (yyerror, init_repo): Const-ify a char*.
4746         (build_srcloc): Don't prototype.
4747         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
4748         Const-ify a char*.
4749         (warn_for_assignment): Don't prototype.
4750         (convert_for_initialization, readonly_error, check_for_new_type,
4751         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
4752         Const-ify a char*.
4754         * decl2.c (acceptable_java_type, output_vtable_inherit,
4755         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
4756         merge_functions, decl_namespace, validate_nonmember_using_decl,
4757         do_nonmember_using_decl): Add static prototype.
4758         (lang_f_options): Const-ify a char*.
4759         (finish_builtin_type): Likewise.
4760         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
4761         prototype.
4763         * errfn.c: Include cp-tree.h.
4764         (cp_thing): Add static prototype.
4765         (compiler_error): Don't protoptype.
4766         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
4767         passing it to `cp_thing'.
4769         * error.c (interesting_scope_p): Add static prototype.
4771         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
4772         a char*.
4774         * init.c (compiler_error): Don't prototype.
4775         (member_init_ok_or_else): Const-ify a char*.
4776         (build_java_class_ref): Add static prototype.
4778         * lex.c (compiler_error): Don't prototype.
4779         (get_time_identifier, interface_strcmp, extend_token_buffer,
4780         handle_cp_pragma): Const-ify a char*.
4781         (is_global, init_filename_times): Add static prototype.
4782         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
4783         (compiler_error): Change from fixed args to variable args.
4784         (yyerror): Const-ify a char*.
4786         * parse.y (cond_stmt_keyword): Const-ify a char*.
4787         (parse_decl): Add static prototype.
4789         * pt.c (template_args_equal, print_template_context): Likewise.
4790         (print_candidates, check_default_tmpl_args): Const-ify a char*.
4791         (instantiate_class_template): Likewise.
4793         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
4795         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
4796         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
4798         * search.c (lookup_field_info, lookup_member): Likewise.
4799         (lookup_member): Cast the first argument of `bzero' to a PTR.
4801         * sig.c (compiler_error): Don't prototype.
4802         (build_signature_pointer_or_reference_nam): Const-ify a char*.
4803         (get_sigtable_name, build_member_function_pointer): Likewise.
4805         * tree.c (compiler_error): Don't prototype.
4806         (no_linkage_helper, build_srcloc): Add static prototype.
4807         (build_vbase_pointer_fields): Const-ify a char*.
4808         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
4810         * typeck.c (compiler_error): Don't prototype.
4811         (convert_for_assignment): Const-ify a char*.
4812         (comp_cv_target_types): Add static prototype.
4813         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
4814         build_component_addr, build_unary_op, convert_for_initialization):
4815         Const-ify a char*.
4817         * typeck2.c (ack): Add static prototype and change from fixed args
4818         to variable args.
4819         (readonly_error, check_for_new_type): Const-ify a char*.
4821         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
4822         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
4823         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
4824         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
4825         gen_assign, GNU_xref_member): Const-ify a char*.
4827 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4829         * gxxint.texi: Remove old discussion on copying virtual bases.
4831 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
4833         * Make-lang.in: Remove all references to g++.o/g++.c.
4834         Link g++ from gcc.o.
4836 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
4838         * decl2.c (comdat_linkage): Treat vtables like functions.
4840 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
4842         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
4844 1999-03-25  Nathan Sidwell  <nathan@acm.org>
4846         * decl.c (init_decl_processing): Add `signed' type as a synonym
4847         for `int'.
4849 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
4851         * typeck.c (common_type): Handle cv-qual unification for pointers
4852         to members.
4854         * decl.c (unqualified_namespace_lookup): Return error_mark_node
4855         on error.
4856         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
4857         * lex.c (do_identifier): If we got error_mark_node, call
4858         lookup_name again.
4860 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4862         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
4863         classes.
4865 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
4867         * decl.c (lookup_name_real): Do nested field lookup regardless of
4868         TYPE_BEING_DEFINED.
4870 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
4872         * cp-tree.h (lang_type): Remove has_assignment and
4873         has_real_assignment.  Add befriending_classes.
4874         (TYPE_HAS_ASSIGNMENT): Remove.
4875         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
4876         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
4877         (lang_decl): Document.
4878         (DECL_BEFRIENDING_CLASSES): New macro.
4879         (FRIEND_NAME): Move declaration to more obvious location.
4880         (FRIEND_DECLS): Likewise.
4881         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
4882         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
4883         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
4884         (grok_op_properties): Likewise.
4885         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
4886         (add_friend): Likewise.  Don't do weird things with assignment
4887         operators.  Update DECL_BEFRIENDING_CLASSES.
4888         (add_friends): Don't do weird things with assignment operators.
4889         (make_friend_class): Likewise.  Update
4890         CLASSTYPE_BEFRIENDING_CLASSES.
4891         * pt.c (instantiate_class_template): Don't set
4892         TYPE_HAS_ASSIGNMENT.
4893         (tsubst_copy): Substitute the TREE_TYPE for more unary
4894         expressions.
4895         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
4896         * search.c (protected_accessible_p): New function.
4897         (friend_accessible_p): Likewise.
4898         (accessible_p): Use them.
4900 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
4902         * pt.c (convert_nontype_argument): Don't create things that aren't
4903         PTRMEM_CSTs when applying a qualification conversion to a
4904         PTRMEM_CST.
4906 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
4908         * Makefile.in (OBJS): Don't mention hash.o.
4909         (OBJDEPS): Likewise.
4911 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
4913         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
4914         * decl.c (expand_static_init): Make sure we don't add any after
4915         then.
4917         * decl.c (cp_finish_decl): Move intelligence about handling
4918         DECL_COMDAT for variables from here...
4919         * decl2.c (comdat_linkage): ...to here.
4920         (maybe_make_one_only): Tweak.
4921         (import_export_decl): Call comdat_linkage for variables, too.
4922         (finish_file): Handle template statics properly.
4924 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
4926         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
4927         Document internals of pointer-to-member-functions.
4928         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
4929         (PFN_FROM_PTRMEMFUNC): Likewise.
4930         (build_type_conversion): Remove unused parameter.
4931         (build_ptrmemfunc1): Declare.
4932         (expand_ptrmemfunc_cst): New function.
4933         (delta2_from_ptrmemfunc): Likewise.
4934         (pfn_from_ptrmemfunc): Likewise.
4935         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
4936         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
4937         (convert_to_reference): Remove unused parameter to
4938         build_type_conversion.
4939         (ocp_convert): Likewise.
4940         (build_user_type_conversion): Likewise.
4941         * error.c (dump_expr): Handle NULL pointer-to-member functions.
4942         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
4943         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
4944         open when handling pointer-to-member functions.
4945         * pt.c (convert_nontype_argument): Clean up error messages.  Be
4946         more stringent with pointers-to-members.
4947         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
4948         (build_unary_op): Tidy ever-so-slightly.
4949         (build_conditional_expr): Remove extra parameter to
4950         build_type_conversion.
4951         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
4952         we're using.
4953         (expand_ptrmemfunc_cst): Define.
4954         (delta2_from_ptrmemfunc): Likewise.
4955         (pfn_from_ptrmemfunc): Likewise.
4957 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
4959         * init.c (build_member_call): Handle template-id expressions
4960         correctly.
4961         * typeck.c (build_x_function_call): Likewise.
4963 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
4965         * friend.c (make_friend_class): Avoid core dump when
4966         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
4968 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
4970         * decl.c (start_function): Suppress normal linkage heuristics
4971         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
4973 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
4975         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
4976         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
4978 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4980         * parse.y (named_complex_class_head_sans_basetype):
4981         Do not push a scope for error_mark_node.
4982         (maybe_base_class_list): Likewise.
4984         * decl.c (start_decl): Check for error_mark_node as a type.
4985         Detected by g++.brendan/array-refs.C.
4986         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
4987         (maybe_build_cleanup_1): Likewise.  Detected by
4988         g++.jason/incomplete1.C.
4990         * tree.c (build_dummy_object): Use void_zero_node instead of the
4991         error_mark_node.
4992         (is_dummy_object): Check for such a node.
4993         Detected by g++.bob/inherit1.C
4995 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
4997         * method.c (old_backref_index): Split out...
4998         (flush_repeats): From here.  Rename back from try_old_backref.
4999         (build_mangled_name): Put back some old-style repeat handling.
5001 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5003         * lex.c: Don't include setjmp.h.
5004         (parse_float): New static function.
5005         (pf_args): New struct.
5006         (real_yylex): Use them in call to `do_float_handler'.
5008 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
5010         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
5011         * tree.c (layout_basetypes): Not here.
5012         * search.c (dfs_search): Remove; no longer used.
5014 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
5016         * decl2.c (validate_nonmember_using_decl): Issue sensible
5017         error-messages on bogus qualifiers.
5019 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
5021         * call.c (add_function_candidate): Fix uninitialized variable.
5023         * Makefile.in (search.o): Add dependency on varray.h.
5025 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
5027         * decl.c (duplicate_decls): Use same_type_p.
5028         * method.c (try_old_backref): Renamed from flush_repeats.  Use
5029         same_type_p.  Don't try to handle repeats.  Return success.
5030         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
5031         calls from old-style code, too.
5032         (check_ktype): Use same_type_p.
5033         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
5034         (build_qualified_name): Simplify logic.
5035         (process_overload_item): Strip typedefs and quals at the top.
5036         (build_mangled_name_for_type_with_Gcode): Remove call to
5037         type_canonical_variant.
5038         (build_mangled_name): Likewise.  Remove support for old-style
5039         repeats, which have been disabled since 2.7.2.  Don't mess with
5040         TREE_USED.
5041         (build_decl_overload_real): Don't mess with TREE_USED.
5043 1999-03-13  Nathan Sidwell  <nathan@acm.org>
5045         * error.c (cp_printers): Add 'F' escape character.
5046         (dump_type_real): Remove TREE_LIST (fnargs) printing.
5047         Functionality moved to dump_parameters.
5048         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
5049         (dump_function_decl): Extend meaning of V parameter.  Use
5050         dump_parameters and dump_exception_spec.
5051         (dump_parameters): New static function.
5052         (dump_exception_spec): New static function.
5053         (fndecl_as_string): Change argument semantics.  Use
5054         dump_function_decl directly.
5056         * sig.c (build_signature_table_constructor): Use cp_error.
5058 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5060         * semantics.c (finish_switch_cond): Handle error cases gracefully.
5061         Detected by g++.law/enum5.C.
5063         * typeck.c (build_modify_expr): Check for errors after resolving
5064         offsets.  Detected by g++.brendan/static1.C.
5066         * decl.c (complete_array_type): Ignore initial_value if it is an
5067         error.  Detected by g++.benjamin/17930.C.
5069         * typeck2.c (process_init_constructor): Return error if one argument
5070         is in error.  Detected by g++.benjamin/13478.C.
5072 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5074         * decl.c (select_decl): Allow class templates when we need types.
5075         * decl2.c (ambiguous_decl): Likewise.
5077 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
5079         * lex.c (do_identifier): Correct call to enforce_access.
5080         * search.c (accessible_p): Tweak comment.
5082 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
5084         * semantics.c (begin_class_definition): Call build_self_reference.
5085         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
5087         * search.c (assert_canonical_unmarked): Fix typo in prototype.
5089         * search.c (dfs_canonical_queue): New function.
5090         (dfs_assert_unmarked_p): Likewise.
5091         (assert_canonical_unmarked): Likewise.
5092         (access_in_type): Use it.
5093         (accessible_p): Likewise.  Walk the whole tree when umarking.
5095         * sig.c (build_signature_table_constructor): Use accessible_p
5096         instead of compute_access.
5098 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
5100         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
5102 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
5104         * cp-tree.h (flag_access_control): Declare.
5105         (TREE_VIA_PPUBLIC): Document.
5106         (DECL_NONSTATIC_MEMBER_P): New macro.
5107         (enforce_access): Return an indication of whether or not access
5108         was permitted.
5109         (build_self_reference): Change prototype.
5110         (compute_access): Replace with ...
5111         (accessible_p): New function.
5112         (dfs_walk): Change prototype.
5113         (dfs_unmark): Likewise.
5114         (markedp): Likewise.
5115         * call.c (enforce_access): Use accessible_p.
5116         * class.c (build_self_reference): Insert the declaration into the
5117         list of members for this type, and make it public.
5118         * decl.c (xref_basetypes): Avoid ill-timed recursion.
5119         * init.c (build_offset_ref): Use lookup_member, not three separate
5120         name-lookups.  Call enforce_access rather than checking for
5121         illegal accesses here.
5122         (resolve_offset_ref): Likewise.
5123         * lex.c (do_identifier): Likewise.
5124         * method.c (hack_identifier): Likewise.
5125         * parse.y (self_reference): Remove.
5126         (opt_component_decl_list): Don't use it.
5127         * parse.c: Regenerated.
5128         * pt.c (print_candidates): Generalize to handle lists of
5129         overloaded functions.
5130         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
5131         not set.
5132         (get_template_base): Use new calling convention for dfs_walk.
5133         * search.c: Include varray.h.  Add prototypes.
5134         (dfs_walk): Accept a data pointer to pass to the work functions.
5135         All callers changed.  All work functions changed.
5136         (breadth_first_search): Rename to bfs_walk, and make consistent
5137         with dfs_walk.
5138         (dfs_walk_real): New function.
5139         (canonical_binfo): New function.
5140         (context_for_name_lookup): Likewise.
5141         (shared_marked_p): Likewise.
5142         (shared_unmarked_p): Likewise.
5143         (lokup_field_queue_p): Likewise.
5144         (lookup_field_r): Generalize to handle both functions and fields.
5145         (lookup_field): Just call lookup_member.
5146         (lookup_fnfields): Likewise.
5147         (lookup_member): Move body of lookup_field here and generalize.
5148         (dfs_accessible_queue_p): Likewise.
5149         (dfs_accessible_p): Likewise.
5150         (dfs_access_in_type): Likewise.
5151         (access_in_type): Likewise.
5152         (compute_access): Remove, and replace with ...
5153         (accessible_p): New function.
5154         (vbase_types): Remove.
5155         (vbase_decl_ptr_intermediate): Likewise.
5156         (vbase_decl_ptr): Likewise.
5157         (vbase_init_result): Likewise.
5158         (closed_envelopes): Likewise.
5159         (bvtable): Likewise.
5161 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
5163         * call.c (add_function_candidate): Check for proper number of args
5164         before checking the validity of those args.
5166 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
5168         * cp-tree.h (struct lang_type): Add anon_union field.
5169         (ANON_UNION_TYPE_P): Use it instead of examining type.
5170         (SET_ANON_UNION_TYPE_P): New macro.
5171         * decl.c (check_tag_decl): Use it.
5173         * search.c (compute_access): Handle non-type contexts earlier, and
5174         handle NULL_TREE.
5176         * tree.c (build_exception_variant): Use copy_to_permanent.
5178         * decl2.c (setup_initp): Give statics with no priority the default
5179         priority here.
5180         (do_dtors, do_ctors, finish_file): Remove special handling of
5181         non-prioritized statics.
5183 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
5185         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
5186         * decl.c (make_typename_type): Don't issue an error if an
5187         immediate lookup fails; it migt be resolved later.
5188         * friend.c (is_friend): Add comment.
5189         * search.c (breadth_first_search): Add POSTFN and DATA
5190         parameters.  Tidy.  All callers changed.
5191         (lookup_field_queue_p): New function.
5192         (lookup_field_r): Likewise.
5193         (lookup_field_post): Likewise.
5194         (lookup_field): Use them, via breadth_first_search, instead of
5195         duplicating logic.
5196         (compute_access): Robustify.
5197         (lookup_fnfield_info): New structure.
5199 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
5201         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
5203 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
5205         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
5206         cc happy.
5208         * decl2.c (import_export_class): Also return if
5209         CLASSTYPE_INTERFACE_ONLY is set.
5211 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5213         * decl.c (push_overloaded_decl): Only overwrite the old binding if
5214         there was one.
5215         * decl2.c (do_local_using_decl): Fix loop termination.
5217 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
5219         * cp-tree.h (determine_specialization): Don't declare.
5220         * pt.c (determine_specialization): Make it static.  Eliminate
5221         complain parameter.  Note that decl is always non-NULL now, and
5222         simplify accordingly.
5224         * decl.c (maybe_push_to_top_level): Always call
5225         push_cp_function_context.
5226         (pop_from_top_level): Always call pop_cp_function_context.
5228 1999-02-26  Nathan Sidwell  <nathan@acm.org>
5230         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
5231         diagnostics.
5232         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
5233         * init.c (build_new_1): Extra arg to complete_type_or_else.
5234         (build_delete): Likewise.
5235         * typeck.c (require_complete_type): Likewise.
5236         (pointer_int_sum): Likewise.
5237         (pointer_diff): Likewise.
5238         (build_component_ref): Likewise.
5240         * typeck2.c (incomplete_type_error): Always use cp_error.
5241         Show declaration of undefined type, if appropriate.
5242         Deal with UNKNOWN_TYPE nodes.
5244         * typeck.c (require_complete_type): Use TYPE_SIZE as
5245         size_zero_node to mean incomplete type.
5246         (require_complete_type_in_void): New function.
5247         (build_compound_expr): Call complete_type_in_void for LHS.
5248         (build_c_cast): Call complete_type_in_void for void cast.
5249         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
5250         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
5251         require_complete_type_in_void.  Call it.
5252         * cp-tree.h (require_complete_type_in_void): Prototype new function.
5254         * typeck.c (convert_arguments): Use alternative format for
5255         function decls.  Don't require_complete_type here.  Simplify
5256         diagnostic printing.
5257         (convert_for_initialization): Don't require_complete_type on RHS yet.
5258         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
5260         * call.c (build_over_call): Cope with qualified void return type.
5261         * semantics.c (finish_call_expr): Likewise.
5262         * typeck.c (build_function_call_real): Likewise.
5263         (c_expand_return): Likewise.
5264         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
5266         * call.c (print_z_candidates): Use alternate print format, to be
5267         consistent with (pt.c) print_candidates.
5268         * method.c (hack_identifier): List candidate members.
5269         * search.c (lookup_field): Build ambiguous list, and show it, if
5270         ambiguous.
5272 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
5274         * typeck.c (decay_conversion): Don't confuse constant array
5275         variables with their initializers.
5277         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
5278         merging decls.
5279         * pt.c (regenerate_decl_from_template): Tweak for clarity.
5280         (instantiate_decl): Mark a decl instantiated before regenerating
5281         it to avoid recursion.
5282         * tree.c (mapcar): Don't call decl_constant_value unless we know
5283         something is TREE_READONLY_DECL_P.
5285         * class.c (check_for_override): Don't stop checking when we find
5286         the first overridden function.  Delete #if 0'd code.
5287         * search.c (get_matching_virtual): Likewise.
5289 1999-02-25  Richard Henderson  <rth@cygnus.com>
5291         * lang-specs.h: Define __FAST_MATH__ when appropriate.
5293 1999-02-24  Mike Stump  <mrs@wrs.com>
5295         * typeck.c (convert_for_assignment): Allow boolean integral constant
5296         expressions to convert to null pointer.
5298 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
5300         * decl.c (lookup_namespace_name): Resolve namespace aliases.
5302         * class.c (push_nested_class): Allow namespaces.
5304         * decl2.c (set_decl_namespace): Add friendp parameter.
5305         * decl.c (grokfndecl): Pass it.
5306         (grokvardecl): Likewise.
5307         * cp-tree.h: Change declaration.
5309 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
5311         * pt.c (tsubst): Allow an array of explicit size zero.
5313 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
5315         * errfn.c: Change varargs code to look like toplev.c.
5317         * method.c (process_modifiers): Don't prepend 'U' for char or
5318         wchar_t.
5320 1999-02-20  Craig Burley  <craig@jcb-sc.com>
5322         * Make-lang.in (cplib2.ready): Don't consider updating
5323         cplib2 stuff if the current directory isn't writable, as
5324         it won't work (such as during a `make install').
5326 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
5328         * decl2.c (start_objects): Make file scope constructors and
5329         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
5330         ASM_OUTPUT_DESTRUCTOR are defined.
5332 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
5334         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
5335         (fn_type_unification): Adjust prototype.
5336         (lookup_fnfields_1): Declare.
5337         * call.c (add_template_candidate_real): Adjust call to
5338         fn_type_unification.
5339         * class.c (add_method): Don't allow duplicate declarations of
5340         constructors or destructors.
5341         (resolve_address_of_overloaded_function): Remove unused variable.
5342         Adjust call to fn_type_unification.
5343         * decl.c (grokfndecl): Be more robust in the face of illegal
5344         specializations.
5345         * decl2.c (check_classfn): Remove hokey handling of member
5346         templates.
5347         * pt.c (determine_specialization): Improve comments.  Adjust to
5348         handle template argument deduction as per the standard.
5349         (check_explicit_specialization): Fix comment spacing.  Handle
5350         type-conversion operators correctly.  Improve error-recovery.
5351         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
5352         (get_bindings_real): Simplify handling of static members.
5353         * search.c (lookup_fnfields_1): Make it have external linkage.
5354         * typeck.c (compparms): Fix comment.
5355         (build_unary_op): Don't try to figure out which template
5356         specialization is being referred to when when the address-of
5357         operator is used with a template function.
5359 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5361         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
5362         keyword to match an analogous change at the top level.
5364         * tree.c (lvalue_or_else): Likewise.
5366 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
5368         * decl.c (xref_basetypes): Comment.
5369         * pt.c (instantiate_class_template): Use xref_basetypes.
5371 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
5373         * cp-tree.h (tsubst): Change prototype.
5374         (tsubst_expr): Likewise.
5375         (tsubst_copy): Likewise.
5376         (type_unification): Remove prototype.
5377         * call.c (convert_default_arg): Adjust call to tsubst_expr.
5378         * class.c (resolve_address_of_overloaded_function): Just use
5379         fn_type_unification.
5380         * decl.c (grokdeclarator): Adjust call to tsubst.
5381         * method.c (build_template_parm_names): Likewise.
5382         * pt.c (GTB_VIA_VIRTUAL): New macro.
5383         (GTB_IGNORE_TYPE): Likewise.
5384         (resolve_overloaded_unification): Add `complain' parameter.
5385         (try_one_overload): Likewise.
5386         (tsubst_template_arg_vector): Likewise.
5387         (tsubst_template_parms): Likewise.
5388         (tsubst_aggr_type): Likewise.
5389         (tsubst_arg_types): Likewise.
5390         (tsubst_call_declarator_parms): Likewise.
5391         (unify): Remove explicit_mask.
5392         (type_unification_real): Likewise.
5393         (get_template_base_recursive): Likewise.
5394         (coerce_template_template_parms): Provide prototype.
5395         (tsubst_function_type): Likewise.
5396         (try_class_unification): New function.
5397         All callers changed to use new complain parameter.
5398         (get_template_base): Use try_class_unification.
5399         (unify): Adjust handling of classes derived from template types.
5400         (fn_type_unification): Substitute explicit arguments before
5401         unification.
5403 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5405         * decl.c (pushdecl): Remove dead code.
5407 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
5409         * decl2.c (finish_objects): Fix code I missed in previous change.
5411 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
5413         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
5414         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
5416         * pt.c (maybe_process_partial_specialization): Complain about
5417         'template <>' on non-specialization.
5419 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
5421         * decl.c (grokdeclarator): Catch wierd declarators.
5422         * decl2.c (finish_file): Don't abort because of namespace parsing
5423         failure.
5424         (check_decl_namespace): Remove.
5426 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
5428         * cp-tree.h (get_template_base): Don't declare.
5429         (dfs_walk): Declare.
5430         (dfs_unmark): Likewise.
5431         (markedp): Likewise.
5432         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
5433         targs to get_template_base.
5434         (get_template_base_recursive): Move here from search.c.  Check to
5435         see that the base found can be instantiated to form the desired
5436         type.
5437         (get_template_base): Likewise.
5438         (get_class_bindings): Simplify.
5439         * search.c (get_template_base_recursive): Move to pt.c.
5440         (get_template_base): Likewise.
5441         (markedp): Make it global.
5442         (dfs_walk): Likewise.
5443         (dfs_unmark): Likewise.
5445 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
5447         * pt.c (maybe_process_partial_specialization): Complain about
5448         specialization in wrong namespace.
5449         * tree.c (decl_namespace_context): New fn.
5451 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5453         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
5454         * pt.c (coerce_template_template_parms): Handle nested
5455         template template parameters.
5457 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
5459         * typeck2.c: Update email addresses.
5461 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5463         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
5464         turned off.
5466 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
5468         * lex.c (retrofit_lang_decl): Split out...
5469         (build_lang_decl): From here.
5470         * decl.c (pushdecl): Call it for functions generated by the middle
5471         end that don't have DECL_LANG_SPECIFIC.
5472         * cp-tree.h: Declare it.
5474         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
5475         (start_objects, finish_objects): Only use special
5476         init_priority code if the user specified a priority.
5477         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
5478         objects.
5480 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
5482         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
5483         mkstemp.o.  Get them from libiberty now.
5484         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
5486 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
5488         * decl2.c (lang_decode_option): Use read_integral_parameter.
5490 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
5492         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
5493         before calling complete_type_or_else.
5495 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5497         * input.c (inline): Don't define, its handled by system.h.
5499 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
5501         * decl2.c: Don't define flag_no_ident here.  Don't process
5502         -f(no-)ident here.
5503         * cp-tree.h: Don't declare flag_no_ident here.
5504         * lang-specs.h: Map -Qn to -fno-ident.
5506 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
5508         * cp-tree.h (struct tree_binding): Replace scope field with a union.
5509         (BINDING_SCOPE): Adjust.
5510         * decl.c (BINDING_LEVEL): Adjust.
5512 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
5514         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
5515         member constants.
5517         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
5518         a ctor initializer.
5520         * tree.c (equal_functions): Fix name in prototype.
5522         * decl.c (push_local_binding): Add FLAGS argument.
5523         (pushdecl, push_overloaded_decl): Pass it.
5524         * decl2.c (do_local_using_decl): Likewise.
5525         * cp-tree.h: Adjust prototype.
5526         * decl.c (poplevel): Fix logic.
5528         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
5529         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
5530         (cat_namespace_levels): Don't loop forever.
5532 1999-01-25  Richard Henderson  <rth@cygnus.com>
5534         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
5536 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
5538         * class.c (resolve_address_of_overloaded_function): Mark the
5539         chosen function used.
5541         * call.c (build_call): Make sure that a function coming in has
5542         been marked used already.
5543         * decl.c (expand_static_init): Call mark_used instead of
5544         assemble_external.
5545         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
5546         alloc_eh_object, expand_throw): Likewise.
5547         * init.c (build_builtin_delete_call): Likewise.
5548         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
5549         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
5550         expand_generic_desc): Likewise.
5552 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5554         * tree.c (equal_functions): New function.
5555         (ovl_member): Call it.
5557 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
5559         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
5561 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
5563         * decl.c (decls_match): Return 1 if old and new are identical.
5564         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
5566 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
5568         * decl.c (start_function): Make member functions one_only on windows.
5569         * decl2.c (import_export_decl): Likewise.
5571         * decl.c (grokdeclarator): Don't complain about implicit int in
5572         a system header.  Change same-name field check to not complain in
5573         a system header instead of within extern "C".
5575 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
5577         * cp-tree.h (PUSH_GLOBAL): New macro.
5578         (PUSH_LOCAL): Likewise.
5579         (PUSH_USING): Likewise.
5580         (namespace_bindings_p): Declare.
5581         (push_overloaded_decl): Likewise.
5582         * decl.c (push_overloaded_decl): Don't make it static.  Check for
5583         illegal declarations after using declarations here.
5584         (namespace_bindings_p): Likewise.
5585         (duplicate_decls): Don't consider declarations from different
5586         namespaces to be the same.
5587         (pushdecl): Use symbolic PUSH_ constants in calls to
5588         push_overloaded_decl.
5589         (push_overloaded_decl_1): Likewise.
5590         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
5591         (do_nonmember_using_decl): Check for illegal using declarations
5592         after ordinary declarations here.
5593         (do_local_using_decl): Call pushdecl to insert declarations.
5595 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
5597         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
5599 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
5601         * tree.c (build_cplus_array_type_1): Don't call build_array_type
5602         for types involving template parameters.
5604         * cp-tree.h (PARM_DECL_EXPR): Delete.
5605         (convert_default_arg): Change prototype.
5606         (check_default_argument): Declare.
5607         (search_tree): Likewise.
5608         * call.c (convert_default_arg): Take the function to which the
5609         default argument belongs as a parameter, and do any necessary
5610         instantiation here, instead of ...
5611         (build_over_call): Here.
5612         * decl.c (local_variable_p): New function.
5613         (check_default_argument): Likewise, split out and tidied from ...
5614         (grokparms): Here.
5615         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
5616         * pt.c (tsubst_call_declarator_parms): New function.
5617         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
5618         with CALL_EXPRs, rather than trying to be clever.
5619         (tsubst): Use tsubst_call_declarator_parms.
5620         * tree.c (search_tree): Don't make it static.
5621         * typeck.c (convert_arguments): Use new interface to
5622         convert_default_arg.
5624 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
5626         * error.c (dump_function_decl): Don't print the argument types for
5627         a function when the verbosity level is negative.
5629         * call.c (build_over_call): Check format attributes at call-time.
5631         * pt.c (tsubst_copy): Fix comment.
5632         (unify): Don't allow unification with variable-sized arrays.
5634         * semantics.c (finish_stmt_expr): When processing a template make
5635         the BIND_EXPR long-lived.
5637 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
5639         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
5640         (import_export_vtable): Not here.
5642 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
5644         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
5645         non-static member function.
5647 1999-01-18  Nathan Sidwell  <nathan@acm.org>
5649         * class.c (instantiate_type): Only diagnose illegal address of member
5650         function if complaining.
5652         * decl.c (lookup_name_real): Remove duplicate code.
5654 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
5656         * tree.c (copy_template_template_parm): Use permanent_obstack.
5658 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5660         * pt.c (unify): Remove restrictions on deduction of argument
5661         of template template parameters.
5663 1999-01-18  Nathan Sidwell  <nathan@acm.org>
5665         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
5667         * class.c (resolve_address_of_overloaded_function): Show list of
5668         all candidates, when none of them match.
5670 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
5672         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
5673         definition of 'casting away const' in reinterpret_cast<>.
5675 1999-01-18  Graham  <grahams@rcp.co.uk>
5677         * cvt.c: Add include for decl.h, remove extern for
5678         static_aggregates which is now provided by decl.h.
5680         * Makefile.in (cvt.o): Add dependency for decl.h and missing
5681         dependencies for convert.h and flags.h.
5683 1999-01-18  Nathan Sidwell  <nathan@acm.org>
5685         * decl2.c (do_dtors): Set current location to that of the
5686         decl, for sensible diagnostics and debugging.
5687         (check_classfn): Issue `incomplete type' error, if
5688         class is not defined.
5690 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
5692         * cp-tree.h: Add prototype for bound_pmf_p.
5694 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
5695             Manfred Hollstein <manfred@s-direktnet.de>
5697         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
5698         -Wreturn-type.
5700 1999-01-16  Nathan Sidwell  <nathan@acm.org>
5702         * cp-tree.h (struct lang_type): Added has_mutable flag.
5703         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
5704         (TYPE_HAS_MUTABLE_P): New macro to read it.
5705         (cp_has_mutable_p): Prototype for new function.
5706         * class.c (finish_struct_1): Set has_mutable from members.
5707         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
5708         it contains a mutable.
5709         * typeck.c (cp_has_mutable_p): New function.
5711 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
5713         * pt.c (process_template_parm): Ignore top-level qualifiers on
5714         non-type parameters.
5716         * decl.c (start_function): Use current_function_parms in the call
5717         to require_complete_type_for_parms, not the probably empty
5718         DECL_ARGUMENTS.
5720 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
5722         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
5724         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
5725         that we don't suppress the other copies.
5726         * lex.c (handle_cp_pragma): Likewise.
5728 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
5730         * decl.c (grokdeclarator): Undo 1998-12-14 change.
5731         * tree.c (build_cplus_array_type_1): Likewise.
5732         * pt.c (instantiate_class_template): Remove misleading comment.
5733         (tsubst_aggr_type): Substitute if there are template parameters,
5734         regardless of whether or not they use template arguments.
5735         (unify): Likewise, but for unification.
5737 1999-01-12  Richard Henderson  <rth@cygnus.com>
5739         * cp-tree.h (flag_permissive): Declare extern.
5741 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
5743         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
5744         here.
5745         (lang_type): Add is_partial_instantiation.  Decrease width of
5746         dummy.
5747         (PARTIAL_INSTANTIATION_P): New macro.
5748         (OPERATOR_TYPENAME_P): Remove.
5749         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
5750         OPERATOR_TYPENAME_P.
5751         (grok_op_properties): Likewise.
5752         * friend.c (do_friend): Handle friends that are member functions
5753         correctly.
5754         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
5755         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
5756         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
5757         any more partial instantiation than is absolutely necessary for
5758         implicit typename.  Set PARTIAL_INSTANTIATION_P.
5759         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
5760         * semantics.c (begin_class_definition): Handle partial
5761         specializations of a type that was previously partially
5762         instantiated.
5764 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
5766         * g++spec.c (LIBSTDCXX): Provide default definition.
5767         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
5769 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5771         * Make-lang.in (g++.o): Depend on prefix.h.
5773 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
5775         * tree.c (bound_pmf_p): New fn.
5776         * typeck.c (build_c_cast): Use it.
5778         * decl.c (grok_op_properties): Use same_type_p.
5780 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5782         * Makefile.in (cvt.o): Depend on toplev.h.
5784         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
5786         * cvt.c: Include toplev.h.
5788         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
5789         definitions.
5791         * init.c (expand_vec_init): Initialize variable `itype'.
5793         * lex.c (yyerror): Cast the argument passed to a ctype function to
5794         an unsigned char.
5796         * method.c (build_mangled_C9x_name): Wrap prototype and definition
5797         in "HOST_BITS_PER_WIDE_INT >= 64".
5799         * typeck.c (build_binary_op): Mark parameter `convert_p' with
5800         ATTRIBUTE_UNUSED.
5802 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
5804         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
5805         * tree.c (build_exception_variant): Don't crash on empty throw
5806         specs.
5808 1998-12-18  DJ Delorie  <dj@cygnus.com>
5810         * cvt.c (convert_to_reference): Check for both error_mark_node
5811         and NULL_NODE after call to convert_for_initialization.
5813 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
5815         * error.c (interesting_scope_p): New fn.
5816         (dump_simple_decl): Use it.
5817         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
5818         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
5820 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
5822         * class.c (resolve_address_of_overloaded_function): Do conversion
5823         to correct type here, rather than ...
5824         (instantiate_type): Here.
5826         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
5827         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
5828         (decl_template_parm_p): Remove.
5829         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
5830         parameter.
5831         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
5832         * pt.c (push_inline_template_parms_recursive): Set it.
5833         (decl_template_parm_p): Remove.
5834         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
5835         (process_template_parm): Set it.
5837 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
5839         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
5840         if configured with cpplib.
5842 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
5844         * decl.c (poplevel): Make sure ns_binding is initialized.
5846         * decl.c (finish_function): Undo inadvertent change in previous
5847         patch.
5849 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
5851         * class.c (pushclass): Tweak handling of class-level bindings.
5852         (resolve_address_of_overloaded_function): Update pointer-to-member
5853         handling.
5854         (instantiate_type): Likewise.
5855         * cvt.c (cp_convert_to_pointer): Likewise.
5856         * decl.c (pop_binding): Take the DECL to pop, not just the name.
5857         Deal with `struct stat' hack.
5858         (binding_level): Add to documentation.
5859         (push_binding): Clear BINDING_TYPE.
5860         (add_binding): New function.
5861         (push_local_binding): Use it.
5862         (push_class_binding): Likewise.
5863         (poplevel): Adjust calls to pop_binding.
5864         (poplevel_class): Likewise.
5865         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
5866         declarations to current binding level.
5867         (push_class_level_binding): Likewise.
5868         (push_overloaded_decl): Adjust handling of OVERLOADs in local
5869         bindings.
5870         (lookup_namespace_name): Don't crash when confronted with a
5871         TEMPLATE_DECL.
5872         (lookup_name_real): Do `struct stat' hack in local binding
5873         contexts.
5874         (build_ptrmemfunc_type): Adjust documentation.
5875         (grokdeclarator): Don't avoid building real array types when
5876         processing templates unless really necessary.
5877         (finish_method): Adjust calls to pop_binding.
5878         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
5879         not reparse_decl_as_expr.
5880         (build_expr_from_tree): Deal with a template-id as the function to
5881         call in a METHOD_CALL_EXPR.
5882         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
5883         (maybe_adjust_types_For_deduction): Don't do peculiar things with
5884         METHOD_TYPEs here.
5885         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
5886         pointer-to-member types where necessary.
5887         * tree.c (build_cplus_array_type_1): Don't avoid building real
5888         array types when processing templates unless really necessary.
5889         (build_exception_variant): Compare the exception lists correctly.
5891 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
5893         * cp-tree.def (CPLUS_BINDING): Update documentation.
5894         * cp-tree.h (LOCAL_BINDING_P): New macro.
5895         (lang_identifier): Rename local_value to bindings.
5896         (tree_binding): Make `scope' of type `void*', not `tree'.
5897         (BINDING_SCOPE): Update documentation.
5898         (IDENTIFIER_LOCAL_VALUE): Remove.
5899         (IDENTIFIER_CLASS_VALUE): Document.
5900         (IDENTIFIER_BINDING): New macro.
5901         (IDENTIFIER_VALUE): Likewise.
5902         (TIME_IDENTIFIER_TIME): Likewise.
5903         (TIME_IDENTIFIER_FILEINFO): Likewise.
5904         (IMPLICIT_TYPENAME_P): Likewise.
5905         (set_identifier_local_value): Remove.
5906         (push_local_binding): New function.
5907         (push_class_binding): Likewise.
5908         * class.c (pushclass): Update comments; use push_class_binding.
5909         * decl.c (set_identifier_local_value_with_scope): Remove.
5910         (set_identifier_local_value): Likewise.
5911         (push_binding): New function.
5912         (pop_binding): Likewise.
5913         (binding_level): Update documentation.  Remove shadowed.
5914         (BINDING_LEVEL): New macro.
5915         (free_binding_nodes): New variable.
5916         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
5917         BLOCK_VARs when doing for-scope extension.  Remove effectively
5918         dead code.
5919         (pushlevel_class): Tweak formatting.
5920         (poplevel_class): Adjust for new name-lookup scheme.
5921         (print_binding_level): Likewise.
5922         (store_bindings): Likewise.
5923         (pushdecl): Likewise.
5924         (pushdecl_class_level): Likewise.
5925         (push_class_level_binding): Likewise.
5926         (push_overloaded_decl): Update comments.  Adjust for new
5927         name-lookup scheme.
5928         (lookup_name_real): Likewise.
5929         (lookup_name_current_level): Likewise.
5930         (cp_finish_decl): Likewise.
5931         (require_complete_types_for_parms): Likewise.  Remove misleading
5932         #if 0'd code.
5933         (grok_parms): Likewise.  Don't call
5934         require_complete_types_for_parms here.
5935         (grok_ctor_properties): Don't treat templates as copy
5936         constructors.
5937         (grop_op_properties): Or as assignment operators.
5938         (start_function): Document.  Adjust for new name-lookup scheme.
5939         (finish_function): Likewise.
5940         * decl2.c (do_local_using_decl): Use push_local_binding.
5941         * lex.c (begin_definition_of_inclass_inline): New function, split
5942         out from ...
5943         (do_pending_inlines): Here, and ...
5944         (process_next_inline): Here.
5945         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
5946         (init_filename_times): Likewise.
5947         (extract_interface_info): Likewise.
5948         (ste_typedecl_interface_info): Likewise.
5949         (check_newline): Likewise.
5950         (dump_time_statistics): Likewise.
5951         (handle_cp_pragma): Likewise.
5952         (do_identifier): Adjust for new name-lookup scheme.
5953         * parse.y (function_try_block): Return ctor_initializer_opt value.
5954         (fndef): Use it.
5955         (fn.defpen): Pass appropriate values to start_function.
5956         (pending_inline): Use functor_try_block value, and pass
5957         appropriate values to finish_function.
5958         * pt.c (is_member_template): Update documentation; remove handling
5959         of FUNCTION_DECLs.  As per name, this function should deal only in
5960         TEMPLATE_DECLs.
5961         (decl_template_parm_p): Change name of olddecl parameter to decl.
5962         (check_template_shadow): Adjust for new name-lookup scheme.
5963         (lookup_template_class): Likewise.
5964         (tsubst_decl): Tweak so as not to confuse member templates with
5965         copy constructors and assignment operators.
5966         (unify): Handle UNION_TYPEs.
5967         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
5968         (lang_print_xnode): Adjust for new name-lookup scheme.
5969         * typeck.c (mark_addressable): Likewise.
5970         (c_expand_return): Likewise.
5972 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
5974         * decl.c (grokdeclarator): Allow field with same name as class
5975         in extern "C".
5977         * decl.c (lookup_name_real): Don't limit field lookup to types.
5978         * class.c (check_member_decl_is_same_in_complete_scope): No error
5979         if icv and x are the same.
5980         * lex.c (do_identifier): Tweak error message.
5982 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
5984         * decl.c (start_enum): Use push_obstacks, not
5985         end_temporary_allocation.
5986         (finish_enum): Call pop_obstacks.
5988 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
5990         * class.c (instantiate_type): Return error_mark_node rather than
5991         junk.
5993 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
5995         * cp-tree.h (most_specialized_instantiation): New function.
5996         (print_candidates): Likewise.
5997         * class.c (validate_lhs): Remove.
5998         (resolve_address_of_overloaded_function): New function, split out
5999         and then substantially reworked, from ...
6000         (instantiate_type): Use it.  Simplify.
6001         * cvt.c (convert_to_reference): Complain when caller has indicated
6002         that's the right thing to do.  Don't crash if instantiate_type
6003         fails.
6004         * pt.c: Substitute `parameters' for `paramters' throughout.
6005         (print_candidates): Don't make it static.
6006         (most_specialized_instantiation): Split out from ...
6007         (most_specialized): Here.
6009 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
6011         * lex.c (lang_init_options): Initialize cpplib.
6012         * decl2.c (parse_options,cpp_initialized): Removed.
6013         (lang_decode_option): Move initialization of cpplib to
6014         lang_init_options.
6016 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
6018         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
6019         well as the TYPE_DECL, when a typedef name is assigned to a
6020         previously anonymous type.
6022 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
6024         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
6025         __cp_eh_info for getting the eh info pointer.  Add table_index to
6026         field list.
6027         (push_eh_cleanup): Don't increment 'handlers' data field.
6028         (process_start_catch_block): Don't set the 'caught' field.
6030         * cp/exception.cc (CP_EH_INFO): New macro for getting the
6031         exception info pointer within library routines.
6032         (__cp_eh_info): Use CP_EH_INFO.
6033         (__start_cp_handler): Get exception info pointer, set caught field,
6034         and increment the handlers field.  Avoids this being done by handlers.
6035         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
6036         (uncaught_exception): Use CP_EH_INFO macro.
6038 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
6040         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
6042 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
6044         * lex.c (check_newline): Add support for \ as `natural'
6045         characters in file names in #line to be consistent with #include
6046         handling.  We support escape processing in the # 1 "..." version of
6047         the command.  See also support in cp/lex.c.
6049 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6051         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
6052         structure.
6054 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
6056         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
6058         * error.c (dump_simple_decl): Also print namespace context.
6059         (dump_function_decl): Likewise.
6061         * decl2.c (ambiguous_decl): Don't print old value if it's
6062         error_mark_node.
6064         * decl.c (lookup_name_real): Fix handling of local types shadowed
6065         by a non-type decl.  Remove obsolete code.
6066         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
6068         * lang-options.h: Add -fpermissive.
6069         * decl2.c: Likewise.
6070         * cp-tree.h: Add flag_permissive.
6071         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
6072         were specified, set flag_pedantic_errors.
6073         * call.c (build_over_call): Turn dropped qualifier messages
6074         back into pedwarns.
6075         * cvt.c (convert_to_reference): Likewise.
6076         * typeck.c (convert_for_assignment): Likewise.
6078 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
6080         * decl2.c (coerce_new_type): Use same_type_p.
6081         (coerce_delete_type): Likewise.
6083         * call.c (check_dtor_name): Return 1, not error_mark_node.
6085 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
6087         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
6088         if MULTIPLE_SYMBOL_SPACES.
6090         * pt.c (check_template_shadow): New fn.
6091         * decl2.c (grokfield): Use it.
6092         * decl.c (pushdecl): Likewise.
6093         (pushdecl_class_level): Likewise.
6094         (start_method): Likewise.
6095         (xref_tag): Don't try to use 't' if we're defining.
6097         * call.c (check_dtor_name): Just return an error_mark_node.
6098         * pt.c (lookup_template_class): Complain about using non-template here.
6099         * parse.y (apparent_template_type): Not here.
6101         * pt.c (check_explicit_specialization): Complain about specialization
6102         with C linkage.
6104         * lang-options.h: Add -f{no-,}implicit-inline-templates.
6106         * pt.c (convert_nontype_argument): Don't assume that any integer
6107         argument is intended to be a constant-expression.
6109 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
6111         * class.c (handle_using_decl): Fix comment.  Don't lookup
6112         constructors in base classes.
6113         (validate_lhs): Fix typo in comment.
6114         * search.c (lookup_field_1): Don't return a USING_DECL.
6116         * cp-tree.h (DECL_ACCESS): Improve documentation.
6118         * decl.c (expand_static_init): Don't set the initialization-done
6119         flag until the initialization is done.
6121 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
6123         * decl2.c (validate_nonmember_using_decl): Complain about using
6124         declarations for class members.
6126 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
6128         * typeck2.c (process_init_constructor): Use same_type_p.
6130         * decl.c (check_tag_decl): Don't warn about null decl inside a
6131         class.
6133         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
6134         UNIFY_ALLOW_NONE.
6135         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
6136         (resolve_overloaded_unification): Strip baselinks.
6138 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6140         * g++spec.c: Don't prototype xmalloc.
6142 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
6144         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
6146         * decl.c (check_tag_decl): Do complain about null friend decl at
6147         file scope.
6149 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
6151         * lex.c (make_lang_type): Clear the whole struct lang_type, not
6152         only the first multiple of sizeof (int).
6154 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
6156         * decl.c (start_decl): An explicit specialization of a static data
6157         member is only a definition if it has an initializer.
6159         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
6160         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
6161         cp_finish_decl.
6162         * init.c (expand_default_init): Check for DIRECT_BIND instead of
6163         DECL_ARTIFICIAL.
6165         * call.c (build_over_call): Use build_decl.
6167         * except.c (expand_throw): Just use convert, not
6168         build_reinterpret_cast.
6170         * lex.c (handle_generic_pragma): Use token_buffer.
6172         * decl.c (check_tag_decl): Don't complain about null friend decl.
6174 1998-11-24  Dave Pitts  <dpitts@cozx.com>
6176         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
6177         first position.
6178         * lex.c (check_newline): Use ISALPHA.
6179         (readescape): Use ISGRAPH.
6180         (yyerror): Use ISGRAPH.
6182 1998-11-24  Nathan Sidwell  <nathan@acm.org>
6184         * search.c (get_abstract_virtuals): Do not use initial
6185         CLASSTYPE_ABSTRACT_VIRTUALS.
6186         * typeck2.c (abstract_virtuals_error): Show location of abstract
6187         declaration.
6188         * call.c (build_new_method_call): Use
6189         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
6190         * class.c (finish_struct_bits): Don't bother working out whether
6191         get_abstract_virtuals will do anything, just do it.
6193 1998-11-24  Graham  <grahams@rcp.co.uk>
6195         * typeck.c (build_component_ref): Remove unused statement.
6197 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
6199         * class.c (add_method): Catch invalid overloads.
6201         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
6202         * search.c (lookup_conversions): Handle getting real OVERLOADs.
6203         (add_conversions): Likewise.  Revert last change.
6204         * call.c (add_conv_candidate): Pass totype to add_candidate instead
6205         of fn.  Don't add a new candidate if the last one was for the same
6206         type.
6207         (print_z_candidates): Handle getting a type as a function.
6208         (joust): If we got two conversion candidates to the same type,
6209         just pick one.
6210         (build_object_call): Lose 'templates'.
6211         (build_user_type_conversion_1): Handle getting real OVERLOADs.
6213 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
6215         * typeck2.c (process_init_constructor): If there are elements
6216         that don't have initializers and they need to have constructors
6217         run, supply them with initializers.
6219         * class.c (finish_struct_1): A class with a 0-width bitfield is
6220         still empty.
6222 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
6224         * pt.c (instantiate_class_template): Don't try to figure out what
6225         specialization to use for a partial instantiation.  Correct
6226         typos in a couple of comments.  Avoid calling uses_template_parms
6227         multiple times.
6229 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
6231         * method.c (process_overload_item): Add call to
6232         build_mangled_C9x_name for intTI_type_nodes.
6233         (build_mangled_C9x_name): Add prototype, define.
6234         * decl.c (init_decl_processing): Add names for
6235         TImode_type_node.
6237 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
6239         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
6241         * class.c (finish_struct_1): Set things up for 0-width bitfields
6242         like we do for others.
6244         * decl.c (check_tag_decl): New fn.
6245         (shadow_tag): Split out from here.
6246         * decl2.c (grok_x_components): Call it.
6248 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
6250         * decl.c: Lose warn_about_return_type.
6251         (grokdeclarator): Always complain about implicit int, except for
6252         `main () { ... }'.
6254         * decl.c (tag_name): New fn.
6255         (xref_tag): Complain about using typedef-name after class-key.
6257         * init.c (expand_vec_init): Also keep going if from_array.
6259         * tree.c (is_overloaded_fn): Also handle the output of
6260         build_offset_ref.
6262         * decl.c (grokdeclarator): Use constructor_name when comparing
6263         field name against enclosing class.
6264         * class.c (finish_struct_anon): Likewise.
6266 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
6268         * decl.c (poplevel): Remove code to handle KEEP == 2.
6269         (finish_function): Don't confuse BLOCK-order when
6270         processing a destructor.
6272 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
6274         * decl.c (require_complete_types_for_parms): Call layout_decl
6275         after we've completed the type.
6277 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6279         * decl2.c (validate_nonmember_using_decl): Allow using templates
6280         from the global namespace.
6282 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
6284         Handle specifying template args to member function templates.
6285         * tree.c (build_overload): Always create an OVERLOAD for a template.
6286         * search.c (add_conversions): Handle finding an OVERLOAD.
6287         * decl2.c (check_classfn): Likewise.
6288         * lex.c (identifier_type): See through a baselink.
6289         * parse.y (do_id): Don't call do_identifier if we got a baselink.
6290         * class.c (instantiate_type, case TREE_LIST): Recurse.
6292         * decl.c (grokdeclarator): Allow a boolean constant for array
6293         bounds, odd as that sounds.
6295         * pt.c (unify): Be more strict about non-type parms, except for
6296         array bounds.
6297         (UNIFY_ALLOW_INTEGER): New macro.
6299 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
6301         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
6303 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
6305         * semantics.c (begin_class_definition): Call
6306         maybe_process_partial_specialization before push_template_decl.
6307         Don't call push_template_decl for a specialization.
6308         * search.c (lookup_field): Do return a member template class.
6309         * decl2.c (handle_class_head): Handle member template classes.
6311         * decl.c (grokdeclarator): A parm type need not be complete.
6313         * pt.c (convert_nontype_argument): Fix thinko.
6315 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
6317         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
6318         (global_delete_fndecl): New variable.
6319         * decl.c (global_delete_fndecl): Define it.
6320         (init_decl_processing): Set it.
6321         * init.c (build_builtin_delete_call): Use it.
6322         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
6323         nodes.
6325 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
6327         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
6328         type.
6330         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
6331         * call.c (build_object_call): Also support references to functions.
6332         * typeck.c (convert_for_initialization): Don't decay a function
6333         if the target is a reference to function.
6335         * search.c (add_conversions): Get all the overloads from a class.
6337         * decl.c (grok_ctor_properties): Complain about any constructor
6338         that will take a single arg of the class type by value.
6340         * typeck2.c (build_functional_cast): Can't create objects of
6341         abstract classes this way.
6342         * cvt.c (ocp_convert): Likewise.
6344         * decl.c (grokfndecl): Member functions of local classes are not
6345         public.
6347 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
6349         * Make-lang.in (cc1plus): Add dependency on hash.o.
6351 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
6353         * search.c (get_abstract_virtuals): Complain about virtuals with
6354         no final overrider.
6355         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
6356         with no final overrider.
6357         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
6358         on virtuals with no final overrider.
6360         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
6362         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
6363         after layout_type.
6365         * friend.c (do_friend): Don't set_mangled_name_for_decl.
6367         * class.c (finish_struct_anon): Complain about non-fields.
6368         * decl2.c (build_anon_union_vars): Likewise.
6370         * decl.c (grokdeclarator): Normal data members can't have the same
6371         name as the class, either.
6372         * class.c (finish_struct_anon): Neither can members of an
6373         anonymous union.
6375 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
6377         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
6378         (TYPE_BINFO): Likewise.
6379         (IS_AGGR_TYPE): Tweak.
6380         (SET_IS_AGGR_TYPE): New macro.
6381         (CLASS_TYPE_P): Tweak.
6382         (lang_type): Group mark bitfields together.  Remove linenum.
6383         (CLASSTYPE_SOURCE_LINE): Remove macro.
6384         (CLASSTYPE_MARKED_N): New macro.
6385         (SET_CLASSTYPE_MARKED_N): Likewise.
6386         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
6387         (CLASS_TYPE_MARKED_*): Use them.
6388         (SET_CLASSTYPE_MARKED_*): Likewise.
6389         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
6390         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
6391         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
6392         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
6393         * class.c (class_cache_obstack): New variable.
6394         (class_cache_firstobj): Likewise.
6395         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
6396         (pushclass): Free the cache, when appropriate.
6397         (popclass): Tidy.
6398         (maybe_push_cache_obstack): Use class_cache_obstack.
6399         * decl.c (include hash.h).
6400         (typename_hash): New function.
6401         (typename_compare): Likewise.
6402         (build_typename_type): Check the hash table to avoid creating
6403         duplicates.
6404         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
6405         (grokdeclarator): Use CLASS_TYPE_P.
6406         (xref_basetypes): Likewise.
6407         (start_function): Likewise.  Don't put current_class_ref on the
6408         permanent obstack.
6409         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
6410         and TYPE_TI_ARGS.
6411         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
6412         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
6413         fields for types other than class types.  Do clear TYPE_ALIAS_SET
6414         for types other than class types, though.
6415         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
6416         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6417         * pt.c (process_template_parm): Don't set
6418         CLASSTYPE_GOT_SEMICOLON.
6419         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6420         Coerce arguments on the momentary obstack.
6421         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6422         (instantiate_class_template): Calculate template arguments on the
6423         momentary obstack.  Tidy.
6424         (tsubst_template_arg_vector): Use make_temp_vec.
6425         (tsubst_aggr_type): Put template arguments on the momentary
6426         obstack.
6427         (tsubst_decl): Likewise.
6428         (tsubst): Copy the array bounds index to the permanent obstack
6429         before building index types.  Use new macros.
6430         (unify): Use new macros.
6431         (do_type_instantiation): Likewise.
6432         * search.c (lookup_fnfields_1): Use new macros.
6433         (dfs_pushdecls): Build envelopes on the cache obstack.
6434         (dfs_compress_decls): Use new macros.
6435         (push_class_decls): Build on the cache obstack.
6436         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
6437         * sign.c (build_signature_pointer_or_reference_type): Use
6438         SET_IS_AGGR_TYPE.
6439         * tree.c (make_binfo): Check CLASS_TYPE_P.
6440         (copy_template_template_parm): Adjust.
6441         (make_temp_vec): Use push_expression_obstack.
6442         * typeck.c (complete_type): Use new macros.
6443         (comptypes): Likewise.
6445 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
6447         * pt.c (tsubst): Add diagnostics for invalid array, reference
6448         and pointer to member types.
6450 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
6452         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
6454         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
6455         Simplify.
6457         * parse.y (structsp): Fix cut-and-paste error.
6459         * init.c (build_new): Complain about non-integral size.
6461         * parse.y (unary_expr): Complain about defining types in sizeof.
6463         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
6465         * rtti.c (build_x_typeid): Complain about typeid without
6466         including <typeinfo>.
6467         (get_typeid): Likewise.  Complain about typeid of incomplete type.
6468         (get_tinfo_fn_dynamic): Likewise.
6469         (get_typeid_1): Not static anymore.
6470         * except.c (build_eh_type_type): Use get_typeid_1.
6472         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
6473         ambiguous or private bases.  Fix warning for reference cast.
6475 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
6477         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
6478         * decl.c (duplicate_decls): Remove special-case code to deal with
6479         template friends, and just do the obvious thing.
6480         * pt.c (register_specialization): Tweak for clarity, and also to
6481         clear DECL_INITIAL for an instantiation before it is merged with a
6482         specialization.
6483         (check_explicit_specialization): Fix indentation.
6484         (tsubst_friend_function): Handle both definitions in friend
6485         declaration and outside friend declarations.
6486         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
6487         (regenerate_decl_from_template): Tweak accordingly.
6488         (instantiate_decl): Likewise.
6490 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
6492         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
6493         member function reference to error.
6494         * cvt.c (ocp_convert): Complain about converting an overloaded
6495         function to void.
6497         * init.c (build_offset_ref): Just return a lone static member
6498         function.
6500         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
6501         not internal ones.
6503         * typeck.c (build_binary_op_nodefault): Improve error handling.
6505         * decl.c (grokfndecl): Complain about making 'main' a template.
6507         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
6509         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
6510         TYPE_DECL in a template.
6512 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
6514         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
6516         * decl.c (struct cp_function): Add named_label_uses.
6517         (push_cp_function_context): Save it.
6518         (pop_cp_function_context): Restore it.
6519         (define_label): Also complain about jumping into the scope of
6520         non-POD objects that don't have constructors.
6521         * tree.c (pod_type_p): New fn.
6523         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
6524         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
6525         (get_tinfo_fn): Not here.
6526         * repo.c (repo_get_id): Abort if we get called for an incomplete
6527         type.
6529 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
6531         * except.c (expand_throw): Make sure first argument to
6532         __cp_push_exception is of type `void*' to avoid spurious error
6533         messages.
6535 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
6537         * pt.c (try_one_overload): Take orig_targs again.  Only check for
6538         mismatches against them; we don't care what a previous call found.
6539         (resolve_overloaded_unification): Adjust.
6541         * search.c (lookup_field): Don't return anything for a non-type
6542         field from a dependent type.
6543         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
6544         in an array declarator.
6545         (start_decl): Push into the class before looking for the field.
6547 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
6549         * method.c (build_overload_value): Handle REFERENCE_TYPE.
6551 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6553         * decl.c (grokdeclarator): Allow namespace-scoped members if they
6554         are friends.
6556 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
6558         * pt.c (tsubst_decl): Don't mess with the global value of an
6559         un-mangled DECL_ASSEMBLER_NAME.
6561 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
6563         * decl.c (init_decl_processing): Remove CYGWIN conditional
6564         since CYGWIN is now able to deal with trapping signals.
6566 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6568         * cp-tree.h: Don't include gansidecl.h.
6569         * exception.cc: Include gansidecl.h (since we don't include config.h)
6570         * g++spec.c: Don't include gansidecl.h.
6572 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
6574         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
6575         size of dummy.
6576         (DECL_DEFINED_IN_CLASS_P): New macro.
6577         (TEMPLATE_PARMS_FOR_INLINE): Document.
6578         (check_static_variable_definition): New function.
6579         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
6580         appropriate.
6581         (check_static_variable_definition): Split out from ...
6582         (grokdeclarator): Here.
6583         * pt.c (check_default_tmpl_args): New function, split out from ...
6584         (push_template_decl_real): Here.
6585         (instantiate_template): Fix comment.
6587 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
6589         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
6590         (CP_TYPE_VOLATILE_P): Likewise.
6591         (CP_TYPE_RESTRICT_P): Likewise.
6593 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
6595         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
6597 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
6599         * class.c (instantiate_type): Be more helpful.
6601         * decl2.c (import_export_decl): Call import_export_class.
6603         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
6604         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
6605         * pt.c (tsubst_copy): Likewise.
6607 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
6609         * init.c (expand_vec_init): Fix off-by-one error.
6611 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
6613         * parse.y (apparent_template_type): New type.
6614         (named_complex_class_head_sans_basetype): Use it.
6615         * Makefile.in (CONFLICTS): One new conflict.
6616         * parse.c: Regenerated.
6618 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
6620         * cp-tree.h (COMPARE_STRICT): New macro.
6621         (COMPARE_BASE): Likewise.
6622         (COMPARE_RELAXED): Likewise.
6623         (COMPARE_REDECLARATION): Likewise.
6624         (same_type_p): Likewise.
6625         (same_or_base_type_p): Likewise.
6626         * call.c (standard_conversion): Use them, in place of comptypes
6627         with numeric arguments.
6628         (reference_binding): Likewise.
6629         (convert_like): Likewise.
6630         (build_over_call): Likewise.
6631         (is_subseq): Likewise.
6632         (is_properly_derived_from): Likewise.
6633         (compare_ics): Likewise.
6634         (joust): Likewise.
6635         * class.c (delete_duplicate_fields_1): Likewise.
6636         (resolves_to_fixed_type_p): Likewise.
6637         (instantiate_type): Likewise.  Remove #if 0'd code.
6638         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
6639         (pushdecl): Likewise.
6640         (lookup_name_real): Likewise.
6641         (grokdeclarator): Likewise.  Check for illegal array declarations.
6642         (grokparms): Likewise.
6643         (grok_op_properties): Likewise.
6644         * decl2.c (check_classfn): Likewise.
6645         * friend.c (is_friend): Likewise.
6646         (make_friend_class): Likewise.
6647         * init.c (expand_aggr_init): Likewise.
6648         (expand_vec_init): Likewise.
6649         * pt.c (is_member_template_class): Remove declaration.
6650         (is_specialization_of): Use COMPARE_* and new macros.
6651         (comp_template_parms): Likewise.
6652         (convert_nontype_argument): Likewise.
6653         (coerce_template_template_parms): Likewise.
6654         (template_args_equal): Likewise.
6655         (lookup_template_class): Likewise.
6656         (type_unification_real): Likewise.
6657         (unify): Likewise.
6658         (get_bindings_real): Likewise.
6659         * search.c (covariant_return_p): Likewise.
6660         (get_matching_virtual): Likewise.
6661         * sig.c (match_method_types): Likewise.
6662         * tree.c (vec_binfo_member): Likewise.
6663         (cp_tree_equal): Likewise.
6664         * typeck.c (common_type): Likewise.
6665         (comp_array_types): Likewise.  Get issues involving unknown array
6666         bounds right.
6667         (comptypes): Update comments.  Use new flags.
6668         (comp_target_types): Use new macros.
6669         (compparms): Likewise.
6670         (comp_target_parms): Likewise.
6671         (string_conv_p): Likewise.
6672         (build_component_ref): Likewise.
6673         (build_indirect_ref): Likewise.
6674         (build_conditional_expr): Likewise.
6675         (build_static_cast): Likewise.
6676         (build_reinterpret_cast): Likewise.
6677         (build_const_cast): Likewise.
6678         (build_modify_expr): Likewise.
6679         (convert_for_assignment): Likewise.
6680         (comp_ptr_ttypes_real): Likewise.
6681         (ptr_reasonably_similar): Likewise.
6682         (comp_ptr_ttypes_const): Likewise.
6684 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
6686         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
6688 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
6690         * decl2.c (delete_sanity): Pass integer_zero_node, not
6691         integer_two_node, to build_vec_delete.
6692         * init.c (build_array_eh_cleanup): Remove.
6693         (expand_vec_init_try_block): New function.
6694         (expand_vec_init_catch_clause): Likewise.
6695         (build_vec_delete_1): Don't deal with case that auto_delete_vec
6696         might be integer_two_node anymore.
6697         (expand_vec_init): Rework for initialization-correctness and
6698         exception-correctness.
6699         * typeck2.c (process_init_constructor): Make mutual exclusivity
6700         of cases more obvious.
6702 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
6704         * decl.c (lookup_name_real): OK, only warn if not lexing.
6705         Simplify suggested fix.
6707         * cp-tree.h (IDENTIFIER_MARKED): New macro.
6708         * search.c (lookup_conversions): Use breadth_first_search.
6709         (add_conversions): Avoid adding two conversions to the same type.
6710         (breadth_first_search): Work with base binfos, rather
6711         than binfos and base indices.
6712         (get_virtual_destructor): Adjust.
6713         (tree_has_any_destructor_p): Adjust.
6714         (get_matching_virtual): Adjust.
6716         * pt.c (push_template_decl_real): Generalize check for incorrect
6717         number of template parms.
6718         (is_member_template_class): #if 0.
6720 1998-10-29  Richard Henderson  <rth@cygnus.com>
6722         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
6723         last.
6725 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6727         * lex.c: Call check_newline from lang_init always.  After
6728         calling cpp_start_read, set yy_cur and yy_lim to read from the
6729         cpplib token buffer.
6731 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
6733         * class.c (instantiate_type): Don't consider templates for a normal
6734         match.
6736         * class.c (finish_struct_1): Don't complain about non-copy
6737         assignment ops in union members.
6739         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
6740         (prepare_fresh_vtable): Likewise.
6741         (finish_struct_1): Don't call import_export_class.
6742         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
6743         (finish_prevtable_vardecl): Lose.
6744         (finish_file): Don't call it.
6745         * pt.c (instantiate_class_template): Likewise.
6746         * cp-tree.h: Remove it.
6748         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
6749         * decl.c (finish_function): Not here.
6750         (start_function): Do set DECL_INITIAL.
6752         * pt.c (push_template_decl_real): Complain about default template
6753         args for enclosing classes.
6755         * call.c (add_function_candidate): Treat conversion functions
6756         as coming from the argument's class.
6757         * cp-tree.h (DECL_CONV_FN_P): New fn.
6758         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
6759         * class.c (add_method): Use DECL_CONV_FN_P.
6760         * decl2.c (check_classfn): Likewise.
6761         * error.c (dump_function_name): Likewise.
6762         (dump_function_decl): Likewise.
6763         * pt.c (fn_type_unification): Likewise.
6764         * search.c (add_conversions): Likewise.
6766 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
6768         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
6769         * method.c (hack_identifier): Also check for using RESULT_DECL
6770         from outer context.
6772 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
6774         * decl.c (grokdeclarator): Use type_quals, rather than constp,
6775         consistently.
6777 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
6779         * call.c (standard_conversion): instantiate_type here.
6780         (reference_binding): And here.
6781         (implicit_conversion): Not here.
6782         (build_op_delete_call): No need to cons up an OVERLOAD.
6783         * cvt.c (cp_convert_to_pointer): instantiate_type here.
6784         (convert_to_reference): And here.
6785         * decl.c (grok_reference_init): Not here.
6786         (grokparms): Or here.
6787         * typeck2.c (digest_init): Or here.
6788         * typeck.c (decay_conversion): Take the address of overloaded
6789         functions, too.
6790         (require_instantiated_type): Lose.
6791         (convert_arguments): Don't handle unknown types here.
6792         (build_c_cast): Likewise.
6793         (build_binary_op): Gut.
6794         (build_conditional_expr): Don't require_instantiated_type.
6795         (build_modify_expr): Likewise.
6796         (build_static_cast): Don't instantiate_type.
6797         (build_reinterpret_cast): Likewise.
6798         (build_const_cast): Likewise.
6799         (convert_for_initialization): Likewise.
6800         (build_ptrmemfunc): Use type_unknown_p.
6801         (convert_for_assignment): Also do default_conversion on overloaded
6802         functions.  Hand them off to ocp_convert.
6804 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
6806         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
6807         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
6809         * class.c (finish_struct_1): Use build_cplus_array_type to build
6810         array types.
6811         * decl.c (init_decl_processing): Likewise.
6812         * except.c (expand_end_eh_spec): Likewise.
6813         * search.c (expand_upcast_fixups): Simplify very slightly.
6815 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6817         * decl.c (grokdeclarator): Complain about a variable using
6818         constructor syntax coming back null from start_decl.
6820         * friend.c (make_friend_class): Complain about trying to make
6821         a non-class type a friend.
6823         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
6824         (start_function): Not here.
6826 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
6828         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
6830 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6832         * typeck2.c (process_init_constructor): Only skip anonymous fields
6833         if they are bitfields.
6835         * cp-tree.def (TYPEOF_TYPE): New code.
6836         * error.c (dump_type_real): Handle it.
6837         * pt.c (tsubst): Likewise.
6838         * tree.c (search_tree): Likewise.
6839         * semantics.c (finish_typeof): New fn.
6840         * parse.y (typespec): Use it.
6841         * cp-tree.h: Declare it.
6843 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
6845         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
6847 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6849         * typeck.c (convert_arguments): Don't handle pmf references
6850         specially.
6852         * init.c (build_member_call): Don't try to convert to the base type
6853         if it's ambiguous or pedantic.
6855         * typeck2.c (check_for_new_type): Only depend on pedantic for
6856         C-style casts.
6858 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
6860         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
6861         non-converting constructors.
6863 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6865         * gxxint.texi: Correct documentation for n, N, Q, and B.
6867 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6869         * parse.y (condition): Convert VAR_DECL from reference to indirect
6870         reference.
6872 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
6874         * exception.cc (__cp_pop_exception): Free the original exception
6875         value, not the potentially coerced one.
6877 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
6879         * Makefile.in (hash.h): Run gperf when necessary.
6881         * cp-tree.h (CP_TYPE_READONLY): Remove.
6882         (CP_TYPE_VOLATILE): Likewise.
6883         (CP_TYPE_QUALS): New macro.
6884         (CP_TYPE_CONST_P): Likewise.
6885         (CP_TYPE_VOLATILE_P): Likewise.
6886         (CP_TYPE_RESTRICT_P): Likewise.
6887         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
6888         (cp_build_type_variant): Rename to ...
6889         (cp_build_qualified_type): New function.
6890         (c_apply_type_quals_to_decl): Declare.
6891         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
6892         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
6893         (cp_type_qual_from_rid): New function.
6894         (compparms): Remove unused parameter.  All callers changed.
6895         (cp_type_quals): New function.
6896         (at_least_as_qualified_p): Likewise.
6897         (more_qualified_p): Likewise.
6899         * call.c (standard_conversion): Replace calls to
6900         cp_build_type_variant with cp_build_qualified_type.  Use
6901         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
6902         compare them.  Use CP_TYPE_* macros to check qualifiers.
6903         (reference_binding): Likewise.
6904         (implicit_conversion): Likewise.
6905         (add_builtin_candidates): Likewise.
6906         (build_over_call): Likewise.
6907         * class.c (overrides): Compare all qualifiers, not just `const',
6908         on method declarations.
6909         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
6910         (convert_pointer_to_real): Likewise.
6911         (type_promotes_to): Likewise.
6912         * decl.c (check_for_uninitialized_const_var): New function.
6913         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
6914         (cp_finish_decl): Use check_for_uninitialized_const_var.
6915         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
6916         handle `restrict'.
6917         (grok_ctor_properties): Likewise.
6918         (grok_op_properties): Likewise.
6919         (start_function): Likewise.
6920         (rever_static_member_fn): Likewise.
6921         * decl2.c (grok_method_quals): Likewise.
6922         (grokfield): Likewise.
6923         * error.c (dump_readonly_or_volatile): Rename to ...
6924         (dump_qualifiers): New function.  Handle `restrict'.
6925         (dump_type_real): Use it.
6926         (dump_aggr_type): Likewise.
6927         (dump_type_prefix): Likewise.
6928         (dump_type_suffix): Likewise.
6929         (dump_function_decl): Likewise.
6930         (cv_as_string): Likewise.
6931         * gxx.gperf: Add __restrict and __restrict__.
6932         * gxxint.texi: Document `u' as used for `__restrict', and a few
6933         other previously undocumented codes.
6934         * hash.h: Regenerated.
6935         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
6936         (build_member_call): Likewise.
6937         (build_new_1): Likewise.
6938         * lex.c (init_parse): Add entry for RID_RESTRICT.
6939         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
6940         (cp_type_qual_from_rid): Define.
6941         * lex.h (enum rid): Add RID_RESTRICT.
6942         * method.c (process_modifiers): Deal with `restrict'.
6943         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
6944         * parse.c: Regenerated.
6945         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
6946         (tsubst_aggr_type): Likewise.
6947         (tsubst): Likewise.
6948         (check_cv_quals_for_unify): Likewise.
6949         (unify): Likewise.
6950         * rtti.c (init_rtti_processing): Likewise.
6951         (build_headof): Likewise.
6952         (get_tinfo_var): Likewise.
6953         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
6954         (expand_class_desc): Likewise.
6955         (expand_attr_desc): Likewise.
6956         (synthesize_tinfo_fn): Likewise.
6957         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
6958         (get_matching_virtual): Likewise.
6959         (expand_upcast_fixups): Likewise.
6960         * sig.c (build_signature_pointer_or_reference_name): Take
6961         type_quals, not constp and volatilep.
6962         (build_signature_pointer_or_reference_type): Likewise.
6963         (match_method_types): More CP_TYPE_QUALS conversion, etc.
6964         (build_signature_pointer_constructor): Likewise.
6965         (build_signature_method_call): Likewise.
6966         * tree.c (build_cplus_array_type): Likewise.
6967         (cp_build_type_variant): Rename to ...
6968         (cp_build_qualified_type): New function.  Deal with `__restrict'.
6969         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
6970         (build_exception_variant): Likewise.
6971         (mapcar): Likewise.
6972         * typeck.c (qualif_type): Likewise.
6973         (common_type): Likewise.
6974         (comptypes): Likewise.
6975         (comp_cv_target_types): Likewise.
6976         (at_least_as_qualified_p): Define.
6977         (more_qualified_p): Likewise.
6978         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
6979         (compparms): Likewise.
6980         (inline_conversion): Likewise.
6981         (string_conv_p): Likewise.
6982         (build_component_ref): Likewise.
6983         (build_indirect_ref): Likewise.
6984         (build_array_ref): Likewise.
6985         (build_unary_op): Likewise.
6986         (build_conditional_expr): Likewise.
6987         (build_static_cast): Likewise.
6988         (build_c_cast): Likewise.
6989         (build_modify_expr): Likewise.
6990         (convert_For_assignment): Likewise.
6991         (comp_ptr_ttypes_real): Likewise.
6992         (cp_type_quals): New function.
6994 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
6996         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
6997         (CP_TYPE_VOLATILE): Likewise.
6998         * decl.c (grokdeclarator): Use them.
6999         * tree.c (canonical_type_variant): Likewise.
7001 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7003         * parse.y (named_class_head): Push into class while parsing the
7004         base class list.
7005         * decl2.c (push_scope, pop_scope): New functions.
7006         * cp-tree.h: Declare them.
7007         * init.c (build_new_1): Delay cleanup until end of full expression.
7009 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
7011         * typeck.c (build_component_ref): Use of a type here is an error.
7013 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
7015         Revamp references to member functions.
7016         * method.c (hack_identifier): Call build_component_ref for a
7017         reference to a member function.
7018         * typeck.c (build_component_ref): Only return a single function
7019         if it's static.  Otherwise, return a COMPONENT_REF.
7020         (build_x_function_call): Handle a COMPONENT_REF.
7021         (build_unary_op): Handle all unknown-type things.
7022         * decl2.c (arg_assoc): Handle COMPONENT_REF.
7023         * class.c (instantiate_type): Complain if the function we get is a
7024         nonstatic member function.  Remove code for finding "compatible"
7025         functions.
7026         * pt.c (tsubst_copy): Handle NOP_EXPR.
7027         * tree.c (build_dummy_object): New fn.
7028         (maybe_dummy_object): New fn.
7029         (is_dummy_object): New fn.
7030         * cp-tree.h: Declare them.
7031         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
7032         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
7033         * init.c (build_member_call): Use maybe_dummy_object and
7034         is_dummy_object.
7035         (build_offset_ref): Use maybe_dummy_object.
7036         (resolve_offset_ref): Use is_dummy_object.
7037         * typeck.c (build_x_function_call): Call build_dummy_object.
7038         (unary_complex_lvalue): Call is_dummy_object.
7040         * typeck.c (build_component_addr): Make sure field is a field.
7042         * call.c (build_new_op): Delete obsolete code.
7044         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
7046 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7048         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
7049         std if std is ignored.
7051 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
7053         * decl.c (grokvardecl): Fix thinko.
7055         * decl.c (grokdeclarator): Embedded attrs bind to the right,
7056         not the left.
7058         * parse.y (fn.def2): Fix 'attrs' format.
7060 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
7062         * Makefile.in (CONFLICTS): Update.
7063         * parse.y (expr_or_declarator_intern): New rule.
7064         (expr_or_declarator, direct_notype_declarator, primary,
7065         functional_cast): Use it.
7066         (notype_declarator_intern): New rule.
7067         (notype_declarator, complex_notype_declarator): Use it.
7069 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
7071         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
7072         (grokvardecl): Likewise.
7074 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7076         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
7077         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
7079         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
7081         * pt.c (process_partial_specialization): Cast 1st argument of
7082         `bzero' to (PTR).
7084         * tree.c (build_base_fields): Cast `base_align' to (int) when
7085         comparing against one.
7087 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
7089         * decl.c (lookup_name_real): Handle template parameters for member
7090         templates where said parameters have the same name as the
7091         surrounding class.
7093         * decl.c (expand_static_init): Build cleanups before entering the
7094         anonymous function used to do them to avoid access-checking
7095         confusion.
7097         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
7098         accidentally removed by previous change, and make DECL_RTL here.
7099         * class.c (add_method): Don't make DECL_RTL here.
7101         * pt.c (for_each_template_parm): Don't examine uninstantiated
7102         default arguments.
7104 1998-10-16  Dave Brolley  <brolley@cygnus.com>
7106         * lex.c (real_yylex): Fix unaligned access of wchar_t.
7108 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
7110         * class.c (add_method): Fix documentation to reflect previous
7111         changes.  Check for duplicate method declarations here.
7112         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
7113         correctly; such things never match.
7114         (grokfndecl): Don't look for duplicate methods here.
7115         * decl2.c (check_classfn): Don't assume names are mangled.
7116         Don't add bogus member function declarations to a class before the
7117         class type is complete.
7118         (grokfield): Reformat error message.
7119         * method.c (set_mangled_name_for_decl): Don't mangle names while
7120         processing_template_decl.
7122 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
7124         * typeck.c (build_indirect_ref): Complain about a pointer to data
7125         member, too.
7126         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
7127         data member.
7128         * init.c (resolve_offset_ref): Don't undo the above.
7130         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
7131         (struct lang_decl_flags): Add `bitfield'.
7132         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
7133         DECL_BIT_FIELD.
7134         * decl2.c (grokbitfield, grok_alignof): Likewise.
7135         * init.c (build_offset_ref): Likewise.
7136         * typeck.c (build_component_addr, expr_sizeof): Likewise.
7137         * cvt.c (build_up_reference): Don't crash if taking the address
7138         returns error_mark_node.
7140         * decl.c (grokfndecl): Also check ctype when checking for ::main().
7142 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
7144         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
7145         Do mangling here.
7146         (grokdeclarator): Instead of here.
7147         * friend.c (do_friend): Lose special handling of ::main and
7148         __builtin_*.
7149         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
7151         * spew.c (yylex): Clear looking_for_typename if we got
7152         'enum { ... };'.
7154 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
7156         * class.c (maybe_warn_about_overly_private_class): Improve error
7157         messages for class with only private constructors.
7159         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
7160         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
7161         (build_typename_type): New function.
7162         * decl.c (build_typename_type): Broken out from ...
7163         (make_typename_type): Use it.
7164         * search.c (lookup_field): Likewise.
7166 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
7168         * pt.c (convert_nontype_argument): Check against type_referred_to.
7169         * decl.c (grokvardecl): Check for declarator name before building
7170         DECL_ASSEMBLER_NAME.
7172 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
7174         * pt.c (lookup_template_class): Add comment.
7175         (instantiate_class_template): Don't mark the _TYPE node for
7176         member class templates as an instantiation.
7178 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
7180         * decl.c (grokfndecl): Fix my thinko.
7182 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
7184         * tinfo2.cc (fast_compare): Remove.
7185         (before): Just use strcmp.
7186         * tinfo.cc (operator==): Just use strcmp.
7188 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
7190         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
7191         declarations.
7193 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
7195         * cp-tree.h (specializations_of_same_template_p): Remove.
7196         * search.c (get_template_base): Don't use it.
7197         (get_template_base_recursive): Likewise.
7198         * pt.c (specializations_of_same_template_p): Remove.
7199         (unify): Don't use it.
7200         (lookup_template_class): Find the correct parent when setting
7201         CLASSTYPE_TI_TEMPLATE.
7203 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
7205         * tinfo.cc (operator==): Always compare names.
7207 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
7209         * decl.c (start_function): Fix cut-and-paste error.
7211 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
7213         * inc/typeinfo: Add #pragma interface.
7214         (operator!=): Just call operator==.
7215         * tinfo.cc: Add #pragma implementation.
7216         (operator==): Move from inc/typeinfo and tinfo2.cc.
7217         Check __COMMON_UNRELIABLE instead of _WIN32.
7219         * typeck2.c (my_friendly_abort): Add URL.
7221 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
7223         * decl.c (start_method): Added extra parameter for attributes.
7224         * cp-tree.h (start_method): Update prototype.
7225         * parse.y (fn.def2): Update start_method parameter list.
7227 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
7229         * cp-tree.h (specializations_of_same_template_p): Declare.
7230         * pt.c (specializations_of_same_template_p): New function.
7231         (unify): Use it.
7232         * search.c (get_template_base): Use it.
7233         (get_template_base_recursive): Likewise.
7235 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
7237         * decl2.c (start_objects): Add new variable `joiner' and
7238         initialize it properly.
7240 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
7242         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
7243         change to vtable types.
7245         * cvt.c (ocp_convert): Avoid infinite recursion caused by
7246         1998-10-03 change.
7248 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
7250         * pt.c (resolve_overloaded_unification): New fn.
7251         (try_one_overload): Likewise.
7252         (unify): Don't fail on unknown type.
7253         (type_unification_real): Likewise.  Use resolve_overloaded_unification
7254         to handle an overloaded argument.
7255         (template_args_equal): Split out...
7256         (comp_template_args): From here.
7257         (determine_specialization): Also allow a template with more
7258         parms than were explicitly specified.
7259         * cp-tree.h: Add template_args_equal.
7260         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
7262 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
7264         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
7265         change.
7267 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
7269         * typeck.c (unsigned_type): Only return TItype nodes when
7270         HOST_BITS_PER_WIDE_INT is >= 64 bits.
7271         (signed_type): Likewise.
7272         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
7273         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
7274         (init_decl_processing): Only create TItype nodes when
7275         HOST_BITS_PER_WIDE_INT is >= 64 bits.
7276         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
7277         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
7279 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7281         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
7282         (gxx.gperf): Update comments describing invocation flags.
7283         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
7285 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
7287         * class.c (finish_struct_1): Add commentary on previous change.
7289         * cp-tree.h (vtbl_ptr_type_node): New variable.
7290         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
7291         already of the right type.
7292         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
7293         Simplify code to grow vtable.
7294         * decl.c (vtbl_ptr_type_node): Define.
7295         (init_decl_processing): Initialize it.
7297 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
7299         * cp-tree.def (PTRMEM_CST): New tree node.
7300         * cp-tree.h (ptrmem_cst): New type.
7301         (lang_type): Remove local_typedecls.
7302         (dummy): Increase to 12 bits from 11.
7303         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
7304         (PTRMEM_CST_CLASS): New macro.
7305         (PTRMEM_CST_MEMBER): Likewise.
7306         (current_access_specifier): New variable.
7307         (current_class_type): Remove duplicate declaration.
7308         (finish_struct): Change prototype.
7309         (unreverse_member_declarations): New function.
7310         (pushdecl_class_level): Change prototype.
7311         (grok_enum_decls): Remove.
7312         (fixup_anonymous_union): New function.
7313         (grok_x_components): Change prototype.
7314         (tsubst_chain): Remove.
7315         (finish_member_template_decl): Likewise.
7316         (check_explicit_specialization): Fix indentation.
7317         (finish_class_definition): Change prototype.
7318         (finish_member_class_template): Likewise.
7319         (finish_member_declaration): New function.
7320         (check_multiple_declarators): Likewise.
7321         * class.c (class_stack_node_t): New type.
7322         (current_class_base): Remove.
7323         (current_class_stack): Change type.
7324         (current_access_specifier): New variable.
7325         (grow_method): Remove.
7326         (check_member_decl_is_same_in_complete_scope): Break out from
7327         finish_struct.
7328         (make_method_vec): New function.
7329         (free_method_vec): Likewise.
7330         (add_implicitly_declared_members): Break out from finish_struct_1.
7331         (free_method_vecs): New variable.
7332         (add_method): Rework for direct use from parser.
7333         (handle_using_decl): Watch for NULL_TREE while iterating through
7334         CLASSTYPE_METHOD_VEC.
7335         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
7336         just do some error-checking.
7337         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
7338         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
7339         (finish_struct): Change prototype.  Simplify; fields and methods
7340         are already set up at this point.
7341         (init_class_processing): Set up current_class_stack.
7342         (pushclass): Save current_access_specifier.
7343         (popclass): Restore it.
7344         (currently_open_class): Simplify.
7345         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
7346         * decl.c (saved_scope): Add access_specifier.
7347         (maybe_push_to_top_level): Save it.
7348         (pop_from_top_level): Restore it.
7349         (maybe_process_template_type_declaration): Use
7350         finish_member_declaration.
7351         (pushtag): Likewise.
7352         (pushdecl_class_level): Don't return a value.
7353         (fixup_anonymous_union): Break out from grok_x_components.
7354         (shadow_tag): Use it.
7355         (xref_tag): Complain about using an elaborated type specifier to
7356         reference a template type parameter or typedef name.
7357         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
7358         (current_local_enum): Remove.
7359         (build_enumerator): Call finish_member_declaration.
7360         (grok_enum_decls): Remove.
7361         * decl2.c (grok_x_components): Simplify.
7362         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
7363         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
7364         (merge_functions): Add to comment.
7365         (arg_assoc_type): Prototype.
7366         (arg_assoc): Pass as many arguments as there are parameters.
7367         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
7368         OFFSET_REF.
7369         * expr.c (cpls_expand_expr): Remove dead code.  Handle
7370         PTRMEM_CST.
7371         * friend.c (do_friend): Lookup friends when in nested classes.
7372         Change comments.
7373         * init.c (build_offset_ref): Do lookup even for classes that are
7374         only partially defined.
7375         (decl_constant_value): Remove dead code.
7376         * method.c (build_overload_value): Remove hack where by TYPE was
7377         not a TYPE.  Handle PTRMEM_CST.
7378         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
7379         should go.
7380         * parse.y (components, notype_components, component_decl,
7381         component_decl_1, component_declarator, component_declarator0):
7382         Now all are itype rather than ttype.  Rework to add members to
7383         classes on the fly.
7384         (typesqpecqual_reserved): Use check_multiple_declarators.
7385         (structsp): Update class to finish_class_definition.
7386         (do_xref_defn): Unsplit into named_class_head.
7387         (access_specifier): Set current_access_specifier.
7388         * pt.c (set_current_access_from_decl): New function.
7389         (finish_member_template_decl): Don't take the parameters.
7390         (comp_template_args): Make more robust.
7391         (lookup_template_class): Don't use current_local_enum.
7392         (for_each_template_parm): Handle PTRMEM_CST.
7393         (instantiate_class_template): Use set_current_access_from_decl,
7394         finish_member_declaration and unreverse_member_declarations.  Set
7395         lineno/input_filename before generating implicit member functions.
7396         (type_unification_real): Don't assume back-unification happens
7397         only for the last argument.
7398         (regenerate_decl_from_template): Call pushclass a bit earlier.
7399         (tsubst_chain): Remove.
7400         (tsubst_enum): Use set_current_access_from_decl.
7401         (set_mangled_name_for_template_decl): Fix indentation.
7402         * search.c (lookup_fnfields_1): Change iteration through
7403         CLASSTYPE_METHOD_VEC.
7404         (dfs_pushdecls): Likewise.
7405         (dfs_compress_decls): Likewise.
7406         (add_conversions): Likewise.
7407         * semantics.c (finish_class_definition): Don't take components.
7408         Change call to finish_struct.
7409         (finish_member_declaration): New function.
7410         (finish_member_class_template): Don't take template parameters.
7411         Change call to grok_x_components.  Call finish_member_template_decl.
7412         (check_multiple_declarators): New function.
7413         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
7414         a passed in fieldlist.
7415         * tree.c (search_tree): Handle PTRMEM_CST.
7416         (mapcar): Likewise.
7417         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
7418         INTEGER_CSTs, for pointer-to-data members.
7420         * call.c (resolve_args): Resolve template specializations, if
7421         possible.
7423 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7425         * Makefile.in (spew.o): Depend on toplev.h.
7427         * call.c (compare_ics): Initialize variables `deref_from_type2',
7428         `deref_to_type1' and `deref_to_type2'.
7430         * except.c (get_eh_type): Hide prototype and definition.
7431         (process_start_catch_block_old): Remove unused static prototype.
7433         * pt.c (tsubst_decl): Initialize variable `argvec'.
7435         * spew.c: Include toplev.h.
7437 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
7439         * pt.c (instantiate_decl): Do save and restore file position.
7441 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7443         * method.c (build_decl_overload_real): Clear
7444         numeric_output_need_bar after __.
7446 1998-10-05  Nathan Sidwell  <nathan@acm.org>
7448         * call.c (build_new_method_call): Issue 'incomplete type' error,
7449         if class is not defined.
7451 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7453         * call.c (build_object_call): Move declaration of variable
7454         `fn' into the scope where it is used.  Don't access variable
7455         `fn' when it is uninitialized, instead use `fns'.
7457 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
7459         * errfn.c (cp_thing): Print buf as a string not as a printf format
7460         to avoid problems with the operator%.  Consequently, `%%' sequences
7461         in format are copied as `%' in buf.
7463 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
7465         * pt.c (pop_tinst_level): Call extract_interface_info.
7466         (instantiate_decl): Don't save and restore file position.
7468         * decl.c (cp_finish_decl): Make statics in extern inlines and
7469         templates common, if possible and the target doesn't support weak
7470         symbols.
7472         * decl.c (grokdeclarator): Remove redundant calls to
7473         build_type_variant and some duplicated code.
7474         * sig.c (build_signature_reference_type): Only take the type parm.
7475         (build_signature_pointer_type): Likewise.
7476         * tree.c (build_cplus_method_type): Adjust.
7477         * cp-tree.h: Update.
7479 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
7481         * call.c (build_over_call): Make pedwarns about dropped qualifiers
7482         into full-fledged errors.
7483         * cvt.c (convert_to_reference): Likewise.
7484         * typeck.c (convert_for_assignment): Likewise.
7486         * search.c (expand_upcast_vtables): In addition to unsetting
7487         TREE_READONLY, remove top-level const type qualifier.
7489 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
7491         * class.c (current_class_ptr, current_class_ref): Clarify
7492         documentation.
7493         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
7494         NOP type conversions.
7495         * decl.c (decls_match): Use comptypes directly; ignore
7496         qualifiers on the DECL.
7497         (duplicate_decls): Remove qualifier checks on DECL.
7498         (grokdeclarator): Make the type built up include top-level
7499         qualifiers.
7500         * decl2.c (do_dtors): Fix spelling error.
7501         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
7502         when printing type information.
7503         * init.c (build_new_1): Add documentation.  Deal with the fact
7504         that type of allocated memory now contains qualifiers.
7505         * lex.c (is_global): Improve error-recovery.
7506         * sig.c (build_member_function_pointer): Don't cast away const
7507         on fields of sigtable_entry_type.
7508         * tree.c (lvalue_type): Don't look at top-level qualifiers on
7509         expressions.
7510         * typeck.c (decay_conversion): Likewise.
7511         (build_component_ref): Make sure the type of the COMPONENT_REF
7512         contains top-level qualifiers, as appropriate.  Improve
7513         error-handling.
7514         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
7515         (build_array_ref): Likewise.
7516         (build_unary_op): Improve error-recovery.
7517         (unary_complex_lvalue): Make taking the address a bound member
7518         function an error, not a sorry.
7519         (build_conditional_expr): Look at the type qualifiers, not the
7520         qualifiers on the expression itself.
7522 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
7524         * decl2.c (merge_functions): Remove duplicates.
7526         * decl2.c: Add -f{no-,}implicit-inline-templates.
7527         (import_export_decl): Check it.
7529         * decl.c (lookup_name_real): Template parms also take precedence
7530         over implicit typename.  Only warn if yylex.
7532         * typeck.c (build_conditional_expr): Only fold if ifexp is an
7533         INTEGER_CST.
7535         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
7536         instead of linkage.
7538 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
7540         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
7541         * class.c (build_vbase_pointer): Use it.
7542         * rtti.c (expand_class_desc): Likewise.
7543         * tree.c (build_vbase_pointer_fields): Likewise.
7545 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
7547         * decl.c (start_decl): Add invocation of
7548         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
7549         (start_function): Add invocation of
7550         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
7552         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
7553         HANDLE_GENERIC_PRAGMAS.
7555 1998-09-28  Anthony Green  <green@cygnus.com>
7557         * semantics.c (finish_asm_stmt): Always permit volatile asms.
7559 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
7561         * decl.c (grokdeclarator): Tighten checks for invalid
7562         destructors.  Improve error-messages and error-recovery.
7563         * decl2.c (check_classfn): Don't assume that mangled destructor
7564         names contain type information.
7566 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
7568         * search.c (get_base_distance): Remove assert.
7570         * decl2.c (build_anon_union_vars): Don't process a field with no
7571         name.
7572         (finish_anon_union): Also complain about local anon unions with no
7573         members.
7575 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7577         * decl.c (lookup_namespace_name): If the name is a namespace,
7578         return it immediately.
7580 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7582         * cp-tree.h (define_case_label): Remove unused parameter.
7583         (check_java_method): Likewise.
7584         (grokclassfn): Likewise.
7585         (expand_aggr_init): Likewise.
7586         (build_x_delete): Likewise.
7587         (maybe_end_member_template_processing): Likewise.
7588         (unshare_base_binfos): Add prototype.
7589         (string_conv_p): Likewise.
7590         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
7592         * cvt.c (build_up_reference): Remove unused parameter
7593         `checkconst', all callers changed.
7594         (build_type_conversion): Mark parameter `code' with
7595         ATTRIBUTE_UNUSED.
7596         (build_expr_type_conversion): Initialize variable `conv'.
7598         * decl.c (push_namespace): Initialize variable `d'.
7599         (define_case_label): Remove unused parameter `decl', all callers
7600         changed.
7602         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
7603         `argc' with ATTRIBUTE_UNUSED.
7604         (grokclassfn): Remove unused parameter `cname', all callers
7605         changed.
7606         (check_java_method): Likewise for parameter `ctype'.
7607         (copy_assignment_arg_p): Mark parameter `virtualp' with
7608         ATTRIBUTE_UNUSED.
7609         (finish_prevtable_vardecl): Likewise for parameter `prev'.
7611         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
7613         * init.c (expand_aggr_init_1): Remove unused parameter
7614         `alias_this', all callers changed.
7615         (expand_aggr_init): Likewise.
7616         (expand_default_init): Likewise.
7617         (build_new_1): Initialize variable `susp'.
7618         (build_x_delete): Remove unused parameter `type', all callers
7619         changed.
7621         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
7622         ATTRIBUTE_UNUSED.
7623         (readescape): Use (unsigned) value in shift.
7624         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
7625         comparing to a signed quantity.
7627         * pt.c (maybe_end_member_template_processing): Remove unused
7628         parameter `decl', all callers changed.
7629         (check_explicit_specialization): Add braces around empty body in
7630         an else-statement.
7631         (current_template_args): Initialize variable `args'.
7632         (lookup_template_class): Likewise for variable `prev_local_enum'.
7633         (tsubst_decl): Likewise for variable `r'.
7634         (set_mangled_name_for_template_decl): Initialize variable
7635         `context'.
7637         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
7638         Likewise for variable `i'.
7639         (yylex): Initialize variable `trrr'.
7641         * typeck.c (compparms): Mark variable `strict' with
7642         ATTRIBUTE_UNUSED.
7644         * xref.c (simplify_type): Cast argument of ctype function to
7645         `unsigned char'.
7647 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
7649         * cp-tree.h (language_lvalue_valid): Remove.
7650         * decl.c (grokdeclarator): Don't disallow references to functions.
7651         * tree.c (lvalue_p_1): New function, combining duplicated
7652         code from ...
7653         (lvalue_p): Use it.
7654         (real_lvalue_p): Likewise.
7655         * typeck.c (language_lvalue_valid): Remove.
7656         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
7657         they don't have TREE_READONLY set.
7658         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
7660 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7662         * spew.c (yylex): Give diagnostic.
7663         * hash.h (is_reserved_word): Add export.
7664         * gxx.gperf: Likewise.
7665         * lex.h (rid): Add RID_EXPORT.
7666         * lex.c (init_parse): Likewise.
7668 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
7670         * friend.c (do_friend): Make warning a full sentence.
7672 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
7674         * parse.y (component_decl_list): Improve error-recovery.
7676 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7678         * decl.c (make_typename_type): Move error to point where name
7679         variable can be used by dump_type.
7681 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
7683         * decl.c (grokfndecl): Improve error-recovery.
7684         * decl2.c (grokfield): Likewise.
7685         * pt.c (finish_member_template_decl): Likewise.
7687 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7689         * method.c (hack_identifier): Finding multiple members is always
7690         an error.
7692 1998-09-21  Per Bothner  <bothner@cygnus.com>
7694         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
7696 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
7698         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
7700 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
7702         * class.c (maybe_warn_about_overly_private_class): Reformat.
7704 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
7706         * exception.cc (__cplus_type_matcher): Realign some code.
7708 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
7710         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
7711         (tinfo2.o): Likewise.
7712         (exception.o): Likewise.
7713         (new.o): Likewise.
7714         (opnew.o): Likewise.
7715         (opnewnt.o): Likewise.
7716         (opvnew.o): Likewise.
7717         (opvnewnt.o): Likewise.
7718         (opdel.o): Likewise.
7719         (opdelnt.o): Likewise.
7720         (opvdel.o): Likewise.
7721         (opvdelnt.o): Likewise.
7723 1998-09-16  Richard Henderson  <rth@cygnus.com>
7725         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
7727 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
7729         * call.c (build_field_call): Handle static data members too.
7731         * typeck.c (comptypes): When comparing pointer types, check
7732         whether referred types match even in strictest modes.
7734 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
7736         * cp-tree.h: Revert previous change.
7737         (finish_struct_methods): Remove declaration.
7738         * class.c: Revert previous change.
7739         (maybe_warn_about_overly_private_class): New function.
7740         (finish_struct_methods): Declare here, and make static.  Remove
7741         unnecessary parameters.  Tidy slightly.  Use
7742         maybe_warn_about_overly_private_class.
7743         (finish_struct_1): Adjust.  Remove check for private constructors,
7744         now done elsewhere.
7745         (finish_struct): Adjust.
7747 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
7749         * except.c (expand_start_catch_block): No need to check for new
7750         exception model.
7751         (process_start_catch_block_old): Deleted.
7752         (process_start_catch_block): Add call to start_decl_1().
7753         (expand_end_catch_block): Add call to end_catch_handler().
7754         * exception.cc (__cplus_type_matcher): Only check the exception
7755         language if there is an exception table.
7757 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
7759         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
7760         as used to prevent conflicts with virtual function tables.
7762 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
7764         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
7765         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
7766         * class.c (maybe_class_too_private_p): New function.
7767         (finish_struct_methods): Use it.
7768         (finish_struct_1): Likewise.
7769         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
7770         appropriate.
7772         * pt.c (check_specialization_scope): Fix spelling error.
7773         (check_explicit_specialization): Remove code to handle explicit
7774         specializations in class scope; they are now correctly diagnosed
7775         as errors.
7777 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
7779         * decl.c (pushdecl): Don't copy types if the
7780         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
7781         type.
7783 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
7785         * class.c (get_enclosing_class): New function.
7786         (is_base_of_enclosing_class): Likewise.
7787         * cp-tree.h (get_enclosing_class): Declare.
7788         (is_base_of_enclosing_class): Likewise.
7789         * pt.c (coerce_template_parms): Use them.
7791 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
7793         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
7794         null to decide whether to use it.
7796         * error.c (dump_type_real): Handle NAMESPACE_DECL.
7797         * parse.y (base_class.1): Avoid crash on error.
7799 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7801         * decl.c (make_typename_type): If context is a namespace, the code
7802         is in error.
7804 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
7806         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
7808 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
7810         * cp-tree.h (anonymous_namespace_name): Declare.
7811         * decl.c: Define it.
7812         (push_namespace): Use anonymous_namespace_name, rather than local
7813         static anon_name.
7814         * error.c (dump_decl): If a namespace is named
7815         anonymous_namespace_name, call it {anonymous}.
7817         * decl.c (grokparms): Distinguish between references and pointers
7818         in error message.
7820 1998-09-08  Richard Henderson  <rth@cygnus.com>
7821             Mark Mitchell  <mark@markmitchell.com>
7823         * pt.c (process_partial_specialization): Consistently allocate
7824         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
7825         tpd.parms, where appropriate.
7827 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
7829         * Makefile.in (INCLUDES): Update after recent toplevel gcc
7830         reorganizations.
7832 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
7834         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
7835         * class.c (finish_struct): Remove hackery to deal with explicit
7836         specializations in class scope.
7837         * decl.c (grokfndecl): Improve error-recovery.
7838         * decl2.c (grokfield): Likewise.
7839         * pt.c (check_specialization_scope): New function.
7840         (begin_specialization): Call it.
7841         (process_partial_specialization): New function, split out from
7842         push_template_decl.  Check partial specializations more
7843         stringently.
7844         (push_template_decl): Call it.
7845         (check_explicit_specialization): Don't attempt to handle explicit
7846         specializations in class scope.
7847         (template_parm_data): Document.  Add current_arg and
7848         arg_uses_template_parms.
7849         (mark_template_parm): Set it.
7850         (tsubst_arg_types): Remove unused variable.
7851         * semantics.c (begin_class_definition): Tweak.
7853 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
7855         * inc/typeinfo (type_info::type_info(const char*)): Make
7856         `explicit'.
7858         * cp-tree.h (hash_tree_cons_simple): New macro.
7859         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
7860         (coerce_template_parms): Use make_temp_vec, instead of
7861         make_tree_vec.  Document this behavior.
7862         (lookup_template_class): Likewise.
7863         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
7864         Remove dead code (and add assertion to check its deadness).  Fix
7865         bug w.r.t. exception specifications.
7867 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
7869         * decl2.c (import_export_vtable): Always make artificials comdat.
7870         (import_export_decl): Likewise.
7871         * pt.c (mark_decl_instantiated): Likewise.
7873 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
7875         * cp-tree.h (finish_globally_qualified_member_call_expr):
7876         Rename to ...
7877         (finish_qualified_call_expr).
7878         * semantics.c: Likewise.
7879         * parse.y (primary): Use it.
7880         * method.c (hack_identifier): Remove redundant code.
7882         * init.c (resolve_offset_ref): Call convert_from_reference to
7883         handle members of reference type.  Improve error recovery.
7885 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
7887         * cp-tree.h: Declare warn_nontemplate_friend.
7888         * decl2.c (lang_decode_option): Set.
7889         * lang-options.h: Add -Wnon-template-friend.
7890         * friend.c (do_friend): Use to toggle non-template function warning.
7892 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
7894         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
7895         corresponding INTEGER_CSTs when processing_template_decl.
7896         * pt.c (tsubst_enum): Tweak accordingly.
7898 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
7900         * decl.c (pushdecl_class_level): Add warning here.
7901         (pushdecl): Tweak.
7903 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
7905         * cvt.c (convert_pointer_to_real): Tidy.
7906         * search.c (get_base_distance_recursive): Simplify.
7907         (get_base_distance): Likewise.
7909         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
7910         parms.
7912 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
7914         * lex.c (check_newline):  Call HANDLE_PRAGMA before
7915         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
7916         if unknown pragmas are encountered.
7917         (handle_sysv_pragma): Interpret return code from
7918         handle_pragma_token ().  Return success/failure indication rather
7919         than next unprocessed character.
7920         (pragma_getc): New function: retrieves characters from the
7921         input stream.  Defined when HANDLE_PRAGMA is defined.
7922         (pragma_ungetc): New function: replaces characters back into the
7923         input stream.  Defined when HANDLE_PRAGMA is defined.
7925 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
7927         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
7928         * class.c (build_vtable_entry_ref): Likewise.
7930 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
7932         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
7933         * decl2.c (import_export_decl): Likewise.
7934         * pt.c (instantiate_decl): Use it.
7936 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
7938         * decl.c (lookup_name_real): Also do implicit typename thing for
7939         artificial TYPE_DECLs.
7940         * search.c (lookup_field): Likewise.
7941         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
7942         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
7943         (enter_scope_of): Extract type from implicit typename.
7944         (begin_class_definition): Likewise.
7945         * lex.c (identifier_type): Handle implicit typename when checking
7946         for SELFNAME.
7948         * cp-tree.h: Declare flag_strict_prototype.
7949         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
7950         -fstrict-prototype.
7951         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
7952         specified, set it to the value of pedantic.
7954 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
7956         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
7958 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
7960         * decl.c (finish_enum): Handle member enums of classes declared in
7961         template functions.
7963         * decl2.c (grok_x_components): Strip attributes before calling
7964         groktypename.
7966 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
7968         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
7969         -fenum-int-equivalence and -fno-nonnull-objects.
7970         * class.c (check_for_override): Remove support for -fall-virtual.
7971         (finish_struct_1): Likewise.
7972         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
7973         * typeck.c (build_binary_op_nodefault): Likewise.
7974         * cvt.c (ocp_convert): Likewise.
7975         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
7976         * class.c (build_vbase_path): Likewise.
7978 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
7980         * Makefile.in (INTERFACE): New, set to 1.
7982 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
7984         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
7985         comparing with global_namespace.
7986         (dump_aggr_type): Likewise.
7988         * decl.c (grokfndecl): Issue error on declaration of friend
7989         templates with explicit template arguments.
7991         * pt.c (convert_template_argument): New function, split out
7992         from...
7993         (coerce_template_parms): Here.
7994         (tsubst): Attempt better error-recovery.
7996 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7998         * pt.c (decl_template_parm_p): Add checks for
7999         TEMPLATE_TEMPLATE_PARM.
8001 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
8003         * lex.c (do_identifier): Fix thinko in previous change.
8005 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
8007         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
8008         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
8010 1998-08-28  Richard Henderson  <rth@cygnus.com>
8012         Add support for discarding unused virtual functions.
8013         * lang-options.h: Add -fvtable-gc.
8014         * cp-tree.h: Add flag_vtable_gc.
8015         * decl2.c (output_vtable_inherit): New fn.
8016         (finish_vtable_vardecl): Call it.
8017         * class.c (build_vtable_entry_ref): New fn.
8018         (build_vtbl_ref): Call it.
8020 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
8022         * cp-tree.h (build_enumerator): Take the enumeration type as a
8023         parameter.
8024         * decl.c (finish_enum): Don't set the TREE_TYPE for the
8025         enumeration constant values if we're processing_template_decls.
8026         Don't set the type for the CONST_DECLs either; that's done in
8027         build_enumerator.
8028         (build_enumerator): Take the enumeration type as a
8029         parameter.
8030         * lex.c (do_identifier): Don't resolve enumeration constants while
8031         processing template declarations, even if they happen to be
8032         TEMPLATE_PARM_INDEXs.
8034         * parse.y (current_enum_type): New variable.
8035         (primary): Don't allow statement-expression in local classes just
8036         as we don't in global classes.
8037         (structsp): Use current_enum_type.
8038         (enum_list): Likewise.
8039         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
8040         finish_enum; they no longer occur.
8042         * cp-tree.h (finish_base_specifier): New function.
8043         * parse.y (base_class): Use it.
8044         * semantics.c (finish_base_specifier): Define it.
8046         * parse.y (structsp): Warn on use of typename outside of template
8047         declarations.
8049 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
8051         * lex.c (handle_cp_pragma): Remove #pragma vtable.
8052         * lang-options.h: Remove +e options.
8053         * decl2.c (lang_decode_option): Likewise.
8054         (import_export_vtable): Don't check write_virtuals.
8055         (finish_vtable_vardecl, finish_file): Likewise.
8056         * search.c (dfs_debug_mark): Likewise.
8057         * semantics.c (begin_class_definition): Likewise.
8058         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
8060         * call.c (build_over_call): Check flag_elide_constructors.
8061         * decl2.c: flag_elide_constructors defaults to 1.
8062         * typeck.c (convert_arguments): Remove return_loc parm.
8063         (build_function_call_real): Adjust.
8065         * search.c: Tear out all mi_matrix and memoize code.
8066         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
8067         * lang-options.h: Remove documentation for -fhandle-exceptions,
8068         -fmemoize-lookups and -fsave-memoized.
8069         * cp-tree.h: Lose mi_matrix and memoize support.
8070         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
8071         * class.c: Lose struct class_level.
8072         (pushclass, popclass): Lose memoize support.
8073         * init.c (build_offset_ref): Likewise.
8075         Never change BINFO_INHERITANCE_CHAIN.
8076         * init.c (emit_base_init): Change modification of
8077         BINFO_INHERITANCE_CHAIN to an assert.
8078         * search.c (get_base_distance_recursive): Likewise.
8079         (get_base_distance): Likewise.
8080         (lookup_member): Likewise.
8081         (convert_pointer_to_single_level): Likewise.
8082         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
8083         (lookup_fnfields): Likewise.
8084         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
8085         (unshare_base_binfos): Don't call propagate_binfo_offsets.
8086         (layout_basetypes): Call propagate_binfo_offsets instead of
8087         unshare_base_binfos.
8088         * decl.c (xref_basetypes): Call unshare_base_binfos.
8089         * pt.c (instantiate_class_template): Likewise.
8090         * tree.c (reverse_path): Remove 'copy' parm; always make a
8091         temporary copy.
8092         * class.c (build_vbase_path): Just call it.
8093         * search.c (compute_access): Likewise.  Don't re-reverse.
8095 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
8097         * class.c (build_vbase_path): Use reverse_path.
8098         (finish_base_struct): Move warnings for inaccessible bases to
8099         layout_basetypes.
8100         (modify_one_vtable): Remove check of TREE_USED (binfo).
8101         (fixup_vtable_deltas1): Likewise.
8102         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
8103         (xref_tag): Remove binfos parameter.
8104         (make_binfo): Remove chain parameter.
8105         (reverse_path): Add copy parameter.
8106         * decl.c (init_decl_processing): Change calls to xref_tag.
8107         (xref_tag): Remove binfos parameter.
8108         (xref_basetypes): Change calls to make_binfo.
8109         * decl2.c (grok_x_components): Change calls to xref_tag.
8110         (handle_class_head): Likewise.
8111         * friend.c (do_friend): Likewise.
8112         * lex.c (make_lang_type): Change calls to make_binfo.
8113         * parse.y (structsp): Change calls to xref_tag.
8114         (named_complex_class_head_sans_basetype): Likewise.
8115         (named_class_head): Likewise.
8116         * rtti.c (init_rtti_processing): Likewise.
8117         * search.c (compute_access): Change calls to reverse_path.
8118         (dfs_get_vbase_types): Change calls to make_binfo.
8119         (get_vbase_types): Remove dead code.
8120         * tree.c (unshare_base_binfos): Change calls to make_binfo.
8121         (layout_basetypes): Warn here about inaccessible bases.
8122         (make_binfo): Remove chain parameter.
8123         (reverse_path): Add copy parameter.
8125 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
8127         * class.c: #if 0 complete_type_p.
8128         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
8129         * method.c (process_overload_item): Likewise.
8130         * typeck.c (comp_target_types): Likewise.
8132         Stop sharing binfos for indirect virtual bases.
8133         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
8134         (layout_basetypes): Likewise.
8135         (unshare_base_binfos): Copy vbases, too.
8136         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
8137         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
8138         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
8139         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
8140         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
8141         reference to BINFO_VIA_PUBLIC.
8142         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
8143         (push_class_decls): Use them.
8144         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
8145         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
8147 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
8149         * decl.c (build_enumerator): Set DECL_CONTEXT for the
8150         CONST_DECLs.
8152 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
8154         * cp-tree.h (finish_enum): Change prototype.
8155         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
8156         VALUES parameter.  Don't try to compute mins/maxs if
8157         processing_template_decl.
8158         * parse.y (structsp): Use new calling sequence for finish_enum.
8159         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
8160         (lookup_template_class): Remove unused variables.  Tweak.
8161         Register enums on instantiation list before substituting
8162         enumeration constants.
8163         (tsubst_decl): Remove unused variables.
8164         (regenerate_decl_from_template): Likewise.
8166         * decl.c (duplicate_decls): Don't obliterate the
8167         DECL_TEMPLATE_INFO for a template if we're not replacing it with
8168         anything.
8170         * lex.c (do_identifier): Fix typo in comment.
8172 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8174         * errfn.c: Remove stdarg.h/varargs.h.
8175         * tree.c: Likewise.
8177 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
8179         * pt.c (tsubst_copy): Only do typename overloading on an
8180         IDENTIFIER_NODE that happens to look like a typename if it actually
8181         has a type for us to use.
8183 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
8185         * typeck.c (comp_cv_target_types): Split out...
8186         (comp_target_types): From here.  Don't allow cv-qual changes under
8187         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
8188         (build_ptrmemfunc): Pass 1 to nptrs.
8189         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
8191 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
8193         * search.c (dependent_base_p): Don't compare a binfo to
8194         current_class_type; use the TREE_TYPE of the binfo instead.
8196         * cp-tree.h (CLASS_TYPE_P): Revise definition.
8198 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
8200         * decl.c (duplicate_decls): Don't complain about different
8201         exceptions from an internal decl even if pedantic.
8203         * typeck.c (convert_for_assignment): Converting from pm of vbase
8204         to derived is an error, not a sorry.
8206         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
8207         * class.c (fixed_type_or_null): Rename from
8208         resolves_to_fixed_type_p.  Return the dynamic type of the
8209         expression, if fixed, or null.
8210         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
8211         does not match the static type.
8212         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
8213         resolves_to_fixed_type_p again.
8215 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
8217         * pt.c (tsubst_decl): Move special case code for dealing with
8218         tricky friend templates here from ...
8219         (regenerate_decl_from_template): Here.
8221 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
8223         * decl.c (start_decl): Remove redundant linkage check.
8225 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
8227         * typeck.c (c_expand_return): Handle the case that valtype
8228         is wider than the functions return type.
8230 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
8232         * cp-tree.h (CLASS_TYPE_P): New macro.
8233         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
8234         * pt.c (process_template_parm): Undo previous change.
8236 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
8238         * cp-tree.h: Declare.
8239         * pt.c (decl_template_parm_p): New function.
8240         * decl.c (pushdecl): Check decls for redeclaring template parms.
8241         (xref_tag): Make redeclaration an error, print decl.
8242         * decl2.c (grokfield): Check field_decls for redeclaration as well.
8244 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
8246         * parse.y (primary): Fix up the type of string constants.
8248 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
8250         * typeck.c (convert_for_initialization): Move check for odd uses
8251         of NULL to avoid duplicate warnings.
8253 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
8255         * tree.c (lvalue_type): Fix for arrays.
8256         * typeck.c (string_conv_p): New fn.
8257         (convert_for_assignment): Use it.
8258         (build_unary_op): Use lvalue_type.
8259         * call.c (standard_conversion, convert_like): Use string_conv_p.
8260         (add_function_candidate): Use lvalue_type.
8261         * cvt.c (convert_to_reference): Likewise.
8262         * decl2.c (lang_decode_option): Ignore -traditional.
8263         * decl.c (init_decl_processing): flag_writable_strings inhibits
8264         flag_const_strings.
8266 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
8268         * lang-options.h (lang_options): Add fconst-strings to the list
8269         of valid options.
8270         * decl2.c (lang_f_options, lang_decode_option): Likewise.
8272 1998-08-24  Nathan Sidwell  <nathan@acm.org>
8274         * lex.c (real_yylex): Don't warn about long long constants if
8275         we're allowing long long.
8277 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8279         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
8280         accessing bindings directly.
8282         * search.c (my_tree_cons): Reimplement.
8284         * lang-specs.h: Remove __HONOR_STD.
8285         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
8287 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
8289         * decl.c (grokdeclarator): Complain about in-class initialization
8290         of aggregates and/or references.
8291         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
8292         TEMPLATE_TYPE_PARMs.
8294         * decl2.c (grok_array_decl): Add comment.
8295         (mark_used): Don't instantiate an explicit instantiation.
8296         * friend.c (make_friend_class): Remove bogus comment.  Fix check
8297         for partial specializations.
8298         * pt.c (check_explicit_specialization): Don't
8299         SET_DECL_EXPLICIT_INSTANTIATION here.
8300         (mark_decl_instantiated): Or here.
8301         (do_decl_instantiation): Do it here, instead.  Add checks for
8302         duplicate explicit instantiations, etc.  Tidy.
8303         (do_type_instantiation): Likewise.
8304         (instantiate_decl): Improve comments.  Complain about explicit
8305         instantiations where no definition is available.
8307         * cp-tree.h (ansi_null_node): Remove.
8308         * call.c (build_over_call): Warn about converting NULL to an
8309         arithmetic type.
8310         * cvt.c (build_expr_type_conversion): Likewise.  Use
8311         null_ptr_cst_p instead of expanding it inline.
8312         * decl.c (ansi_null_node): Remove.
8313         (init_decl_processing): Make null_node always have integral type.
8314         * except.c (build_throw): Warn about converting NULL to an
8315         arithmetic type.
8316         * lex.c (init_parse): Remove handling of ansi_null_node.
8317         * pt.c (type_unification_real): Don't convert NULL to void* type.
8318         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
8319         (convert_for_assignment): Warn about converting NULL to an
8320         arithmetic type.
8321         (convert_for_initialization): Likewise.
8323 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
8325         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
8326         * pt.c (coerce_template_parms): Use no_linkage_check.
8327         * decl.c (grokvardecl): Likewise.
8328         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
8330         * method.c (process_overload_item): Remove useless code.
8332 1998-08-20  Per Bothner  <bothner@cygnus.com>
8334         Handle new'ing of Java classes.
8335         * init.c (build_class_classref):  New function.
8336         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
8337         constructor does not return this;  don't need to exception-protect.
8339         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
8340         * decl2.c (acceptable_java_type):  Handle template-derived types.
8342 1998-08-20  Per Bothner  <bothner@cygnus.com>
8344         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
8346 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
8348         * decl.c (duplicate_decls): Always merge the old and new patterns
8349         for templates, regardless of whether or not the new one has
8350         DECL_INITIAL.  Don't throw away specializations.  Merge
8351         DECL_SAVED_TREE.
8352         * pt.c (tsubst_decl): Use the right pattern when calculating the
8353         complete args for a new template instance.
8354         (do_decl_instantiation): Fix typo in comment.
8355         (regenerate_decl_from_template): Deal with tricky friend template
8356         case.
8357         (instantiate_decl): Likewise.
8359 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
8361         * init.c (build_builtin_delete_call): Add missing assemble_external
8362         call.
8364 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
8366         * parse.y (notype_unqualified_id): Also accept ~A<int>.
8368 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
8370         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
8371         arithmetic.
8372         * except.c (build_throw): Warn when NULL is thrown, even with
8373         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
8374         thrown expression.
8376         * cp-tree.h (ansi_null_node): New variable.
8377         * decl.c (ansi_null_node): New variable.
8378         (init_decl_processing): Initialize its type.
8379         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
8380         for null_node in non-ANSI mode.
8381         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
8382         place of null_node to avoid spurious errors.
8384 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
8386         * cp-tree.h (enter_scope_of): New function.
8387         * parse.y (complex_direct_notype_declarator): Use it.
8388         * semantics.c (enter_scope_of): New function.
8390 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
8392         * decl.c (grokparms): No, here.
8394         * decl.c (grokdeclarator): Catch parm with pointer to array of
8395         unknown bound here...
8396         * method.c (process_overload_item): ...not here.
8398         * gxxint.texi: Remove obsolete documentation of overloading code.
8400         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
8401         * class.c (finish_struct_bits): Likewise.
8403         * tree.c (lvalue_type): Fix for arrays.
8404         * typeck.c (build_unary_op): Use lvalue_type.
8405         * call.c (add_function_candidate): Likewise.
8406         * cvt.c (convert_to_reference): Likewise.
8408         * decl2.c (lang_decode_option): Ignore -traditional.
8410         * init.c (build_offset_ref): Don't mess with error_mark_node.
8411         * lex.c (do_scoped_id): Use cp_error.
8413         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
8415 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
8417         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
8419 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
8421         * cp-tree.h (set_identifier_local_value): Provide prototype.
8423         * decl2.c (do_namespace_alias): Remove unused variables `binding'
8424         and `old'.
8426 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
8428         * Makefile.in: Rename BBISON to BISON so that it can be properly
8429         inherited from the parent makefile.
8431 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
8433         * lang-options.h: Add -finit-priority.
8434         * decl2.c: Likewise.  Check flag_init_priority instead of
8435         USE_INIT_PRIORITY.
8437         * decl2.c (setup_initp): New fn.
8438         (start_objects, finish_objects, do_ctors): Handle init_priority.
8439         (do_dtors, finish_file): Likewise.
8441 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
8443         * pt.c (tsubst_copy): Hush warning.
8445         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
8447 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
8449         * pt.c (print_template_context): Don't abort when instantiating a
8450         synthesized method.
8452         * decl.c (grokdeclarator): Issue errors on namespace qualified
8453         declarators in parameter lists or in class scope.
8455 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
8457         * pt.c (check_explicit_specialization): Don't abort on bogus
8458         explicit instantiations.
8460 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
8462         * typeck.c (require_complete_type): Use complete_type_or_else.
8463         (complete_type_or_else): Always return NULL_TREE on failure, as
8464         documented.
8466         * pt.c (tsubst_aggr_type): Prototype.
8467         (tsubst_decl): New function, split out from tsubst.  Set
8468         input_filename and lineno as appropriate.
8469         (pop_tinst_level): Restore the file and line number saved in
8470         push_tinst_level.
8471         (instantiate_class_template): Set input_filename and lineno as
8472         appropriate.
8473         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
8474         context for a TYPENAME_TYPE is complete.
8476         * decl2.c (grokbitfield): Issue errors on bitfields declared with
8477         function type.
8478         (do_dtors): As in do_ctors, pretend to be a member of the same
8479         class as a static data member while generating a call to its
8480         destructor.
8482         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
8483         conversions, even in complex virtual base class hierarchies.
8485 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
8487         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
8488         (TYPE_TEMPLATE_INFO): Likewise.
8489         (SET_TYPE_TEMPLATE_INFO): Likewise.
8490         (ENUM_TI_TEMPLATE): Likewise.
8491         (ENUM_TI_ARGS): Likewise.
8492         (lookup_nested_type_by_name): Remove.
8493         * decl.c (maybe_process_template_type_declaration): Handle enums.
8494         (start_enum): Don't check for primary-template enum declarations
8495         here.
8496         (finish_enum): Clean up, document.  Make sure template enum
8497         constants get the correct type.
8498         (build_enumerator): Copy initializers for template enumerations,
8499         too.
8500         (grok_enum_decls): Document.
8501         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
8502         better.  Build LOOKUP_EXPRs for local variables, even if they are
8503         TREE_PERMANENT.
8504         * pt.c (tsubst_enum): Remove field_chain parameter.
8505         (template_class_depth): Include the depth of surrounding function
8506         contexts.
8507         (push_template_decl): Check for primary-template enum declarations
8508         here.  Deal with enumeration templates.
8509         (lookup_template_class): Likewise.
8510         (for_each_template_parm): Likewise.
8511         (instantiate_class_template): Don't call tsubst_enum directly,
8512         call tsubst instead, to instantiate enums.  Deal with all
8513         field_chain issues here, not in tsubst_enum.
8514         (lookup_nested_type_by_name): Remove.
8515         (tsubst_aggr_type): Revise handling of enumeration types.
8516         (tsubst): Likewise.
8517         (tsubst_copy): Likewise.
8518         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
8520 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
8522         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
8523         uses template parameters.
8524         * method.c (build_template_parm_names): Use the full set of
8525         template arguments for tsubst'ing.
8526         (build_overload_identifier): Pass the full set of template
8527         arguments to build_template_parm_names, not just the
8528         innermost_args.
8529         * pt.c (TMPL_ARGS_DEPTH): Define using
8530         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
8531         (NUM_TMPL_ARGS): New macro.
8532         (add_outermost_template_args): Deal with the case where the outer
8533         args will be completely discarded.
8534         (coerce_template_parms): Use the full set of template arguments
8535         for tsubst'ing.  Simplify.  Add some asserts.  Improve
8536         error messages.
8537         (lookup_template_class): Pass the full set of template arguments
8538         to coerce_template_parms.
8539         (tsubst): Add assertion.
8540         (do_type_instantiation): Don't instantiate member template
8541         classes.
8543         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
8544         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
8546 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
8548         * method.c (set_mangled_name_for_decl): Change return type to void.
8550         * decl.c (lookup_name_real): A namespace-level decl takes priority
8551         over implicit typename.  Avoid doing the same lookup twice.
8553         * search.c (dependent_base_p): New fn.
8554         (dfs_pushdecls, dfs_compress_decls): Use it.
8556         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
8557         virtual functions if the type doesn't have any.
8559 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
8561         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
8562         uses template parameters.
8564 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
8566         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
8567         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
8568         * lex.c (do_identifier): Don't use a second argument, or a type,
8569         when building LOOKUP_EXPRs.
8570         (do_identifier): Likewise.
8571         (do_scoped_id): Likewise.
8572         * method.c (hack_identifier): Improve error message.
8573         * pt.c (lookup_template_function): Don't needlessly call
8574         copy_to_permanent or build_min.
8575         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
8576         necessary.
8577         (do_decl_instantiation): Improve error message.
8578         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
8579         (build_min): Copy the type to the permanent obstack, too.
8581 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
8583         * init.c (init_init_processing): Remove BI* handling.
8584         (build_builtin_call): Remove.
8585         (build_builtin_delete_call): New fn.
8586         (build_delete): Use it.
8588 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
8590         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
8591         (maybe_check_template_type): New function.
8592         * decl.c (maybe_process_template_type_declaration): New function,
8593         split out from pushtag  Call maybe_check_template_type.
8594         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
8595         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
8596         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
8597         * pt.c (template_class_depth_real): Generalization of ...
8598         (template_class_depth): Use it.
8599         (register_specialization): Use duplicate_decls for duplicate
8600         declarations of specializations.
8601         (maybe_check_template_type): New function.
8602         (push_template_decl_real): Fix comment.
8603         (convert_nontype_argument): Likewise.
8604         (lookup_template_class): Likewise.  Avoid an infinite loop on
8605         erroneous code.
8606         (tsubst_friend_function): Fix comment.
8607         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
8608         an IDENTIFIER_NODE.
8609         * semantics.c (begin_function_definition): Use
8610         reset_specialization to note that template headers don't apply
8611         directly to declarations after the opening curly for a function.
8613 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
8615         * decl.c (push_overloaded_decl): Use current_namespace instead of
8616         DECL_CONTEXT (decl) to determine where we go.
8618         * decl.c (lookup_name_real): Fix typo.
8620 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
8622         * friend.c (is_friend): Be lenient with member functions to deal
8623         with nested friends.
8625 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
8627         * class.c (finish_struct_1): Convert integer_zero_node to
8628         ssizetype before passing it to set_rtti_entry.
8629         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
8630         of any size to a pointer.
8632 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
8634         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
8635         (build_template_decl_overload): Remove.
8636         (set_mangled_name_for_decl): New function.
8637         (innermost_args): Remove is_spec parameter.
8638         (most_specialized, most_specialized_class): Remove declarations.
8639         (lookup_template_class): Add entering_scope parameter.
8640         (maybe_process_partial_specialization): New function.
8641         (finish_template_decl): Likewise.
8642         (finish_template_type): Likewise.
8643         * class.c (finish_struct): Clean up processing of member template
8644         specializations.
8645         * decl.c (pushtag): Fix formatting.
8646         (lookup_tag): Improve handling of pseudo-global levels.
8647         (make_typename_type): Adjust call to lookup_template_class.
8648         (shadow_tag): Use maybe_process_partial_specialization.
8649         (xref_tag): Improve handling of member friends.
8650         (start_function): Call push_nested_class before
8651         push_template_decl.  Don't call push_template_decl for
8652         specializations.
8653         * decl2.c (grok_x_components): Don't call xref_tag for
8654         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
8655         (grokclassfn): Use set_mangled_name_for_decl.
8656         (arg_assoc_class): Adjust call to innermost_args.
8657         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
8658         * error.c (dump_function_name): Improve printing of template
8659         function names.
8660         * friend.c (is_friend): Don't compare types of decls to determine
8661         friendship, unless flag_guiding_decls.
8662         (make_friend_class): Partial specializations cannot be friends.
8663         (do_friend): Use set_mangled_name_for_decl.  Call
8664         push_template_decl_real instead of push_template_decl.
8665         * method.c (build_decl_overload_real): Remove prototype.  Give it
8666         external linkage.
8667         (build_overload_identififer): Adjust call to innermost_args.
8668         (build_template_decl_overload): Remove.
8669         (set_mangled_name_for_decl): New function.
8670         * parse.y (.finish_template_type): New non-terminal.
8671         (template_def): Use finish_template_decl.  Use template_extdef
8672         instead of extdef.
8673         (template_extdef, template_datadef): New non-terminals, containing
8674         only those rules for things which can be templates.
8675         (datadef): Tidy.
8676         (template_type, self_template_type): Use .finish_template_type.
8677         (named_class_head): Use maybe_process_partial_specialization.
8678         * pt.c (mangle_class_name_for_template): Remove context parameter.
8679         (get_class_bindings): Remove outer_args parameter.
8680         (complete_template_args): Remove.
8681         (add_outermost_template_args): New function.
8682         (register_specialization): Return the specialization.
8683         (unregister_specialization): New function.
8684         (tsubst_template_parms): Likewise.
8685         (most_specialized, most_specialized_class): Prototype here as
8686         static.
8687         (original_template): Rename to most_general_template.
8688         (tsubst_template_parms): New function.
8689         (set_mangled_name_for_template_decl): Likewise.
8690         (TMPL_ARGS_DEPTH): New macro.
8691         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
8692         (TMPL_ARGS_LEVEL): New macro.
8693         (SET_TMPL_ARGS_LEVEL): Likewise.
8694         (TMPL_ARG): Likewise.
8695         (SET_TMPL_ARG): Likewise.
8696         (TMPL_ARGS_DEPTH): Likewise.
8697         (finish_member_template_decl): Use finish_template_decl.
8698         (maybe_process_partial_specialization): New function, split out
8699         from tsubst.
8700         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
8701         (maybe_begin_member_template_processing): Use new macros.
8702         (is_member_template): Likewise.
8703         (is_member_template_class): Likewise.
8704         (add_to_template_args): Likewise.  Deal with multiple levels of
8705         args.
8706         (maybe_process_partial_specialization): New function.
8707         (retrieve_specialization): Add consistency check.
8708         (determine_specialization): Return full argument list.
8709         (check_explicit_specialization): Tweak friend handling.  Use full
8710         argument lists.  Simplify.
8711         (current_template_args): Use new macros.
8712         (push_template_decl_real): Change ill-named mainargs to specargs.
8713         Check that a partial specialization actually specializes at least
8714         one parameter.   Improve friend handling.  Modify for full
8715         template arguments.
8716         (classtype_mangled_name): Don't mangle the names of
8717         specializations.
8718         (lookup_template_class): Add entering_scope parameter.  Use it to
8719         avoid finding a template type when an instantiation is required.
8720         Simplify.  Use full template arguments.
8721         (tsubst_friend_function): Use unregister_specialization.  Use new
8722         macros.  Use full template arguments.
8723         (tsubst_friend_class): Substitute, using tsubst_template_parms,
8724         into the template parameters before passing them to
8725         redeclare_class_template.
8726         (instantiate_class_template): Simplify.  Use full template
8727         arguments.  Adjust calls to get_class_bindings.  Use
8728         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
8729         (innermost_args): Use new macros.
8730         (tsubst_aggr_type): New function, split out from tsubst.
8731         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
8732         conventions for lookup_template_class.  Refine handling of partial
8733         instantiations.   Remove calls to complete_template_args.
8734         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
8735         and set_mangled_name_for_template_decl.
8736         (tsubst_copy): Use tsubst_aggr_type.
8737         (instantiate_template): Use full template arguments.
8738         (more_specialized): Improve formatting.
8739         (more_specialized_class): Adjust calls to get_class_bindings.
8740         (get_bindings_real): Don't call complete_template_args.
8741         (most_specialized): Don't overwrite input; create a new list.
8742         (most_specialized_class): Use most_general_template.
8743         (regenerate_decl_from_template): Use unregister_specialization.
8744         Use full template arguments.
8745         (instantiate_decl): Use full template arguments.
8746         (set_mangled_name_for_template_decl): New function.
8747         * semantics.c (begin_class_definition): Use
8748         maybe_process_partial_specialization.
8749         (finish_member_class_template): New function.
8750         (finish_template_decl): Likewise.
8751         (finish_template_type): Likewise.
8752         (typeck.c): Don't crash after issuing a compiler_error.
8753         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
8755 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
8757         * typeck2.c (build_functional_cast): Handle default-initialization.
8759         * call.c (build_over_call): Pass 1 to popclass.
8761         * parse.y (direct_notype_declarator): Add precedence declaration
8762         to notype_unqualified_id case.
8763         * Makefile.in (EXPECT): Adjust.
8765         * tree.c (ovl_member): Fix for single function in OVL.
8767 1998-07-27  Dave Brolley  <brolley@cygnus.com>
8769         * c-lex.c (yylex): Fix boundary conditions in character literal and
8770         string literal loops.
8772 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
8774         * decl.c (lookup_name_real): OK, do return the from_obj value
8775         unless got_object depends on template parms.
8777         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
8779         * pt.c (coerce_template_parms): Also complain about local enums.
8781         * cp-tree.h: Add prototype for set_identifier_local_value.
8782         * decl.c (set_identifier_local_value_with_scope): Make static,
8783         prototype.
8784         * search.c (covariant_return_p): Likewise.
8785         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
8787         * call.c (build_method_call): Only pull out the type of a destructor
8788         if it's a template type parm.
8789         * decl.c (lookup_name_real): Never return the from_obj value.
8791 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
8793         * except.c (process_start_catch_block_old): Call start_decl_1 for
8794         catch parm.
8795         * decl.c (start_decl_1): Avoid duplicate error.
8797         * init.c (expand_default_init): Only perform the initialization if
8798         it will do something.
8800 1998-07-23  H.J. Lu  (hjl@gnu.org)
8802         * parse.y (base_class): Check for invalid base class.
8804 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
8806         * decl2.c (import_export_template): Fold in...
8807         (import_export_class): ...to here.  Handle dllimport/export.
8809         * class.c (build_vtable): Pass at_eof to import_export_vtable.
8810         (prepare_fresh_vtable): Likewise.
8811         * decl2.c (import_export_class): Split out...
8812         (finish_prevtable_vardecl): From here.
8813         * class.c (finish_struct_1): Call import_export_class if at_eof.
8815         * decl.c (start_function): #if 0 mysterious code I wrote and have
8816         forgotten why.
8817         * rtti.c (get_tinfo_fn): If this is for a class type, set
8818         DECL_CONTEXT.
8820 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
8822         * inc/exception: Change terminate and unexpected to ().
8824         * parse.y (named_class_head_sans_basetype_defn): A
8825         named_class_head_sans_basetype followed by '{' or ':' is a defn.
8827 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
8829         * tree.c (canonical_type_variant): New fn to handle arrays.
8830         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
8831         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
8832         * method.c (process_overload_item): Use build_overload_value for
8833         arrays.
8835 1998-07-20  Dave Brolley  <brolley@cygnus.com>
8837         * lex.c (mbchar.h): #include it.
8838         (GET_ENVIRONMENT): New macro.
8839         (init_parse): Set character set based on LANG environment variable.
8840         (real_yylex): Handle multibyte characters in character literals.
8841         (real_yylex): Handle multibyte characters in string literals.
8843 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
8845         * lex.c (do_identifier): Look for class value even if we don't
8846         have a global value.  Do implicit declaration if parsing is 2.
8847         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
8848         lookup.
8850 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
8852         * decl.c (pushtag): Revert previous change.
8853         * pt.c (lookup_template_class): Don't put out debugging
8854         information for types that use template parameters.
8856         * decl.c (pushtag): Don't put out debugging information for
8857         compiler-generated typedefs.
8859         * error.c (dump_type_real): Don't crash when presented with
8860         intQI_type_node or the like.
8862         * semantics.c (finish_translation_unit): Fix spelling error in
8863         comment.
8865 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
8867         * decl.c (lookup_name_real): Pull out single function here.
8868         (select_decl): Not here.
8869         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
8871         * decl.c (qualify_lookup): Tweak again.
8873         * pt.c (lookup_template_class): Don't mess with the context of the
8874         instantiation.
8875         * decl2.c (current_decl_namespace): Remove special handling for
8876         templates.
8878         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
8879         a member template specialization.
8881         * tree.c (ovl_member): Use decls_match to compare functions.
8882         * decl.c (decls_match): Check the context of a function.
8884         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
8885         in Koenig lookup support rules.
8886         * semantics.c (finish_call_expr): Handle the new cases.
8888         * typeck.c (build_x_function_call): Handle overloaded methods.
8890         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
8892 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
8894         * semantics.c (finish_object_call_expr): Revert previous change.
8895         * call.c (build_new_method_call): Likewise.  Instead, convert
8896         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
8898 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
8900         * decl.c (qualify_lookup): Handle templates.
8902         * decl2.c (do_using_directive): Don't pass ancestor.
8903         * decl.c (push_using_directive): Calculate ancestor.
8905         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
8906         * decl.c (pushdecl): Move type shadowing handling from here...
8907         (duplicate_decls): ...to here.
8908         * decl.c (set_identifier_local_value_with_scope): New fn.
8909         (pushdecl): Use it.
8910         (set_identifier_local_value, lookup_type_current_level): New fns.
8911         * decl2.c (do_local_using_decl): Handle types and binding level
8912         stuff properly.
8914         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
8915         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
8916         (lookup_namespace_name): Likewise.
8917         * typeck.c (build_unary_op): Not here anymore.
8919         * decl2.c (do_class_using_decl): Make sure we get an identifier.
8920         * class.c (handle_using_decl): Ignore TYPE_DECLs.
8922         * decl.c (qualify_lookup): New fn.
8923         (lookup_name_real): Use it.
8925 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
8927         * decl2.c (add_using_namespace): When directly using a namespace
8928         that was indirect before, promote it.
8930         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
8931         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
8932         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
8933         * decl.c (select_decl): Replace two flag parameters by one.
8934         (unqualified_namespace_lookup): Likewise, pass flag.
8935         (lookup_flags): New function.
8936         (lookup_name_real): Compute flags, pass them.
8937         (lookup_namespace_name): Call with zero-flag.
8938         * decl2.c (ambiguous_decl): Add flag parameter, complain only
8939         according to flags.
8940         (lookup_using_namespace, qualified_lookup_using_namespace):
8941         Add flag parameter, pass them through.
8942         * lex.c (do_scoped_id): Call with zero-flag.
8944 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
8946         * typeck.c (convert_for_assignment): Use comptypes.
8948 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
8950         * semantics.c (finish_object_call_expr): Move test for the
8951         function called being a TYPE_DECL to ...
8952         * call.c (build_new_method_call): Here.
8954 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
8956         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
8957         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
8959         * lex.c (looking_for_typename): Don't initialize.
8961         * decl2.c (ambiguous_decl): Clarify error message.
8963         * decl.c (push_using_directive): Iterate over namespaces used
8964         indirectly.
8966 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8968         * decl2.c (add_using_namespace): Iterate over namespaces used
8969         indirectly.
8971         * decl.c (lookup_name_real): Accept namespace aliases as locals.
8972         (cat_namespace_levels): Ignore aliases.
8973         (duplicate_decls): Ignore duplicate aliases.
8974         * decl2.c (do_namespace_alias): Process block level namespace
8975         aliases.  Store alias with pushdecl.  Remove odr errors.
8976         * parse.y (namespace_alias): New non-terminal.
8977         (extdef): Use it.
8979 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
8981         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
8982         Handle TEMPLATE_TYPE_PARM.
8983         (arg_assoc): Rewrite.
8985         * pt.c (complete_template_args): Don't look at the context unless
8986         we have to.
8988         * method.c (build_decl_overload_real): Fix namespace handling.
8990         * typeck.c (build_unary_op): Extract a lone function from an
8991         OVERLOAD.
8993         * call.c (build_scoped_method_call): Handle getting a namespace
8994         for basetype in a destructor call.
8995         (check_dtor_name): Handle enums.
8997         * parse.y (using_directive): New nonterminal.
8998         (extdef, simple_stmt): Use it.
9000 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9002         * decl2.c (add_function): Move error message ...
9003         (arg_assoc_namespace): ... from here.
9005 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
9007         * parse.y (namespace_qualifier): Fix multiple level handling.
9008         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
9009         (arg_assoc): Don't skip the first argument of a function.
9011 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
9013         * search.c (my_tree_cons): Clean up.
9015 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
9017         * call.c (joust): Don't warn about "confusing" conversions to the
9018         same type.
9020 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9022         * class.c (push_nested_class): Complain about namespaces.
9023         * decl.c (start_decl): Enter the object's namespace.
9024         (cp_finish_decl): Leave it.
9025         (grokdeclarator): Likewise.
9026         * decl2.c (check_decl_namespace): New function.
9027         (finish_file): Call it.
9028         * parse.y (complex_direct_notype_declarator): Set complexity
9029         of namespace-qualified ids to -1, enter the namespace.
9031         * method.c (build_template_decl_overload): Expect _DECL as first
9032         parameter.  Put context temporarily into current_namespace.
9033         * pt.c (check_explicit_specialization): Change caller.
9034         (tsubst): Likewise.
9036         * init.c (build_offset_ref): Call mark_used and
9037         convert_from_reference for namespace members.
9039 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9041         * search.c (my_tree_cons): The bitfield is at index 2.
9043 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
9045         * lang-options.h: Format changed to work with new --help support
9046         in gcc/toplev.c
9048 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9050         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
9051         Do Koenig lookup in CALL_EXPR.
9052         (arg_assoc): Handle error_mark.
9053         * lex.c (is_global): New function.
9054         (do_identifier): Expect arguments for Koenig lookup.
9055         * parse.y (primary): Add rules for calls of unqualified function calls.
9056         (do_id): Change call of do_identifier.
9057         * pt.c (finish_stmt_expr): Likewise.
9058         * semantics.c (finish_id_expr): Likewise.
9059         (finish_call_expr): Add integer parameter to indicate
9060         argument-dependent lookup.
9062         * decl.c (struct binding_level): New field using_directives.
9063         (push_using_decl): Not sorry anymore.
9064         (push_using_directive): New function.
9065         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
9066         (unqualified_namespace_lookup): New function, code from ...
9067         (lookup_name_real): ... here.
9068         * decl2.c (lookup_using_namespace): Pass using list instead of
9069         initial scope.
9070         (validate_nonmember_using_decl): New function.
9071         (do_nonmember_using_decl): New function.
9072         (do_toplevel_using_decl): Use them.
9073         (do_local_using_decl): New function.
9074         (do_using_directive): Support block-level directives.
9075         * parse.y (simple_stmt): Support using declarations and
9076         directives.
9077         (namespace_qualifier, namespace_using_decl): New non-terminals.
9079         * xref.c (classname): New function.
9080         (GNU_xref_hier): Change class and base parameters to tree.
9081         * decl.c (xref_baseypes): Change caller.
9082         * friend.c (make_friend_class): Likewise.
9084 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
9086         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
9087         comparison.
9089         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
9090         template template parameter, record its use.
9091         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
9092         its template arguments if exists.
9094         * pt.c (coerce_template_template_parms): New function equivalent
9095         to coerce_template_parms when IS_TMPL_PARM is true.
9096         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
9097         all callers changed.
9099         (coerce_template_parms): Access ARGLIST properly when creating a
9100         new vector.  Only accept implicit TYPE_DECL as valid argument for
9101         a template template parameter when it is a base class of
9102         current_class_type.  Don't display error message when COMPLAIN is
9103         false.
9105 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
9107         * repo.c (get_base_filename): Use file_name_nondirectory.
9108         (open_repo_file): Likewise.
9109         * cp-tree.h (file_name_nondirectory): Add prototype.
9111 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
9113         * friend.c (do_friend): Pull the identifier out of declarator.
9114         Use cp_error and friends.
9115         * decl2.c (qualified_lookup_using_namespace): Fix call to
9116         purpose_member.
9117         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
9118         (grokvardecl): Use DECL_CLASS_SCOPE_P.
9119         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
9120         * class.c (warn_hidden): Fix for OVERLOAD.
9121         From grahams@rcp.co.uk:
9122         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
9123         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
9125 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
9127         * g++.1 (-traditional): Remove duplicated documentation.
9129 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
9131         * method.c (flush_repeats): Add nrepeats parameter.
9132         (issue_nrepeats): Likewise.
9133         (is_back_referenceable_type): New function.  Don't back-reference
9134         TEMPLATE_TYPE_PARMs as well as simple types like integers.
9135         (build_mangled_name_for_type): Likewise.
9136         (build_mangled_name_for_type_with_Gcode): Likewise.
9137         (lasttype): Remove.
9138         (nrepeats): Likewise.
9139         (Nrepeats): Likewise.
9140         (start_squangling): Don't clear the variables removed above.
9141         (end_squangling): Likewise.
9142         (flush_repeats): Tidy.  Use nrepeats parameter rather than
9143         Nrepeats global.
9144         (issue_nrepeats): Likewise, but with nrepeats global.  Use
9145         is_backreferenceable_type.
9146         (build_overload_nested_name): Tidy.  Add comment.  Use
9147         build_mangled_name_for_type.
9148         (build_underscore_int): Comment.
9149         (build_overload_scope_ref): Use build_mangled_name_for_type.
9150         (build_overload_int): Likewise.
9151         (build_template_template_parm_names): Tidy.
9152         (build_template_parm_names): Use build_mangled_name_for_type.
9153         (build_overload_identifier): Add comments.
9154         (build_mangled_name_for_type_with_Gcode): Split out from
9155         build_mangled_name.
9156         (build_mangled_name_for_type): Use it.
9157         (build_mangled_name): Rework to use build_mangled_name_for_type
9158         and to not use global nrepeats/Nrepeats.  Tidy.
9159         (process_modifiers): Tidy.
9160         (check_btype): Use is_backreferenceable_type.  Add comment.
9161         Rename `node' to `type'.
9162         (process_overload_item): Set numeric_output_need_bar here.
9163         Use build_mangled_name_for_type.  Tidy.
9164         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
9165         build_mangled_name_for_type.
9167         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
9168         for TYPE_DECLs.
9170 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
9172         * cp-tree.h (warn_long_long): Define.
9173         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
9174         warning "ANSI C++ does not support `long long'".
9175         * decl2.c (warn_long_long): Define.
9176         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
9178 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
9180         * decl.c (xref_tag): Handle attributes between 'class' and name.
9181         * parse.y (aggr): Likewise.
9182         * semantics.c (finish_class_definition): Likewise.
9183         * Makefile.in (EXPECTED): Adjust.
9185         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
9186         * decl2.c: Define them.
9187         (lang_decode_option): Handle them.
9188         * lang-options.h: Add -foptional-diags.
9189         * class.c (finish_struct): Don't complain about multiple meanings of
9190         name if -fno-optional-diags.
9191         * decl.c (pushdecl_class_level): Likewise.
9192         * lex.c (real_yylex): Check warn_multichar.
9194 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
9196         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
9198         * tree.c (make_binfo): Fix length.
9200 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
9202         * decl2.c (lang_decode_option): Remove warn_template_debugging.
9203         * lang-options.h: Likewise.
9205 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9207         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
9208         (process_start_catch_block): Likewise for variables
9209         `false_label_rtx', `call_rtx' and `return_value_rtx'.
9211 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
9213         * tree.c (build_srcloc): Make sure we allocate this node on the
9214         permanent obstack.
9216 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
9218         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
9219         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
9220         (lang_specific_driver): Only add -lm automatically if need_math is
9221         nonzero.
9223 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
9225         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
9227 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9229         * Makefile.in (EXPR_H): New dependency variable.
9230         (decl2.o): Depend on $(EXPR_H).
9231         (typeck.o): Likewise.
9232         (init.o): Likewise.
9233         (expr.o): Likewise.
9235 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
9237         * decl.c (start_enum): Put local enums on permanent_obstack.
9239 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
9241         * cp-tree.h (c_get_alias_set): Declare.
9242         * decl.c (init_decl_processing): Set lang_get_alias_set.
9244 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
9246         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
9247         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
9248         flag for all function decls which are in the exception table.
9249         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
9250         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
9251         code is emitted for any referenced rtti function.
9253 1998-06-25  Dave Brolley  <brolley@cygnus.com>
9255         * lang-specs.h: Use new | syntax to eliminate
9256         string concatenation.
9258 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
9260         * cp-tree.h (CP_DECL_CONTEXT): New macro.
9261         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
9262         * method.c (build_overload_nested_name): Likewise.
9263         * sig.c (build_signature_pointer_or_reference_type): Don't set
9264         DECL_CONTEXT.
9266 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9268         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
9269         * cp-tree.h (FROB_CONTEXT): New macro.
9270         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
9271         * decl.c (namespace_binding): Replace NULL_TREE with
9272         global_namespace.
9273         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
9274         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
9275         Likewise.
9276         * decl.c (pushtag): Use FROB_CONTEXT.
9277         (pushdecl, make_typename_type, define_function, grokdeclarator):
9278         Likewise.
9279         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
9280         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
9281         Likewise.
9282         * decl2.c (decl_namespace): Return global_namespace if no context.
9283         * method.c (build_overload_nested_name): Expect null as context.
9284         * pt.c (mangle_class_name_for_template): Do nothing for null
9285         contexts.
9286         (lookup_template_class): Allow for null id_context.
9288 1998-06-25  Richard Henderson  <rth@cygnus.com>
9290         * method.c (emit_thunk): Set current_function_is_thunk for the
9291         ASM_OUTPUT_MI_THUNK case as well.
9293 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
9295         * exception.cc (__cplus_type_matcher): Get a match_info pointer
9296         instead of an exception table entry as a parameter.
9298 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
9300         * parse.y (function_try_block): Don't call start_catch_handler.
9301         * except.c (call_eh_info): Remove coerced field from declaration.
9302         (build_eh_type_type_ref): New function to create an address of a
9303         rtti function for the new style exception tables.
9304         (expand_start_catch_block): Split function, this contains the
9305         common part.
9306         (process_start_catch_block_old): New function to perform the rest
9307         of expand_start_catch_block under old style exceptions.
9308         (process_start_catch_block_old): New function to perform the rest
9309         of expand_start_catch_block under new style exceptions.
9310         (expand_end_catch_block): Only pop the false label off the stack under
9311         the old style of exceptions.
9312         * semantics.c (finish_try_block): Don't call start_catch_handler.
9313         * exception.cc (struct cp_eh_info): Add original_value field.
9314         (__cplus_type_matcher): Perform type matching on the original exception
9315         value, and if we have a match, set the current value.
9316         (__cp_push_exception): Set the original exception value.
9318 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
9320         * call.c (joust): Fix confusing conversion warning.
9322         * call.c (build_op_delete_call): Add placement parm.  Check
9323         LOOKUP_SPECULATIVELY.
9324         * cp-tree.h, decl2.c, init.c: Adjust.
9325         * decl.c (finish_function): Use it.
9327         * pt.c (tsubst): Diagnose creating void fields or variables.
9329 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9331         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
9333         * cp-tree.h (check_dtor_name): Add prototype.
9335         * init.c (expand_member_init): Remove unused variables
9336         `ptr_type_node', `parm' and `rval'.
9338         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
9339         in call to fprintf.
9340         (lang_print_xnode): Likewise.
9342         * typeck2.c (enum_name_string): Cast argument to sprintf to long
9343         and use %ld specifier.
9345         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
9346         specifier in call to fprintf.
9347         (GNU_xref_member): Cast argument to sprintf to int.
9349 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
9351         * typeck2.c (pop_init_level): Warn about implicit zero initialization
9352         of struct members.
9354 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9356         * cp-tree.h: Prototype function `check_java_method'.
9358 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
9360         * class.c (finish_struct): Make conflicting use of id a pedwarn.
9361         * decl.c (pushdecl_class_level): Likewise.
9363 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
9365         * pt.c (convert_nontype_argument): Issue an error when presented
9366         with an integer (real) constant that cannot be simplified to an
9367         INT_CST (REAL_CST).
9369         * cp-tree.h (c_get_alias_set): Remove declaration added in
9370         1998-06-13 change that should never have been checked in.
9372 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
9374         * typeck.c (build_binary_op_nodefault): Change % in format strings
9375         to %%.
9377         * decl.c (grokvardecl): Don't build_static_name for decls that
9378         aren't at namespace scope.
9380         * init.c (perform_member_init): Catch default-initialization of
9381         references.
9383 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
9385         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
9387 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
9389         * method.c (hack_identifier): Complain about getting a namespace
9390         or class template.
9391         * typeck.c (decay_conversion): Remove check for namespaces.
9392         * typeck2.c (incomplete_type_error): Likewise.
9393         * parse.y (template_arg): Add PTYPENAME expansion.
9395 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
9397         * decl.c (grokvardecl): Don't build external assembler names for
9398         TYPENAMEs in other namespaces as there is no declarator.
9399         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
9400         info from DECL_CONTEXT if it is NULL.
9402 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
9404         * call.c (check_dtor_name): Split out.
9405         (build_scoped_method_call): Use it.
9406         (build_method_call): Use it.
9407         * init.c (build_offset_ref): Use it.
9409         * typeck.c (build_static_cast): Fix handling of pointers to members.
9411         * decl.c (finish_function): Just return nothing from a constructor.
9412         * typeck.c (c_expand_return): Complain about returning a void
9413         expression from a destructor.
9415 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
9417         * class.c (alter_access): Accept a BINFO explaining how to get
9418         from the entity whose accessed is being altered to the type doing
9419         the altering.
9420         (handle_using_decl): New function containing code split out from ...
9421         (finish_struct_1): Here.
9423         * cp-tree.h (complete_type_or_else): Declare.
9424         * init.c (build_new_1, build_delete): Use it.
9425         * typeck.c (require_complete_type): Use complete_type, rather than
9426         expanding it inline.
9427         (complete_type_or_else): New function.
9428         (build_component_ref): Use it.
9429         (pointer_int_sum): Make sure the type pointed to is complete.
9430         (pointer_diff): Likewise.
9432         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
9433         types.
9435         * search.c (get_matching_virtual): Note that member templates
9436         cannot override virtual functions.
9438 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
9440         * pt.c (check_explicit_specialization): If DECLARATOR turned into
9441         an error_mark_node from lookup_template_function, return the same.
9442         (determine_specialization): Also make sure TEMPLATE_ID isn't an
9443         error_mark_node, before we try to read its operands.
9444         * decl.c (grokdeclarator): If we got an error_mark_node from
9445         check_explicit_specialization, just return it right back.
9447 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
9449         * class.c (instantiate_type): Don't treat template-ids that don't
9450         specify any template arguments as equivalent to ordinary
9451         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
9452         pointer-to-members for member templates.  Tidy slightly.
9453         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
9454         * init.c (build_offset_ref): Handle template-ids like ordinary
9455         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
9456         offset part of the OFFSET_REF.
9457         * typeck.c (build_unary_op): Change check for unknown types to
9458         look for OFFSET_REFs, not SCOPE_REFs.
9460 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
9462         * pt.c (is_member_template_class): New function.
9463         (push_template_decl_real): Use it.
9465 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
9467         * friend.c (do_friend): Add support for nested classes using
9468         member functions of the enclosing class as friends.
9470 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
9472         * call.c (convert_default_arg): Make global, not static.
9473         (convert_arg_for_ellipsis): Split out from ...
9474         (build_over_call): Here.
9475         * cp-tree.h (convert_default_arg); Declare.
9476         (convert_arg_to_ellipsis): Likewise.
9477         (do_member_init): Remove.
9478         * init.c (do_member_init): Remove; this code is dead.
9479         (expand_member_init): Remove much of this code; it is dead.
9480         * typeck.c (convert_arguments): Use convert_default_arg and
9481         convert_arg_for_ellipsis, rather than duplicating here.
9483         * call.c (convert_like): Don't fail silently if
9484         build_user_type_conversion fails.  Always return error_mark_node
9485         for failure.
9487 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
9489         * search.c (covariant_return_p): Complain about ambiguous base.
9491         * typeck.c (build_component_ref): Diagnose ref to nested type.
9493 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
9495         * decl.c (grokparms): Check that INIT isn't an error_mark_node
9496         before giving error about invalid type for default arg.
9498 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
9500         * call.c (build_method_call): Fix thinko.
9502 1998-06-10  Dave Brolley  <brolley@cygnus.com>
9504         * decl2.c (lang_decode_option): New argc/argv interface.
9505         * cp-tree.h (lang_decode_option): New argc/argv interface.
9506         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
9507         specified for cpplib-enabled compilers.
9508         * lex.c (lang_init): Don't check_newline for cpplib.
9509         (init_parse): Don't initialize cpplib here.
9511 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
9513         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
9514         piece before checking DECL_MUTABLE_P.
9516 1998-06-10  John Carr  <jfc@mit.edu>
9518         * tree.c (debug_binfo): Make printf format match arguments.
9520         * error.c (OB_PUTI): Make printf format match arguments.
9522 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
9524         * init.c (perform_member_init): Handle default-initialization.
9526         * except.c (build_throw): Handle throwing NULL.
9528         * typeck.c (build_x_function_call): Use resolve_offset_ref.
9530         * search.c (compute_access): Only strip an anonymous union
9531         for a FIELD_DECL.
9533         * call.c (add_builtin_candidates): Tweak.
9535         * cvt.c (build_expr_type_conversion): Restore code for conversion
9536         from class types.
9537         * decl2.c (delete_sanity): Use it.  Clean up.
9539         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
9541 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
9543         * typeck.c (c_expand_return): Don't warn about void expressions on
9544         return statements in functions returning void.
9546 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
9548         * pt.c (fn_type_unification): Revise documentation.  Tidy.
9549         (type_unification): Likewise.
9551 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
9553         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
9554         expand_end_catch.
9555         * parse.y (function_try_block): Rename expand_start_catch, and delete
9556         expand_end_catch.
9557         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
9558         expand_end_catch.
9560 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
9562         * search.c (lookup_member): New fn.
9563         * class.c (finish_struct_1): Use it.
9564         * decl.c (lookup_name_real): Use it.
9566 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9568         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
9570         * cp-tree.h: Add prototype for `maybe_print_template_context' and
9571         `maybe_make_one_only'.
9573         * decl.c (auto_function): Remove unused variable `decl'.
9575         * decl2.c: Include dwarf2out.h and dwarfout.h.
9577         * lex.c: Remove redundant declarations of `set_float_handler' and
9578         `asm_out_file'.
9580 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
9582         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
9583         time flag.  Call __cp_eh_info instead of __cp_exception_info.
9584         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
9585         (__cp_exception_info): Return offset into cp_eh_info structure to
9586         match what use to be the start of this structure.
9587         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
9588         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
9589         compile time flag.
9590         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
9591         __cp_eh_info instead of __cp_exception_info.
9593 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
9595         * decl.c (cp_finish_decl): Disable inlining of extern inlines
9596         with static variables.
9598 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
9600         * init.c (build_offset_ref): Correct previous change to use build,
9601         not build_min.
9603 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
9605         * class.c (instantiate_type): Handle pointer-to-members where the
9606         member is a template.
9607         * init.c (build_offset_ref): Likewise.
9608         * typeck.c (build_unary_op): Likewise.
9610 1998-06-07  Richard Henderson  <rth@cygnus.com>
9612         * lex.c (lang_init_options): New function.
9613         (lang_init): Remove flag_exceptions == 2 hack.
9615 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
9617         * search.c (envelope_add_decl): Tweak for implicit typename.
9619         * call.c (joust): Also warn about confusing conversion op/constructor
9620         overload resolution.
9622         * spew.c (yylex): Also return the TYPE_DECL if got_object.
9623         Don't clear got_object after '~'.
9624         * call.c (build_scoped_method_call): Tweak destructor handling.
9625         (build_method_call): Likewise.
9626         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
9627         TYPE_MAIN_VARIANT for destructors.
9628         * semantics.c (finish_object_call_expr): Complain about calling a
9629         TYPE_DECL.
9631 1998-06-05  Per Bothner  <bothner@cygnus.com>
9633         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
9634         Define - update needed by gcc.c change.
9636 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
9638         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
9640 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9642         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
9643         * decl.c (lookup_name_real): Add namespaces_only parameter.
9644         If set, return only NAMESPACE_DECLs.
9645         (select_decl): Likewise.
9646         (identifier_type_value): Give additional parameter.
9647         (lookup_name_nonclass): Likewise.
9648         (lookup_name): Likewise.
9649         (find_binding): Skip namespace aliases.
9650         (binding_for_name): Likewise.
9651         (push_namespace): Check for namespace aliases.
9652         (lookup_name_namespace_only): New function.
9653         (begin_only_namespace_names, end_only_namespace_names): New functions.
9654         * decl2.c (set_decl_namespace): Skip namespace aliases.
9655         (do_using_directive): Likewise.
9656         (do_namespace_alias): Produce namespace aliases, fix alias
9657         redeclaration.
9658         * error.c (dump_decl): Support SCOPE_REF.
9659         * parse.y (extdef): Wrap lookup with namespace_only for namespace
9660         aliases and using declarations.
9662 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
9664         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
9666         * error.c (dump_expr): Clean up NEW_EXPR case.
9668 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9670         Suggested by Brendan Kehoe
9671         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
9672         treat it as using ::decl.
9674         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
9676         * tree.c (mapcar): Support NEW_EXPR.
9678         * error.c (dump_expr): Support NEW_EXPR.
9680 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
9682         * method.c (make_thunk): Use overload machinery to make name.
9683         * search.c (covariant_return_p): New fn.
9684         (get_matching_virtual): Use it.
9686         * init.c (build_new_1): Fix check for void.
9688 1998-06-01  Per Bothner  <bothner@cygnus.com>
9690         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
9691         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
9692         java_int_type_node, java_long_type_node, java_float_type_node,
9693         java_double_type_node, java_char_type_node, java_boolean_type_node):
9694         New "primitive" types, with predefined names __java_byte etc.
9695         (record_builtin_java_type):  New function.
9696         (init_decl_processing):  Make Java types with record_builtin_java_type.
9697         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
9698         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
9699         (grokfndecl):  Call check_java_method for Java classes.
9700         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
9701         (process_overload_item):  Match types against specific
9702         java_XX_type_node types, rather than using is_java_type.
9703         * class.c (finish_struct_1):  Don't add default copy constructor
9704         or operator= if TYPE_FOR_JAVA.
9705         (pop_lang_conext):  Restore strict_prototyp proper if Java.
9706         * decl2.c (acceptable_java_type, check_java_method):  New functions.
9707         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
9708         (tsubst):  Move common statement after if statement.
9709         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
9711 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
9713         * pt.c (for_each_template_parm): Use first_rtl_op.
9715         * tree.c (build_cplus_array_type_1): Also check index_type for
9716         template parms.
9718 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
9720         * pt.c (tsubst): Always copy BINFO_BASETYPES.
9722 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
9724         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
9725         TYPE_SIZE_UNIT too.
9727 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
9729         * decl.c (grokdeclarator): Don't complain about in-class
9730         initialization of static consts if we don't really know the type
9731         of the variable.
9733 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
9735         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
9736         * method.c (build_destructor_name): New fn.
9737         * decl2.c (maybe_retrofit_in_chrg): Split out...
9738         (grokclassfn): From here.  Reorganize.
9739         * decl.c (grok_ctor_properties): Make sure ctors for types with
9740         vbases have the in_chrg parm.
9741         * pt.c (instantiate_class_template): Update
9742         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
9743         grok_*_properties.
9744         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
9746 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
9748         * pt.c (instantiate_decl): Make test for whether or not static
9749         variables should be instantiated early match its comment.
9751 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
9753         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
9754         a member.
9755         (start_function): Call check_default_args.
9756         * decl2.c (grokfield): Don't call check_default_args.
9757         (check_default_args): Use cp_error_at.
9758         * lex.c (do_pending_defargs): Call check_default_args.
9760 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
9762         * call.c (build_method_call): Make sure get_type_value returns
9763         something before we try to use its TYPE_MAIN_VARIANT.
9764         (build_scoped_method_call): Likewise.
9766 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
9768         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
9769         initialize an array.
9771         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
9772         DECL_VIRTUAL_P.
9774         * friend.c (do_friend): Clarify template warning.
9776 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
9778         * decl.c (shadow_label): Don't treat decls as identifiers.
9779         (maybe_push_to_top_level): Clear shadowed_labels.
9781         * pt.c (instantiate_decl): Reset lineno and filename after calling
9782         regenerate_decl_from_template.
9784         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
9785         error_mark_node.
9787 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
9789         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
9791 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
9793         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
9794         (convert_nontype_argument): Handle cases when nontype template
9795         parameters become classes after substitution.
9797 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
9799         * friend.c (is_friend): Use comptypes, rather than == to compare
9800         types.  Modify for new representation of template friends.
9801         (make_friend_class): Likewise.
9802         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
9803         (instantiate_class_template): Deal with template friends.
9805         * decl.c (store_parm_decls): Remove redundant call to
9806         expand_main_function.
9808 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
9810         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
9811         DECL_USE_TEMPLATE.
9813 1998-05-26  Per Bothner  <bothner@cygnus.com>
9815         * language_as_string:  Handle lang_java.
9817 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
9819         * decl.c (pushdecl): Don't copy the type_decl.
9821 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9823         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
9824         current_class_type.
9825         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
9827         * parse.y (complex_direct_notype_declarator): Use $1 to access
9828         scope of notype_qualified_id.
9830 1998-05-26  Dave Brolley  <brolley@cygnus.com>
9832         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
9833         (init_parse): Initialize cpplib interface.
9835         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
9836         empty continuation.
9838 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
9840         * decl.c (pushtag): Avoid crashing on erroneous input.
9842 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9844         * decl.c (push_namespace): Only produce one unique name for
9845         anonymous namespaces.
9846         (get_unique_name): Remove.
9848 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
9850         * call.c (tourney): Don't do any extra comparisons.
9852         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
9854         * cp-tree.h (processing_template_parmlist): Declare.
9855         * decl.c (pushtag): Don't call push_template_decl when we
9856         shouldn't.
9857         * pt.c (processing_template_parmlist): New variable.
9858         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
9859         (complete_template_args): Use it.
9860         (add_to_template_args): Likewise.
9861         (innermost_args): Likewise.
9862         (tsubst): Likewise.
9863         (begin_template_parm_list): Use processing_template_parmlist.
9864         (end_template_parm_list): Likewise.
9866         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
9867         * decl.c (grokdeclarator): Use it.
9868         * decl2.c (grok_x_components): Likewise.
9869         * init.c (initializing_context): Likewise.
9870         * method.c (do_build_copy_constructor): Likewise.
9871         (do_build_assign_ref): Likewise.
9872         * search.c (compute_access): Likewise.
9873         * typeck.c (build_component_ref): Likewise.
9875         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
9876         unnamed type a typedef name "for linkage purposes".
9878         * pt.c (lookup_template_class): Don't look at
9879         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
9881         * method.c (build_overload_int): Handle error cases gracefully.
9883         * pt.c (instantiate_decl): Handle static member variables
9884         correctly.
9886         * pt.c (tsubst): Use the tsubst'd type when producing new
9887         TEMPLATE_PARM_INDEX nodes.
9889 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
9891         * tree.c (cp_tree_equal): Handle pointers to member functions.
9893         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
9894         sure the type of the REF_BIND is a reference type.
9895         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
9896         target_type for clarity.
9898         * parse.y (xcond): Move call to condition_conversion ...
9899         * semantics.c (finish_for_cond): Here.
9900         * parse.c: Regenerated.
9902 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
9904         * decl.c (push_namespace): Namespaces have type void.
9905         * typeck2.c (incomplete_type_error): Complain about namespace
9906         used as expression.
9907         * typeck.c (decay_conversion): Likewise.
9909 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9911         * error.c (dump_expr): Support namespaces.
9913 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
9915         * cp-tree.def: Add SRCLOC.
9916         * cp-tree.h: Add struct tree_srcloc and accessor macros.
9917         * tree.c (build_srcloc, build_srcloc_here): New fns.
9918         * pt.c (add_pending_template): Use build_srcloc_here.
9919         (push_tinst_level): Update last_template_error_tick before erroring.
9920         (instantiate_decl): Restore lineno and input_filename before
9921         calling add_pending_template.
9922         * decl2.c (finish_file): Set up lineno and input_filename for
9923         pending templates.
9925 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
9927         * decl.c (lang_print_error_function): New fn.
9928         (init_decl_processing): Set print_error_function to use it.
9929         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
9931         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
9932         ICS_BAD_FLAG.
9934         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
9935         copy-initialization.
9937         * class.c (build_vtable_entry): Use int_fits_type_p.
9938         (build_vtable): Pass a signed offset to build_vtable_entry.
9939         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
9940         set_rtti_entry): Likewise.
9942 1998-05-22  Per Bothner  <bothner@cygnus.com>
9944         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
9945         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
9947 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
9949         * pt.c (print_template_context): Use fprintf instead of cp_error.
9951         * pt.c (determine_specialization): Just return an error_mark_node.
9952         Also print the decl we want in error messages.  If we complain,
9953         return error_mark_node.
9954         (tsubst_friend_function): Set lineno and input_filename so
9955         error messages will be useful.
9956         (instantiate_template): Just return an error_mark_node.
9957         (check_explicit_specialization): Don't mess with a returned
9958         error_mark_node.
9960         * pt.c (print_template_context): Add new argument.
9961         (maybe_print_template_context): New fn.
9962         (push_tinst_level): Increment tinst_level_tick.
9963         (pop_tinst_level): Likewise.
9964         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
9965         xrealloc instead of xmalloc.
9967         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
9969 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
9971         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
9972         if the template we looked up is the same as the one we already
9973         have.
9975 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
9977         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
9978         (cpp_reader,parse_in): Add for cpplib.
9979         (check_newline): Call handle_sysv_pragma with new interface.
9980         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
9982         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
9983         (sub_getch): Call GETC for cpplib.
9985         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
9986         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
9988         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
9990 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
9992         * decl2.c (maybe_make_one_only): New fn.
9993         (import_export_vtable): Use it.
9994         (import_export_decl): Likewise.
9995         * pt.c (mark_decl_instantiated): Likewise.
9997 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
9999         * decl2.c (find_representative_member): Rename to ...
10000         (build_anon_union_vars): New function.
10001         (finish_anon_union): Fix stupidity of previous change.
10003 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
10005         * decl.c (grokfndecl): Handle definition of specialization in
10006         friend declaration.
10008         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
10010 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
10012         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
10013         to look for type declarations.
10014         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
10015         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
10016         (finish_member_class_template): Declare.
10017         * decl.c (pushtag): Put member class templates on the
10018         CLASSTYPE_TAGS list, just as for ordinary member classes.
10019         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
10020         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
10021         IDENTIFIER_NAMESPACE_VALUEs.
10022         * parse.y (component_decl): Move code to ...
10023         * semantics.c (finish_member_class_template): New function.
10024         Don't put member class templates on the list of components for a
10025         class.
10026         * parse.c: Regenerated.
10027         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
10028         In fact, don't use DECL_CONTEXT at all here.
10030 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10032         * decl.c (record_unknown_type): New function.
10033         (init_decl_processing): Call it for the unknown and global type
10034         nodes.
10036 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
10038         * decl2.c (find_representative_member): New function.
10039         (finish_anon_union): Use it.
10041         * cp-tree.h (MAIN_NAME_P): New macro.
10042         (DECL_MAIN_P): Likwise.
10043         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
10044         (grokfndecl): Use the new macros.
10045         (grokdeclarator): Likewise.
10046         (start_function): Likewise.
10047         (store_parm_decls): Likewise.
10048         (finsh_function): Likewise.
10049         * friend.c (do_friend): Likewise.
10050         * typeck.c (build_function_call_real): Likewise.
10051         (build_unary_op): Likewise.
10053 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
10055         * decl2.c (start_objects, finish_objects, do_dtors,
10056         do_ctors): Split out from...
10057         (finish_file): ...here.
10059 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
10061         * tree.c (is_overloaded_fn): Don't abort on placeholders from
10062         push_class_decls.
10064 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
10066         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
10068         * error.c (dump_expr): Handle an ARROW_EXPR.
10070 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
10072         * decl.c (saveable_obstack): Declare.
10073         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
10074         declare, if necessary.
10076 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
10078         * call.c (compare_qual): Remove.
10079         (is_subseq): Tweak.
10080         (is_properly_derived_from): New function.
10081         (maybe_handle_ref_bind): Likewise.
10082         (maybe_handle_implicit_object): Likewise.
10083         (compare_ics): Modify substantially to bring into conformance with
10084         the standard.
10085         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
10086         (comp_cv_qualification): Declare.
10087         (comp_cv_qual_signature): Likewise.
10088         * typeck.c (comp_cv_qualification): Likewise.
10089         (comp_cv_qual_signature): Likewise.
10091 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10093         * Makefile.in (parse.o): Depend on toplev.h.
10095         * class.c (typecode_p): Remove prototype and definition.
10097         * cp-tree.h (currently_open_class, is_empty_class, member_p):
10098         Add prototype.
10100         * decl.c (push_overloaded_decl_top_level): Remove prototype and
10101         definition.
10103         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
10104         in call to `cp_thing'.
10105         (cp_warning): Likewise for function pointer `warning'.
10107         * except.c (do_function_call): Remove prototype and definition.
10108         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
10110         * method.c (is_java_type): Add prototype and make it static.
10112         * parse.y: Include toplev.h.
10114         * pt.c (type_unification): Remove unused variable `arg'.
10115         (instantiate_decl): Likewise for `save_ti'.
10117         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
10119 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
10121         * init.c (build_member_call): Handle template_ids.
10122         * parse.y (primary): Add global_scope template_id.
10124 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
10126         * decl2.c (get_sentry): Use end_temporary_allocation.
10127         Don't declare permanent_obstack.
10129 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
10131         * parse.y (.finish_new_placement): New non-terminal.
10132         (unary_expr, new_type_id): Use it.
10133         * parse.c: Regenerated.
10135 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
10137         * pt.c (redeclare_class_template): Say where the original definition
10138         of the template-parameter's default argument appeared.
10140 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
10142         * call.c (build_over_call): Tweak empty class handling.
10144         * decl.c (make_typename_type): Use currently_open_class.
10146         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
10148 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
10150         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
10151         for a type unless it is one.
10153         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
10155 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
10157         * Makefile.in (program_transform_name, objdir): Define.
10159         * Makefile.in (BISON): Use bison from the build tree if it exists.
10160         (FLEX): Likewise.
10162 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
10164         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
10166         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
10168 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
10170         * call.c (build_scoped_method_call): Likewise.
10172 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
10174         * init.c (build_new_1): Call suspend_momentary around the creation
10175         of values that must be saved for exception handling.
10176         * parse.y (.build_new_placement): New non-terminal.
10177         (unary_expr, new_placement): Use it.
10178         * parse.c: Regenerated.
10180 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
10182         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
10183         old and new types.
10185         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
10186         canonical type.
10188         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
10190 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
10192         * decl.c (start_decl): Revert problem change.
10194         * Makefile.in (CONFLICTS): Fix.
10196 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10198         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
10200 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
10202         * class.c (finish_struct_1): Use BINFO_SIZE.
10204         * decl.c (start_decl): Use 'tem'.
10206 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
10208         * exception.cc: Include eh-common.h.
10209         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
10210         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
10211         (__cp_push_exception): Initialize eh_info struct as well.
10212         * except.c: Remove local structs and include eh-common.h.
10213         (init_exception_processing): Set language and version codes.
10214         (call_eh_info): Add presence of eh_info to runtime description of
10215         struct cp_eh_info.
10216         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
10217         * semantics.c (finish_try_block): Call start_catch_block() and
10218         end_catch_block().
10219         * parse.y (function_try_block): Call start_catch_block() and
10220         end_catch_block().
10222 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
10224         * typeck.c (original_type): New function.
10225         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
10226         to see if they're actually the same.
10227         * cp-tree.h (original_type): Declare.
10229 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10231         * Makefile.in (lex.o): Depend on output.h.
10233         * call.c (add_function_candidate): Remove unused variable `cand'.
10234         (add_conv_candidate): Likewise.
10235         (build_builtin_candidate): Likewise.
10237         * cp-tree.h: Add prototype for `types_overlap_p'.
10239         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
10241         * decl2.c (merge_functions): Remove unused variables `tmp' and
10242         `tempn'.
10244         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
10245         (code_as_string): Likewise.
10246         (language_as_string): Likewise.
10247         (parm_as_string): Likewise.
10248         (op_as_string): Likewise.
10249         (assop_as_string): Likewise.
10250         (cv_as_string): Likewise.
10252         * lex.c: Include output.h.
10254         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
10256         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
10257         ATTRIBUTE_UNUSED.
10259         * tinfo.cc (__class_type_info::dcast): Change the type of variable
10260         `i' from int to size_t.
10262         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
10263         ATTRIBUTE_UNUSED.
10265 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
10267         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
10268         DECL_NAMESPACE_SCOPE_P.
10269         (lang_decl_name): Likewise.
10270         * pt.c (tsubst_friend_function, tsubst): Likewise.
10271         * decl.c (pushdecl, redeclaration_error_message, start_decl,
10272         cp_finish_decl, start_function): Likewise.
10273         * class.c (finish_struct_1): Likewise.
10274         * call.c (build_over_call): Likewise.
10275         (compare_ics): Use DERIVED_FROM_P.
10277 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
10279         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
10280         * method.c (build_mangled_name): Use it.
10281         (build_decl_overload_real): Likewise.
10283         * error.c (dump_simple_decl): New function, broken out from ...
10284         (dump_decl): Use it.
10286 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
10288         * ptree.c (lang_print_xnode): Add missing `break'.
10290         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
10292         * call.c (add_template_candidate): Adjust for changes to
10293         fn_type_unification.
10294         (add_template_candidate_real): Likewise.
10295         (add_template_conv_candidate): Likewise.
10296         (build_user_type_conversion_1): Likewise.
10297         (build_new_function_call): Likewise.
10298         (build_object_call): Likewise.
10299         (build_new_op): Likewise.
10300         (build_new_method_call): Likewise.
10301         * class.c (instantiate_type): Likewise.
10302         * cp-tree.h (unification_kind_t): New type.
10303         (fn_type_unification): Adjust prototype.
10304         (type_unificaiton): Likewise.
10305         * pt.c (UNIFY_ALLOW_NONE): New macro.
10306         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
10307         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
10308         (UNIFY_ALLOW_DERIVED): Likewise.
10309         (unify): Change prototype.
10310         (maybe_adjust_types_for_deduction): New function.
10311         (check_cv_quals_for_unify): Likewise.
10312         (determine_specialization): Adjust.
10313         (fn_type_unification): Likewise.
10314         (type_unification): Likewise.
10315         (type_unification_real): Likewise.  Use
10316         maybe_adjust_types_for_deduction.  Fix mishandling of
10317         back-unification of template functions passed as arguments.  Pass
10318         appropriate combination of UNIFY_ALLOW_* to unify.
10319         (unify): Remove unused NTPARMS parameter.  Use
10320         check_cv_quals_for_unify.  Remove bogus code that allowed
10321         too-generous unification in order to adhere more closely to standard.
10322         (get_bindings_real): Adjust.
10323         (get_class_bindings): Likewise.
10325         * method.c (build_overload_identifier): Only use the innermost
10326         template arguments when mangling.
10327         * pt.c (tsubst_template_argument_vector): New function.
10328         (complete_template_args): Deal with the situation where the
10329         extra_args contain more than one level of arguments.
10330         (lookup_template_class): Deal with member template classes, which
10331         may have more than one level of arguments.
10332         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
10333         Improve handling of member template classes.  Use
10334         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
10335         tsubst_template_argument_vector where appropriate.
10336         (regenerate_decl_from_template): Break out from ...
10337         (instantiate_decl): Here.
10339         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
10340         * parse.h: Regenerated.
10341         * parse.c: Really regenerated.
10343         * cp-tree.h (finish_unary_op_expr): New function.
10344         (finish_id_expr): Likewise.
10345         (begin_new_placement): Likewise.
10346         (finish_new_placement): Likewise.
10347         (finish_declarator): Likewise.
10348         (finish_translation_unit): Likewise.
10349         (finish_parmlist): Likewise.
10350         (begin_class_definition): Likewise.
10351         (finish_class_definition): Likewise.
10352         (finish_default_args): Likewise.
10353         (finish_inline_definitions): Likewise.
10354         * parse.y (GCC_ASM_KEYWORD): Remove.
10355         (TYPENAME_ELLIPSIS): Likewise.
10356         * parse.c: Regenerated.
10357         Use new functions in semantics.c in the actions for many rules.
10358         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
10359         * hash.h: Regenerated.
10360         * semantics.c (finish_expr_stmt): Allow NULL expr.
10361         (finish_unary_op_expr): New function, containing
10362         code previously in parse.y.
10363         (finish_id_expr): Likewise.
10364         (begin_new_placement): Likewise.
10365         (finish_new_placement): Likewise.
10366         (finish_declarator): Likewise.
10367         (finish_translation_unit): Likewise.
10368         (finish_parmlist): Likewise.
10369         (begin_class_definition): Likewise.
10370         (finish_class_definition): Likewise.
10371         (finish_default_args): Likewise.
10372         (finish_inline_definitions): Likewise.
10374 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
10376         * typeck.c (build_c_cast): Don't decay arrays and functions to
10377         pointer type when converting to a class type.
10379 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
10381         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
10382         (DECL_CLASS_SCOPE_P): Likewise.
10384 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
10386         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
10387         * decl2.c (constructor_name_full): Likewise.
10389 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
10391         * tree.c (mapcar): Add OVERLOAD support.
10393         * init.c (resolve_offset_ref): We must use basetype_path before we
10394         destroy it with a call to convert_pointer_to.
10396 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
10398         * class.c (currently_open_class): New fn.
10399         * decl.c (lookup_name_real): Use it.
10400         * search.c (lookup_field): Likewise.
10402 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10404         * cp-tree.def (OVERLOAD): New node.
10405         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
10406         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
10407         (NAMESPACE_BINDING): Remove.
10408         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
10409         namespace_binding.
10410         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
10411         Define.
10412         (tree_overload): New struct.
10413         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
10414         (REAL_IDENTIFIER_TYPE_VALUE): Define.
10415         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
10416         (lang_decl_flags): Remove in_namespace.
10417         (lang_decl): Remove chain.
10418         (DECL_CHAIN, DECL_NAMESPACE): Remove.
10419         (flag_honor_std): Declare extern.
10420         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
10421         namespace_binding, set_namespace_binding,
10422         lookup_function_nonclass, cat_namespace_levels,
10423         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
10424         scratch_ovl_cons, ovl_member, build_overload): Declare.
10425         (decl_list_length, get_namespace_id, current_namespace_id,
10426         overloaded_globals_p): Remove.
10427         (lookup_using_namespace, qualified_lookup_using_namespace): Change
10428         return type.
10429         (push_scratch_obstack): New macro.
10430         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
10431         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
10432         convs, fns.
10433         (build_new_function_call): Iterate using OVL_CHAIN.
10434         Print DECL_NAME in when reporting ambiguities.
10435         (build_object_call): Iterate using OVL_NEXT for fns, convs.
10436         (build_new_op): Call lookup_function_nonclass.
10437         Iterate using OVL_NEXT.
10438         (build_op_delete_call): Change detection of members.
10439         Do not wrap TREE_LIST around fields and single global functions.
10440         (build_over_call): Don't push a class level if the context is a
10441         namespace.
10442         (build_new_method_call): Iterate using OVL_NEXT.
10443         * class.c (add_method): Chain overloaded members using
10444         build_overload.  Remove copying of method.
10445         (grow_method): When iterating through the obstack, expect OVERLOAD
10446         nodes.  Chain overload members.
10447         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
10448         nodes in call to get_baselinks.
10449         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
10450         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
10451         fdecls that are OVERLOAD nodes.
10452         (validate_lhs): New function.
10453         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
10454         code.  Use DECL_NAME in error messages.  Split code between global
10455         and member function processing.
10456         * decl.c (global_type_node): New static variable.
10457         (in_std): New global.
10458         (struct binding_level): New field usings.
10459         (resume_binding_level): Assert that we are not in a class.
10460         (toplevel_bindings_p): Just check for namespace_p or
10461         pseudo_global.
10462         (resume_level): Remove.
10463         (find_binding): New function.
10464         (binding_for_name): Call it.
10465         (namespace_binding, set_namespace_binding): New functions.
10466         (push_namespace): Associate binding level with new namespace,
10467         resume_binding_level for existing namespace.  Remove old code.
10468         Fake std by counting.
10469         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
10470         (maybe_push_to_top_level): Save current namespace.
10471         (pop_from_top_level): Restore saved namespace.
10472         (pop_namespace): Call suspend_binding_level.  Remove old code.
10473         (cat_namespace_levels): New function.
10474         (set_identifier_type_value_with_scope): For namespace bindings,
10475         set BINDING_TYPE, and use global_type_node.
10476         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
10477         (identifier_type_value): New function.
10478         (pushtag): If no context, use current_namespace.
10479         (duplicate_decls): Don't process DECL_CHAIN.
10480         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
10481         already set.  Never reset it to NULL_TREE.  Lookup global variables
10482         in their namespace.  Push overloaded templates if they are on
10483         namespace level.
10484         (pushdecl_namespace_level): New function.
10485         (pushdecl_top_level): Implement using pushdecl_namespace_level.
10486         (pushdecl_using_decl): New function.
10487         (overloaded_globals_p): Remove.
10488         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
10489         them.  Use namespace_binding and set_namespace_value.
10490         (redeclaration_error_message): Complain if the declarations come
10491         from different namespaces.
10492         (lookup_tag): On namespace level, look in the BINDING_TYPE.
10493         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
10494         old code.
10495         (select_decl): New function.
10496         (lookup_name_real): Call it for qualified and unqualified lookup.
10497         Pass tree_bindings from the stack.
10498         If prefer_type is 1, also accept namespaces.
10499         (lookup_function_nonclass): New function.
10500         (init_decl_processing): Set the binding level of the global
10501         namespace to global_binding_level.
10502         Build a proper type list for __builtin_apply.
10503         Initialize std_node to "fake std" if flag_honor_std is set.
10504         Initialize global_type_node.
10505         Allocated bad_alloc in namespace std if flag_honor_std.
10506         (define_function): Set the DECL_CONTEXT to the current_namespace.
10507         (start_decl): A namespace is not considered as a context here.  If
10508         the DECL_CONTEXT is a namespace, push the decl.
10509         (cp_finish_decl): Check for namespaces used as initializers.
10510         (grokfndecl): Add namespace parameter.  Remove processing of
10511         DECL_CHAIN.
10512         (grokvardecl): Add namespace parameter.
10513         (grokdeclarator): Process SCOPEs that are namespaces.  For
10514         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
10515         (start_function): Check for contexts that are namespaces.
10516         Set context for declarations that have not been pushed.
10517         (store_parm_decls): Check for ::main only.
10518         (finish_function): Likewise.
10519         (start_method): Check for contexts that are namespaces.
10520         (start_method): Remove DECL_CHAIN processing.
10521         * decl2.c (flag_honor_std): Declare.
10522         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
10523         (decl_namespace_list): New static global.
10524         (grok_x_components): Ignore namespaces as type contexts.
10525         (check_classfn): Expect OVERLOAD nodes.
10526         (grokfield): Remove DECL_CHAIN processing.
10527         (finish_file): Call cat_namespace_levels.
10528         (merge_functions): New function.
10529         (ambiguous_decl): Rewrite.
10530         (lookup_using_namespace): Produce tree_bindings.
10531         (qualified_lookup_using_namespace): Likewise.
10532         (set_decl_namespace, decl_namespace, current_decl_namespace,
10533         push_decl_namespace, pop_decl_namespace): New functions.
10534         (arg_lookup): New struct.
10535         (add_function, arg_assoc_namespace, arg_assoc_class,
10536         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
10537         New functions.
10538         (get_namespace_id, current_namespace_id): Remove.
10539         (do_toplevel_using_decl): Rewrite.
10540         (do_class_using_decl): Complain about namespace qualifiers.
10541         (do_using_directive): Sorry if not on namespace level.  Complain
10542         about unknown namespaces.
10543         * error.c (dump_aggr_type): Check for namespace contexts.
10544         * except.c (init_exception_processing): Push terminate into std.
10545         * friend.c (is_friend): A namespace is not a context, here.
10546         * init.c (expand_member_init): Remove DECL_CHAIN processing.
10547         (build_offset_ref): Process OVERLOAD nodes.
10548         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
10549         * lex.c (identifier_type): Loop using OVL_CHAIN.
10550         (see_typename): Set looking_for_typename to 2.
10551         (real_yylex): Likewise.
10552         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
10553         (do_scoped_id): Expect OVERLOAD nodes.
10554         Change calling convention for qualified_lookup_using_namespace.
10555         (build_lang_decl): Don't set in_namespace anymore.
10556         * method.c (typevec_size): New global.
10557         (build_overload_nested_name): Return if global_namespace.
10558         Otherwise, always expect a declaration context.
10559         (build_qualified_name): Likewise.
10560         Make sure we don't write beyond typevec_size.
10561         (build_decl_overload_real): Likewise.
10562         Allocate one extra slot for the namespace.
10563         (hack_identifier): Mark code dead.
10564         Process OVERLOAD and NAMESPACE_DECL nodes.
10565         * parse.y (program): Pop namespaces until in global namespace.
10566         (extdef): In a using-declaration, don't discard the identifier if
10567         there is no declaration.
10568         (left_curly): Ignore type contexts which are namespaces.
10569         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
10570         used as scope.
10571         * pt.c (template_class_depth): Expect types to be namespaces.
10572         (determine_specialization): Simplify by expecting OVERLOAD nodes.
10573         (push_template_decl): Push into namespace level.
10574         Reset ctx if it is a namespace.
10575         Set DECL_CONTEXT to current_namespace if not set already.
10576         Ignore real contexts that are namespaces.
10577         (mangle_class_name_for_template): Skip global_namespace.
10578         Mangle other namespaces as declarations.
10579         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
10580         (lookup_template_class): Push into namespace of context.
10581         If the context is a namespace, set it to global_namespace.
10582         Use id_context for mangling.
10583         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
10584         (tsubst_friend_function): Ignore namespace contexts.
10585         Push into namespace level.
10586         (tsubst): Handle NAMESPACE_DECL nodes.
10587         Remove DECL_CHAIN processing.
10588         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
10589         * ptree.c (print_lang_identifier): Print bindings.
10590         (lang_print_xnode): Print OVERLOAD nodes.
10591         * rtti.c (init_rtti_processing): Push type_info into std.
10592         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
10593         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
10594         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
10595         lookup_fnfields_here): Likewise.
10596         Process all nodes, instead of going through TREE_CHAIN.
10597         * sig.c (build_signature_pointer_or_reference_type): Set context
10598         to global_namespace.
10599         (build_signature_table_constructor): Expect OVERLOAD nodes.
10600         * spew.c (yylex): Save old setting of looking_for_typename.
10601         * tree.c (decl_list_length): Remove.
10602         (binding_init): New function.
10603         (count_functions): Rewrite.
10604         (is_overloaded_fn): Expect OVERLOAD nodes.
10605         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
10606         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
10607         ovl_member): New functions.
10608         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
10609         (type_unknown_p): Likewise.
10610         (require_instantiated_type): Likewise.
10611         (build_component_ref): Declare code dead.
10612         (build_x_function_call): Create and expect OVERLOAD nodes.
10613         (build_function_call_real): Check for ::main only.
10614         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
10615         (convert_for_assignment): Check for TREE_LIST before accessing
10616         TREE_VALUE.
10617         * decl.c (duplicate_decls): Check for namespace bindings instead
10618         of global bindings.
10619         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
10620         lookup_name_current_level, start_decl, xref_tag,
10621         finish_enum): Likewise.
10622         * init.c (build_offset_ref): Likewise.
10623         * search.c (lookup_field): Likewise.
10624         (lookup_fnfields): Likewise.
10625         (dfs_debug_mark): Likewise.
10626         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
10627         (poplevel_class, pop_from_top_level): Likewise.
10628         * decl2.c (finish_method): Likewise.
10629         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
10630         * decl.c (record_builtin_type): Likewise.
10631         (init_decl_processing, grokfndecl): Likewise.
10632         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
10633         (make_lang_type): Likewise.
10634         * parse.y (make_thunk): Likewise.
10635         * pt.c (tsubst): Likewise.
10636         * tree.c (debug_binfo): Likewise.
10637         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
10638         tinfo2.cc, inc/new.h: Add std qualifications.
10639         * inc/new: Wrap with namespace std if __HONOR_STD.
10640         * inc/typeinfo: Likewise.
10642 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
10644         * call.c (build_user_type_conversion_1): Handle second_conv
10645         properly for templates.
10647 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
10649         * method.c (build_decl_overload_real): Set TREE_USED flag to
10650         zero for build_type_variants nodes as well.
10652 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
10654         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
10656 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
10658         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
10659         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
10660         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
10661         xref.o): Add toplev.h dependencies.
10663 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
10665         * errfn.c (cp_error, cp_warning): Remove declarations for
10666         error and warning respectively.
10668 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10670         * error.c: Convert to using ctype macros defined in system.h.
10671         * method.c: Likewise.
10672         * xref.c: Likewise.
10673         * lex.c: Likewise.  Also remove redundant system header stuff.
10675 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
10677         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
10678         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
10679         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
10680         xref.c: Add include of toplev.h.
10682 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
10684         * tree.c (perm_manip): Also regenerate the RTL of an extern.
10685         (copy_to_permanent): Use end_temporary_allocation.
10687 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
10689         * init.c (expand_vec_init): The initialization of each array
10690         element is a full-expression.
10692 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
10694         * method.c (build_mangled_name): Add a call to build_type_variant
10695         to get the right type.
10697 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
10699         * Makefile.in: Add .SUFFIXES.
10701         * cp-tree.def: Remove NAMESPACE_DECL.
10703 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
10705         * call.c (build_over_call): Do evaluate arg even if it has empty
10706         class type.
10707         * decl.c (start_function): Don't push a member function.
10709 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
10711         * Makefile.in (g++FAQ.info): Put -o option before input file.
10713 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
10715         * gxxint.texi: Add info for squangling codes K and B.
10717 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
10719         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
10720         the expression in templates.
10721         (finish_stmt_expr): Likewise.
10723 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
10725         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
10727 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
10729         * decl.c (maybe_push_to_top_level): Always clear
10730         current_template_parms and processing_template_decl.
10731         (pushtag): Remove check of current_class_type and some comments,
10732         since maybe_push_to_top_level no longer creates confusion.
10734 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
10736         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
10737         (DECL_CLASS_TEMPLATE_P): Likewise.
10738         (DECL_PRIMARY_TEMPLATE): Likewise.
10739         (PRIMARY_TEMPLATE_P): Use it.
10740         (push_template_decl_real): New function.
10741         (redeclare_class_template): Take new template parameters as
10742         input.
10743         (is_specialization_of): New function.
10744         (comp_template_args): Declare.
10745         * decl.c (pushtag): Handle friend template classes.
10746         (xref_tag): Likewise.  Use new calling convention for
10747         redeclare_class_template.
10748         * decl2.c (grok_x_components): Handle friend templates.
10749         * friend.c (is_friend): Use is_specialization_of where
10750         appropriate.  Deal with friend class templates.
10751         (make_friend_class): Let a class template be friends with itself.
10752         * pt.c (comp_template_args): Remove declaration.
10753         (tsubst_friend_class): New function.
10754         (push_template_decl_real): New function.
10755         (push_template_decl): Use it.
10756         (redeclare_class_template): Adjust for new calling convention.
10757         (comp_template_args): Give it external linkage.
10758         (instantiate_class_type): Use tsubst_friend_class to deal
10759         with friend templates.
10760         * typeck.c (comptypes): Use comp_template_args, rather than
10761         expanding it inline.
10762         * parse.y (component_decl): Handle a nested template type
10763         like other component type declarations.
10765         * pt.c (check_explicit_specialization): Handle overloaded
10766         constructors correctly.
10768         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
10769         (lookup_template_class): Use it.
10771 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
10773         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
10774         * cp-tree.h: Add WRAPPER support.
10775         * call.c (add_candidate): Split out from add_*_candidate fns.
10776         (build_over_call): Take the candidate instead of function and args.
10777         Enforce access control here.  Emit overload warnings here.
10778         (add_warning): New fn.
10779         (joust): Add WARN parm.  If not set, call add_warning instead of
10780         printing a warning.  Re-enable some warnings.
10781         (tourney): Pass it.
10782         (convert_like): Adjust.
10783         (build_new_op): Adjust.
10784         (build_new_function_call): Adjust.
10785         (build_user_type_conversion_1): Adjust.
10786         (USER_CONV_FN): Adjust.
10787         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
10788         build_int_wrapper): New fns.
10790 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
10792         * pt.c (unify): Fix typo in previous change.
10794 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
10796         * error.c (dump_type_real): Declare canonical_name.
10798         * typeck.c (comp_target_types): Fix PMFs.
10800 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
10802         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
10803         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
10804         TEMPLATE_DECL.
10806         * pt.c (tsubst): Decrease the template-level of
10807         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
10808         TEMPLATE_PARM_INDEX.
10809         (template_decl_level): New function.
10810         (unify): Make sure to record unifications for template
10811         parameters, even when the parameters exactly match the arguments.
10812         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
10813         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
10814         aren't from the level we're currently working on.
10816 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
10818         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
10820         * decl2.c (check_member_template): Set DECL_IGNORED for member
10821         class templates, too.
10823         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
10825 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10827         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
10829 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
10831         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
10832         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
10833         (init_decl_processing): Handle TI types.
10834         * typeck.c (unsigned_type, signed_type): Handle TI types.
10836 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
10838         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
10839         New local added_libraries.  Increment count when add library to
10840         arglist.
10842 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
10844         * cp-tree.h (type_as_string_real): New function.
10845         * pt.c (mangle_class_name_for_template): Use it.
10846         * error.c (dump_aggr_type): Change prototype.
10847         (dump_type_prefix): Likewise.
10848         (dump_type_suffix): Likewise.
10849         (dump_type_real): Convert from dump_type.  If desired, the
10850         "canonica" name of a typedef, i.e., the name of the underlying
10851         type, can be printed.
10852         (dump_type): Call dump_type_real.
10854 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
10856         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
10858         * typeck.c (comp_target_types): Tweak pedantic case.
10859         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
10860         Return -1 or 1 instead of 1 or 2.
10861         (compparms): Remove STRICT handling.
10862         (convert_for_assignment): Fix handling of pmfs.
10864 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
10866         * typeck.c (comp_target_types): Handle references like pointers.
10867         (comp_target_parms): Note that return code from comp_target_types
10868         can be negative to indicate failure.
10870 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
10872         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
10873         which requires a working target compiler to build.
10875 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
10877         * tree.c (avoid_overlap): Add prototype.
10879         * spew.c (num_tokens): Add prototype.
10880         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
10882         * search.c (dfs_check_overlap): Add prototype.
10883         (dfs_no_overlap_yet): Likewise.
10885         * pt.c (original_template): Add prototype.
10886         (inline_needs_template_parms): Likewise.
10887         (push_inline_template_parms_recursive): Likewise.
10888         (retrieve_specialization, register_specialization): Likewise.
10889         (print_candidates, reduce_template_parm_level): Likewise.
10890         (build_template_decl, mark_template_parm): Likewise.
10891         (tsubst_friend_function, get_bindings_real): Likewise.
10893         * method.c (start_squangling): Add prototype.
10894         (end_squangling, check_ktype, issue_ktype): Likewise.
10895         (build_overloaded_scope_ref, check_btype): Likewise.
10896         (build_mangled_template_parm_index): Likewise.
10898         * lex.c (init_cpp_parse): Add prototype.
10899         (handle_cp_pragma, handle_sysv_pragma): Likewise.
10900         (reduce_cmp, token_cmp): Likewise.
10902         * except.c (call_eh_info): Add prototype.
10903         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
10904         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
10906         * decl2.c (is_namespace_ancestor): Add prototype.
10907         (namespace_ancestor, add_using_namespace): Likewise.
10908         (ambiguous_decl): Likewise.
10910         * decl.c (indent): Add prototype.
10912         * call.c (add_template_candidate_real): Add prototype.
10914 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
10916         * decl2.c (build_expr_from_tree): Just return a PMF.
10918 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
10920         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
10921         when doing initializations.
10923         * pt.c (unify): Use comptypes to compare type args.
10925 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
10927         * decl.c (duplicate_decls): Fix check for when it's safe to free
10928         the new decl.
10930         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
10931         to type_as_string.
10933 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
10935         * pt.c (build_template_parm_index): Add prototype.
10937         * search.c (my_tree_cons): Don't clear words outside the
10938         newly allocated node.
10940 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
10942         * lex.c (init_parse): Now returns char* containing the filename.
10944 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
10945                           Jeff Law   <law@cygnus.com>
10947         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
10948         than a pointer.
10950 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10952         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
10954 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10956         * decl.c (duplicate_decls): Don't warn for redundant decls if
10957         friend: let add_friend take care of it.
10959 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
10961         * sig.c (build_signature_pointer_constructor): Don't set
10962         TREE_HAS_CONSTRUCTOR for a signature pointer.
10963         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
10964         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
10965         here, too.
10966         * typeck.c (build_unary_op): Only allow taking the address of a
10967         real constructor.
10968         * typeck2.c (digest_init): Simplify.
10969         (store_init_value): Don't pedwarn about using { } for pmfs.
10971 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
10973         * cp-tree.h (start_decl):  Update prototype.
10974         * decl.c (start_decl):  Like the C version, new parameters
10975         for the attributes.  Call cplus_decl_attributes here,
10976         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
10977         (grokdeclarator):  Pass NULL for new start_decl arguments.
10978         * pt.c (tsubst_expr):  Likewise.
10979         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
10980         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
10981         * lex.c (build_lang_decl): Add lang_name_java.
10982         * class.c (push_lang_context): Add lang_name_java.
10983         * method.c (build_mangled_name): Check for is_java_type.
10985 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10987         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
10988         * call.c (build_scoped_method_call): Check for TREE_CODE for
10989         VOID_TYPE instead of type ==  void_type_node.
10990         (build_method_call): Likewise.
10991         * decl.c (lookup_name_real): Likewise.
10992         (grokdeclarator): Likewise.
10993         (start_decl): Likewise.
10994         (grokparms): Likewise.
10995         (start_function): Likewise.
10996         (finish_function): Likewise.
10997         (start_method): Likewise.
10999 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
11001         * lex.c (finput): New variable.
11002         (init_cpp_parse):  Renamed from init_parse.
11003         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
11004         (finish_parse): New function.
11005         * cp-tree.h (init_lex, init_parse): Remove declarations.
11007 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
11009         * call.c (build_call): Still evaluate the actual argument.
11010         * class.c (is_empty_class): Update for -fnew-abi.
11012         * decl2.c: -fnew-abi implies -fsquangle.
11014         * method.c (do_build_assign_ref): Don't do anything to copy
11015         an empty class.
11016         (do_build_copy_constructor): Likewise.
11017         * call.c (build_over_call): Likewise.
11019 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
11021         * tree.c (avoid_overlap): Return a value.
11023 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
11025         * method.c (check_btype): Add missing argument to xrealloc.
11026         (check_ktype): Likewise.
11028 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
11030         Implement empty base optimization.
11031         * class.c (finish_struct_1): Add vbase fields earlier.  Set
11032         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
11033         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
11034         (types_overlap_p): New fn.
11035         * tree.c (avoid_overlap): New fn.
11036         (build_base_fields): Use it to avoid overlapping empty bases.
11037         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
11039         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
11041         Re-implement allocation of base class subobjects.
11042         * tree.c (unshare_base_binfos): New fn.
11043         (layout_basetypes): Use it.  Now handles offsets of both virtual and
11044         non-virtual bases, after layout_type.
11045         (layout_vbasetypes): Remove.
11046         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
11047         (build_vbase_pointer_fields): Split out from old layout_basetypes.
11048         * class.c (finish_base_struct): Lose offset handling code.
11049         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
11050         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
11051         * cp-tree.h: Adjust.
11053 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
11055         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
11056         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
11057         * class.c (duplicate_tag_error): Likewise.
11058         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
11059         * tree.c (layout_vbasetypes): Update from layout_record, remove
11060         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
11061         (layout_basetypes): Likewise.
11063 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
11065         * class.c, Make sure system.h is included just after config.h.
11066         Delete lingering stdio and errno references too.
11067         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
11069 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
11071         * friend.c (is_friend): Fix access control for local classes.
11073         * class.c (is_empty_class): New fn.
11074         * call.c (build_call): Don't pass empty class objects to a function.
11076 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
11078         * call.c (build_over_call): Do name resolution for default
11079         arguments of function templates in the scope of the templates.
11081 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
11083         * call.c: Include system.h.  Remove includes, declarations and
11084         defines provided by system.h.
11085         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
11086         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
11087         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
11088         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
11089         * typeck2.c, xref.c: Likewise.
11090         * Makefile.in: Dependencies updated as appropriate.
11091         * Make-lang.in: Likewise.
11093 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
11095         * pt.c (fn_type_unification): Allow incomplete unification without
11096         an immediate error message.
11098 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
11100         * tree.c (member_p): New fn.
11101         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
11102         initializing class members.
11104         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
11105         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
11107         * call.c (build_method_call): Handle non-scoped destructors, too.
11108         * pt.c (tsubst_copy): Likewise.
11110         * pt.c (print_template_context): Split out...
11111         (push_tinst_level): ...from here.
11113         * friend.c (is_friend): Don't pass a type to decl_function_context.
11115         * typeck.c (convert_for_initialization): Always hand off
11116         conversions to class type.
11118 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
11120         * friend.c (is_friend): Local classes have the same access as the
11121         enclosing function.
11123 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
11125         * typeck.c (expand_target_expr): Delete dead function.
11127         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
11129         * repo.c (save_string): Delete dead function.
11131         * method.c (thunk_printable_name): Delete dead function.
11133         * lex.c (yynextch): Delete dead function.
11135         * expr.c (tree_extract_aggr_init): #if 0 out.
11137         * except.c (do_unwind): Delete dead function.
11138         (easy_expand_asm): Likewise.
11140         * cvt.c (build_conversion_type_1): Delete dead function.
11142         * cp-tree.h (push_expression_obstack): Declare.
11144         * call.c (source_type): #if 0 out.
11146         * class.c (alter_access): Remove unused label.  Add braces
11147         around empty else clause.
11149         * lex.c (yyprint): Fix argument to printf.
11151 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
11153         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
11155         * pt.c (instantiate_class_template): Make sure template
11156         arguments are permanent.
11157         * init.c (resolve_offset_ref): Don't go looking around in
11158         template types.
11160         * semantics.c: Add routines to handle expressions, and some
11161         declaration processing.
11162         * parse.y: Use them.
11163         (current_class_depth): Move declaration to cp-tree.h.
11164         * parse.c: Regenerated.
11165         * cp-tree.h: Use them.
11166         (current_class_depth): Declare.
11167         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
11169 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
11171         * error.c (dump_decl): Be a bit more explicit with template
11172         type arguments, when verbose.
11174 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
11176         * inc/exception: Reorder closing braces.
11178 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
11180         * pt.c (redeclare_class_template): New function.
11181         * cp_tree.h (redeclare_class_template): Declare it.
11182         * decl.c (xref_tag): Use it.
11184 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
11186         * call.c (build_over_call): Check IS_AGGR_TYPE, not
11187         TYPE_LANG_SPECIFIC.
11188         * typeck.c (convert_arguments): Likewise.
11190         * decl.c (grokdeclarator): Remove const and volatile from type after
11191         setting constp and volatilep.
11193         * class.c (finish_struct_1): Don't warn about bool bitfield larger
11194         than one bit.
11196 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
11198         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
11200 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
11202         * call.c (build_object_call): Complain about ambiguous operator(),
11203         rather that crashing.
11204         (build_new_op): Likewise.
11205         (build_op_delete_call): Likewise.
11207 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
11209         * cvt.c (perform_qualification_conversions): Use comp_target_types
11210         instead of comp_ptr_ttypes.
11212 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
11214         * cp-tree.h (enforce_access): Declare.
11215         * call.c (enforce_access): Make it extern, not static.
11216         * class.c (alter_access): Use enforce_access; modify code for ISO
11217         compliance, rather than ARM rules.
11219 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11221         * cp-tree.h: Fix typo.
11223 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
11225         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
11226         if (aggregate_value_p (type)).
11228         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
11230 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
11232         * tree.c (mapcar): When dealing with a DECL, use it's constant
11233         value, if any.
11234         * pt.c (lookup_template_class): Don't mangle the names of template
11235         classes whose arguments are unknown.
11237         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
11239 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
11241         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
11243 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
11245         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
11246         boolean_type_node to 1.
11248 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
11250         * error.c (dump_expr): Remove unused variable `l'.
11252         * pt.c (for_each_template_parm): New function, created by
11253         converting uses_template_parms.
11254         (tree_fn_t): New typedef.
11255         (uses_template_parms): Use it.
11256         (mark_template_parm): New function.
11257         (push_template_decl): Check that the argument list of a partial
11258         specialization uses all the template parameters.
11260         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
11261         with it; we might want it for debugging.
11262         * cp-tree.h (type_unification): Change interface.
11263         * class.c (finish_struct_1): Skip nested template types, just like
11264         ordinary nested types.
11265         (instantiate_type): Use new interface to type_unification.
11266         * lex.c (init_lex): Add __sz as opname for sizeof.
11267         * method.c (build_overload_scope_ref): New function.
11268         (build_overload_int): Handle complex expressions.  Set
11269         numeric_output_need_bar if necessary.
11270         (build_overload_value): Handle non-PARM_DECL nodes; this
11271         routine is now used by build_overload_int.  Remove some
11272         assignments to numeric_output_need_bar.  Use
11273         build_overload_scope_ref.
11274         (build_qualified_name): Note that some template mangled names end
11275         with digits, and set numeric_output_need_bar appropriately.  Use
11276         build_underscore_int.
11277         * pt.c (unify): Change interface.
11278         (type_unification_real): Likewise.
11279         (determine_specialization): Use new interfaces.
11280         (tsubst): Deal gracefully with situations in which the argument
11281         vector is not fully filled.
11282         (fn_type_unification): Use new interfaces.
11283         (type_unification): Likewise.  Remove NOP_EXPR hack.
11284         (type_unification_real): Likewise.
11285         (unify): Likewise.  Deal with unification of complex expressions.
11287 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11289         * pt.c (complete_template_args): Initialize skip properly.
11291         * decl.c (make_typename_type): Revert.
11292         (make_implicit_typename): Remove.
11293         (lookup_name_real): Don't call it.  Call lookup_field if we see a
11294         TYPE_DECL from a template base.
11295         * search.c (lookup_field): Do implicit typename stuff.
11297 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
11298                           Geoff Noer    <noer@cygnus.com>
11300         * Makefile.in: Various fixes for building cygwin32 native toolchains.
11301         * Make-lang.in: Likewise.
11303 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11305         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
11307 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
11309         * decl.c (make_implicit_typename): Rewrite removed code.
11310         (make_typename_type): Call it if the type we look up comes from
11311         a base that uses template parms.
11313         * pt.c (complete_template_args): Rewrite.
11314         (tsubst, FUNCTION_DECL): Use it.
11316 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
11318         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
11319         c_expand_asm_operands () if output_operands, input_operands or
11320         clobbers is not NULL_TREE.
11322 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11324         * pt.c (complete_template_args): New function.
11325         (get_bindings): Deal with specializations of function templates
11326         with return type containing parameters from outer class
11327         templates.
11328         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
11329         substitute arguments and compose a new type.
11331 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
11333         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
11334         FUNCTION_DECLs.
11336 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
11338         * decl.c (make_implicit_typename): Lose useless code.
11340         * call.c (standard_conversion): Handle A* -> const A* properly.
11342         * pt.c (get_bindings_real): Rename from get_bindings.  Add
11343         check_rettype parm.
11344         (get_bindings): Pass 1.
11345         (get_bindings_overload): Pass 0.
11347 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
11349         * pt.c (check_explicit_specialization): When reverting a static
11350         member function, also remove the `this' parameter from
11351         last_function_parms.
11353 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
11355         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
11356         a function context.
11358         * decl.c (store_bindings): Use free_binding_vecs.
11359         (pop_from_top_level): Likewise.
11361 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
11363         * decl.c (make_implicit_typename): Only change the type of a
11364         TYPENAME_TYPE.
11366 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
11368         * semantics.c: New file, containing routines to perform the
11369         semantic phase of parsing.
11370         * parse.y: Use it.
11371         * pt.c (tsubst_expr): Likewise.
11372         * cp-tree.h: Declare the various functions in semantics.c.
11373         Provide macros to access _STMT tree nodes.
11374         * cp-tree.def: Add ASM_STMT tree node.
11375         * Makefile.in, Make-lang.in: Add dependencies on and for
11376         semantics.c.
11378 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
11380         * pt.c (push_template_decl): Only check primary templates.
11382         * pt.c (check_explicit_specialization): Complain about default args
11383         in explicit specialization.
11385         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
11386         constructor_declarator.
11388 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
11390         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
11391         has no overloaded operator ->.
11393         * call.c (build_field_call): Don't crash when presented with a
11394         field that is actually a nested type.
11396         * decl.c (pushtag): Deal with friend class injection in local
11397         classes.
11399         * call.c (build_object_call): Don't crash if OBJ is a
11400         pointer-to-member-function.
11402 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
11404         * pt.c (push_template_decl): Complain about template with C linkage,
11405         anonymous template class.
11407 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
11409         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
11410         * search.c: Likewise.
11412         * lex.c (do_pending_defargs): Only call
11413         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
11415         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
11417 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
11419         * parse.y: Deal with CONSTRUCTORS in new_initializers.
11421 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
11423         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
11424         closely mimics the behavior in parse.y.
11425         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
11426         into a compound statement.
11428 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
11430         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
11431         * pt.c (inline_needs_template_parms): New fn.
11432         (original_template): New fn.
11433         (push_inline_template_parms_recursive): New fn.
11434         (maybe_begin_member_template_processing): Use them.
11435         (maybe_end_member_template_processing): Likewise.
11436         (is_member_or_friend_template): Rename to is_member_template.
11437         Member functions of local classes are never member templates.
11439 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11441         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
11442         added in the class scope to catch redefinition error.
11444         * pt.c (reduce_template_parm_level): Also copy
11445         the DECL_TEMPLATE_PARMS field.
11447 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
11449         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
11450         reduced-level template type parameter.
11452 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11454         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
11455         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
11456         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
11457         * decl.c (duplicate_decls): Propagate it.
11458         * typeck2.c (abstract_virtuals_error): Use two loops to emit
11459         abstract virtual functions and virtual functions which need a
11460         final overrider separately.
11462 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11464         * lang-specs.h: Properly put brackets around array elements in
11465         initializer.
11467         * typeck.c (build_binary_op_nodefault): Correctly place parens around
11468         && and || in expression.
11470 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11472         * call.c (default_parm_conversions): Remove prototype definition.
11473         (build_method_call): Remove unused variable result.
11475         * cvt.c (ocp_convert): Remove unused variable conversion.
11477         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
11479         * except.c (do_unwind): #if 0 definition of unused variables fcall
11480         and next_pc.
11482         * expr.c (extract_scalar_init): #if 0 prototype and function
11483         definition.
11485         * init.c (expand_aggr_init_1): Remove unused variable init_type.
11486         (build_new_1): Remove unused variable t.
11488         * pt.c (instantiate_class_template): Remove unused variable newtag;
11489         cast called function return value to void.
11490         (do_decl_instantiation): Remove unused variables name and fn.
11492         * tree.c (get_type_decl): Add default return to shut up compiler from
11493         complaining control reaches end of non-void function.
11495         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
11497 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11499         * call.c (default_parm_conversions): Remove prototype definition.
11500         (build_method_call): Remove unused variable result.
11501         (build_over_call): Add default case in enumeration switch.
11503 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11505         * decl2.c (lang_decode_option): Change j's type to size_t.
11507         * tree.c (layout_vbasetypes): record_align and desired_align are of
11508         type unsigned int; const_size and nonvirtual_const_size likewise.
11510 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
11512         * parse.y (new_initializer): Make sure all initializers are
11513         lists.
11515 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
11517         * decl2.c (import_export_decl): Mark tinfo functions for
11518         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
11520 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
11522         * method.c: Fix typo.
11524 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11526         * method.c: Include "system.h" to get stdlib.h, stdio.h,
11527         ctype.h, string.h, etc.
11528         (issue_nrepeats): Add default case in enumeration switch.
11529         (check_btype): Likewise.
11530         (process_overload_item): Likewise.
11532         * Makefile.in (method.o): Depend on system.h.
11534 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
11536         * lex.c (do_scoped_id): Fix parenthesizing.
11538 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
11540         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
11541         FLAG_RTTI is unset, initialize type info machinery and continue
11542         with FLAG_RTTI enabled.
11543         (get_typeid): Likewise.
11545 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
11547         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
11548         from B.
11550 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
11552         * pt.c (finish_member_template_decl): Deal more gracefully with
11553         invalid declarations.
11555 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
11557         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
11558         cp-tree.h: Clean up more old overloading code, old RTTI code, and
11559         some formatting quirks.
11561         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
11562         method.c, pt.c, ptree.c, typeck.c: Remove support for
11563         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
11564         * class.h: Remove.
11565         * Makefile.in: Adjust.
11567         * pt.c (unify): Don't allow reduced cv-quals when strict.
11569         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
11570         *type_unification* and unify.
11572 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
11574         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
11575         (nested_name_specifier): And add it before this use.
11576         (typename_sub0): And this use.  Also add use without the keyword.
11577         (typename_sub1): Likewise.
11578         * pt.c (instantiate_class_template): Don't actually instantiate
11579         anything if our type uses template parms.
11581 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
11583         * decl.c (start_function): Don't call temporary_allocation for a
11584         nested function.
11586 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11588         * pt.c (instantiate_class_template): Don't mess with friends if
11589         our type uses template parms.
11591 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
11593         * parse.y (nested_name_specifier): Use explicit_template_type.
11594         (typename_sub): Allow a template_type, an explicit_template_type,
11595         or an implicit template type at the end.
11596         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
11597         * decl.c (make_typename_type): Handle template-id where the name
11598         is a TEMPLATE_DECL.
11599         * call.c (build_scoped_method_call): Handle member template
11600         destructor call.
11601         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
11602         destructor is represented by the type.
11604         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
11605         * parse.y (nested_name_specifier): Add 'template' case.
11606         (explicit_template_type): New rule.
11607         (typename_sub): Use it.
11608         * decl.c (make_typename_type): Handle getting a template-id for NAME.
11609         * pt.c (tsubst): Likewise.
11611 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
11613         * pt.c (add_to_template_args): Fix thinko.
11614         (instantiate_class_template): Call it later.
11616         * pt.c (get_class_bindings): Add outer_args parm.
11617         (most_specialized_class): Likewise.
11618         (instantiate_class_template): Pass it.
11619         (more_specialized_class): Likewise.
11620         (lookup_template_class): Get context from template if none
11621         was specified.
11622         (finish_member_template_decl): Don't do anything with a
11623         partial specialization.
11624         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
11625         AGGREGATE_TYPE_P.
11626         * class.c (finish_struct): Member class templates have already been
11627         checked for name clashes.
11628         * decl.c (pushdecl_with_scope): Handle pushing at class level.
11630 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
11632         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
11633         (tsubst, *_PARM): Support multiple levels of template classes.
11634         (instantiate_class_template): Look up the pattern from the
11635         original template.
11636         (lookup_template_class): Handle getting a template for d1.
11637         (push_template_decl): Correct setting of 'primary'.
11638         (reduce_template_parm_level): Add 'levels' parm.
11639         (finish_member_template_decl): Support member class templates.
11640         (template_class_depth): Handle multiple levels.
11641         * parse.y (component_decl_1, fn.def2): Remove member template case.
11642         (component_decl): Add member template cases.
11643         * decl2.c (check_member_template): We now handle member template
11644         classes.
11645         * decl.c (pushtag): Handle member templates.
11646         * method.c (do_inline_function_hair): Don't touch
11647         IDENTIFIER_GLOBAL_VALUE.
11648         * init.c (build_offset_ref): If name isn't an identifier, just
11649         return it.
11650         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
11652         * typeck.c (get_delta_difference): Do adjust for conversions to
11653         and from virtual base.
11655 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
11657         * typeck.c (get_delta_difference): Give hard error for conversion
11658         from virtual base.
11660         * cp-tree.h: Tweak formatting.
11662 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
11664         * decl.c (push_namespace): Handle redeclaration error.
11666         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
11667         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
11668         (NAMESPACE_BINDING): New macro.
11669         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
11670         * *.c: Use them.
11672         * pt.c (push_template_decl): Use innermost_args.
11674         * decl.c (get_unique_name): Tweak from earlier in the name.
11676 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11678         * cp-tree.def: Add CPLUS_BINDING node.
11679         * cp-tree.h (tree_binding): New struct.
11680         (BINDING_SCOPE, BINDING_VALUE): New macros.
11681         (current_namespace, global_namespace): Declare extern.
11682         (struct lang_decl_flags): New field in_namespace.
11683         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
11684         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
11685         (TREE_INDIRECT_USING): New macro.
11686         * decl2.c (current_namespace, global_namespace): Declare.  The
11687         value is a NAMESPACE_DECL now, not a TREE_LIST.
11688         (is_namespace_ancestor, namespace_ancestor): New static functions.
11689         (add_using_namespace, ambiguous_decl): Likewise.
11690         (lookup_using_namespace): New support function for lookup_name.
11691         (qualified_lookup_using_namespace): New support function for
11692         do_scoped_id and lookup_namespace_name.
11693         (get_namespace_id): Mark as obsolete.
11694         (current_namespace_id): Likewise.
11695         (do_namespace_alias): Implement.
11696         (do_using_directive): Implement as call to add_using_namespace.
11697         * decl.c (binding_for_name): New function.
11698         (push_namespace, pop_namespace): Implement.
11699         (push_decl): Don't install a FUNCTION_DECL in the global branch.
11700         (lookup_namespace_name): Implement using qualified lookup.
11701         (lookup_name_real): For global scoping, lookup in
11702         global_namespace.  For namespace scoping, lookup in given
11703         namespace.  For unscoped lookup, iterate over namespace,
11704         considering using directives.
11705         (init_decl_processing): Initialize global_namespace.
11706         (grokvardecl): Build assembler name as static name for globals.
11707         (grokdeclarator): Remove old namespace mangling.
11708         (xref_tag): When installing a global binding for the
11709         tag, make sure we have an identifier.
11710         * method.c (build_overload_nested_name): Mangle namespaces.
11711         (build_qualified_name): Likewise.
11712         (build_decl_overload_real): Likewise.
11713         * lex.c (build_lang_decl): Set namespace for new declaration to
11714         current_namespace.
11715         (do_scoped_id): Find global names in global or current
11716         namespace, or using qualified namespace lookup, depending on
11717         context.
11718         * init.c (build_member_call): When scope is namespace, use
11719         build_x_function_call instead.
11720         (build_offset_ref): When scope is namespace, collapse processing
11721         to lookup_namespace_name instead.
11722         * error.c (dump_decl): Support NAMESPACE_DECL.
11723         * decl.c (pushdecl): Bind globals to current namespace.
11724         (push_overloaded_decl): Likewise.
11725         (lookup_tag): Likewise.
11726         (lookup_name_current_level): Likewise.
11727         (xref_tag): Likewise.
11728         (start_function): Likewise.
11729         * lex.c (do_identifier): Likewise.
11730         (identifier_typedecl_value): Likewise.
11731         (real_yylex): Likewise.
11732         * method.c (do_inline_function_hair): Likewise.
11733         * parse.y (unscoped): Likewise.
11734         * pt.c (check_explicit_specialization): Likewise.
11735         (lookup_template_class): Likewise.
11736         * rtti.c (call_void_fn): Likewise.
11737         * sig.c (build_sigtable): Likewise.
11738         * ptree.c (lang_print_xnode): New function.
11740 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
11742         * pt.c (instantiate_class_template): Don't instantiate if pedantic
11743         and the args use template parms.
11745         * pt.c (push_tinst_level): If the instantiation uses template parms,
11746         fail silently.
11747         * decl.c (xref_basetypes): Do call complete_type for basetypes
11748         that involve template parameters.
11750 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
11752         * typeck2.c (process_init_constructor): Fix labeled init check.
11754 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
11756         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
11757         argument to tsubst and friends.
11759         * pt.c (tsubst, FUNCTION_DECL): Tidy.
11761         * typeck.c (build_x_function_call): Handle static member function
11762         templates like non-templates.  Handle friend templates like normal
11763         function templates.
11764         * pt.c (tsubst, *_PARM): Don't use orig_level.
11765         (get_bindings): Don't call add_to_template_args.
11766         (instantiate_template): Likewise.
11767         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
11768         * ptree.c (print_lang_type): Print index/level for template parms.
11770 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
11772         * Make-lang.in (cc1plus): Note that cc1plus depends on
11773         cp/cp-tree.h and cp/cp-tree.def.
11775         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
11776         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
11777         position in a template parameter list.
11778         * cp-tree.h (template_parm_index): New structure, used as the tree
11779         structure for a TEMPLATE_PARM_INDEX.
11780         (TEMPLATE_PARM_IDX): New macro.
11781         (TEMPLATE_PARM_LEVEL): Likewise.
11782         (TEMPLATE_PARM_DESCENDANTS): Likewise.
11783         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
11784         (TEMPLATE_PARM_DECL): Likewise.
11785         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
11786         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
11787         (TEMPLATE_TYPE_DECL): Likewise.
11788         (TEMPLATE_CONST_IDX): Remove.
11789         (TEMPLATE_CONST_LEVEL): Likewise.
11790         (TEMPLATE_CONST_SET_INFO): Likewise.
11791         (TEMPLATE_TYPE_SET_INFO): Likewise.
11792         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
11793         node.
11794         (TEMPLATE_TYPE_LEVEL): Likewise.
11795         * decl.c (decls_match): Call comp_template_parms, rather than
11796         expanding it inline.
11797         (duplicate_decls): If two template declarations are being merged,
11798         then their TEMPLATE_INFOs should be merged as well.
11799         (grokfndecl): Save template-id information when declaring a friend
11800         with explicit template arguments.  Pass arguments to
11801         check_explicit_specialization via correct convention; at some
11802         point check_explicit_specialization changed, but these call-sites
11803         did not.
11804         (grokdeclarator): Tidy up slightly.
11805         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
11806         two template functions with the same DECL_ASSEMBLER_NAME the same,
11807         since the names are not yet mangled.
11808         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
11809         TEMPLATE_CONST_PARM.
11810         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
11811         decl for a non-type parameter, rather than printing `<tparm ...>'.
11812         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
11813         (do_friend): Deal with template friends.
11814         * lex.c (do_pending_inlines): Call
11815         maybe_begin_member_template_processing, rather than
11816         conditionally calling begin_member_template_processing.
11817         (process_next_inline): Likewise.  Call
11818         maybe_end_member_template_processing, rather than
11819         conditionally calling end_member_template_processing.
11820         (do_pending_defargs): Likewise.
11821         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
11822         TEMPLATE_CONST_PARM.
11823         * method.c (build_mangled_template_parm_index): New function.
11824         (build_overload_value): Use it.
11825         (build_overload_name): Likewise.
11826         * pt.c (finish_member_template_decl): Allow friend declarations.
11827         (template_class_depth): New function.
11828         (is_member_template): Rename, and modify, to become...
11829         (is_member_or_friend_template): New function.
11830         (end_member_template_processing): Rename, and modify, to become...
11831         (maybe_end_member_template_processing).
11832         (build_template_parm_index): New function.
11833         (reduce_template_parm_level): New function.
11834         (process_template_parm): Modify to use build_template_parm_index.
11835         (push_template_decl): Deal with friend templates.
11836         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
11837         TEMPLATE_CONST_PARM.
11838         (tsubst_friend_function): New function.
11839         (instantiate_class_template): Generate the DECL_FRIENDLIST
11840         for a new instantiation by using tsubst_friend_function rather
11841         than just tsubst.
11842         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
11843         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
11844         appropriate new macros.  Use reduce_template_parm_level to
11845         generate lower-level template parameters.  Handle tsubst'ing into
11846         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
11847         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
11848         templates.  Similarly for the template parameters for a new
11849         template.
11850         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
11851         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
11852         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
11853         (get_bindings): Call add_to_template_args if necessary.
11854         (instantiate_decl): Handle instantiations of friend templates.
11855         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
11856         TEMPLATE_TYPE_PARM as a list of fields; it's not!
11857         * spew.c (yylex): Do a little manual constant propagation to
11858         clarify the code.
11860 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
11862         * error.c: Include sys/types.h.
11864 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
11866         * method.c (build_mangled_name): Start CPP directives in column zero.
11868 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
11870         * typeck2.c (process_init_constructor): Sorry about non-trivial
11871         labeled initializers.
11872         * parse.y (initlist): Re-enable labeled initializers.
11874 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11876         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
11877         all callers changed.  Rely on the new parameter instead of arg
11878         being a TREE_LIST when determine whether we are working inside
11879         template template parameter.  Clean up is_type test.
11881 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
11883         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
11884         * typeck2.c (initializer_constant_valid_p): Allow conversions
11885         between pointers and references.
11887 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
11889         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
11890         if pedantic || warn_pointer_arith.
11892 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11894         * pt.c (unify): Handle TEMPLATE_DECL.
11896 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
11898         * cp-tree.h (strip_attrs): Remove decl.
11900 1998-02-18  Doug Evans  <devans@cygnus.com>
11902         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
11903         Update olddecl's attributes too.
11904         (strip_attrs): Remove function.
11905         * typeck.c (common_type): Call merge_machine_type_attributes.
11907 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
11909         * parse.y (initdcl0_innards): New grammar symbol.
11910         (nomods_initdecls, nomods_initdcl0): Change type from itype to
11911         none, since the resulting value is never used.
11912         (parse_decl): New function.
11913         (datadef): Remove redundant actions.
11914         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
11915         * parse.c: Regenerated.
11917 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
11919         * parse.y (simple_stmt): Use getdecls() to check for decl.
11921 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11923         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
11924         macros.
11925         (c++.install-common): Install c++filt properly as native or as cross
11926         variant.
11927         (c++.uninstall): Add c++filt.
11929 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11931         * call.c (standard_conversion): Fix multi-level ptr conversions.
11933 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
11935         * init.c (build_new): Propagate error_mark_node up.
11937 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
11939         * parse.y (simple_stmt): If the condition isn't a declaration,
11940         start the controlled block after the test.
11942 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
11944         * call.c (build_over_call): Convert builtin abs, labs and fabs to
11945         tree-codes.
11946         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
11947         builtins.
11949 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
11951         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
11953 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
11955         * cp-tree.h: Add access_protected_virtual_node.
11956         * class.c (init_class_processing): Initialize it.
11957         * decl.c (xref_basetypes): Use it.
11958         * parse.y (base_class_access_list): Likewise.
11960         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
11961         (c++.install-common): Install c++filt.
11963 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11965         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
11967 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
11969         * call.c (reference_binding): Use comptypes when comparing
11970         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
11972 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
11974         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
11975         (really_overloaded_fn): Move check here from is_overloaded_fn.
11976         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
11978 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
11980         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
11981         conversions.
11983 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
11985         * cp-tree.h (push_template_decl): Return the decl passed in, or an
11986         equivalent duplicate.
11987         * decl.c (pushtag): Use the return value from push_template_decl.
11988         (duplicate_decls): When duplicating a template declaration, merge
11989         the DECL_TEMPLATE_RESULTs as well.
11990         (make_implicit_typename): Don't try to dive into typename types to
11991         find a context for making a new implicit typename.
11992         (start_decl): Use the return value from push_template_decl.
11993         (grokdeclarator): Complain about declarations list `const operator
11994         int'.  Since we don't correctly handle in-class initializations of
11995         non-static data members, complain about this (now illegal)
11996         practice.  Issue an error for initializations of non-const statics
11997         since that is illegal as well, and since we don't handle that case
11998         correctly either.
11999         (start_function): Use the return value from push_template_decl.
12000         (start_method): Likewise.
12001         * decl2.c (grokfield): Likewise.  Since the change to
12002         grokdeclarator ensures that all initialized fields are in fact
12003         static, remove a redundant test for TREE_PUBLIC.
12004         * parse.y (initlist): Disable labeled initializers since they do
12005         not work as per the documentation, and since they do not use the
12006         same syntax as the C front end.
12007         * pt.c (push_template_decl): Return the decl passed in, or an
12008         equivalent duplicate.
12009         (lookup_template_class): When searching in a nested context,
12010         use the right arguments.
12011         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
12012         * typeck.c (build_component_ref): Assign the correct type to the
12013         result of build_vfn_ref.
12015 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
12017         * pt.c (convert_nontype_argument): Fix typo.
12018         (check_explicit_specialization): Allow old-style specialization
12019         of class template members.
12021 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
12022                           Manfred Hollstein  <manfred@s-direktnet.de>
12024         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
12025         when deciding to override DECL_ASSEMBLER_NAME.
12027 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
12029         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
12030         * cp-tree.h (flag_do_squangling): Add declaration.
12031         * lang-options.h: Add -fsquangle and -fno-squangle.
12032         * method.c: Add macros and static variables for squangling.
12033         (build_overload_name): Rename to build_mangled_name, add logic for B
12034         compression, and split into process_modifiers and
12035         process_overload_item.
12036         (process_modifiers): New function, to handle constant, reference,
12037         and pointer types.
12038         (process_overload_item): New function, handles issue of type codes.
12039         (build_overload_name): New function, start squangling and call
12040         build_mangled_name.
12041         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
12042         (start_squangling): New function to initialize squangling structs.
12043         (end_squangling): New function to destroy squangling structs.
12044         (nrepeats): Rename variable to Nrepeats.
12045         (issue_nrepeats): New function for issuing 'n' type repeats.
12046         (check_ktype): New function to check for type K name compression.
12047         (build_overload_nested_name): Add a check for K name compression.
12048         (build_qualified_name): Add a check for K name compression and don't
12049         use DECL_ASSEMBLER_NAME when squangling is on.
12050         (check_btype): New function, checks for B type compression.
12051         (build_static_name, build_decl_overload_real): Initiate squangling.
12052         (build_typename_overload, build_overload_with_type): Initiate
12053         squangling
12055 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
12057         * method.c (make_thunk): Avoid name buffer overflow.
12059 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
12061         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
12062         don't define them yet.
12064         * parse.y (nomods_initdcl0): Add constructor_declarator case.
12066 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12068         * config-lang.in (diff_excludes): Use basename only.
12070 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
12072         * tinfo2.cc: Add tinfo for signed char.
12074 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
12076         * search.c (compute_access): Handle protected constructors in derived
12077         classes as accessible.
12079 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
12081         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
12082         Call convert_from_reference sooner.
12084 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
12086         * cvt.c (ocp_convert): Obtain the constant values from constant
12087         decls even if the destination type is the same as the type of the
12088         decl.
12090         * decl2.c (finish_file): Make sure that static inlines with
12091         definitions are not marked DECL_EXTERNAL before returning.
12093 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
12095         * decl.c: Lose arg_looking_for_template.
12096         (lookup_name_real): Likewise.
12097         * parse.y: Lose processing_template_arg, template_arg1.
12098         (primary): Likewise.
12099         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
12101 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12103         * error.c (dump_decl): Fix type of default arguments for template
12104         template parameters and nontype template parameters.
12105         * parse.y (template_parm): Handle invalid default template
12106         template arguments here.
12108         * parse.y (template_parm): Use template_arg instead of PTYPENAME
12109         for default template template argument.
12110         * pt.c (coerce_template_parms): Merge default template argument
12111         codes.  Can treat RECORD_TYPE as template name if it is implicitly
12112         created.  Fix argument index in error message.
12113         * typeck.c (comptypes): Merge template argument comparison codes in
12114         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
12116 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
12118         * lex.c (file_name_nondirectory): Also check for '/'.
12120 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
12122         * parse.y (primary): Deal with statement-expressions in
12123         templates.
12124         * pt.c (tsubst_copy): Handle BIND_EXPR.
12125         * tree.c (mapcar): Likewise.
12127         * call.c (add_template_candidate_real): Pass extra parameter to
12128         fn_type_unification.
12129         * cp-tree.h (fn_type_unification): Add parameter.
12130         * pt.c (fn_type_unification): Add additional parameter to deal with
12131         static member functions.
12132         (get_bindings): Deal with static member functions.
12134         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
12135         (revert_static_member_fn): Declare.
12136         * decl.c (revert_static_member_fn): Remove declaration.  Change
12137         linkage from internal to external.
12138         (cp_finish_decl): Deal with virtual functions in classes local to
12139         template functions.
12140         * decl2.c (finish_file): Don't forget to emit increment/decrement
12141         expressions in initializers for file-scope variables.
12142         * parse.y (typename_sub2): If the typename doesn't names a
12143         template, rather than a type, issue an error message.
12144         * pt.c (check_explicit_specialization): Handle specializations of
12145         static member functions.
12146         (coerce_template_parms): Handle offset references to lists of
12147         member functions.
12148         * search.c (note_debug_info_needed): Don't crash when handed a
12149         type which is being defined.
12150         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
12151         that can happen with some illegal code.
12153 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12155         * call.c (user_harshness): Initialize `code' to 0.
12156         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
12157         (null_ptr_cst_p): Add parentheses around && within ||.
12158         (standard_conversion): Likewise.
12159         (z_candidate): Likewise.
12160         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
12161         (build_object_call): Likewise for `mem_args'.
12162         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
12163         default case in enumeration switch.
12165         * class.c (build_vtable_entry): Add explicit braces to avoid
12166         ambiguous `else'.
12167         (build_class_init_list): Likewise.
12168         (finish_struct_1): Initialize `width' to 0.
12169         (instantiate_type): Initialize `name' to NULL_TREE.  Add
12170         explicit braces to avoid ambiguous `else'.
12172         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
12173         `else'.
12175         * decl.c (grok_reference_init): Eliminate unused parameter, all
12176         callers changed.
12177         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
12178         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
12179         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
12180         (grokdeclarator): Add parentheses around && within ||.  Add
12181         explicit braces to avoid ambiguous `else'.
12182         (grokparms): Initialize `type' to NULL_TREE.
12183         (xref_tag): Remove unused label `just_return'.
12184         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
12185         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
12186         (hack_incomplete_structures): Add parentheses around assignment
12187         used as truth value.
12189         * decl2.c (coerce_delete_type): Hide definition of `e3'.
12191         * error.c: Include <stdlib.h>.
12192         (dump_expr): Change the type of `i' to size_t.  Remove unused
12193         label `error'.
12195         * except.c (init_exception_processing): Remove unused variable `d'.
12196         (expand_throw): Likewise for `label'.
12198         * friend.c (add_friends): Add explicit braces to avoid ambiguous
12199         `else'.
12201         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
12202         (sort_base_init): Likewise for `binfo'.
12203         (expand_member_init): Likewise for `rval'.
12204         (build_member_call): Add parentheses around assignment used as
12205         truth value.
12206         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
12207         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
12208         `old_immediate_size_expand' to 0.
12209         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
12210         (build_vec_delete_1): Remove unused variable `block'.
12211         (expand_vec_init): Initialize `itype' to NULL_TREE.
12213         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
12214         declaration of `index' and `rindex' with autoconf macros.
12215         (reinit_parse_for_expr): Remove unused variables
12216         `look_for_semicolon' and `look_for_lbrac'.
12217         (cons_up_default_function): Initialize `args' to NULL_TREE.
12218         (readescape): Initialize `firstdig' to 0.
12219         (real_yylex): Add parentheses around assignment used as truth value.
12221         * method.c: Include <strings.h> if we don't have <string.h>.
12222         Protect declaration of `index' with autoconf macro.
12224         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
12225         Initialize `type' to NULL_TREE.
12226         (structsp): Remove unused variable `id'.
12228         * pt.c (coerce_template_parms): Add explicit braces to avoid
12229         ambiguous `else'.
12230         (lookup_template_class): Initialize `template' to NULL_TREE.
12231         (instantiate_class_template): Remove unused variable `name' and `e'.
12232         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
12233         (do_poplevel): Initialize `saved_warn_unused' to 0.
12234         (type_unification): Remove unused varable `parm'.
12235         (unify): Likewise for `j'.
12237         * repo.c (init_repo): Add parentheses around assignment used as
12238         truth value.
12239         (finish_repo): Remove unused varable `p'.
12241         * search.c (get_binfo): Initialize `type' to NULL_TREE.
12242         (get_base_distance): Likewise.
12243         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
12244         and `new_v' to NULL_TREE.
12245         (lookup_fnfields): Likewise for `rval_binfo_h'.
12246         (breadth_first_search): Add parentheses around assignment used as
12247         truth value.
12248         (get_template_base): Initialize `type' to NULL_TREE.
12250         * sig.c (append_signature_fields): Initialize `last_mfptr' to
12251         NULL_TREE.
12252         (build_signature_table_constructor): Likewise for
12253         `last_rhs_field', `pfn' and `vt_off'.
12254         (build_sigtable): Likewise for `init'.
12256         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
12257         (propagate_binfo_offsets): Likewise for `delta'.
12258         (hash_tree_cons): Initialize hashcode to 0.
12259         (can_free): Likewise for `size'.
12260         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
12262         * typeck.c (convert_sequence): Hide prototype.
12263         (common_type): Add explicit braces to avoid ambiguous `else'.
12264         (comp_target_types): Likewise.
12265         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
12266         (build_function_call_real): Add explicit braces to avoid ambiguous
12267         `else'.
12268         (convert_arguments): Initialize `called_thing' to 0.
12269         (convert_for_initialization): Initialize `savew' and `savee' to 0.
12271         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
12272         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
12273         (build_x_arrow): Likewise for `last_rval'.
12275         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
12277 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
12279         * decl.c (init_decl_processing): Use set_sizetype.
12280         * decl2.c (sizetype): Don't declare.
12281         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
12282         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
12283         (build_component_addr, unary_complex_lvalue): Likewise.
12284         * rtti.c (expand_class_desc): Likewise.
12285         * class.c (get_vfield_offset): Likewise.
12287 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
12289         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
12290         early to avoid bogus error.  Handle overloaded function
12291         names provided as template arguments correctly.
12292         (coerce_template_parms): Don't mishandle overloaded functions when
12293         dealing with template template parameters.
12294         (lookup_template_class): Issue an error message, rather than
12295         crashing, when the TYPE_DECL provided is not a template type.
12297 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
12299         * class.c (instantiate_type): Don't just return a known type if
12300         it's wrong.
12302 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
12304         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
12305         since that code could never be reached.
12307         * error.c (dump_decl): Avoid aborting in the midst of printing an
12308         error message about an illegal template declaration.
12310         * parse.y (structsp): Print an error message, rather than crashing,
12311         when a class-head does not name a class.
12313         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
12314         template arguments as a g++ extension.
12316         * cp-tree.def (ALIGNOF_EXPR): New tree code.
12317         * decl2.c (grok_alignof): If processing_template_decl, just store
12318         the expression.
12319         * typeck.c (c_alignof): Likewise.
12320         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
12321         * error.c (dump_expr): Likewise.
12322         * pt.c (tsubst_copy): Likewise.
12323         * tree.c (cp_tree_equal): Likewise.
12324         * pt.c (uses_template_parms): Correctly determine whether or not a
12325         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
12326         folding can be done.
12328         * cp-tree.h (grok_enum_decls): Remove type parameter.
12329         * decl.c (grok_enum_decls): Likewise.
12330         * decl2.c (grok_x_components): Call grok_enum_decls
12331         unconditionally, since it will do nothing if there is no
12332         current_local_enum.  Use the new calling sequence.
12333         * pt.c (tsubst_enum): Use the new calling sequence for
12334         grok_enum_decls.
12336         * decl.c (start_function): Make member functions of local classes
12337         in extern inline functions have comdat linkage here...
12338         (grokdeclarator): Rather than here.
12340 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
12342         * pt.c (convert_nontype_argument): Use decl_constant_value.
12344 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
12346         * call.c (add_template_candidate_real): New function.
12347         (add_template_candidate): Use it.
12348         (add_template_conv_candidate): Likewise.
12349         (joust): Pass extra argument to more_specialized.
12350         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
12351         (is_local_class): Remove.
12352         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
12353         * cp-tree.h (is_local_class): Remove.
12354         (perform_array_to_pointer_conversion): Likewise.
12355         (finish_member_template_decl): Add.
12356         (check_explicit_specialization): Return a tree, not an int.
12357         (more_specialized): Take additional argument.
12358         (get_bindings): Likewise.
12359         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
12360         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
12361         (perform_array_to_pointer_conversion): Remove.
12362         * decl.c (saved_scope): Add processing_specialization,
12363         processing_explicit_instantiation fields.
12364         (maybe_push_to_top_level): Save them.
12365         (pop_from_top_level): Restore them.
12366         (grokfndecl): Use new return value from
12367         check_explicit_specialization.
12368         (start_decl): Don't check flag_guiding_decls before pushing
12369         decls.
12370         (cp_finish_decl): Remove previous (bogus) change.
12371         (grok_declarator): Use decl_function_context rather than
12372         is_local_class.
12373         * decl2.c (finish_file): Pass extra argument to get_bindings.
12374         (build_expr_from_tree): Let build_x_component_ref check
12375         validity of arguments rather than doing it here.
12376         * lex.c (cons_up_default_function): Remove code fooling with
12377         processing_specialization, processing_explicit_instantiation
12378         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
12379         * method.c (build_overload_identifier): Mangle local classes in
12380         template functions correctly.
12381         * parse.y (finish_member_template_decl): Move to pt.c.
12382         * pt.c (finish_member_template_decl): Moved here from parse.y.
12383         (print_candidates): New function.
12384         (determine_specialization): Change interface.  Properly look for
12385         most specialized versions of template candidates.
12386         (check_explicit_specialization): Fully process explicit
12387         instantiations.
12388         (push_template_decl): Avoid looking at CLASSTYPE fields in
12389         FUNCTION_DECLS.
12390         (determine_overloaded_function): Remove.
12391         (convert_nontype_argument): Change name from
12392         convert_nontype_parameter.  Use determine_overloaded_function
12393         instead of instantiate_type.
12394         (mangle_class_name_for_template): Handle type contexts as well as
12395         function contexts.
12396         (classtype_mangled_name): Likewise.
12397         (lookup_template_class): Likewise.
12398         (tsubst): Likewise.
12399         (more_specialized): Take explict template arguments as a
12400         parameter.
12401         (most_specialized): Likewise.
12402         (get_bindings): Likewise.  Check that return types match before
12403         proclaiming a function a match.
12404         (do_decl_instantiation): Remove code searching for function to
12405         instantiate; that is now done in check_explicit_specialization.
12406         (add_maybe_template): Pass extra argument to get_bindings.
12407         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
12408         implementation.
12409         * typeck.c (build_component_ref): Check for invalid arguments.
12411 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
12413         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
12414         return_target and call_target are equivalent.
12416         * pt.c (type_unification_real): Just accept function parms that
12417         don't use any template parms.
12419 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
12421         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
12422         unset DECL_NOT_REALLY_EXTERN.
12424         * parse.y (typename_sub*): Fix std::.
12426 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
12428         * error.c (dump_decl): Fix type default template args.
12429         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
12431 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
12433         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
12434         (file_name_nondirectory): Use.
12436 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12438         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
12439         that are not really present.  Substitute default arguments in
12440         template template arguments.  Correctly convert TEMPLATE_DECL to
12441         TEMPLATE_TEMPLATE_PARM.
12442         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
12443         are no longer treated specially here.
12444         * parse.y (template_template_parm): Fix copy error.
12445         * decl.c (grokdeclarator): Warn about missing `typename' for nested
12446         type created from template template parameters.
12447         * parse.y (bad_parm): Likewise
12449         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
12450         (push_nested_class): Likewise.
12451         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
12452         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
12453         (copy_template_template_parm): Declare.
12454         * decl.c (arg_looking_for_template): New variable.
12455         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
12456         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
12457         node if arg_looking_for_template is nonzero.
12458         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
12459         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
12460         (grokdeclarator): Handle TEMPLATE_DECL.
12461         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
12462         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
12463         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
12464         (dump_decl): Handle unnamed template type parameters.
12465         Handle template template parameters.
12466         (dump_function_name): Handle template template parameters.
12467         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
12468         Handle TEMPLATE_TEMPLATE_PARM.
12469         * method.c (build_template_template_parm_names): New function.
12470         (build_template_parm_names): Handle TEMPLATE_DECL.
12471         (build_overload_nested_name, build_overload_name):
12472         Handle TEMPLATE_TEMPLATE_PARM.
12473         * parse.y (maybe_identifier): New nonterminal.
12474         (template_type_parm): Use it.
12475         (template_template_parm, template_arg1): New nonterminal.
12476         (template_parm): Add template_template_parm rules.
12477         (template_arg): Set processing_template_arg.
12478         (template_arg1): Rules moved from template_arg.
12479         (primary, nonnested_type): Set arg_looking_for_template if we are
12480         processing template arguments.
12481         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
12482         (process_template_parm): Handle template template parameters.
12483         (coerce_template_parms, comp_template_args): Likewise.
12484         (mangle_class_name_for_template, lookup_template_class): Likewise.
12485         (uses_template_parms): Handle TEMPLATE_DECL and
12486         TEMPLATE_TEMPLATE_PARM.
12487         (current_template_args): Handle TEMPLATE_DECL.
12488         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
12489         * search.c (dfs_walk, dfs_record_inheritance):
12490         Handle TEMPLATE_TEMPLATE_PARM.
12491         * tree.c (copy_template_template_parm): New function.
12492         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
12493         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
12495 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
12497         * decl.c (start_decl): Don't allow duplicate definitions of static
12498         data members.
12500         * call.c (build_user_type_conversion_1): Handle user-defined
12501         template conversion operators correctly.
12503         * decl2.c (build_expr_from_tree): Issue an error message if the
12504         object in a COMPONENT_REF is a TEMPLATE_DECL.
12506         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
12508         * class.c (is_local_class): New function.
12509         * cp-tree.h (is_local_class): Declare it.
12510         (last_tree): Likewise.
12511         (begin_tree): Likewise.
12512         (end_tree): Likewise.
12513         (lookup_template_class): Change prototype.
12514         * decl.c (cp_finish_decl): Check for NULL where necessary.
12515         Consider FUNCTION_DECLS to declare objects with top-level binding,
12516         when calling make_decl_rtl.
12517         (grokdeclarator): Give members of local classes internal linkage.
12518         (start_function): Remove declaration of last_tree.
12519         (finish_function): Set flag_keep_inline_functions around call to
12520         rest_of_compilation if we are processing a member function in a
12521         local class.
12522         (start_method): Call push_template_decl for member functions of
12523         local classes in template functions.
12524         * decl2.c (import_export_decl): Don't give external linkage to
12525         instantiations of templates with internal linkage.
12526         * parse.y (last_tree): Remove declaration.
12527         (template_type): Pass extra parameter to lookup_template_class.
12528         (self_template_type): Likewise.
12529         (structsp): Move call to reset_specialization into left_curly.
12530         (left_curly): Call reset_specialization, and begin_tree.
12531         * pt.c (saved_trees): New variable.
12532         (mangle_class_name_for_template): Change prototype.  Use
12533         additional function context to name local classes in templates
12534         correctly.
12535         (classtype_mangled_name): Pass the context.
12536         (push_template_decl): Handle local classes and templates, and
12537         member functions for such classes.
12538         (convert_nontype_parameter): Fix handling of pointer-to-member
12539         constants.
12540         (lookup_template_class): Handle local classes in templates.
12541         (tsubst): Likewise.  Don't assume that template instantiations
12542         have external linkage; pay attention to the template declaration.
12543         (mark_decl_instantiated): Likewise.
12544         (begin_tree): New function.
12545         (end_tree): Likewise.
12547         * decl.c (xref_basetypes): Don't call complete_type for basetypes
12548         that involve template parameters; that can lead to infinite
12549         recursion unnecessarily.
12551         * pt.c (register_specialization): Do not register specializations
12552         that aren't ready to be registered yet.
12553         (check_explicit_specialization): Handle explicit specialization of
12554         constructors and destructors.
12555         (build_template_decl): New function.
12556         (push_template_delc): Handle out-of-class specializations of
12557         member templates.
12559         * pt.c (check_explicit_specialization): Set up the template
12560         information before registering the specialization.
12561         (coerce_template_parms): Fix thinko.
12562         (tsubst): Handle specializations of member templates correctly.
12564         * class.c (finish_struct_methods): Remove calls to
12565         check_explicit_specialization from here.
12566         (finish_struct): And insert them here.
12567         * cp-tree.h (perform_qualification_conversions): New function.
12568         (perform_array_to_pointer_conversion): Likewise.
12569         (begin_explicit_instantiation): Likewise.
12570         (end_explicit_instantiation): Likewise.
12571         (determine_specialization): Renamed from
12572         determine_explicit_specialization.
12573         (comp_template_parms): New function.
12574         (processing_explicit_instantiation): New variable.
12575         * cvt.c (perform_qualification_conversions): New function.
12576         (perform_array_to_pointer_conversion): Likewise.
12577         * decl.c (duplicate_decls): Don't consider template functions
12578         alike unless they have the same parameters.  Refine handling of
12579         instantiation/specialization mismatches.
12580         (start_decl): Don't call pushdecl for template specializations,
12581         since they don't affect overloading.
12582         (start_function): Likewise.
12583         (grokfndecl): Call check_explicit_specialization a little later.
12584         Don't call duplicate_decls for memberm template specializations.
12585         (grokdeclarator): Don't update template_count for classes that are
12586         themselves specializations.  Remove use of `2' as parameter to
12587         grokfndecl since that value isn't used.
12588         * lex.c (cons_up_default_function): Save and restore
12589         processing_explicit_instantiation around calls to grokfield.
12590         * parse.y (finish_member_template_decl): New function.
12591         (component_decl_1): Use it.
12592         (fn.def2): Likewise.
12593         (template_arg_list_opt): New nonterminal.
12594         (template_type): Use it.
12595         (self_template_type): Likewise.
12596         (template_id): Likewise.
12597         (object_template_id): Likewise.
12598         (notype_template_declarator): Likwise.
12599         (begin_explicit_instantiation): Likewise.
12600         (end_explicit_instantiation): Likewise.
12601         (explicit_instantiation): Use them.
12602         * pt.c (coerce_template_parms): Add parameters.
12603         (processing_explicit_instantiation): New variable.
12604         (convert_nontype_parameter): New function.
12605         (determine_overloaded_function): Likewise.
12606         (begin_explicit_instantiation): Likewise.
12607         (end_explicit_instantiation): Likewise.
12608         (retrieve_specialization): Likewise.
12609         (register_specialization): Likewise.
12610         (processing_explicit_specialization): Removed.
12611         (determine_specialization): Handle specializations of member
12612         functions of template class instantiations.
12613         (check_explicit_specialization): Refine to conform to standard.
12614         (comp_template_parms): New function.
12615         (coerce_template_parms): Call convert_nontype_parameter.
12616         (tsubst): Refine handling of member templates.  Use
12617         register_specialization.
12618         (instantiate_template): Use retrieve_specialization.
12619         (do_decl_instantiation): Likewise.
12620         (instantiate_decl): Likewise.
12621         (type_unification): Improve handling of explict template
12622         arguments.
12623         * tree.c (mapcar): Return error_mark_node, rather than aborting,
12624         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
12625         * typeck.c (build_unary_op): Call determine_specialization, rather
12626         than determine_explicit_specialization.
12628 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
12630         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
12632 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12634         * error.c (dump_decl): For enum tags, output the tag, not its value.
12636 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
12638         * decl.c (init_decl_processing): Only call init_rtti_processing
12639         FLAG_RTTI is set.
12641 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
12643         * init.c (build_new_1): Split out from build_new.
12644         (build_new): Just return a NEW_EXPR.
12645         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
12647         * decl2.c (get_temp_regvar): Tweak.
12649         * cp-tree.h (TREE_CALLS_NEW): Comment out.
12650         * class.c (resolves_to_fixed_type_p): Remove use.
12651         * method.c (build_opfncall): Likewise.
12652         * call.c (build_new_op): Likewise.
12654 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
12656         * exception.cc (__eh_alloc, __eh_free): New fns.
12657         (__cp_push_exception, __cp_pop_exception): Use them.
12658         (__uncatch_exception): Call terminate here if no exception.
12659         * except.c (build_terminate_handler): New fn.
12660         (expand_start_catch_block): Use it.
12661         (expand_exception_blocks): Likewise.
12662         (alloc_eh_object): New fn.
12663         (expand_throw): Use it.  Protect exception init with terminate.
12664         * typeck.c (build_modify_expr): Remove code that ignores trivial
12665         methods.
12667 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12669         * call.c (add_builtin_candidate): Add default case in enumeration
12670         switch.
12671         (build_new_op): Likewise.
12672         (convert_like): Likewise.
12673         * cvt.c (build_expr_type_conversion): Likewise.
12674         * tree.c (real_lvalue_p): Likewise.
12675         (lvalue_p): Likewise.
12676         (cp_tree_equal): Likewise.
12677         * typeck.c (comptypes): Likewise.
12678         (build_component_ref): Likewise.
12679         (build_function_call_real): Likewise.
12680         (build_binary_op_nodefault): Likewise.
12681         (build_unary_op): Likewise.
12682         (build_modify_expr): Likewise.
12683         * typeck2.c (initializer_constant_valid_p): Likewise.
12685 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
12687         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
12689 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
12691         * pt.c (coerce_template_parms): Make sure to digest_init if
12692         possible.
12694         * decl.c (duplicate_decls): Make the newdecl virtual if the
12695         olddecl was, just as is done with other attributes of olddecl.
12697 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
12699         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
12700         address of an OFFSET_REF.
12702         * cp-tree.def: Add AGGR_INIT_EXPR.
12703         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
12704         AGGR_INIT_EXPR where appropriate.
12705         * expr.c (cplus_expand_expr): Likewise.  Simplify.
12707         * decl2.c (finish_file): Remove call to register_exception_table.
12709 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12711         * pt.c (instantiate_class_template): Don't do injection when
12712         processing_template_decl is true, as pollutes current_binding_level
12713         for base classes.
12715 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
12717         * pt.c (maybe_fold_nontype_arg): Add prototype.
12719 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
12721         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
12722         * error.c (dump_expr): Likewise.
12724 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
12726         * typeck.c (build_function_call_real): Remove "inline called before
12727         definition" pedwarn.
12729         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
12731 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
12733         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
12735         * pt.c (type_unification_real): Change __null to type void* with
12736         a warning.
12738 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
12740         * call.c (implicit_conversion): Don't call
12741         build_user_type_conversion_1 with a NULL expr, since it will
12742         crash.
12744         * pt.c (unify): Don't try to unify array bounds if either array is
12745         unbounded.
12747 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12749         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
12750         Replace extern decls with casts.
12752         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
12753         Update last_parm_cleanup_insn.
12754         (store_after_parms): Remove.
12755         * cp-tree.h: Adjust.
12757 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
12759         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
12760         (finish_file): Check DECL_COMDAT instead of weak|one_only.
12761         (import_export_vtable): Use make_decl_one_only instead of
12762         comdat_linkage for win32 tweak.
12763         (import_export_decl): Likewise.
12764         * pt.c (mark_decl_instantiated): Likewise.
12766         * decl2.c (finish_file): Lose handling of templates in pending_statics.
12768 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
12770         * decl2.c (finish_file): Lose call to expand_builtin_throw.
12771         * except.c (expand_builtin_throw): Remove.
12772         * cp-tree.h: Remove ptr_ptr_type_node.
12773         * decl.c: Likewise.
12775 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
12777         * decl.c (ptr_ptr_type_node): Define.
12778         (init_decl_processing): Initialize it.
12779         * cp-tree.h: Declare it.
12780         * exception.cc (__cp_exception_info): Use __get_eh_info.
12781         (__cp_push_exception): Likewise.
12782         (__cp_pop_exception): Likewise.
12784         From Scott Snyder <snyder@d0sgif.fnal.gov>:
12785         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
12786         saved_pc.
12787         (init_exception_processing): Removed saved_pc initialization.
12789 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
12791         * pt.c (instantiate_decl): Defer all templates but inline functions.
12793 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
12795         * init.c (expand_vec_init): Don't fold a list of parameters.
12797         * decl.c (copy_args_p): Handle copy elision for types with virtual
12798         bases.
12799         * call.c (build_over_call): Likewise.
12801 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
12803         * pt.c (lookup_template_function): Copy the template arguments,
12804         not just the list containing them, to the permanent obstack.
12806 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
12808         * except.c (expand_start_catch_block): suspend_momentary for the
12809         terminate handler.
12811         * error.c (dump_decl): Handle LOOKUP_EXPR.
12813 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
12815         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
12816         permanent obstack if we are processing a template decl.
12817         * typeck.c (build_static_cast): Likewise.
12818         (build_const_cast): Likewise.
12819         (build_reinterpret_cast): Likewise.
12821         * pt.c (coerce_template_parms): Coerce some expressions, even
12822         when processing_template_decl.
12824 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12826         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
12827         handling of pointer difference expressions.
12829         * typeck.c (comp_target_types): Comparison of function/method types
12830         is independent of nptrs.
12832 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
12834         * pt.c (tsubst): Avoid creating pointer to reference and
12835         reference to reference types.
12837 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
12839         * parse.y (do_id): New nonterminal.
12840         (template_id): Use it.
12842 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
12844         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
12845         * spew.c (yylex): Don't do_identifier here.
12846         * decl2.c (build_expr_from_tree): Revert last change.
12848         * decl2.c (build_expr_from_tree): Expand the name for a method call.
12849         * parse.y (object_template_id): Don't try to take the DECL_NAME.
12851 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
12853         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
12854         alloc_expr.
12855         * call.c (build_op_delete_call): Adjust.
12857         * except.c (expand_end_catch_block): Lose rethrow region.
12858         (expand_start_catch_block): Likewise.
12859         (expand_end_catch_block): Don't expand_leftover_cleanups.
12861 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12863         * pt.c (tsubst): Remove tree_cons call (places redundant info into
12864         DECL_TEMPLATE_INSTANTIATION).
12866 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
12868         * tree.c (is_overloaded_fn): Handle getting a fn template.
12869         (really_overloaded_fn): Likewise.
12870         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
12871         * pt.c (check_explicit_specialization): Tweak.
12872         (determine_explicit_specialization): Tweak.
12874         * tree.c, cp-tree.h (get_target_expr): New fn.
12876 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
12878         * pt.c (check_explicit_specialization): Fix misspelling in
12879         diagnostic: `preceeded'.
12880         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
12881         `conversiona'.
12883 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
12885         * pt.c (determine_explicit_specialization): Avoid an internal
12886         error for bad specializations.
12888         * method.c (build_overload_value): Handle SCOPE_REF.
12890 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
12892         * class.c (prepare_fresh_vtable): Enable even more complex MI
12893         vtable names.
12895 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
12897         * exception.cc (__check_eh_spec): Optimize a bit.
12899         * exception.cc (__cp_pop_exception): Lose handler arg.
12900         * except.c (do_pop_exception): Likewise.
12901         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
12902         (expand_end_catch_block): Likewise.
12904 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12906         * pt.c (check_explicit_specialization): Complain about using a
12907         template-id for a non-specialization.
12909 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
12911         * repo.c: Prototype rindex only if needed.
12912         * xref.c: Likewise.
12914 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12916         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
12918 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
12920         * typeck.c (build_const_cast): Handle references here instead of
12921         handing off to convert_to_reference.
12923         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
12924         TerminateFunctionCall.
12925         (init_exception_processing): Likewise.  Terminate et al are now
12926         the fns, not ADDR_EXPRs.
12927         (various): Lose redundant assemble_external calls.
12928         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
12930         * cp-tree.h (struct lang_decl_flags): Add comdat.
12931         (DECL_COMDAT): New macro.
12932         * decl.c (duplicate_decls): Propagate it.
12933         (cp_finish_decl): Handle it.
12934         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
12936         * class.c: Remove static pending_hard_virtuals.
12937         (add_virtual_function): Take pointers to pending_virtuals
12938         and pending_hard_virtuals.
12939         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
12941 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
12943         * decl2.c (import_export_vtable): If we support one_only but not
12944         weak symbols, mark instantiated template vtables one_only.
12945         (import_export_decl): Likewise for tinfo functions.
12946         (finish_vtable_vardecl): Also write out vtables from explicitly
12947         instantiated template classes.
12948         * pt.c (mark_class_instantiated): Revert last change.
12950         * except.c (expand_throw): Call mark_used on the destructor.
12952 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
12954         * lex.c (lang_init): Enable flag_exceptions by default if no
12955         command line switch was specified.
12957 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
12959         * pt.c (unify): Handle `void' template parameters in
12960         specializations.
12962 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
12964         * rtti.c (build_dynamic_cast): Handle template case here.
12965         (build_dynamic_cast_1): Not here.
12967         * typeck2.c (digest_init): Make copies where appropriate.
12969         * decl2.c (delete_sanity): resolve_offset_ref.
12971         * except.c: Call terminate without caching so many bits.
12973         * except.c (expand_start_catch_block): Fix catching a reference
12974         to pointer.
12976 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
12978         * init.c (build_new): Copy size to the saveable obstack.
12980         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
12981         TRY_CATCH_EXPR for now.
12983 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
12985         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
12986         has DECL_LANG_SPECIFIC.
12988         * exception.cc (struct cp_eh_info): Add handlers field.
12989         (__cp_push_exception): Initialize it.
12990         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
12991         (__throw_bad_exception): Remove.
12992         * except.c (call_eh_info): Add handlers field.
12993         (get_eh_handlers): New fn.
12994         (push_eh_cleanup): Increment handlers.
12996 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
12998         * except.c (expand_start_eh_spec): Use the try/catch code.
12999         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
13000         doing everything inline.
13001         (init_exception_processing): throw_type_match now takes
13002         const void pointers.
13003         * exception.cc (__check_eh_spec): New fn.
13004         * inc/exception: Neither terminate nor unexpected return.
13005         * decl.c: Make const_ptr_type_node public.
13006         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
13008         * except.c (expand_start_catch_block): We only need the rethrow
13009         region for non-sjlj exceptions.
13010         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
13012 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
13014         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
13015         (various.o): Likewise.
13016         * inc/new: Add placement deletes.  Add throw specs for default new.
13017         * new.cc (set_new_handler): Move here from libgcc2.
13018         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
13019         (new): Move from libgcc2.  Throw bad_alloc.
13020         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
13021         * decl.c (init_decl_processing): Update exception specs on new and
13022         delete.
13024         * method.c (build_decl_overload_real): Don't mess with global
13025         placement delete.
13027         * init.c (build_new): Check for null throw spec, not nothrow_t.
13029         * decl.c (duplicate_decls): Don't complain about different exceptions
13030         from an internal declaration.
13032         * call.c (build_op_delete_call): Fix check for member fns again.
13034         * decl2.c (import_export_decl): Interface hackery affects
13035         virtual synthesized methods.
13037 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
13039         * decl.c (start_decl): Don't just complain about a mismatched
13040         scope, fix it.
13042         * decl.c (make_implicit_typename): Handle case where t is not
13043         actually from context.
13044         * tree.c (get_type_decl): Lose identifier case.
13045         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
13046         * parse.y (nonnested_type): Just use lookup_name.
13047         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
13049 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
13051         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
13052         T was built in C language context (for example, by
13053         output_func_start_profiler).
13055 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
13057         * decl.c (make_implicit_typename): New fn.
13058         (lookup_name_real): Use it.  Use current_class_type as the context.
13060 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
13062         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
13064 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
13066         * friend.c (do_friend): Warn about non-template friends in templates.
13068         * call.c (build_op_delete_call): Fix handling of inherited delete.
13070         * search.c (dfs_record_inheritance): Ignore template type parms.
13072 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
13074         * call.c (build_new_op): Fix copy error.
13075         (build_op_new_call): New fn.
13076         (build_op_delete_call): New fn.
13077         * cp-tree.h: Declare them.
13078         * init.c (build_new): Use them.  Support placement delete.
13079         (build_x_delete): Use build_op_delete_call.
13080         (build_delete): Likewise.
13081         * decl2.c (delete_sanity): Likewise.
13082         (coerce_delete_type): Don't complain about placement delete.
13084 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13086         * call.c (build_new_function_call): Remove unused 'obj' parm.
13087         * cp-tree.h, typeck.c: Adjust.
13089         * init.c (build_new): Make the cleanup last longer.
13090         (expand_vec_init): Call do_pending_stack_adjust.
13092 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
13094         * pt.c (do_type_instantiation): Fix typo.
13095         (mark_class_instantiated): If we support one_only but not weak
13096         symbols, don't mark this as known.
13098         * init.c (build_new): Handle vec delete in EH cleanup.
13100 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13102         * call.c (build_method_call): Call complete_type before checking
13103         for destructor.
13105 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
13107         * decl.c (add_block_current_level): Delete.
13108         * init.c (build_vec_delete_1): Delete build_block and
13109         add_block_current_level calls.
13111 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
13113         * init.c (build_new): Handle freeing allocated memory when the
13114         constructor throws.
13116         * call.c (build_new_method_call): Fix flags arg.
13118         * pt.c (do_type_instantiation): Don't try to instantiate
13119         member templates.
13120         (mark_decl_instantiated): If we support one_only but not
13121         weak symbols, mark this one_only.
13122         * decl2.c (import_export_vtable): Don't defer handling of vtables
13123         if MULTIPLE_SYMBOL_SPACES.
13125 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
13127         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
13129 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
13131         * except.c (do_pop_exception): Return a value.
13133 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
13135         * call.c (build_new_method_call): Handle getting a
13136         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
13137         if we got template parms.
13138         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
13139         not just the args.
13140         * decl2.c (build_expr_from_tree): Tweak last change.
13141         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
13142         (maybe_fold_nontype_arg): Split out from tsubst_copy.
13143         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
13145 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
13147         * pt.c (tsubst_copy): Handle explicit template arguments in
13148         function calls.
13149         * typeck.c (build_x_function_call): Likewise.
13150         * decl2.c (build_expr_from_tree): Lookup function name if it
13151         hasn't been done.
13153         * pt.c (tsubst): Instantiate template functions properly when
13154         template parameter does not appear in function arguments and return
13155         type.
13156         (comp_template_args): Handle member templates required by tsubst.
13158 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13160         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
13161         previous change.
13163 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13165         * pt.c (coerce_template_parms): Tweak error message.
13167         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
13168         return type defaults to `int', even if there are storage-class
13169         specifiers.
13171 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
13173         Complete nested exception support.
13174         * except.c (do_pop_exception): Split out...
13175         (push_eh_cleanup): From here.  Handle the EH region by hand.
13176         (expand_start_catch_block): Add a new level for the catch parm.
13177         Move the rethrow region outside the two cleanup regions.
13178         Protect the initializer for the catch parm with terminate.
13179         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
13180         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
13181         popping off the middle of the stack.
13182         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
13183         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
13184         (build_cplus_new): Only wrap CALL_EXPRs.
13185         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
13186         the constructor call.
13188 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13190         * Make-lang.in (c++.distdir): Make inc subdirectory.
13192 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
13194         * decl2.c (finish_file): Put back some code.
13196 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
13198         * decl2.c (finish_file): Remove redundant code.
13199         * method.c (emit_thunk): Don't let the backend defer generic thunks.
13201 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
13203         * except.c (call_eh_info): Split out...
13204         (push_eh_info): From here.
13205         (expand_builtin_throw): Use it.
13206         (expand_start_catch_block): Move region start back.
13208 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
13210         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
13211         (real_yylex): Record wide strings using target endianness, not host.
13213 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
13215         * repo.c (rindex): Add decl unconditionally.
13216         (get_base_filename, open_repo_file): Don't cast rindex.
13217         * xref.c (rindex): Add decl unconditionally.
13218         (index): Remove unused decl.
13219         (open_xref_file): Don't cast rindex.
13221 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
13223         * class.c (build_vbase_path): Propagate the result type properly.
13225 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
13227         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
13228         remaining use of saved_throw_type with a call to get_eh_type.
13230 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
13232         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
13233         (file_name_nondirectory): New function, doing the same as the macro.
13234         (set_typedecl_interface_info): Use it instead of the macro.
13235         (check_newline): Likewise.
13236         (handle_cp_pragma): Likewise.
13238         * repo.c (get_base_filename): Cast result of rindex to char*.
13239         (open_repo_file): Likewise.
13240         * xref.c (open_xref_file): Likewise.
13241         * error.c (dump_char): Make its arg int, not char.
13243         * except.c (push_eh_info): Pass the number of fields - 1 down, not
13244         the exact number of fields.
13246 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
13248         Support for nested exceptions.
13249         * tinfo2.cc (__is_pointer): New fn.
13250         * exception.cc (struct cp_eh_info): Define.
13251         (__cp_exception_info, __uncatch_exception): New fns.
13252         (__cp_push_exception, __cp_pop_exception): New fns.
13253         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
13254         Lose empty_fndecl.
13255         (init_exception_processing): Likewise.  __eh_pc is now external.
13256         (push_eh_info): New fn.
13257         (get_eh_{info,value,type,caught}): New fns.
13258         (push_eh_cleanup): Just call __cp_pop_exception.
13259         (expand_start_catch_block): Use push_eh_info.  Start the eh region
13260         sooner.
13261         (expand_end_eh_spec): Use push_eh_info.
13262         (expand_throw): Call __cp_push_exception to set up the exception info.
13263         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
13264         when we rethrow.
13265         (expand_builtin_throw): Don't refer to empty_fndecl.
13267 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
13269         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
13271 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
13273         * method.c (build_template_parm_names, build_decl_overload_real):
13274         Add static to definitions.
13275         * pt.c (add_to_template_args, note_template_header,
13276         processing_explicit_specialization, type_unification_real): Likewise.
13277         ({determine,check}_explicit_specialization): Use a single string for
13278         error messages.
13280 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
13282         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
13283         (expand_end_catch_block): Likewise.
13284         (expand_end_eh_spec): Likewise.
13286 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
13288         * decl.c (duplicate_decls): Handle template specializations
13289         correctly.
13290         * error.c (dump_function_name): Fix printing of specializations of
13291         member functions that are not member templates.
13292         * cp-tree.h (processing_specialization): Make global.
13293         * pt.c (processing_specialization): Likewise.
13294         * lex.c (cons_up_default_function): Save and restore
13295         processing_specialization to avoid confusion.
13297 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
13299         * decl.c (init_decl_processing): Give null_node unknown* type.
13300         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
13301         (common_type): Likewise.
13302         * error.c (args_as_string): Recognize null_node.
13304 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13306         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
13307         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
13309         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
13311         * Make-lang.in (g++): Include prefix.o.
13313 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
13315         * pt.c (determine_explicit_specialization): Initialize "dummy"
13316         to keep Purify quiet.
13318 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
13320         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
13321         (build_overload_int): Not here.
13323 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
13325         * class.c (build_type_pathname): Remove.
13326         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
13328 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
13330         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
13331         &&label GNU extension.
13333 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
13335         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
13336         so as to avoid incorrect manglings.
13337         * method.c (build_decl_overload_real): Don't mangle return types
13338         for constructors.
13340 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
13342         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
13343         scratch_tree_cons): Define as macros for now.
13344         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
13345         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
13346         typeck2.c: Use them and the expression_obstack variants.
13348 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13350         * decl.c (store_return_init): Allow classes with explicit ctors to
13351         be used with the named return values extension.
13353 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
13355         * pt.c (instantiate_decl): Fix previous change.
13357 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
13359         * pt.c (tsubst): Fix thinko.
13360         (instantiate_decl): Really use the original template.
13362         * call.c (build_new_method_call): Use simple constructor_name for
13363         error messages.
13365 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
13367         * method.c (build_underscore_int): Don't use ANSI specific
13368         features.
13370 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
13372         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
13373         for our key method; it might have been inlined by -O3.
13375 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
13377         * decl.c (make_typename_type): Do not try to call lookup_field for
13378         non-aggregate types.
13380 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
13382         * typeck.c (build_reinterpret_cast): Tweak.
13384 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
13386         * typeck.c (build_reinterpret_cast): Converting a void pointer
13387         to function pointer with a reinterpret_cast produces a warning
13388         if -pedantic is issued.
13390 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13392         * typeck.c (c_expand_return): Don't warn about returning a
13393         reference-type variable as a reference.
13395 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
13397         * method.c (build_static_name): Fix typo.
13399 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
13401         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
13402         OLDDECL before we try to do DECL_USE_TEMPLATE.
13404 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13406         * decl.c (duplicate_decls): Don't warn about template instances.
13408         * typeck.c (mark_addressable): Lose ancient code that unsets
13409         DECL_EXTERNAL.
13411         * pt.c (do_decl_instantiation): Lose support for instantiating
13412         non-templates.
13414         * call.c (build_new_function_call): Fix handling of null explicit
13415         template args.
13416         (build_new_method_call): Likewise.
13418 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
13420         * method.c (build_underscore_int): Fix typo.
13422 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
13424         * tree.c (print_lang_statistics): #if 0 call to
13425         print_inline_obstack_statistics until its definition is checked in.
13427 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
13429         * decl2.c (finish_file): Move dump_tree_statistics to end.
13431         * pt.c (instantiate_decl): Look for the original template.
13432         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
13433         of member templates.
13435 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13437         * Makefile.in (g++FAQ.*): New rules.
13438         (CONFLICTS): Update.
13439         * g++FAQ.texi: Moved from libg++.
13441         * parse.y (PFUNCNAME): Only specify the type once.
13443 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
13445         * lex.c (real_yylex): Clean up the code to fully behave the way
13446         the c-lex.c parser does for complex and real numbers.
13448 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13450         * method.c (build_decl_overload_real): Reformat.
13452 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
13454         * method.c (synthesize_method): If at_eof, determine our linkage.
13456 1997-09-29  Paul Eggert  <eggert@twinsun.com>
13458         * lex.c (real_yylex): Treat `$' just like `_', except issue a
13459         diagnostic if !dollars_in_ident or if pedantic.
13461         * lang-specs.h (@c++): -ansi no longer implies -$.
13463         * decl2.c (lang_decode_option):
13464         -traditional and -ansi now do not mess with
13465         dollars_in_ident.
13467 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
13469         * Makefile.in (parse.o, decl.o): Also depend on
13470         $(srcdir)/../except.h $(srcdir)/../output.h.
13471         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
13472         $(srcdir)/../except.h $(srcdir)/../output.h.
13473         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
13474         ../insn-codes.h.
13476         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
13478         * expr.c (cplus_expand_expr): Make it static.
13480         * decl2.c, init.c, typeck.c: Include "expr.h".
13481         (expand_expr): Use proper values when calling the function.
13483 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
13485         * lang-options.h: New -Wold-style-cast flag.
13486         * cp-tree.h (warn_old_style_cast): New variable.
13487         * decl2.c (warn_old_style_cast): Likewise.
13488         (lang_decode_option): Support -Wold-style-cast.
13489         (reparse_absdcl_as_casts): Produce old-style-cast warning.
13491 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13493         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
13494         TREE_USED, reset value based on already_used.
13496         * init.c (expand_member_init): Revert change.
13498 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
13500         * cp-tree.h, decl.c, decl2.c, pt.c:
13501         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
13503         * decl2.c (lang_decode_option): Add missing ;.
13505 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
13507         * friend.c (do_friend): Disable injection for all template-derived
13508         decls.
13509         * decl2.c (lang_decode_option): Handle -fguiding-decls.
13510         * parse.y (notype_template_declarator): New nonterminal.
13511         (direct_notype_declarator): Use it.
13512         (complex_direct_notype_declarator): Likewise.
13513         (object_template_id): Accept any kind of identifier after TEMPLATE.
13514         (notype_qualified_id): Don't add template declarators here.
13516 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
13518         * call.c (add_template_candidate): Add explicit_targs parameter.
13519         (build_scoped_method_call): Use it.
13520         (build_overload_call_real): Likewise.
13521         (build_user_type_conversion_1): Likewise.
13522         (build_new_function_call): Likewise.
13523         (build_object_call): Likewise.
13524         (build_new_op): Likewise.
13525         (build_new_method_call): Likewise.
13526         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
13527         (build_new_method_call): Likewise.
13529         * class.c (finish_struct_methods): Add specialization pass to
13530         determine which methods were specializing which other methods.
13531         (instantiate_type): Handle TEMPLATE_ID_EXPR.
13533         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
13535         * cp-tree.h (name_mangling_version): New variable.
13536         (flag_guiding_decls): Likewise.
13537         (build_template_decl_overload): New function.
13538         (begin_specialization): Likewise.
13539         (reset_specialization): Likewise.
13540         (end_specialization): Likewise.
13541         (determine_explicit_specialization): Likewise.
13542         (check_explicit_specialization): Likewise.
13543         (lookup_template_function): Likewise.
13544         (fn_type_unification): Add explicit_targs parameter.
13545         (type_unification): Likewise.
13547         * decl.c (duplicate_decls): Add smarts for explicit
13548         specializations.
13549         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
13550         specializations.
13551         (grokfndecl): Call check_explicit_specialization.
13553         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
13554         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
13555         (check_classfn): Handle specializations.
13557         * error.c (dump_function_name): Print specialization arguments.
13559         * friend.c (do_friend): Don't call pushdecl for template
13560         instantiations.
13562         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
13564         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
13565         and -fno-guiding-decls.
13567         * lex.c (identifier_type): Return PFUNCNAME for template function
13568         names.
13570         * method.c (build_decl_overload_real): New function.
13571         (build_template_parm_names): New function.
13572         (build_overload_identifier): Use it.
13573         (build_underscore_int): New function.
13574         (build_overload_int): Use it.  Add levels for template
13575         parameters.
13576         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
13577         (build_overload_nested_names): Handle template type parameters.
13578         (build_template_decl_overload): New function.
13580         * parse.y (YYSTYPE): New ntype member.
13581         (nested_name_specifier): Use it.
13582         (nested_name_specifier_1): Likewise.
13583         (PFUNCNAME): New token.
13584         (template_id, object_template_id): New non-terminals.
13585         (template_parm_list): Note specializations.
13586         (template_def): Likewise.
13587         (structsp): Likewise.
13588         (fn.def2): Handle member template specializations.
13589         (component_decl_1): Likewise.
13590         (direct_notype_declarator): Handle template-ids.
13591         (component_decl_1): Likewise.
13592         (direct_notype_declarator): Handle template-ids.
13593         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
13595         * pt.c (processing_specializations): New variable.
13596         (template_header_count): Likewise.
13597         (type_unification_real): New function.
13598         (processing_explicit_specialization): Likewise.
13599         (note_template_header): Likewise.
13600         (is_member_template): Handle specializations.
13601         (end_template_decl): Call reset_specialization.
13602         (push_template_decl): Handle member template specializations.
13603         (tsubst): Likewise.
13604         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
13605         (instantiate_template): Handle specializations.
13606         (instantiate_decl): Likewise.
13607         (fn_type_unification): Handle explicit_targs.
13608         (type_unification): Likewise.  Allow incomplete unification
13609         without an error message, if allow_incomplete.
13610         (get_bindings): Use new calling sequence for fn_type_unification.
13612         * spew.c (yylex): Handle PFUNCNAME.
13614         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
13615         (really_overloaded_fn): Likewise.
13616         (get_first_fn): Handle function templates.
13618         * typeck.c (build_x_function_call): Use really_overloaded_fn.
13619         Handle TEMPLATE_ID_EXPR.
13620         (build_x_unary_op): Likewise.
13621         (build_unary_op): Likewise.
13622         (mark_addressable): Templates whose address is taken are marked
13623         as used.
13625 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13627         * decl.c (init_decl_processing): Declare __builtin_constant_p as
13628         accepting any kind of type, not only int.
13630 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
13632         * search.c (get_matching_virtual): Notice virtual bases when sorrying
13633         about covariant returns.
13635         * parse.y (member_init): Also imply typename here.  Remove ancient
13636         extension for initializing base members.
13638 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13640         Handle multi-level typenames and implicit typename in base list.
13641         * parse.y (typename_sub{,[0-2]}): New rules.
13642         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
13643         (nonnested_type): New rule.
13644         (complete_type_name): Use it.
13645         (base_class.1): Use typename_sub and nonnested_type.
13646         (nested_name_specifier): Don't elide std:: here.
13647         * decl.c (make_typename_type): Handle getting a type for NAME.
13648         (lookup_name_real): Turn std:: into :: here.
13650         Rvalue conversions were removed in London.
13651         * call.c (is_subseq): Don't consider lvalue transformations.
13652         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
13653         (joust): Re-enable ?: kludge.
13655 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
13657         * decl.c (start_function): Up warning of no return type to be a
13658         pedwarn.
13660 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13662         * init.c (expand_member_init): Don't set TREE_USED.
13663         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
13664         set,don't clear TREE_USED wholesale.
13666 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
13668         * call.c (build_over_call): Do require_complete_type before
13669         build_cplus_new.
13671 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
13673         * search.c (lookup_field): Call complete_type in all cases.
13675         * decl.c (finish_function): Just warn about flowing off the end.
13677 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13679         * decl.c (grokparms): Don't bash a permanent list node if we're
13680         in a function.
13682 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
13684         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
13686 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
13688         * call.c (build_new_op): Give better error for syntactically
13689         correct, but semantically invalid, use of undeclared template.
13691         * call.c (compare_qual): Handle pmfs.
13693         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
13694         after the exception spec.
13696 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13698         * call.c (null_ptr_cst_p): Integer type, not integral type.
13700         * call.c (joust): Disable warnings until they can be moved to the
13701         right place.
13703 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
13705         * Makefile.in, config-lang.in:  Convert to autoconf.
13707 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
13709         * decl.c (lookup_name_real): Add implicit 'typename' to types from
13710         base classes.
13712         * pt.c (most_specialized_class): Fix typo.
13713         (tsubst): Move constant folding to TREE_VEC case.
13715 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
13717         * pt.c (do_poplevel): Don't warn about unused local variables
13718         while processing_template_decl since we don't always know whether
13719         or not they will need constructing/destructing.
13721         * pt.c (uses_template_parms): Check the values of an enumeration
13722         type to make sure they don't depend on template parms.
13724         * decl.c (make_typename_type): Don't lookup the field if the
13725         context uses template parms, even if we're not
13726         processing_template_decl at the moment.
13728         * pt.c (coerce_template_parms): Avoid looking at the
13729         TYPE_LANG_DECL portion of a typename type, since there won't be
13730         one.
13731         (tsubst): Do constant folding as necessary to make sure that
13732         arguments passed to lookup_template_class really are constants.
13734 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
13736         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
13737         * decl2.c (finish_file): Only register exception tables if we
13738         need to.
13740         * decl.c (init_decl_processing): Add __builtin_[fs]p.
13742 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13744         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
13746 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
13748         * error.c (dump_decl): Avoid crashing when presented with a
13749         uninitialized constant, as can occur with a template parameter.
13750         (dump_expr): Make sure that there are enough levels of
13751         current_template_parms before we start diving through them.
13753 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
13755         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
13756         c-typeck.c.
13758 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13760         * except.c (expand_throw): Call build_delete for all
13761         exception types, not just objects with destructors.
13763 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
13765         * decl.c (current_local_enum): Remove static.
13766         * pt.c (tsubst_enum): Save and restore value of current_local_enum
13767         in case template is expanded in enum decl.
13768         (instantiate_class_template): Use new tsubst_enum signature.
13769         (tsubst_expr): Likewise.
13771 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
13773         * pt.c (begin_member_template_processing): Take a function as
13774         argument, not a set of template arguments.  Use the template
13775         parameters, rather than the arguments.  Handle non-type parameters
13776         correctly.  Push a binding level for the parameters so that multiple
13777         member templates using the same parameter names can be declared.
13778         (end_member_template_processing): Pop the binding level.
13779         (push_template_decl): Mark member templates as static when
13780         appropriate.
13782         * lex.c (do_pending_inlines): Pass the function, not its template
13783         arguments, to begin_member_template_processing.
13784         (process_next_inline): Likewise.
13785         (do_pending_defargs): Likewise.
13787         * error.c (dump_expr): Obtain the correct declaration for a
13788         TEMPLATE_CONST_PARM.
13790         * call.c (add_template_conv_candidate): New function.
13791         (build_object_call): Handle member templates, as done in the other
13792         build_ functions.
13794 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
13796         * decl.c (replace_defag): Undo previous change.
13797         * lex.c (do_pending_defargs): Deal with member templates.
13799         * pt.c (is_member_template): Avoid crashing when passed a
13800         non-function argument.
13802 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13804         * class.c (grow_method): Remove check for redeclaration.
13806 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
13808         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
13809         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
13810         (PRIMARY_TEMPLATE_P): Use it.
13811         * call.c (build_overload_call_real): Use it.
13812         * class.c (instantiate_type): Likewise.
13813         * decl.c (decls_match): Likewise.
13814         * method.c (build_overload_identifier): Likewise.
13815         * pt.c (push_template_decl): Likewise.
13816         (classtype_mangled_name): Likewise.
13817         (lookup_template_class): Likewise.
13819         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
13820         DECL_NTPARMS to conform to usage elsewhere.
13821         * call.c (add_template_candidate): Likewise.
13822         * class.c (instantiate_type): Likewise.
13823         * pt.c (instantiate_template): Likewise.
13824         (get_bindings): Likewise.
13826         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
13827         is_member_template.
13829         * pt.c (unify): Undo changes to allow multiple levels of template
13830         parameters.
13831         (type_unification): Likewise.
13832         (fn_type_unification): Likewise.
13833         (get_class_bindings): Likewise.
13834         * cp-tree.h (Likewise).
13836         * decl.c (replace_defarg): Check that the type of the default
13837         parameter does not invlove a template type before complaining
13838         about the initialization.
13840         * error.c (dump_expr): Deal with template constant parameters in
13841         member templates correctly.
13843         * pt.c (is_member_template): Deal with class specializations
13844         correctly.
13845         (tsubst): Handle "partial instantiation" of member templates
13846         correctly.
13848 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
13850         * pt.c (type_unification): Change calling sequence to allow for
13851         multiple levels of template parameters.
13852         (tsubst_expr): Likewise.
13853         (tsubst): Likewise.
13854         (tsubst_copy): Likewise.
13855         (instantiate_template): Likewise.
13856         (unify): Likewise.
13857         * call.c (build_overload_call_real): Use it.
13858         (add_builtin_candidate): Use it.
13859         (build_new_method_call): Use it.
13860         * class.c (instantiate_type): Use it.
13861         * decl.c (grokdeclarator): Use it.
13862         * decl2.c (finish_file): Use it.
13863         * method.c (build_overload_identifier): Use it.
13865         * call.c (add_template_candidate):  Add additional parameter for
13866         the function return type.  Call fn_type_unification istead of
13867         type_unification.
13868         (build_user_type_conversion_1): Handle member templates.
13869         (build_new_function_call): Likewise.
13870         (build_new_op): Likewise.
13871         (build_new_method_call): Likewise.
13873         * class.c (grow_method): Don't give an error message indicating
13874         that two member templates with the same name are ambiguous.
13875         (finish_struct): Treat member template functions just like member
13876         functions.
13878         * cp-tree.h (check_member_template): Add declaration.
13879         (begin_member_template_processing): Likewise.
13880         (end_member_template_processing): Likewise.
13881         (fn_type_unification): Likewise.
13882         (is_member_template): Likewise.
13883         (tsubst): Change prototype.
13884         (tsubst_expr): Likewise.
13885         (tsubst_copy): Likewise.
13886         (instantiate_template): Likewise.
13887         (get_bindings): Likewise.
13889         * decl.c (decls_match): Handle multiple levels of template
13890         parameters.
13891         (pushdecl): Handle template type params just like other type
13892         declarations.
13893         (push_class_level_binding): Return immediately if the
13894         class_binding_level is NULL.
13895         (grokfndecl): If check_classfn() returns a member_template, use
13896         the result of the template, not the template itself.
13898         * decl2.c (check_member_template): New function.  Check to see
13899         that the entity declared to be a member template can be one.
13900         (check_classfn): Allow redeclaration of member template functions
13901         with different types; the new functions can be specializations or
13902         explicit instantiations.
13904         * error.c (dump_decl): Handle multiple levels of template
13905         parameters.
13906         (dump_function_decl): Update to handle function templates.
13908         * lex.c (do_pending_inlines): Set up template parameter context
13909         for member templates.
13910         (process_next_inline): Likewise.
13912         * method.c (build_overload_identifier): Adjust for multiple levels
13913         of template parameters.
13915         * parse.y (fn.def2): Add member templates.
13916         (component_decl_1): Likewise.
13918         * pt.c (begin_member_template_processing): New function.
13919         (end_member_template_processing): Likewise.
13920         (is_member_template): Likewise.
13921         (fn_type_unification): Likewise.
13922         (current_template_parms): Return a vector of all the template
13923         parms, not just the innermost level of parms.
13924         (push_template_decl): Deal with the possibility of member
13925         templates.
13926         (lookup_template_class): Likewise.
13927         (uses_template_parms): Likewise.
13928         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
13929         TEMPLATE_CONST_PARM to deal with multiple levels of template
13930         arguments.   Add processing of TEMPLATE_DECL to produce new
13931         TEMPLATE_DECLs from old ones.
13932         (do_decl_instantiation): Handle member templates.
13934         * search.c (lookup_fnfields_1): Handle member template conversion
13935         operators.
13937         * tree.c (cp_tree_equal): Check the levels, as well as the
13938         indices, of TEMPLATE_CONST_PARMs.
13940         * typeck.c (comptypes): Check the levels, as well as the indices,
13941         fo TEMPLATE_TYPE_PARMs.
13942         (build_x_function_call): Treat member templates like member
13943         functions.
13945 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13947         * typeck.c (c_expand_return): Always convert_for_initialization
13948         before checking for returning a pointer to local.
13950         * pt.c (type_unification): If strict and the function parm doesn't
13951         use template parms, just compare types.
13953 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
13955         * method.c (build_overloaded_value): Replace direct call
13956         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
13958 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
13960         * typeck.c (convert_arguments): Don't arbitrarily choose the first
13961         of a set of overloaded functions.
13963 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13965         * lex.c (real_yylex): Don't elide __FUNCTION__.
13967         * method.c (build_overload_value): Add in_template parm.
13968         (build_overload_int): Likewise.
13969         (build_overload_identifier): Pass it.
13971         * decl.c (duplicate_decls): Don't bash a previous template
13972         definition with a redeclaration.
13974         * pt.c (unify): float doesn't match double.
13976         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
13977         TYPE_DECL.  Handle getting non-template types.
13978         * parse.y (explicit_instantiation): Use typespec instead of
13979         aggr template_type.
13981 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
13983         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
13985 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
13987         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
13988         (compare_ics): Likewise.
13990 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
13992         * call.c (joust): Warn about choosing one conversion op over
13993         another because of 'this' argument when the other return type is
13994         better.
13995         (source_type): New fn.
13997         * call.c (build_new_op): Strip leading REF_BIND from first operand
13998         to builtin operator.
14000         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
14001         use its RTL.
14003 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
14005         * call.c (null_ptr_cst_p): Remove support for (void*)0.
14007 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
14009         * typeck.c (expand_target_expr): Make definition match declaration.
14011         * class.c (get_basefndecls): Make definition match declaration.
14013 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
14015         * input.c (sub_getch): Eventually give up and release the input file.
14017         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
14018         right place.
14020         * call.c (joust): Tweak message.
14022 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
14024         * error.c (type_as_string): Put const/volatile on template type
14025         parameters where appropriate.
14027 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
14029         * call.c (strictly_better): Make arguments unsigned ints.
14031 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
14033         * lex.c (real_yylex): Refer to __complex instead of complex.
14035 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
14037         * lex.c (real_yylex): Don't use getc directly.
14039 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
14041         * call.c (is_subseq): Don't try to be clever.
14043 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
14045         * parse.y, pt.c: Include "except.h".
14046         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
14047         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
14048         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
14049         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
14050         prototyping.
14052 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
14054         * decl2.c (mark_vtable_entries): Instead of replacing pure
14055         virtuals with a reference to __pure_virtual, copy the decl and
14056         change the RTL.
14058 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
14060         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
14062         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
14064         * pt.c (instantiate_class_template): Call repo_template_used
14065         before finish_prevtable_vardecl.
14067         * call.c (is_subseq): New fn.
14068         (compare_ics): Use it.
14070         * repo.c (finish_repo): Don't crash on no args.
14072         * parse.y (named_complex_class_head_sans_basetype): Handle
14073         explicit global scope.
14074         * decl2.c (handle_class_head): New fn.
14076         * pt.c (unify): Add CONST_DECL case.
14078 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14080         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
14082         * cp-tree.h (report_type_mismatch): Add prototype.
14083         * call.c (build_overload_call_real): Remove erroneous fourth
14084         argument to report_type_mismatch.
14085         (build_user_type_conversion_1): Remove erroneous second arg to
14086         tourney.
14087         (build_new_function_call): Likewise.
14088         (build_object_call): Likewise.
14089         (build_new_op): Likewise.
14090         (build_new_method_call): Likewise.
14092 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
14094         * error.c (dump_decl): Don't bother processing a function with no
14095         DECL_LANG_SPECIFIC.
14097         * method.c (emit_thunk): Call init_function_start in the macro case.
14099 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
14101         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
14102         defined and used to set flag_vtable_thunks.
14104 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
14106         * parse.y: Don't clear the inlines from their obstack until they've
14107         all been processed.
14109         * decl.c (duplicate_decls): Don't complain about exception
14110         specification mismatch if flag_exceptions is off.
14112 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
14114         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
14116 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
14118         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
14119         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
14120         Include <stdio.h> before include files that formerly used STDIO_PROTO.
14122         * decl.c, g++spec.c, lex.c, method.c, repo.c:
14123         Include "config.h" first, as per autoconf manual.
14125 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
14127         * decl.c (duplicate_decls): Tweak wording.
14128         * lex.c (do_pending_defargs): Don't die if we see a default arg
14129         that isn't a DEFAULT_ARG.
14130         * error.c (dump_expr): Handle DEFAULT_ARG.
14132         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
14133         * lang-options.h: Add -fhandle-exceptions.
14135         * class.c (build_vtable): Vtables are artificial.
14136         (prepare_fresh_vtable): Likewise.
14138 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
14140         * cvt.c (ocp_convert): After converting to the target type, set
14141         LOOKUP_NO_CONVERSION.
14143         * call.c (joust): Warn about potentially confusing promotion rules
14144         with -Wsign-promo.
14145         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
14147 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
14149         * exception.cc: Declare __terminate_func with noreturn attribute.
14151 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
14153         * parse.y: Break out eat_saved_input, handle errors.
14154         (function_try_block): Use compstmt instead of compstmt_or_error.
14156 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
14158         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
14160 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14162         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
14163         existence of cc1plus check whether $(LANGUAGES) contains C++.
14165 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14167         * method.c (do_build_copy_constructor): When copying an anonymous
14168         union member loop around to handle nested anonymous unions.  Use
14169         the offset of the member relative to the outer structure, not the
14170         union.
14172 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
14174         * call.c (resolve_args): New fn.
14175         (build_new_function_call): Use it.
14176         (build_object_call): Likewise.
14177         (build_new_method_call): Likewise.
14179 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
14181         * call.c (build_over_call): tsubst all default parms from templates.
14183 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
14185         * decl.c (struct cp_function): Add static_labelno.
14186         (push_cp_function_context): Save it.
14187         (pop_cp_function_context): Restore it.
14189 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
14191         * typeck.c (build_component_ref_1): Convert from reference.
14193 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14195         * parse.y (current_declspecs, prefix_attributes): Initialize to
14196         NULL_TREE.
14198         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
14199         before we try to force it to be a TREE_LIST.
14200         (decl): Make sure $1.t is non-nil.
14202 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
14204         * pt.c (uses_template_parms): Handle template first-parse codes.
14206         * decl.c (cp_finish_decl): Only warn about user-defined statics.
14208 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
14210         * pt.c (unify): Handle BOOLEAN_TYPE.
14212         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
14213         * pt.c (tsubst): Don't set it.
14214         * call.c (build_over_call): Use uses_template_parms.
14216 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
14218         * method.c (build_overload_nested_name): Use static_labelno
14219         instead of var_labelno.
14220         (build_qualified_name): New fn.
14221         (build_overload_name): Split out from here.
14222         (build_static_name): Use build_qualified_name.
14223         * decl.c (cp_finish_decl): Statics in extern inline functions
14224         have comdat linkage.
14225         (start_function): Initialize static_labelno.
14227 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14229         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
14230         before "all member functions in class [] are private".
14232 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
14234         * lex.c (do_scoped_id): convert_from_reference.
14235         * init.c (build_offset_ref): Likewise.
14237 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
14239         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
14241 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
14243         * typeck.c (get_member_function_from_ptrfunc): Promote index
14244         before saving it.
14246 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
14248         * tree.c (layout_basetypes): Move non-virtual destructor warning.
14249         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
14251 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14253         * decl.c (grokdeclarator): Call add_defarg_fn for the function
14254         type, too.
14255         * lex.c (add_defarg_fn): Adjust.
14256         (do_pending_defargs): Adjust.  Don't skip the first parm.
14258 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
14260         * decl.c (build_enumerator): Global enumerators are also readonly.
14262         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
14263         (build_dynamic_cast): Call it and convert_from_reference.
14265         * lex.c (add_defarg_fn): New fn.
14266         (snarf_defarg): Don't add to defarg_types.
14267         (do_pending_defargs): Lose defarg_types.  All fns we process now
14268         have defargs.
14269         * decl.c (grokfndecl): Call add_defarg_fn.
14271         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
14272         * cp-tree.def: Add DEFAULT_ARG.
14273         * spew.c (yylex): Call snarf_defarg as appropriate.
14274         * parse.y: New tokens DEFARG and DEFARG_MARKER.
14275         (defarg_again, pending_defargs, defarg, defarg1): New rules.
14276         (structsp): Use pending_defargs.
14277         (parms, full_parm): Use defarg.
14278         * lex.c (init_lex): Initialize inline_text_firstobj.
14279         (do_pending_inlines): Never pass the obstack to feed_input.
14280         (process_next_inline): Call end_input instead of restore_pending_input.
14281         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
14282         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
14283         * input.c (end_input): New fn.
14284         (sub_getch): At the end of some fed input, just keep returning EOF
14285         until someone calls end_input.
14286         Remove 'obstack' field from struct input_source.
14287         * decl.c (grokparms): Handle DEFAULT_ARG.
14288         (replace_defarg): New fn.
14289         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
14291 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14293         * call.c (implicit_conversion): If nothing else works, try binding
14294         an rvalue to a reference.
14296 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
14298         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
14299         ifndef for Cygwin32 to include SIGSEGV.
14301 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
14303         * class.c (finish_struct_1): Only complain about pointers without
14304         copy stuff if there are any constructors.
14306         * rtti.c (build_dynamic_cast): Call complete_type on the types.
14308         * decl.c (grokfndecl): If the function we chose doesn't actually
14309         match, die.
14311         * decl2.c (grokclassfn): Don't specify 'const int' for the
14312         artificial destructor parm.
14314         * pt.c (type_unification): If we are called recursively, nothing
14315         decays.
14317 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
14319         * decl.c (init_decl_processing): Stop trying to catch signals
14320         other than SIGABRT since the Cygwin32 library doesn't support
14321         them correctly yet.  This fixes a situation in which g++ causes
14322         a hang on SIGSEGVs and other such signals in our Win32-hosted
14323         tools.
14325 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
14327         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
14329 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
14331         * typeck2.c (store_init_value): Always return the value if our
14332         type needs constructing.
14334         * method.c (hack_identifier): Convert class statics from
14335         reference, too.
14337 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
14339         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
14341 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
14343         * typeck.c (c_expand_return): Make sure we clean up temporaries at
14344         the end of return x;
14346 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14348         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
14350 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
14352         * except.c (expand_builtin_throw): Add support
14353         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
14355 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
14357         * repo.c (extract_string): Null-terminate.
14359         * cp-tree.h (TI_SPEC_INFO): New macro.
14360         (CLASSTYPE_TI_SPEC_INFO): New macro.
14361         * pt.c (push_template_decl): Correctly determine # of template parms
14362         for partial specs.
14364         * call.c (compare_ics): Really fix 'this' conversions.
14366         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
14367         non-template fn.
14369         * pt.c (push_template_decl): Complain about mismatch in # of
14370         template parms between a class template and a member template.
14372 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
14374         * method.c (synthesize_method): You can't call
14375         function_cannot_inline_p after finish_function.
14376         * decl.c (finish_function): Turn on flag_inline_functions and turn
14377         off DECL_INLINE before handing a synthesized method to the
14378         backend.
14380 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14382         * method.c (synthesize_method): Remove July 30 change to never set
14383         DECL_INLINE if at_eof.
14385 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
14387         * xref.c (GNU_xref_member): Ensure that the node has a
14388         decl_lang_specific part before checking DECL_FRIEND_P.
14390 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
14392         * pt.c (instantiate_class_template): Diagnose non-class types used
14393         as bases.
14395 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
14397         * typeck.c (build_conditional_expr): Use convert_for_initialization
14398         instead of convert_and_check.
14400 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14402         * parse.y (typespec): Don't pedwarn for typeof.
14404 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
14406         * repo.c (finish_repo): Only check changes if we would write a
14407         repo file.
14409         * call.c (compare_ics): Fix handling of 'this' conversions.
14411         * pt.c (do_decl_instantiation): Support static data too.  Rename
14412         from do_function_instantiation.
14413         * cp-tree.h: Adjust.
14414         * parse.y: Adjust.
14416         * repo.c (extract_string): New fn.
14417         (get_base_filename): Use it.
14418         (init_repo): Compare old args with current args.
14420 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
14422         * Makefile.in, Make-lang.in: Protect C-ls with a comment
14423         character, idea from Paul Eggert <eggert@twinsun.com>.
14425 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
14427         * typeck.c (c_expand_return): Be more persistent in looking for
14428         returned temps.
14430         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
14431         pointer to reference.
14433         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
14435 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
14437         * init.c (build_member_call, build_offset_ref):
14438         Use do_scoped_id instead of do_identifier.
14440         * cvt.c (convert): Remove bogosity.
14442 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14444         * cvt.c (build_up_reference): Do checks of ARGTYPE and
14445         TARGET_TYPE before trying to use get_binfo.
14447 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
14449         * cvt.c (build_up_reference): Call get_binfo to get access control.
14451         * decl2.c (import_export_decl): If we don't support weaks, leave
14452         statics undefined.
14454 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
14456         * except.c (expand_builtin_throw): Add support for machines that
14457         cannot access globals after throw's epilogue when
14458         -fno-sjlj-exceptions is used.
14460 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
14462         * parse.y: 'std::' becomes '::'.
14463         * lex.c (real_yylex): Remove 'namespace' warning.
14464         * init.c (build_member_call): Ignore 'std::'.
14465         (build_offset_ref): Likewise.
14466         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
14467         (do_toplevel_using_decl): Ignore 'using std::whatever'.
14468         * decl.c (push_namespace): Just sorry.
14469         (pop_namespace): Nop.
14470         (init_decl_processing): Declare std namespace.
14472 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
14474         * search.c (push_class_decls): A name which ambiguously refers to
14475         several instantiations of the same template just refers to the
14476         template.
14478 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
14480         * decl.c (build_enumerator): Fix problem with unsigned long
14481         enumerated values being smashed to ints, causing overflow
14482         when computing next enumerated value (for enum values around
14483         MAX_VAL).
14485 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
14487         * typeck.c (build_component_ref): Only call mark_used on a decl.
14489 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14491         * typeck.c (build_c_cast): Make the check for a ptr to function
14492         more specific before possible default_conversion call.
14494 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
14496         * except.c (expand_exception_blocks): Simplify and fix and make
14497         sure we don't end a region in a sequence, as expand_end_bindings
14498         doesn't like it.
14500 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
14502         * except.c (init_exception_processing): Mark terminate as not
14503         returning so that the optimizer can optimize better.
14505 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
14507         * cvt.c (convert): Don't do any extra work, if we can avoid it
14508         easily.
14510 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
14512         * *.[chy]: Change cp_convert to ocp_convert, change convert to
14513         cp_convert.  convert is now reserved for the backend, and doesn't
14514         have the semantics a frontend person should ever want.
14516 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
14518         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
14519         Lose -traditional support.
14521 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14523         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
14525         * parse.y (self_reference): Do it for templates, too.
14526         * class.c (pushclass): Don't overload_template_name; the alias
14527         generated by build_self_reference serves the same purpose.
14529         * tree.c (list_hash): Make static, take more args.
14530         (list_hash_lookup): Likewise.
14531         (list_hash_add): Make static.
14532         (list_hash_canon): Lose.
14533         (hash_tree_cons): Only build a new node if one isn't already in the
14534         hashtable.
14535         (hash_tree_chain): Use hash_tree_cons.
14536         * cp-tree.h: Adjust.
14537         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
14538         of calling lookup_name.
14540 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
14542         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
14543         doesn't refer to the CONST_DECLs.
14545 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
14547         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
14548         is bigger.
14549         (expand_class_desc): Convert the last argument to a sizetype.
14551 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14553         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
14554         __real__): Add reswords.
14555         * hash.h: Regenerate.
14556         * lex.h (rid): Add RID_COMPLEX.
14557         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
14558         * lex.c (init_lex): Add building of RID_COMPLEX.
14559         (real_yylex): General cleanup in line with what c-lex.c also has,
14560         sans the cruft for traditional; add handling of SPEC_IMAG, complex
14561         types, and imaginary numeric constants.
14562         * parse.y (REALPART, IMAGPART): Add tokens.
14563         (unary_expr): Add REALPART and IMAGPART rules.
14564         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
14565         * decl.c (complex_{integer,float,double,long}_type_node): Define
14566         types.
14567         (init_decl_processing): Set up the types.
14568         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
14569         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
14570         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
14571         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
14572         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
14573         COMPLEX_TYPE case.
14574         * method.c (build_overload_name): Add handling of the different
14575         COMPLEX_TYPEs, prefixing them with `J'.
14576         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
14577         as a template parm.
14578         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
14579         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
14580         (mapcar): Handle COMPLEX_CST.
14581         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
14582         (common_type): Add code for complex types.
14583         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
14584         (convert_for_assignment): Likewise.
14585         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
14587 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
14589         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
14590         tsubst_expr, as it might try to do overload resolution.
14592 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
14594         * pt.c (instantiate_class_template): Oops.
14596 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
14598         * cp-tree.def: Add TAG_DEFN.
14599         * pt.c (tsubst_enum): New fn.
14600         (instantiate_class_template): Use it.
14601         (tsubst_expr): Support TAG_DEFN.
14602         (tsubst): Support local enums.
14603         (tsubst_copy): Likewise.
14604         * decl.c (finish_enum): Likewise.
14605         (start_enum): If this is a local enum, switch to permanent_obstack.
14607 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
14609         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
14610         (finish_function): Put the base init code for constructors just
14611         after the parm cleanup insns.
14612         (struct cp_function): Add last_parm_cleanup_insn.
14613         (push_cp_function_context): Likewise.
14614         (pop_cp_function_context): Likewise.
14616 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
14618         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
14620 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14622         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
14623         for THUNK_FNDECL before we switch to temporary allocation.
14625 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
14627         * call.c (build_new_op): Handle null arg2 for ?:.
14629 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
14631         * except.c (expand_exception_blocks): Ensure that we flow through
14632         the end of the exception region for the exception specification.
14633         Move exception region for the exception specification in, so that
14634         it doesn't protect the parm cleanup.  Remove some obsolete code.
14635         * decl.c (store_parm_decls): Likewise.
14636         (finish_function): Likewise.
14638 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
14640         * init.c (build_new): Fix nothrow handling.
14642 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14644         * init.c (emit_base_init): Don't warn about the initialization
14645         list for an artificial member.
14647 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14649         * expr.c (do_case): Handle !START case for the error msg.
14651 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
14653         * decl2.c, lang-options.h: New option -Weffc++.
14654         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
14655         to -Weffc++.
14657         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
14658         to MULTIPLE_SYMBOL_SPACES.
14660 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
14662         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
14664         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
14666         * typeck.c (c_expand_return): Don't complain about returning void
14667         to void in an artificial function.
14668         * method.c (make_thunk): Change settings of READONLY/VOLATILE,
14669         don't set DECL_RESULT, set DECL_ARTIFICIAL.
14670         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
14672 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
14674         * init.c (init_decl_processing): Add support for setjmp/longjmp based
14675         exception handling.
14676         * except.c (init_exception_processing): Likewise.
14677         (expand_end_catch_block): Likewise.
14678         (expand_exception_blocks): Likewise.
14679         (expand_throw): Likewise.
14680         * exception.cc (__default_terminate): Likewise.
14682         * init.c (perform_member_init): Use new method of expr level
14683         cleanups, instead of cleanups_this_call and friends.
14684         (emit_base_init): Likewise.
14685         (expand_aggr_vbase_init_1): Likewise.
14686         (expand_vec_init): Likewise.
14687         * decl.c (cp_finish_decl): Likewise.
14688         (expand_static_init): Likewise.
14689         (store_parm_decls): Likewise.
14690         (cplus_expand_expr_stmt): Likewise.
14691         * decl2.c (finish_file): Likewise.
14693         * Make-lang.in (exception.o): Ok to compile with -O now.
14695         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
14696         we know it will be done later by the backend.
14698         * decl2.c (lang_f_options): Remove support for short temps.
14699         * lang-options.h: Likewise.
14701 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
14703         * tree.c (varargs_function_p): New fn.
14704         * method.c (emit_thunk): Replace broken generic code with code to
14705         generate a heavyweight thunk function.
14707 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
14709         * pt.c (process_template_parm): pedwarn about floating-point parms.
14711         * decl.c (grokdeclarator): inline no longer implies static.
14713         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
14715 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
14717         * class.c (check_for_override): The signature of an overriding
14718         function is not changed.
14720         * call.c (build_over_call): Move setting of conv into the loop.
14721         Note: this change, along with the related changes of the 18th thru
14722         the 20th of April, fix an infinite loop problem in conversions.
14724 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
14726         * call.c (build_user_type_conversion_1): Really ignore rvalue
14727         conversions when looking for a REFERENCE_TYPE.
14729         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
14730         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
14731         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
14732         (build_unary_op): Likewise.
14733         * call.c (build_over_call): See through a CONVERT_EXPR around the
14734         ADDR_EXPR for on a temporary.
14735         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
14736         the ADDR_EXPR for a local variable.
14738 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
14740         * call.c (build_user_type_conversion_1): If we're trying to
14741         convert to a REFERENCE_TYPE, only consider lvalue conversions.
14742         (build_new_function_call): Print candidates.
14743         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
14744         (reference_binding): Binding a temporary of a reference-related type
14745         is BAD.
14747 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14749         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
14750         * tinfo2.cc (type_info::before): Likewise.
14752 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
14754         * call.c (implicit_conversion): Oops.
14756 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
14758         * call.c (implicit_conversion): Try to find a reference conversion
14759         before binding a const reference to a temporary.
14761 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
14763         * exception.cc (__default_unexpected): Call terminate by default,
14764         so that if the user overrides terminate, the correct function will
14765         be called.
14767 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
14769         * parse.y (left_curly): Avoid trying to use any fields of
14770         error_mark_node, as there aren't any.
14772 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
14774         * lex.c (do_identifier): Avoid breaking on overloaded methods
14775         as default arguments.
14777 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
14779         * call.c (add_template_candidate): Initialize the variable "dummy".
14781 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
14783         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
14784         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
14786 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14788         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
14789         (debug_binfo): Delete decl, not needed.
14791         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
14792         promotes_to_aggr_type): Delete fns.
14793         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
14794         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
14795         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
14797         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
14799         * friend.c (is_friend_type): Delete fn.
14800         * cp-tree.h (is_friend_type): Delete decl.
14802         * decl.c (original_result_rtx, double_ftype_double,
14803         double_ftype_double_double, int_ftype_int, long_ftype_long,
14804         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
14805         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
14807         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
14808         fwd decls.
14809         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
14811         * decl.c (pushdecl_nonclass_level): #if 0, unused.
14812         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
14814         * lex.c (reinit_lang_specific): #if 0, unused.
14815         * cp-tree.h (reinit_lang_specific): #if 0 decl.
14817         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
14818         * cp-tree.h (revert_static_member_fn): Delete decl.
14820         * class.c (root_lang_context_p): Delete fn.
14821         * cp-tree.h (root_lang_context_p): Delete decl.
14823         * decl.c (set_current_level_tags_transparency): #if 0, unused.
14824         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
14826         * lex.c (set_vardecl_interface_info): Make static.
14827         * cp-tree.h (set_vardecl_interface_info): Delete decl.
14829         * call.c (find_scoped_type): Make static.
14830         * cp-tree.h (find_scoped_type): Delete decl.
14832         * search.c (convert_pointer_to_vbase): Make static.
14833         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
14835         * decl.c (const_ptr_type_node): Likewise.
14836         * cp-tree.h (const_ptr_type_node): Delete decl.
14838         * typeck.c (common_base_type): Make static.
14839         * cp-tree.h (common_base_types): Delete erroneous decl.
14841         * pt.c (classtype_mangled_name): Make static.
14842         * cp-tree.h (classtype_mangled_name): Delete decl.
14844         * lex.c (check_newline): Make static.
14845         * cp-tree.h (check_newline): Delete decl.
14847         * typeck.c (build_x_array_ref): Delete fn, same idea as
14848         grok_array_decl.
14849         * cp-tree.h (build_x_array_ref): Delete decl.
14851         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
14852         copy_lang_decl.
14853         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
14855         * class.c (build_vtable_entry): Make static.
14856         * cp-tree.h (build_vtable_entry): Delete decl.
14858         * class.c (build_vbase_pointer): Make static.
14859         * cp-tree.h (build_vbase_pointer): Delete decl.
14861         * sig.c (build_sptr_ref): Add forward decl and make static.
14862         * cp-tree.h (build_sptr_ref): Delete decl.
14864         * call.c (build_new_method_call): Add forward decl and make static.
14865         * cp-tree.h (build_new_method_call): Delete decl.
14867         * call.c (build_object_call): Make static.
14868         * class.c (check_for_override, complete_type_p, mark_overriders):
14869         Likewise.
14870         * decl.c (cp_function_chain): Likewise.
14871         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
14872         Likewise.
14873         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
14874         Likewise.
14875         * tree.c (build_cplus_array_type_1): Likewise.
14876         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
14877         (comp_target_parms): Likewise.
14879         * init.c (build_builtin_call): Make static.
14880         * cp-tree.h (build_builtin_call): Delete decl.
14882         * typeck.c (binary_op_error): Delete decl.
14883         * cp-tree.h (binary_op_error): Likewise.
14885 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14887         * call.c (build_method_call): Compare against error_mark_node
14888         directly, rather than the ERROR_MARK tree code.
14889         * cvt.c (cp_convert): Likewise.
14890         * decl.c (print_binding_level): Likewise.
14891         (duplicate_decls): Likewise.
14892         (grokdeclarator): Likewise.
14893         (grokdeclarator): Likewise.
14894         * init.c (expand_aggr_init_1): Likewise.
14895         (decl_constant_value): Likewise.
14896         * method.c (build_opfncall): Likewise.
14897         (hack_identifier): Likewise.
14898         * typeck.c (build_modify_expr): Likewise.
14900         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
14902 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14904         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
14906         * pt.c (coerce_template_parms): Add new error message.
14908         * method.c (build_overload_value): Implement name mangling for
14909         floating-point template arguments.
14911         * method.c (build_overload_int, icat, dicat): Fix mangling of template
14912         arguments whose absolute value doesn't fit in a signed word.
14914 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14916         * friend.c: New file; put all of the friend stuff in here.
14917         * init.c: Instead of here.
14918         * Makefile.in (CXX_OBJS): Add friend.o.
14919         (friend.o): Add dependencies.
14920         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
14922 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
14924         * call.c (build_scoped_method_call): Complain if the scope isn't a
14925         base.
14927 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
14929         * parse.y (left_curly): Don't crash on erroneous type.
14931         * init.c (build_delete): Fix type of ref.
14933 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
14935         * search.c (get_vbase_1): Renamed from get_vbase.
14936         (get_vbase): Wrapper, now non-static.
14937         (convert_pointer_to_vbase): Now static.
14939         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
14940         * init.c (build_delete): Pass one.
14941         (build_partial_cleanup_for): Use build_scoped_method_call.
14942         * decl.c (finish_function): Pass a binfo.
14944 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14946         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
14948         * typeck.c (build_c_cast): Lose other reference to flag.
14950         * call.c (build_field_call): Don't look for [cd]tor_identifier.
14951         * decl2.c (delete_sanity): Remove meaningless use of
14952         LOOKUP_HAS_IN_CHARGE.
14953         * decl.c (finish_function): Use build_scoped_method_call instead
14954         of build_delete for running vbase dtors.
14955         * init.c (build_delete): Call overload resolution code instead of
14956         duplicating it badly.
14958 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
14960         * call.c (build_over_call): Call mark_used before trying to elide
14961         the call.
14963         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
14965 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14967         * typeck.c (build_modify_expr): Always pedwarn for a cast to
14968         non-reference used as an lvalue.
14970 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
14972         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
14974 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
14976         * parse.y (handler): Fix template typo.
14978 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14980         * error.c (lang_decl_name): New fn.
14981         * tree.c (lang_printable_name): Use it.
14983 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
14985         * g++spec.c: Include config.h so that we can catch bzero #defines
14986         from the config file.
14988 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
14990         * new1.cc: Include a declaration for malloc, to avoid warning, and
14991         avoid lossing on systems that require one (ones that define malloc
14992         in xm.h).
14994 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14996         * decl2.c (max_tinst_depth): New variable.
14997         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
14998         option.
14999         * pt.c (max_tinst_depth): Variable moved.
15000         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
15001         as legal.
15003 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
15005         * decl.c (xref_basetypes): Allow a base class that depends on
15006         template parms to be incomplete.
15008         * decl2.c (build_expr_from_tree): Support typeid(type).
15009         * rtti.c (get_typeid): Support templates.
15010         (expand_si_desc, expand_class_desc): Fix string length.
15011         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
15013 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
15015         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
15017         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
15019 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
15021         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
15022         smashes together template and non-template decls of the same
15023         signature.
15025 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
15027         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
15029 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15031         * decl.c (duplicate_decls): Next route, pedwarn about different
15032         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
15034 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15036         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
15037         (struct lang_type): Delete has_default_implementation member.
15038         Increase dummy to 21.
15039         * decl.c (start_method): Delete usage.
15041         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
15042         store_after_parms, start_decl_1, auto_function): Add decls.
15043         (get_arglist_len_in_bytes, declare_implicit_exception,
15044         have_exceptions_p, make_type_decl, typedecl_for_tag,
15045         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
15046         build_component_type_expr, cplus_exception_name,
15047         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
15048         * call.c (build_this): Make static.
15049         (is_complete): Likewise.
15050         (implicit_conversion): Likewise.
15051         (reference_binding): Likewise.
15052         (standard_conversion): Likewise.
15053         (strip_top_quals): Likewise.
15054         (non_reference): Likewise.
15055         (build_conv): Likewise.
15056         (user_harshness): Likewise.
15057         (rank_for_ideal): Likewise.
15058         * decl.c (start_decl_1): Delete forward decl.
15059         (push_decl_level): Make static.
15060         (resume_binding_level): Make static.
15061         (namespace_bindings_p): Make static.
15062         (declare_namespace_level): Make static.
15063         (lookup_name_real): Make static.
15064         (duplicate_decls): Make static.  Take register off NEWDECL and
15065         OLDDECL parm decls.
15066         * decl2.c (get_sentry): Make static.
15067         (temp_name_p): Delete fn.
15068         * except.c (auto_function): Delete decl.
15069         * lex.c (handle_{cp,sysv}_pragma): Make static.
15070         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
15071         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
15072         * pt.c (tsubst_expr_values): Make static.
15073         * rtti.c (combine_strings): Delete decl.
15075 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
15077         * pt.c (push_template_decl): Handle getting a typedef.
15079         * call.c (build_new_function_call): Complain about void arg.
15081 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15083         * decl.c (duplicate_decls): Give pedwarn of different exceptions
15084         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
15086 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
15088         * except.c (expand_throw): Don't expand the cleanup tree here,
15089         since we are not going to write the rtl out.  Fixes problem with
15090         -g -O on SPARC.
15092 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
15094         * Make-lang.in: Add $(exeext) as necessary.
15096 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
15098         * parse.y (handler_seq): Must have at least one catch clause.
15100 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
15102         * call.c (add_builtin_candidate): Restore ?: hack.
15104         * decl.c (grok_op_properties): More warnings.
15106 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15108         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
15109         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
15111         * decl.c (duplicate_decls): Scale back to a warning, and only do
15112         'em if -pedantic.
15114 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
15116         * decl.c (duplicate_decls): pedwarn mismatched exception
15117         specifications.
15119 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
15121         * call.c (build_new_method_call): Don't display the invisible
15122         argument for controlling virtual bases.
15124 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
15126         * new: Add nothrow new and delete, bad_alloc and throw specifications
15127         for delete.
15128         * decl.c (init_decl_processing): Add throw specification for delete.
15129         * new.cc (nothrow): Define.
15130         * lex.c (real_yylex): Removing warning that throw and friends are
15131         keywords.
15132         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
15133         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
15134         * Make-lang.in: Add new{1,2}.{cc,o}.
15136 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
15138         * lex.c (cons_up_default_function): Fix return type of synth op=.
15140         * init.c (emit_base_init): Add warnings for uninitialized members
15141         and bases.
15143         * decl.c (xref_basetypes): Add warning for non-polymorphic type
15144         with destructor used as base type.
15146         * decl.c (grok_op_properties): Add warning for op= returning void.
15147         * typeck.c (c_expand_return): Add warning for op= returning anything
15148         other than *this.
15150         * class.c (finish_struct_1): Add warning for class with pointers
15151         but not copy ctor or copy op=.
15153         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
15154         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
15155         (instantiate_template): If -fexternal-templates, add this
15156         instantiation to pending_templates.
15158         * decl2.c (copy_assignment_arg_p): Disable old hack to support
15159         Booch components.
15161 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
15163         * cvt.c (cp_convert): pedwarn enum to pointer conversions.
15165 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
15167         * call.c (standard_conversion): Handle getting references.  Tack
15168         on RVALUE_CONV here.  Do it for non-class types, too.
15169         (reference_binding): Pass references to standard_conversion.
15170         (implicit_conversion): Likewise.
15171         (add_builtin_candidate): Disable one ?: kludge.
15172         (convert_like): Handle RVALUE_CONVs for non-class types.
15173         (joust): Disable the other ?: kludge.
15175 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15177         * decl.c (init_decl_processing): Add code to build up common
15178         function types beforehand, to avoid creation then removal of
15179         things already in the hash table.
15181 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
15183         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
15184         the arguments.
15186         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
15187         current_template_parms.
15189 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
15191         * search.c (lookup_field): Don't return a function, check want_type.
15193 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15195         * init.c (build_new): Make sure PLACEMENT has a type.
15197 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
15199         * init.c (build_new): Support new (nothrow).
15201 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
15203         * pt.c (instantiate_decl): Also do push_to_top_level before setting
15204         up DECL_INITIAL.
15206         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
15207         * pt.c (tsubst): Defer instantiation of default args.
15208         * call.c (build_over_call): Until here.
15210 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15212         * search.c (lookup_field): Make sure we have an
15213         IDENTIFIER_CLASS_VALUE before we try to return it.
15215 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15217         * call.c (build_method_call): Delete unused var PARM.
15218         (build_overload_call_real): Likewise.
15219         (build_object_call): Delete unused var P.
15220         (build_new_op): Likewise.
15221         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
15222         var definitions, which are never used.
15223         (shadow_tag): Delete unused var FN.
15224         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
15225         * init.c (build_new): Delete unused var ALLOC_TEMP.
15226         * method.c (hack_identifier): Delete unused var CONTEXT.
15227         (do_build_copy_constructor): Delete unused var NAME.
15228         (synthesize_method): Delete unused var BASE.
15229         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
15230         * rtti.c (build_headof): Delete unused var VPTR.
15231         (get_typeid): Delete unused var T.
15232         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
15233         and ORIG_OP2.
15234         (build_ptrmemfunc): Delete unused vars U and NINDEX.
15235         * typeck2.c (build_functional_cast): Delete unused var BINFO.
15237 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
15239         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
15240         things in a type being defined.
15241         * decl.c (finish_enum): Reverse the values so that they are in
15242         the correct order.
15244         * pt.c (instantiate_class_template): Don't initialize
15245         BINFO_BASETYPES until the vector is filled out.
15246         (unify): Don't abort on conflicting bindings, just fail.
15247         (instantiate_decl): Do push_tinst_level before any tsubsting.
15249         * method.c (build_overload_value): Handle getting a
15250         TEMPLATE_CONST_PARM for a pointer.
15252 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
15254         * init.c (expand_member_init): Don't give 'not a base' error for
15255         templates.
15257         * pt.c (instantiate_decl): Call import_export_decl later.
15259         * pt.c (instantiate_class_template): Return a value.
15261         * parse.y (extension): New rule for __extension__.
15262         (extdef, unary_expr, decl, component_decl): Use it.
15264 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
15266         * class.c (base_binfo): Remove unused base_has_virtual member.
15267         (finish_base_struct): Likewise.
15268         (finish_struct_1): Likewise.
15270 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
15272         * search.c (expand_upcast_fixups): Fix bogus code generation
15273         problem where the generated code uses the wrong index into the
15274         runtime built vtable on the stack.  Old code could clobber random
15275         stack values.
15277 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
15279         * init.c (perform_member_init): Make sure the partial EH cleanups
15280         live on the function_obstack.
15282 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
15284         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
15285         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
15287 Tue Dec 24 10:24:03 1996  Jeffrey A Law  <law@cygnus.com>
15289         * decl.c (grokvardecl): Avoid ANSI style initialization.
15291 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
15293         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
15295 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
15297         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
15299 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15301         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
15302         arguments we compare against.  Start the count of I at 1, not 0,
15303         since argv[0] is still the command.
15305 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
15307         * lang-specs.h: Accept .cp as an C++ extension.
15309 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15311         * cp-tree.h (ptr_reasonably_similar): Add decl.
15313 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15315         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
15316         pointer.  New local SPECBITS with the parm's value.
15317         (grokdeclarator): Pass &specbits down.
15319         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
15320         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
15322         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
15323         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
15325         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
15326         not an error_mark_node.
15328 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
15330         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
15331         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
15333 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
15335         * decl.c (grokdeclarator): When giving an anonymous struct a name,
15336         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
15337         not affected).
15339         * typeck2.c (build_m_component_ref): If component is a pointer
15340         to data member, resolve the OFFSET_REF now.
15342         * call.c (convert_like): Don't go into infinite recursion.
15344         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
15346         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
15347         * tree.c (layout_basetypes): And on the vbase ptr.
15349 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15351         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
15352         CHAR_TYPE_SIZE so bool is always the same size as another type.
15354         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
15356 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
15358         * decl2.c (grok_x_components): Remove synthesized methods from
15359         TYPE_METHODS of an anonymous union, complain about member
15360         functions.
15361         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
15362         anonymous unions.
15363         (finish_function): Just clear the DECL_RTL of our arguments.
15365 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15367         * decl2.c (finish_file): Emit DWARF debugging info for static data
15368         members.
15370         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
15372 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
15374         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
15375         IDENTIFIER_NODE.
15377 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
15379         * Make-lang.in (g++-cross$(exeext)): Fix typo.
15381 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15383         Make the g++ driver now be a standalone program, rather than one
15384         that tries to run the gcc driver after munging up the options.
15385         * Make-lang.in (g++.c, g++spec.o): New rules.
15386         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
15387         added.
15388         (g++$(exeext)): New rule, based on xgcc rule.
15389         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
15390         * g++spec.c: New file.
15391         * g++.c: Removed file.
15393 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
15395         * cvt.c (build_up_reference): Arrange for any temporary values
15396         that have been keep in registers until now to be put into memory.
15398 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15400         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
15401         that make -j3 bootstrap works better.
15403 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
15405         * decl.c (pushtag): Do pushdecl for anon tags.
15407 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
15409         * typeck.c (c_expand_return): Fix logic.
15410         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
15412 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
15414         * g++.c (main): Make sure arglist has a final NULL entry.  Add
15415         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
15416         stdin/stdout of the invoked program are redirected to
15417         nowheresville.
15419 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
15421         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
15423 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
15425         * init.c (resolve_offset_ref): Handle obj.vfn better.
15426         * typeck.c (build_component_ref): Set TREE_TYPE on result from
15427         build_vfn_ref.
15429 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
15431         * typeck.c (convert_for_assignment): Also handle anachronistic
15432         implicit conversions from (::*)() to cv void*.
15433         * cvt.c (cp_convert_to_pointer): Likewise.
15435 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
15437         * lex.c (handle_cp_pragma): Fix bogus warning.
15439 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
15441         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
15442         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
15444 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15446         * class.c (finish_struct_1): Support DWARF2_DEBUG.
15447         * search.c (dfs_debug_mark): Likewise.
15448         * decl2.c (finish_vtable_vardecl): Likewise.
15449         * decl.c (pushtag, finish_enum): Likewise.
15450         * lex.c (check_newline): Use debug_* instead of calling *out
15451         functions directly.
15453 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15455         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
15456         on some picky hosts.
15458 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15460         * class.c (finish_struct_1): A class has a non-trivial copy
15461         constructor if it has virtual functions.
15463         * cvt.c (cp_convert): Always call a constructor.
15465         * call.c (reference_binding): Still tack on a REF_BIND
15466         for bad conversions.
15467         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
15469         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
15470         (c_expand_return): Likewise.
15471         * typeck2.c (digest_init): Likewise for { }.
15472         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
15473         * cvt.c (cp_convert): Handle failure better.
15475 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15477         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
15478         of GCC be path-relative.
15480 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
15482         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
15483         it does need choose-temp.o and pexecute.o.
15485 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15487         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
15488         that we still use it.
15489         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
15491 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
15493         * init.c (expand_default_init): Avoid calling constructors to
15494         initialize reference temps.
15496         * cvt.c (convert_to_reference): Fix.
15498 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15500         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
15501         (convert_to_reference): Likewise.
15502         * typeck.c (convert_for_initialization): Likewise.
15503         * init.c (expand_default_init): Likewise.
15504         (expand_aggr_init_1): Likewise.
15505         * cp-tree.h (CONV_NONCONVERTING): Lose.
15506         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
15507         * *.c: Adjust.
15508         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
15510 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
15512         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
15514 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15516         * init.c (expand_aggr_init_1): Don't crash on non-constructor
15517         TARGET_EXPR.
15519 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15521         * g++.c: Include gansidecl.h.
15522         (VPROTO, PVPROTO, VA_START): Delete.
15523         (choose_temp_base_try, choose_temp_base, perror_exec,
15524         run_dos) [__MSDOS__]: Delete fns.
15525         (pfatal_with_name): Delete fn.
15526         (temp_filename): Declare like in gcc.c.
15527         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
15528         (error_count, signal_count): Define.
15529         (error): Delete both definitions.
15530         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
15531         (pfatal_pexecute): Add fn from gcc.c.
15532         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
15533         code to use the pexecute stuff also used by gcc.c.
15534         (MIN_FATAL_STATUS): Define.
15535         * Make-lang.in (g++): Add dependency on and linking with
15536         choose-temp.o and pexecute.o.
15538         * cp-tree.h: Include gansidecl.h.
15539         (STDIO_PROTO): Delete #undef/#define.
15540         * cvt.c (NULL): Delete #undef/#define.
15541         * expr.c (NULL): Likewise.
15542         * init.c (NULL): Likewise.
15543         * rtti.c (NULL): Likewise.
15544         * xref.c (NULL): Likewise.
15546         * cp-tree.h (build_user_type_conversion): Add prototype.
15547         * call.c (build_user_type_conversion): Delete prototype.  Correct
15548         decl of FLAGS arg to be an int.
15549         * cvt.c (build_user_type_conversion): Likewise.
15551 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
15553         * cp-tree.def: Add TRY_BLOCK and HANDLER.
15554         * except.c (expand_start_catch_block): Support templates.
15555         * parse.y (try_block, handler_seq): Likewise.
15556         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
15558 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
15560         * pt.c (current_template_args): New fn.
15561         (push_template_decl): Use it.
15562         * decl.c (grokdeclarator): Use it.
15564         * decl2.c (build_expr_from_tree): Dereference ref vars.
15566         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
15567         the decl-specifier-seq.
15569         * decl.c (grok_op_properties): Don't force the type of a conversion
15570         op to be complete.  Don't warn about converting to the same type
15571         for template instantiations.
15573         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
15574         methods.
15576 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
15578         * typeck.c (get_delta_difference): Remove previous bogusness.
15579         Don't give errors if force is set.
15581 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
15583         * decl2.c (finish_file): Don't emit debug info.
15584         * decl.c (pushdecl): Lose obsolete code.
15585         (grokdeclarator): Still do the long long thing after complaining.
15586         * search.c (note_debug_info_needed): Don't do anything if we're in a
15587         template.
15588         * method.c (synthesize_method): For non-local classes,
15589         push_to_top_level first.
15591 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
15593         * typeck.c (get_delta_difference): Add no_error parameter.
15594         (build_ptrmemfunc): Call get_delta_difference with no_error set;
15595         we don't want error messages when converting unrelated
15596         pointer-to-member functions.
15598 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
15600         * error.c (dump_expr): Improve the wording on error messages that
15601         involve pointer to member functions.
15603 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
15605         * cvt.c (cp_convert_to_pointer): Move code for conversions from
15606         (::*)() to void* or (*)() up a bit, so that we can convert from
15607         METHOD_TYPEs as well.
15609 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15611         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
15612         There are no 'member' types.
15613         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
15614         (build_x_typeid): Handle errors.
15616 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
15618         * typeck.c (convert_for_assignment): Handle anachronistic implicit
15619         conversions from (::*)() to void* or (*)().
15620         * cvt.c (cp_convert_to_pointer): Likewise.
15621         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
15622         conversions from here.
15623         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
15624         * lang-options.h: Likewise.
15625         * decl2.c (warn_pmf2ptr): Define.
15626         * cp-tree.h: Declare it.
15627         * typeck2.c (digest_init): Allow pmfs down into
15628         convert_for_initialization.
15630 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
15632         * typeck.c (c_expand_return): Fix for returning overloaded fn.
15634 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15636         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
15637         * decl.c (grok_reference_init): Pass DIRECT_BIND.
15638         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
15639         DIRECT_BIND.
15640         * call.c (convert_like): Don't pass INDIRECT_BIND.
15641         * typeck.c (convert_arguments): Likewise.
15642         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
15644 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
15646         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
15647         similar code in build_up_ref.
15648         * cvt.c (build_up_reference): Drastically simplify.
15650 Mon Oct 28 12:45:05 1996  Jeffrey A Law  <law@cygnus.com>
15652         * typeck.c (signed_or_unsigned_type): If the given type already
15653         as the correct signedness, then just return it.
15655         * typeck.c ({un,}signed_type): If can't do anything, call
15656         signed_or_unsigned_type.
15658 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
15660         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
15661         current_class_type is NULL.
15663 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
15665         * class.c (finish_struct_1): Avoid empty structs by adding a field
15666         so layout_type gets the mode right.
15668         * typeck.c (c_expand_return): Drastically simplify.
15670 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
15672         * typeck.c (decay_conversion): Handle overloaded methods.
15674 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
15676         * call.c (build_over_call): A TARGET_EXPR has side-effects.
15678 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
15680         * cvt.c (convert_to_pointer_force): Add code to support pointer to
15681         member function to pointer to function conversions.
15682         * init.c (resolve_offset_ref): Add code to allow faked up objects,
15683         ignoring them if they are not used, and giving an error, if they
15684         are needed.
15685         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
15686         code, and so that we can give an error, if we needed an object,
15687         and one was not provided.
15688         (build_c_cast): Don't call default_conversion when we want to
15689         convert to pointer to function from a METHOD_TYPE.
15691 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
15693         * Make-lang.in (cplib2.ready): Fix logic.
15695         * decl.c (shadow_tag): Only complain about non-artificial function
15696         members.
15698         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
15700 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
15702         * expr.c (cplus_expand_expr): Pre-tweak call_target like
15703         expand_inline_function would.
15705         * pt.c (mark_decl_instantiated): If extern_p, call
15706         mark_inline_for_output.
15708 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
15710         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
15711         pmd conversions.
15713         * typeck.c (get_delta_difference): Fix wording, as we can be used
15714         for pointer to data members.
15716 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
15718         * pt.c (tsubst): If the function decl isn't a member of this
15719         template, return a copy of the decl (including copying the
15720         lang-specific part) so we don't hose ourselves later.
15722 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15724         * class.c (finish_struct): Remove DWARF-specific tag handling.
15725         * decl.c (pushtag): Likewise.
15726         (finish_function): Always clear DECL_ARGUMENTS on function decls with
15727         no saved RTX.
15728         * decl2.c (finish_file): Emit DWARF debugging info for static data
15729         members.
15731 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
15733         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
15734         isn't the same as the new one before we whack it.
15736 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
15738         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
15739         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
15740         warn_traditional and warn_strict_prototypes; remove ancient
15741         'overload' code; remove references to flag_traditional.
15743 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
15745         * input.c (sub_getch): Handle 8-bit characters in string literals.
15747 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
15749         * tree.c (mapcar): Handle CONSTRUCTORs.
15750         (copy_to_permanent): Handle expression_obstack properly.
15752         * Make-lang.in (cplib2.txt): Also depend on the headers.
15754         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
15755         INT_TYPE_SIZE.
15756         (expand_class_desc): Use USItype for offset field.
15757         * tinfo.h (struct __class_type_info): Likewise.
15759         * method.c (build_overload_int): TYPE_PRECISION should be applied
15760         to types.
15762 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
15764         * call.c (build_new_op): A COND_EXPR involving void must be a
15765         builtin.
15767 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15769         * typeck.c (build_x_component_ref): New fn.
15770         (build_object_ref): Use it.
15771         * parse.y (primary): Use it.
15772         * decl2.c (build_expr_from_tree): Use it.
15773         * cp-tree.h: Declare it.
15775         * decl.c (start_decl): Variable-sized arrays cannot be initialized.
15776         * error.c (dump_type_suffix): Handle variable arrays.
15778 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15780         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
15782 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
15784         * decl.c (lookup_name_real): Don't try to look up anything in a
15785         TYPENAME_TYPE.
15787         * tinfo2.cc (__throw_type_match_rtti): Oops.
15789 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15791         * Make-lang.in (exception.o): Use -fno-PIC for now.
15793 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
15795         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
15796         calling them.
15797         (get_tinfo_fn_dynamic): Extracted from build_typeid.
15798         * tinfo2.cc (__dynamic_cast): Adjust.
15800         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
15801         (build_x_typeid): Likewise.
15803         * parse.y: Call build_x_typeid instead of build_typeid.
15804         * cp-tree.def: Add TYPEID_EXPR.
15805         * pt.c (tsubst_copy): Handle typeid.
15806         * decl2.c (build_expr_from_tree): Likewise.
15807         * rtti.c (build_x_typeid): Throw bad_typeid from here.
15808         (build_typeid): Not here.
15809         * cp-tree.h: Declare build_x_typeid.
15811 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
15813         * call.c (convert_like): Pull out constant values.
15815         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
15817 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
15819         * decl.c (init_decl_processing): Create short int types before
15820         creating size_t in case a machine description needs to use
15821         unsigned short for size_t.
15823 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
15825         * Make-lang.in (exception.o): Turn off pic.
15827         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
15828         type, multi-level ptr conversions.
15830         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
15831         (throw_bad_cast): Use it.
15832         (throw_bad_typeid): New fn.
15833         (build_typeid): Throw bad_typeid as needed.
15834         Use build_call.
15835         (synthesize_tinfo_fn): Handle functions and arrays before checking
15836         for cv-quals.
15838         * Remove .h from standard C++ headers, add new.h, move into inc
15839         subdirectory.
15841         * exception*: Remove pointer from object, constructors.  Add
15842         default exception::what that uses type_info::name.  Add
15843         __throw_bad_typeid.
15845         * init.c (build_new): Don't add a cookie to new (void *) T[2].
15847 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
15849         * Make-lang.in: Building C++ code depends on cc1plus.
15851 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15853         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
15854         a HOST_WIDE_INT, not a tree.
15856 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
15858         * exception.cc: Don't include <stdlib.h>.
15860         * Make-lang.in (c++.clean): Remove cplib2.*.
15862 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
15864         * parse.y (component_decl_1, component_costructor_declarator case):
15865         Pass attributes/prefix_attributes in tree list.
15867 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
15869         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
15871 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
15873         * lex.c (do_identifier): Don't do deferred lookup in a template
15874         header.
15876         * typeck2.c (store_init_value): Oops.
15878         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
15879         New files for C++ lang-support library.
15880         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
15881         (CXX_LIB2FUNCS): Define.
15882         And rules for building the C++ lang-support code.
15883         * config-lang.in (headers): Define.
15884         (lib2funcs): Define.
15886 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15888         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
15889         digest_init.
15890         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
15891         * typeck2.c (store_init_value): Check for initializing pmf with { }
15892         here.
15893         (process_init_constructor): Not here.
15895 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15897         * pt.c (begin_template_parm_list): Increment
15898         processing_template_decl here.
15899         (end_template_parm_list): Not here.
15900         (process_template_parm): No need to add 1 to it now.
15901         * *.c: Use processing_template_decl instead of current_template_parms
15902         to check for being in a template.
15904         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
15905         (tsubst_copy): Handle CONSTRUCTOR.
15906         (instantiate_decl): Set up context properly for variables.
15907         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
15908         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
15910 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15912         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
15914 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15916         * method.c (make_thunk): Call comdat_linkage before setting the
15917         TREE_CODE.
15919         * decl2.c (comdat_linkage): Use make_decl_one_only.
15920         (import_export_decl): Likewise.
15921         * decl.c (init_decl_processing): Check supports_one_only instead of
15922         SUPPORTS_WEAK.
15924 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
15926         * decl2.c (grokfield): Tighten checking for access decls.
15928         * decl.c (make_typename_type): Resolve references to
15929         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
15930         (lookup_name_real): Types that depend on a template parameter get
15931         an implicit 'typename' unless they're in the current scope.
15932         (start_decl_1): We don't care about incomplete types that depend
15933         on a template parm.
15934         (grokdeclarator): Resolve 'typename's in the type specifier that
15935         refer to members of the current scope.
15937         * call.c (build_over_call): Remove 'inline called before
15938         definition' diagnostic.
15939         (build_method_call): Likewise.
15940         * decl.c (duplicate_decls): Downgrade 'used before declared
15941         inline' to a warning, only with -Winline.
15943 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
15945         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
15947 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
15949         * call.c (build_method_call): When calling a signature
15950         default implementation, as in other cases, let instance_ptr simply
15951         be instance.
15953 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
15955         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
15957 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
15959         * except.c (expand_start_catch_block): Add a pushlevel so that -g
15960         works on hppa and SPARC.
15962 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15964         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
15966 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
15968         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
15969         before testing whether it's a signature.
15971 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
15973         * call.c (build_new_method_call): Don't complain about signature
15974         pointers and references not being an aggr type.
15975         (build_this): If a signature pointer or reference was passed in,
15976         just return it.
15977         (build_new_method_call): If instance is a signature pointer, set
15978         basetype to the signature type of instance.
15979         * sig.c (build_signature_method_call): Deleted basetype and
15980         instance parameters, they can be found as the DECL_CONTEXT of
15981         function and as the first argument passed in.
15982         * cp-tree.h: Changed declaration of build_signature_method_call.
15983         * call.c (build_method_call): Deleted first two arguments in call
15984         of build_signature_method_call.
15985         (build_over_call): Added call to build_signature_method_call.
15987 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15989         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
15990         target_expr.
15992 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15994         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
15996 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
15998         * except.c (expand_start_try_stmts): Move to except.c in the backend.
15999         (expand_end_try_stmts): Remove.
16001         * init.c (perform_member_init): Use add_partial_entry () instead
16002         of directly manipulating lists.
16003         (emit_base_init): Likewise.
16005 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
16007         * except.c (expand_exception_blocks): Always make sure USE and
16008         CLOBBER insns that came at the end still do, the backend relies
16009         upon this.
16011 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
16013         * call.c (build_over_call): We can only use a TARGET_EXPR of the
16014         right type.
16016 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
16018         * cvt.c (convert_to_reference): Revert last change, don't complain
16019         about temp without target decl.
16021 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
16023         * decl.c (grokdeclarator): Don't core dump when void() is given.
16025 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
16027         * decl.c (copy_args_p): Don't crash.
16029 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
16031         * pt.c (tsubst): And support template args inside the exception
16032         specification.
16034         * pt.c (tsubst): Add support for exception specifications in
16035         template functions.
16037 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
16039         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
16040         fields now.
16041         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
16042         (start_function): Likewise.
16043         (start_method): Likewise.
16044         (grokfield): Likewise.
16045         (make_call_declarator): Add throw spec parameter.
16046         (set_quals_and_spec): Add routine.
16047         * lex.c (set_quals_and_spec): Likewise.
16048         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
16049         * decl.c (shadow_tag): Eliminate the throw spec parameter to
16050         grokdeclarator.
16051         (groktypename): Likewise.
16052         (start_decl): Eliminate the throw spec parameter.  Eliminate the
16053         throw spec parameter to grokdeclarator.  Eliminate the throw spec
16054         field in DECL_STMT.
16055         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
16056         (grokfndecl): Remove useless set of raises.
16057         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
16058         the throw spec parameter to start_decl.  Pull the throw spec out
16059         of the call declarator.
16060         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
16061         (start_function): Eliminate the throw spec parameter.  Eliminate
16062         the throw spec parameter to grokdeclarator.
16063         (start_method): Likewise.
16064         * decl2.c (grokfield): Likewise.
16065         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
16066         (grokoptypename): Likewise.
16067         (finish_file): Eliminate the throw spec parameter to
16068         start_function.  Add throw spec to make_call_declarator.
16069         * except.c (init_exception_processing): Add throw spec to
16070         make_call_declarator.  Eliminate the throw spec parameter to
16071         start_decl.
16072         (expand_start_catch_block): Eliminate the throw spec parameter to
16073         grokdeclarator.
16074         (expand_builtin_throw): Add throw spec to make_call_declarator.
16075         Eliminate the throw spec parameter to start_function.
16076         (start_anon_func): Likewise.
16077         * lex.c (make_call_declarator): Add throw spec parameter.
16078         (set_quals_and_spec): New routine.
16079         (cons_up_default_function): Add throw spec to make_call_declarator.
16080         Eliminate the throw spec parameter to grokfield.
16081         * method.c (synthesize_method): Eliminate the throw spec parameter
16082         to start_function.
16083         * pt.c (process_template_parm): Eliminate the throw spec parameter
16084         to grokdeclarator.
16085         (tsubst): Add throw spec to make_call_declarator.
16086         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
16087         (do_function_instantiation): Eliminate the throw spec parameter to
16088         grokdeclarator.  Eliminate the throw spec parameter to
16089         start_function.
16090         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
16091         to start_function.
16092         * parse.y (datadef): Remove non-winning optimization.
16093         (decl): Likewise.
16094         (fndef): Remove ambiguous error productions uncovered by grammar
16095         fixing.
16096         (constructor_declarator): Add exception_specification_opt here.
16097         (component_constructor_declarator): Likewise.
16098         (direct_after_type_declarator): Likewise.
16099         (complex_direct_notype_declarator): Likewise.
16100         (direct_abstract_declarator): Likewise.
16101         (fn.def1): Remove exception_specification_opt.
16102         (fn.def2): Likewise.
16103         (condition): Likewise.
16104         (initdcl0): Likewise.
16105         (initdcl): Likewise.
16106         (notype_initdcl0): Likewise.
16107         (nomods_initdcl0): Likewise.
16108         (component_decl_1): Likewise.
16109         (component_declarator): Likewise.
16110         (after_type_component_declarator0): Likewise.
16111         (after_type_component_declarator): Likewise.
16112         (notype_component_declarator): Likewise.
16114 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16116         * call.c (build_over_call): Also use an INIT_EXPR when
16117         initializing anything from an rvalue.
16119         * call.c (build_over_call): Call stabilize_reference when building
16120         an INIT_EXPR instead of calling the copy ctor.
16122         * call.c (joust): Extend the previous change to all comparisons.
16124         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
16125         NO_LINKAGE_HEURISTICS.
16127         * decl2.c (finish_file): Emit any statics that weren't already.
16129         * typeck.c (build_static_cast): Implement.
16130         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
16131         * decl.c (grokparms): Use can_convert_arg instead of
16132         implicit_conversion directly.
16133         (copy_args_p): New fn.
16134         * cvt.c (convert_to_reference): Don't complain about temp with
16135         static_cast.
16136         (build_up_reference): Handle TARGET_EXPRs.
16137         * call.c (build_over_call): Elide unnecessary temps.
16138         (can_convert*): Use new overloading code.
16140 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
16142         * call.c: Move TYPE_PTR*_MACROS ...
16143         * cp-tree.h: To here.
16144         * typeck.c (build_reinterpret_cast): Implement.
16146         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
16147         ptr_complete_ob.
16148         (joust): If we're comparing a function to a builtin and the worst
16149         conversion for the builtin is worse than the worst conversion for the
16150         function, take the function.
16152         * typeck.c (build_const_cast): Implement.
16153         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
16154         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
16156 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
16158         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
16159         too early.  Make sure we explode if exprtype turns out to be a
16160         NULL_TREE when it shouldn't be.
16162 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
16164         * cp-tree.h: New routine make_call_declarator.
16165         * lex.c (make_call_declarator): Define it.
16166         * except.c (init_exception_processing): Use it.
16167         (expand_builtin_throw): Likewise.
16168         (start_anon_func): Likewise.
16169         * decl2.c (finish_file): Likewise.
16170         * lex.c (cons_up_default_function): Likewise.
16171         * parse.y: Likewise.
16172         * pt.c (tsubst): Likewise.
16174 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
16176         * decl2.c (groktypefield): Remove unused code.
16178 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
16180         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
16181         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
16182         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
16183         nonempty_cv_qualifiers.
16184         * hash.h: Rebuild.
16186         * lex.c (make_pointer_declarator): Change type_quals into
16187         cv_qualifiers.
16188         (make_reference_declarator): Likewise.
16190 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
16192         * decl.c (start_function): Only check interface_* for templates
16193         with flag_alt_external_templates.
16195         * call.c (build_new_op): Check for comparison of different enum types.
16196         (build_over_call): Fix arg # output.
16198         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
16200 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
16202         * call.c (build_new_op): Check for erroneous args.
16204         * call.c (build_new_method_call): Add missing args to cp_error.
16206         * tree.c (error_type): Don't print reference-to-array.
16208         * typeck.c (convert_for_assignment): Don't say contravariance for
16209         removing const.
16211 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
16213         * call.c (build_over_call): Diagnose bad convs for `this'.
16215         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
16216         on _ctor_arg.
16218         * call.c (convert_like): Handle bad convs.
16219         (build_over_call): Handle bad convs better.
16221         * decl2.c: -fansi-overloading is now the default.
16223         * call.c (build_new_method_call): Check for erroneous args.
16225         * pt.c (instantiate_class_template): Propagate
16226         TYPE_USES_MULTIPLE_INHERITANCE.
16228 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
16230         * call.c (enforce_access): Add static to routine.
16232 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
16234         * call.c (build_user_type_conversion_1): Fix bad handling.
16235         (compare_ics): Likewise.
16237 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
16239         * call.c (standard_conversion): Oops.
16241 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
16243         * g++.c: Update test for win32 (&& ! cygwin32).
16245 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
16247         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
16248         (ptr_reasonably_similar): New fn.
16249         * call.c (BAD_RANK): New rank.
16250         (ICS_BAD_FLAG): New macro.
16251         (standard_conversion): Handle almost-right pointer conversions.
16252         (reference_binding): Handle bad rvalue bindings.
16253         (add_*_candidate): Stuff.
16254         (build_over_call): Pass bad conversions to convert_for_initialization.
16255         (compare_ics): Handle bad convs.
16256         (joust): Likewise.
16258 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
16260         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
16261         integer_type_node when computing pointer offsets.
16263 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
16265         * tree.c (lvalue_type): New fn.
16266         (error_type): New fn.
16267         * call.c (op_error): Use error_type.
16268         (add_conv_candidate): Use lvalue_type.
16269         (add_builtin_candidates): Likewise.
16270         * error.c (args_as_string): Use error_type.
16272 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
16274         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
16275         (tsubst): Not here.
16277         * decl.c (init_decl_processing): With -ansi, __null's type is the
16278         signed integral type with the same number of bits as a pointer.
16279         Introduce a new variable null_node for it.
16280         * cp-tree.h: Adjust.
16281         * call.c (null_ptr_cst_p): Adjust.
16283 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
16285         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
16286         optimize.
16288 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
16290         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
16291         fns of classes without virtual functions.
16293         * call.c (add_function_candidate): Handle `this' specially.
16294         (compare_ics): Likewise.
16296 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
16298         * typeck.c (build_conditional_expr): Fix handling of __null.
16300         * decl2.c (comdat_linkage): New fn.
16301         (import_export_vtable): Use it.
16302         (import_export_decl): Use it.
16303         * method.c (make_thunk): Use it.
16305 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
16307         * pt.c (end_template_decl): If we don't actually have parms, return.
16308         * parse.y (template_header): Accept 'template <>'.
16310         * errfn.c: Allow 5 args.
16312 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
16314         * tree.c (make_temp_vec): New fn.
16315         * pt.c (push_template_decl): Handle partial specs.
16316         (instantiate_class_template): Likewise.
16317         (more_specialized): Use get_bindings.
16318         (more_specialized_class): New fn.
16319         (get_class_bindings): New fn.
16320         (most_specialized_class): New fn.
16321         (do_function_instantiation): List candidates for ambiguous case.
16322         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
16323         (shadow_tag): Call push_template_decl for partial specializations.
16324         * parse.y: Likewise.
16325         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
16326         DECL_TEMPLATE_MEMBERS.
16327         * call.c (print_z_candidates): Reduce duplication.
16329 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
16331         * decl2.c (lang_decode_option): Allow -fansi-overloading.
16333 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
16335         * pt.c (get_bindings): New fn.
16336         (most_specialized): Likewise.
16337         (do_function_instantiation): Use them.
16338         (add_maybe_template): New fn.
16339         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
16340         * call.c (build_new_op): Handle guiding decls.
16341         (build_new_function_call): Likewise.
16342         * decl2.c (finish_file): Likewise.
16344         * decl2.c (mark_used): Do synthesis here.
16345         * call.c (build_method_call): Not here.
16346         (build_over_call): Or here.
16347         * typeck.c (build_function_call_real): Or here.
16348         * tree.c (bot_manip): Call mark_used on functions used in default
16349         args.
16351 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
16353         * decl2.c (import_export_vtable): Delete code that disabled vtable
16354         heuristic on systems with ASM_OUTPUT_EXTERNAL.
16356 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
16358         * typeck.c (build_x_function_call): Handle static call context
16359         better.
16361         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
16362         the function, not its outer block.
16364         * call.c (build_field_call): Pass fields on to build_opfncall
16365         regardless of TYPE_OVERLOADS_CALL_EXPR.
16366         (build_method_call): Pass on to build_new_method_call sooner.
16368         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
16369         gives us.
16370         * class.c (instantiate_type): Don't put a POINTER_TYPE to
16371         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
16372         modifying it.
16374 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
16376         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
16377         (add_builtin_candidate): Don't take enums for ++.
16378         (build_new_method_call): Handle non-aggregates and field calls.
16379         Move new overloading code from...
16380         * cvt.c: Here.
16382         * decl.c (grokparms): Don't check default args in templates.
16384 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
16386         * cvt.c (build_new_op): Fix args to build_unary_op.
16387         (add_builtin_candidates): Don't call type_promotes_to on float.
16389         * decl.c (grokparms): Check the type of the default arg.
16391         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
16392         returning NULL_TREE.
16394         * typeck.c (build_x_binary_op): Avoid doing extra work.
16395         (build_x_unary_op): Likewise.
16396         (build_x_conditional_expr): Likewise.
16397         * cvt.c (build_over_call): Return.
16398         (add_builtin_candidate): Fix MEMBER_REF.
16399         (build_new_op): Likewise.
16401 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
16403         * method.c (build_overload_name): Put bug fix into code but leave
16404         disabled for now so we can be bug compatible with older releases
16405         that do repeats incorrectly.  In the future, we can enable it.
16407 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
16409         * cvt.c (convert_like): Don't call build_cplus_new twice.
16411         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
16412         Control new overloading code with -fansi-overloading.
16414 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
16416         * cvt.c (build_over_call): Call build_cplus_new.
16417         * call.c (build_method_call): Likewise.
16418         * typeck.c (build_function_call_real): Likewise.
16419         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
16420         the COND_EXPR in a TARGET_EXPR so they use the same slot.
16422         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
16423         recursive calls.
16424         * typeck.c (complete_type): Propagate
16425         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
16427 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
16429         * cvt.c (joust): More ?: kludging.  Sigh.
16430         (build_over_call): Don't try to synthesize global fns.
16432         * search.c (lookup_conversions): Use binfo marking.
16434 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
16436         * search.c (build_mi_matrix): Use the correct value of cid
16437         when determining the new mi_size.
16439 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
16441         * cvt.c (add_builtin_candidates): Do consider type conversion ops
16442         for the first parms of += et al.
16443         (strip_top_quals): New fn.
16444         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
16445         (implicit_conversion): Likewise.
16446         (add_builtin_candidates): Be careful about arrays.
16447         (build_new_method_call): Handle vtable optimization.
16449 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
16451         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
16452         * cvt.c (reference_binding): Use it.
16453         (implicit_conversion): Use it.
16454         (add_builtin_candidate, COND_EXPR): Use it.
16456         * cvt.c (build_new_function_call): Check for error args.
16458         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
16460         * gxx.gperf: Add __null.
16461         * hash.h: Regenerate.
16462         * lex.h: Add RID_NULL.
16463         * lex.c (init_lex): Create null_pointer_node here, stick it in
16464         RID_NULL.
16465         * decl.c (init_decl_processing): Still set its type here.
16466         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
16467         (convert_to_pointer_force): Likewise.
16468         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
16469         if (! pedantic).
16470         * call.c (convert_harshness): Use null_ptr_cst_p.
16471         * typeck.c (convert_for_assignment): Likewise.  Don't produce
16472         null_pointer_node.
16474         * error.c (args_as_string): Handle lists of actual args, too.
16475         * cvt.c (null_ptr_cst): Support (void*)0 for now.
16476         (build_user_type_conversion_1): Improve diagnostics.
16477         (build_new_function_call): Likewise.
16478         (build_object_call): Likewise.
16479         (build_new_method_call): Likewise.  Move call before def diagnostic...
16480         (build_over_call): Here.
16482         * cvt.c (build_new_method_call): Don't complain about no match if
16483         LOOKUP_SPECULATIVELY.
16484         (build_over_call): Fix 'this' for virtual fn.
16485         (build_new_method_call): Add diagnostic.
16487 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16489         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
16490         constructors to be passed in.
16491         (build_over_call): Likewise.
16492         (build_user_type_conversion_1): Pass them in.
16493         (convert_like): Likewise.
16494         (build_object_call): Handle overloaded conversions.
16495         (build_over_call): Pass the right args to build_vfn_ref.
16496         (standard_conversion): Fix pmf convs.
16497         (joust): Handle comparing statics and non-statics.
16498         (build_new_method_call): New fn.
16499         * call.c (build_method_call): Call it if NEW_OVER.
16501 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
16503         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
16504         %D instead.
16506 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
16508         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
16509         instead of just maybe_build_cleanup so that we deallocate the
16510         thrown object.
16512 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16514         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
16515         * cp-tree.h (finish_prevtable_vardecl): Add decl.
16517 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
16519         * pt.c (instantiate_class_template): Call complete_type.  Also, if
16520         we're at the end of the file and we just instantiated a template
16521         class with a vtable, call finish_prevtable_vardecl.
16523         * error.c (dump_decl): Don't explode (or explode more gracefully
16524         as appropriate) if the object being dumped has a null type.
16525         (dump_expr): Likewise.
16527         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
16528         by counting the number of nodes that we'll need before allocating
16529         the array.
16530         (lookup_fnfields): Fix comment.
16531         (breadth_first_search): Fix comment.
16533 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
16535         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
16536         TYPE_ALIGN.
16537         * class.c (finish_struct): Call cplus_decl_attributes here.
16538         (finish_struct_1): Not here.
16539         * cp-tree.h: Adjust.
16541         * pt.c (type_unification): New parameter STRICT.
16542         (unify): If STRICT, don't allow cv addition or base deduction.
16543         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
16545 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
16547         * search.c (get_template_base{_recursive}): New fns.
16548         * pt.c (more_specialized): New fn.
16549         (do_function_instantiation): Use it.
16550         (unify): Handle base deduction.
16551         * cvt.c (joust): Use more_specialized.
16552         Don't arbitrarily choose between non-builtin candidates.
16553         (build_over_call): Call require_complete_type.
16555         * decl.c (start_function): Statics are static even in a #pragma
16556         interface file.
16558         * decl2.c (import_export_vtable): Disable vtable heuristic on
16559         systems with ASM_OUTPUT_EXTERNAL.
16561         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
16562         (standard_conversion): No std conv to enum type.
16564         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
16565         for ptm's.
16567         * cvt.c (reference_binding): Bind directly to a base subobject of
16568         a class rvalue.
16570         * cvt.c (build_new_op): Enforce access control.
16572 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
16574         * typeck2.c (process_init_constructor): When scanning the
16575         union for a named field, skip things that aren't FIELD_DECLs.
16577         * method.c (synthesize_method): Don't scan fndecl's rtl if
16578         we're at the end of the file; just assume the function can't
16579         be inlined.
16581 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16583         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
16584         it failed.
16586         * cvt.c (build_user_type_conversion_1): Handle overloaded
16587         conversion ops.
16589         * cvt.c (add_builtin_candidates): Don't consider type conversion
16590         operators for the first parameter of operator=.
16592 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
16594         * typeck.c (complete_type): Only call layout_type if we're not
16595         expanding a template.
16597 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
16599         * cvt.c (compare_ics): Oops.
16601         * cvt.c (op_error): Oops.
16603         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
16604         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
16605         (build_conv): Use them.
16606         (implicit_conversion): Use them.
16607         (convert_like): Handle them.
16608         (build_new_op): Handle builtin COND_EXPR again.
16609         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
16610         in lists of types for COND_EXPR.
16611         (add_builtin_candidate): Add enum candidates for COND_EXPR.
16613 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
16615         * typeck.c (build_modify_expr): Always attempt to build a call to
16616         the assignment operator, even if we're using a default one.
16617         (convert_for_initialization): Call complete_type.
16619 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
16621         * cvt.c (reference_binding): A REF_BIND gets the reference type.
16622         (implicit_conversion): Likewise.
16623         (convert_like): Likewise.
16624         (compare_ics): Likewise.
16625         (compare_qual): Likewise.
16626         (print_z_candidates): Handle no candidates.
16627         (build_new_op): Don't handle builtin COND_EXPR for now.
16629 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
16631         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
16633 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
16635         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
16637         * cvt.c (build_builtin_candidate): Oops.
16638         (build_new_op): Oops.
16640         * method.c (build_opfncall): Pass COND_EXPR on.
16641         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
16642         (add_builtin_candidate{,s}): Likewise.
16643         (add_builtin_candidates): Likewise.
16644         (print_z_candidates, op_error, build_new_op): Likewise.
16645         (type_decays_to): New fn.
16646         * lex.c (init_lex): Just say ?: for COND_EXPR.
16648 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
16650         * typeck.c (complete_type): Call layout_type rather than building
16651         a new array type.
16653         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
16654         only use ptrdiff_t.
16656 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
16658         * cvt.c: Always compile the new overloading code (but don't use it).
16659         (implicit_conversion): Add a BASE_CONV when converting to
16660         the same class type.
16661         (convert_like): Handle BASE_CONV.
16663 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16665         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
16666         (add_builtin_candidate): Likewise.
16668         NEW_OVER changes:
16669         * typeck.c (build_x_function_call): Try an operator function
16670         whenever we call an object of class type.
16671         * method.c (build_opfncall): Pass CALL_EXPRs through.
16672         * cvt.c (implicit_conversion): Do const-ref case first.
16673         (add_conv_candidate, build_object_call, op_error): New fns.
16674         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
16675         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
16676         builtin candidates.
16677         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
16678         Fall back on preincrement handling.  Use op_error.
16679         Handle warn_synth.
16680         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with
16681         an error_mark_node.
16682         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
16683         properly.
16685 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
16687         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
16689 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
16691         * typeck.c (build_component_ref_1): Use build_component_ref
16692         instead of open coding it here.
16694 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
16696         * g++.c (main): Don't link with -lg++.
16698         NEW_OVER changes:
16699         * cvt.c (convert_to_reference): Don't use convert_from_reference on
16700         result of build_type_conversion.
16701         (cp_convert): Only call build_method_call for ctors if
16702         build_type_conversion failed.
16703         (ptr_complete_ob): New function.
16704         (TYPE_PTR{,OB,MEM}_P): New macros.
16705         ({add,build}_builtin_candidate{,s}): New functions.
16706         (print_z_candidates): Handle builtins.
16707         (build_user_type_conversion_1): Don't use conversion fns for
16708         converting to a base type.
16709         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
16710         (build_user_type_conversion): Use convert_from_reference.
16711         (build_new_op): New function.
16712         (build_over_call): Fix handling of methods.
16713         (compare_ics): Handle AMBIG_CONV properly.
16714         * typeck2.c: Increment abort count.
16715         * method.c (build_opfncall): Forward most requests to build_new_op.
16716         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
16718 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16720         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
16721         invalid second argument to dump_expr_list.
16723 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
16725         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
16727 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
16729         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
16730         ASSEMBLE_EXTERNAL.
16732 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
16734         * typeck2.c (process_init_constructor): New pedwarn for using { }
16735         to initialize a pointer to member function.
16736         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
16737         we can avoid the new error.
16739 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
16741         * typeck.c (build_ptrmemfunc1): New function to hide details of
16742         pointer to member functions better.
16744 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
16746         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
16747         methods into the actual method, as we know the implied object is
16748         not used.
16750 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16752         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
16753         inside a system header.
16755 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
16757         * call.c (build_method_call): Call complete_type on the
16758         instance type.
16760 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
16762         * typeck.c (build_component_ref): Always build up an OFFSET_REF
16763         for obj_ptr->func so that we can know which object to use in a
16764         method call.
16766 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
16768         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
16769         around things.  Also improve maintainability.
16771 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
16773         * decl.c (grokdeclarator): Check for overflow when evaluating an
16774         array dimension.
16776 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
16778         * cvt.c (cp_convert): Don't check for ambiguity with constructor
16779         if NEW_OVER.
16781         * typeck.c (build_x_function_call): Pass function overload
16782         questions to new overloading code if NEW_OVER.
16783         * init.c (expand_aggr_init_1): Only check for type conversion ops
16784         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
16785         Don't check for ambiguity with constructor if NEW_OVER.
16786         * cvt.c (convert_to_reference): Dereference the result of a type
16787         conversion operator.
16788         (build_conv): Propagate ICS_USER_FLAG.
16789         (implicit_conversion): Call instantiate_type.
16790         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
16791         (add_function_candidate): Fix cv-quals on argtype.
16792         (print_z_candidates): New function.
16793         (build_new_function_call): Call it.
16794         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
16795         consider non-converting constructors.
16796         Call print_z_candidates.
16797         Return an AMBIG_CONV for an ambiguous conversion.
16798         (build_user_type_conversion): Handle AMBIG_CONV.
16799         (convert_like): Fix test for building TARGET_EXPR.
16800         Call instantiate_type.
16801         Handle AMBIG_CONV and LVALUE_CONV.
16802         (build_over_call): Handle 0 args and ellipsis.
16803         * cp-tree.def: Add AMBIG_CONV.
16805 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
16807         * decl.c (lookup_name_real): If we find mem in obj when parsing
16808         `obj->mem', make sure we return the right value.
16810 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
16812         * search.c (get_base_distance): Call complete_type.
16814 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
16816         * decl.c (store_bindings): Make static.
16818 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
16820         * init.c (expand_aggr_init_1): Don't check type conversions if
16821         NEW_OVER.
16823         * cvt.c (z_candidate): Put back template field.
16824         (add_function_candidate): Set it.
16825         (add_template_candidate): Likewise.
16826         (joust): Use it.
16827         (compare_qual): Handle references and pointers to members.
16828         (compare_ics): Handle reference bindings.
16830         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
16832 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
16834         * call.c (compute_conversion_costs): Call complete_type.
16836         * tree.c (vec_binfo_member): Use comptypes instead of comparing
16837         pointers, so we can handle template parameters.
16839 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
16841         * cvt.c (cp_convert_to_pointer): We have to call complete_type
16842         here; let's make it explicit instead of a side effect of an
16843         error check.
16845 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
16847         * cvt.c (z_candidate): Remove template field.
16848         (reference_binding): Handle binding to temporary.
16849         (implicit_conversion): Likewise.
16850         (add_function_candidate): Handle artificial constructor parms.
16851         Handle functions with too few parms.
16852         (add_template_candidate): New function.
16853         (build_user_type_conversion_1): Handle constructors.
16854         (convert_like): Likewise.
16855         (build_over_call): Likewise.
16856         (build_new_function_call): Support templates.
16857         (compare_ics): Fix reference, inheritance handling.
16859 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
16861         * decl.c: Add signed_size_zero_node.
16862         (init_decl_processing): Build it.
16863         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
16864         when we're trying to make a negative delta.
16866 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16868         Stop doing this damn index==strchr variable name confusion.
16869         * class.c (add_virtual_function): Change local var INDEX to be
16870         named IDX.
16871         (add_method): Likewise.
16872         * lex.c (print_parse_statistics): Likewise.
16873         * search.c (make_memoized_table_entry): Likewise.
16874         (lookup_fnfields_here): Likewise.
16875         (lookup_field): Likewise.
16876         (lookup_fnfields): Likewise.
16877         (get_baselinks): Likewise.
16878         * sig.c (build_signature_table_constructor): Likewise.
16879         (build_signature_method_call): Likewise.
16880         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
16881         (get_member_function_from_ptrfunc): Likewise.
16882         (build_ptrmemfunc): Change local var INDEX to be IDX.
16883         (c_expand_start_case): Likewise.
16885 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
16887         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
16888         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
16889         (convert_to_reference): Use build_type_conversion to convert to
16890         the reference type directly.
16891         (standard_conversion): Fix void* case, non-conversions.
16892         (reference_binding): Fix expr == 0 case, non-conversions.
16893         (convert_like): Support REF_BIND.
16894         (compare_qual): Split out from compare_ics.
16895         (compare_ics): Use it, handle icses with only a qual_conv.
16897         * init.c (expand_vec_init): Don't crash if decl is NULL.
16899 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
16901         * mpw-config.in: New file, configury for Mac MPW.
16902         * mpw-make.sed: New file, makefile editing for MPW.
16904 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16906         * pt.c (instantiate_class_template): Call repo_template_used.
16908         * search.c (lookup_conversions): Only lookup conversions in
16909         complete types.
16911 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16913         * cp-tree.def: Renamed from tree.def, to avoid confusion with
16914         gcc's tree.def.
16915         * cp-tree.h, lex.c: Include cp-tree.def.
16916         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
16918 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
16920         * init.c (build_vec_delete_1): Call complete_type.
16922 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
16924         * except.c (start_anon_func): Make sure anonymous functions are
16925         never external.
16927 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
16929         * decl.c (finish_function): If function_depth > 1, set nested.
16931         * decl2.c (grokbitfield): Revert Bob's change.
16932         * class.c (finish_struct_1): Fix handling of named bitfield widths.
16934 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
16936         * pt.c (add_pending_template): Handle types.
16937         (lookup_template_class): With -fexternal-templates, just add the class
16938         to pending_templates instead of instantiating it now.
16939         * decl2.c (finish_file): Handle types in pending_templates.
16941 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
16943         * decl2.c (grokbitfield): Handle constant decls appropriately.
16944         Give an appropriate error message now instead of spewing core
16945         later.
16947 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
16949         * decl2.c: Don't turn on thunks by default for now.
16951 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
16953         * typeck.c (complete_type): Handle error_mark_node.
16954         (common_type, OFFSET_TYPE): Handle template_type_parms.
16956 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
16958         * pt.c (instantiate_decl): If at_eof, call import_export_decl
16959         regardless of DECL_INLINE.
16961         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
16963         * class.c (finish_struct_bits): Copy TYPE_SIZE.
16965         * rtti.c (build_dynamic_cast): Support templates.
16966         * tree.def: Support DYNAMIC_CAST_EXPR.
16967         * pt.c (tsubst_copy): Likewise.
16968         * decl2.c (build_expr_from_tree): Likewise.
16970 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
16972         * typeck.c (build_static_cast): Support templates.
16973         (build_const_cast): Likewise.
16974         * tree.def: Support CONST/STATIC_CAST_EXPR.
16975         * pt.c (tsubst_copy): Likewise.
16976         * decl2.c (build_expr_from_tree): Likewise.
16978 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
16980         * decl2.c (finish_vtable_vardecl): Don't trust
16981         TREE_SYMBOL_REFERENCED for vtables of local classes.
16983 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
16985         * pt.c (tsubst_copy): Handle operator T.
16987 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16989         * init.c (build_delete): Move creation of PARMS inside test of
16990         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
16992 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
16994         * typeck.c (build_conditional_expr): Don't assume that
16995         the arguments to ?: are always pointers or records.
16997 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
16999         * decl2.c (import_export_decl): Still emit static/weak/comdat
17000         copies of inline template functions with -fno-implicit-templates.
17002 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
17004         * init.c (build_delete): Determine the complete basetype
17005         path to the destructor we're calling.
17007 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
17009         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
17010         initialize the enum, because we really and truly don't know where
17011         it came from.
17012         (start_enum): Don't copy integer_zero_node because
17013         build_enumerator will do it.
17015 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17017         * decl.c (finish_function): Do access control on base destructors.
17019         * pt.c (tsubst, case FUNCTION_DECL): Set up
17020         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
17021         hose us.
17023 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
17025         * cvt.c (build_up_reference): If we have already extended the
17026         lifetime of the temporary, don't try it again.
17027         * typeck.c (c_expand_return): Don't try and convert the return
17028         value twice when we want a reference, once is enough.
17030 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
17032         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
17033         LOOKUP_ONLYCONVERTING at all for now.
17035         * search.c (add_conversions): Put the conversion function in
17036         TREE_VALUE, the basetype in TREE_PURPOSE.
17037         * cvt.c (build_type_conversion): Adjust.
17038         * cvt.c (build_expr_type_conversion): Adjust.
17039         * call.c (user_harshness): Adjust.
17041 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
17043         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
17044         backend's benefit.
17046 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
17048         * except.c (expand_start_catch_block): Add a dummy region, if we
17049         get an error, so that we can avoid core dumping later.
17051 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
17053         * cp-tree.h (OFFSET_REF): Remove.
17054         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
17055         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
17056         * init.c (expand_aggr_init_1): Likewise.
17057         (build_new): Likewise.
17058         * typeck.c (expand_target_expr): Likewise.
17060 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
17062         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
17063         TARGET_EXPR.
17065 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
17067         * cvt.c (build_up_reference): Redo how and when temporaries are
17068         created.
17069         * decl.c (grok_reference_init): Don't try and be smart about
17070         running cleanups.
17072 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
17074         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
17075         (TARGET_EXPR...), now that it has 4 arguments.
17076         * tree.c (build_cplus_new): Likewise.
17078 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
17080         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
17082         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
17083         * decl.c (struct saved_scope): Remove named_labels,
17084         {base,member}_init_list.
17085         (maybe_push_to_top_level): Don't set them.  Call
17086         push_cp_function_context if appropriate.
17087         (pop_from_top_level): Likewise.
17089         * method.c (do_build_assign_ref): Remove obsolete check of
17090         TYPE_HAS_ASSIGN_REF (basetype).
17092         * decl.c (grokfndecl): Diagnose user definition of
17093         implicitly-declared methods.
17095 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
17097         * method.c (do_build_copy_constructor): Add code to give
17098         meaningful error messages instead of crashing.
17099         (do_build_assign_ref): Don't synthesize assignment operators for
17100         classes containing reference or const members.
17102         * class.c (struct base_info): Remove cant_synth_copy_ctor
17103         and cant_synth_asn_ref.
17104         (finish_base_struct): Remove the code that tries to conditionalize
17105         synthesis of copy constructors & assignment operators based on
17106         access permissions.  Instead, let it fail when it tries to
17107         synthesize the copy constructor.  This will give meaningful error
17108         messages instead of silently generating code to perform a bitcopy.
17110 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
17112         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
17113         determining types for constant values.
17115         * decl.c (struct named_label_list): Use instead of stuffing
17116         random items into a TREE_LIST node.
17117         (named_label_uses): Use the new struct.
17118         (poplevel): Likewise.
17119         (lookup_label): Likewise.
17120         (define_label): Add an error message to tell the user the line
17121         where the goto is located in addition to the destination of the
17122         goto.
17123         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
17124         named_label_uses.
17125         (finish_function): Likewise.
17127         (start_decl): Complain about defining a static data member
17128         in a different type from which it was declared.
17130 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
17132         * cvt.c (build_expr_type_conversion): Adjust.
17134 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
17136         * call.c (build_method_call): Always convert 'this' to the
17137         appropriate type.
17139         * search.c (add_conversions): Put the conversion function in
17140         TREE_VALUE, the type in TREE_PURPOSE.
17141         * cvt.c (build_type_conversion): Adjust.
17142         * call.c (user_harshness): Adjust.
17144         * method.c (emit_thunk): Call temporary_allocation and
17145         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
17147         * tree.c (build_cplus_array_type): Handle tweaking of
17148         TYPE_MAIN_VARIANT here.
17149         * typeck.c (common_type): Not here.
17151         * typeck.c (complete_type): Only try to complete an array type if
17152         it has a domain.
17154 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
17156         * decl.c (grokvardecl): Call complete_type.
17157         (grokdeclarator): Call complete_type for PARM_DECLs.
17159 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
17161         * pt.c (instantiate_class_template): Re-set
17162         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
17164 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
17166         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
17167         smart enough to do it right.
17168         * tree.c (cp_expand_decl_cleanup): Likewise.
17169         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
17170         cp_expand_decl_cleanup.
17171         (store_parm_decls): Likewise.
17172         (hack_incomplete_structures): Likewise.
17173         * except.c (push_eh_cleanup): Likewise.
17175 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
17177         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
17178         frontend to the backend where it belongs.
17179         * tree.c (unsave_expr): Likewise.
17180         (unsave_expr_now): Likewise.
17181         * tree.def (UNSAVE_EXPR): Likewise.
17182         * cp-tree.h (unsave_expr): Likewise.
17183         (unsave_expr_now): Likewise.
17185 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
17187         * init.c (emit_base_init): Make sure the partial EH cleanups live
17188         on the function_obstack.
17190 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
17192         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
17193         when checking for pointer types.
17195 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
17197         * pt.c (instantiate_class_template): Remove obsolete check for
17198         access declarations.
17200 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
17202         * call.c (build_overload_call): Simplify calls to
17203         build_overload_call by removing last parameter.
17204         (build_method_call): Likewise.
17205         * cp-tree.h: Likewise.
17206         * method.c (build_opfncall): Likewise.
17207         * typeck.c (build_x_function_call): Likewise.
17209 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
17211         * call.c (default_parm_conversions): Factor out common code.
17212         (build_method_call): Use it.
17213         (build_overload_call_real): Use it.
17215 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
17217         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
17218         but pedwarn as the code is bogus.
17219         * typeck.c (decay_conversion): Likewise.
17220         (build_function_call_real): Use build_addr_func instead of
17221         default_conversion.  Don't allow pointer-to-method functions down
17222         here.
17223         (build_unary_op): Use real pointer-to-member functions instead of
17224         fake ones.
17225         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
17226         (convert_for_assignment): Removed some obsolete code.
17227         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
17228         build_x_function_call instead of current_class_ptr.  Only call
17229         digest_init once on an initializer, we do this just checking
17230         TREE_TYPE.
17231         (build_expr_from_tree): Pass current_class_ref to
17232         build_x_function_call instead of current_class_ptr.
17233         * init.c (build_member_call): Likewise.
17234         * pase.y: Likewise.
17235         * error.c (dump_expr): Handle OFFSET_REFs better.
17236         * pt.c (unify): Handle pointer-to-member functions better.
17237         * decl.c (finish_function): Clear out current_class_ref just like
17238         we do for current_class_ptr.
17240         * typeck.c (get_delta_difference): Handle virtual bases better.
17242 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
17244         * sig.c (build_signature_table_constructor): Use the delta for
17245         the original basetype for this virtual function with thunks.
17246         (build_signature_method_call): We still need to adjust 'this'
17247         with thunks.
17249 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
17251         * call.c (build_addr_func): New routine.  Used to get the `real'
17252         address of a function or a method.  Needed to avoid getting a
17253         pointer-to-member function.
17254         (build_call): New routine to build CALL_EXPRs.
17255         (build_method_call): Use it.
17256         * cvt.c (convert_to_aggr): Likewise.
17257         * typeck.c (build_function_call_real): Likewise.
17258         * sig.c (build_signature_table_constructor): Use build_addr_func.
17259         * cp-tree.h (build_call, build_addr_func): Declare them.
17261 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
17263         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
17264         * parse.y: Remove uses of LOOKUP_AGGR.
17266 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
17268         * *.[chy]: Rename current_class_decl to current_class_ptr, and
17269         C_C_D to current_class_ref.
17271 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
17273         * call.c (convert_harshness): Tighten up pointer conversions.
17275 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
17277         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
17278         (finish_file): Likewise.
17280 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
17282         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
17284         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
17285         code.
17287 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
17289         * decl2.c: Turn on thunks by default where supported.
17291 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
17293         * cp-tree.h (build_overload_call_maybe): Removed.
17294         * call.c (build_overload_call_real): Invert meaning of last arg to
17295         be require_complete.
17296         (build_overload_call): Likewise.
17297         * typeck.c (build_x_function_call): Use build_overload_call_real
17298         instead of build_overload_call_maybe.
17300 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
17302         * decl2.c (finish_file): Don't try to emit functions that haven't
17303         been compiled.
17305 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
17307         * decl2.c (finish_vtable_vardecl): Oops.
17309         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
17310         Also store the bindings from previous_class_values.
17311         (pop_from_top_level): Restore them.
17313 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
17315         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
17316         symbol has been referenced.
17317         (finish_file): Re-join synthesis/vtable loop with inline emission
17318         loop, disable inlining when an inline is output.
17320 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
17322         * except.c (init_exception_processing): Setup saved_in_catch.
17323         (push_eh_cleanup): Reset __eh_in_catch.
17324         (expand_start_catch_block): Set __eh_in_catch.
17326 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
17328         * except.c (push_eh_cleanup): Add tracking for whether or not we
17329         have an active exception object.
17330         (expand_builtin_throw): Use it to make sure a rethrow without an
17331         exception object is caught.
17333 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
17335         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
17336         cache.
17338 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
17340         * decl2.c (finish_file): Also use sentries for vars with
17341         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
17342         created).
17344         * lex.c (handle_cp_pragma): Disable #pragma
17345         interface/implementation if SUPPORTS_ONE_ONLY > 1.
17347 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
17349         * method.c (emit_thunk): Wrap default case in
17350         temporary/permanent_allocation.
17352         * method.c (make_thunk): Use DECL_ONE_ONLY.
17353         (emit_thunk): Call assemble_end_function.
17355 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
17357         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
17358         (import_export_decl): Likewise.
17359         (finish_prevtable_vardecl): Disable vtable hack if
17360         SUPPORTS_ONE_ONLY > 1.
17362 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
17364         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
17365         PREDECREMENT_EXPRs take two arguments, not one.
17367 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
17369         * class.c (build_vtable_entry): Don't build thunks for abstract
17370         virtuals.
17372         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
17373         frontend.
17375 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
17377         * class.c (set_rtti_entry): Use size_zero_node.
17378         (build_vtable): Likewise.
17380 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
17382         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
17383         (prepare_fresh_vtable): Likewise.
17385 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
17387         * method.c (emit_thunk): Call mark_used on the target function.
17389         * call.c (build_method_call): Don't warn about pending templates.
17391 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
17393         * decl2.c (finish_file): Fix list walking logic.
17395         * typeck2.c (check_for_new_type): Only warn if -pedantic.
17397 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
17399         * class.c (finish_struct_1): Remove old code for
17400         dont_allow_type_definitions.
17401         * cp-tree.h: Likewise.
17402         * spew.c: Make sure cp-tree.h is included before parse.h, so the
17403         definition of flagged_type_tree is found before it is used.
17404         * lex.c: Likewise.
17405         * parse.y: Added the ftype member to the type union, and changed a
17406         number of rules to use it instead of ttype.  Added calls to
17407         check_for_new_type() as appropriate.
17408         * typeck2.c (check_for_new_type): New function for checking
17409         if a newly defined type appears in the specified tree.
17410         * cp-tree.h: Add new type flagged_type_tree.  Add a prototype
17411         for check_for_new_type().
17413 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
17415         * decl2.c (finish_file): Only use a sentry if the decl is public.
17417         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
17418         don't pass LOOKUP_ONLYCONVERTING.
17420 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
17422         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
17423         properly keeps track of const and volatile type modifiers.
17425 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
17427         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
17428         * pt.c (comp_template_args): Use it.
17430         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
17431         assemble_external for artificial function decls.
17433         * decl.c (cp_finish_decl): Oops.
17435 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
17437         * decl2.c (import_export_decl): Put static data member templates
17438         into common storage, or make them weak, depending on whether they
17439         are dynamically or statically initialized.
17440         (get_sentry): New function.
17441         (finish_file): Do import_export_decl for static data members before
17442         building the init/fini functions.  Don't init/fini a variable that's
17443         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
17444         push/pop_temp_slots.
17445         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
17446         expand_static_init thang.
17447         * method.c (get_id_2): New function.
17449 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
17451         * parse.y (empty_parms): Make sure we use C++-style prototypes
17452         when we're declaring member functions.
17454 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
17456         * Makefile.in (CONFLICTS): 16 s/r conflicts.
17457         * parse.y (self_template_type): New nonterminal.
17459 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
17461         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
17462         name.
17463         * parse.y (base_class.1): Allow 'typename foo::bar'.
17465         * lex.c (check_newline): Remove #pragma code that plays with the
17466         input stream, since we now deal with tokens.  Clear nextchar when
17467         we're done.
17468         (handle_cp_pragma): Use real_yylex.
17469         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
17470         in one place.
17472         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
17474         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
17476 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17478         * parse.y: New token SELFNAME for potential constructor.
17479         * spew.c (yylex): Handle it.
17480         * lex.c (identifier_type): Produce it.
17482         * parse.y (complete_type_name): In :: case, don't push class binding.
17483         (complex_type_name): Likewise.
17485 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
17487         * typeck.c (build_reinterpret_cast): Handle pointer to member
17488         functions.
17490 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17492         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
17493         pragmas.
17494         (check_newline): Put the vtable/unit/implementation/interface pragma
17495         code into handle_cp_pragma, replacing it with a call.
17496         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
17497         args.  Get the next token after handling the pragma token.
17499 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
17501         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
17502         (convert_to_pointer_force): Likewise.
17504         * init.c (build_new): Fix array new without -fcheck-new.
17506 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
17508         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
17509         tree.c: Lose TYPE_NESTED_NAME.
17511         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
17512         as identifiers.
17514         * tree.def: Add VEC_INIT_EXPR.
17515         * expr.c (cplus_expand_expr): Handle it.
17516         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
17517         the extra file-scope symbol nastiness.
17519 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
17521         * method.c (make_thunk): Thunks are static.
17522         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
17524         * decl2.c (mark_vtable_entries): Emit thunks as needed.
17525         (finish_file): Don't emit them here.
17527 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
17529         * rtti.c (build_dynamic_cast): Handle null pointers.
17530         (ifnonnull): New function.
17532 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
17534         * call.c (build_method_call): Remember the original basetype we
17535         were called with.  Give an error message instead of trying
17536         (incorrectly) to call a non-static member function through a
17537         non-inherited class.
17539         * search.c (expand_upcast_fixups): Mark the new fixup as
17540         DECL_ARTIFICIAL.
17542 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17544         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
17546         * class.c (set_rtti_entry): Fix for thunks.
17548         * decl2.c (import_export_decl): Still emit typeinfo fns for
17549         cv-variants of builtin types.
17551         * rtti.c (expand_class_desc): Set up base_info_type_node here.
17552         (init_rtti_processing): Instead of here.
17554 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
17556         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
17557         (build_typeid): Only complain about taking dynamic typeid without
17558         -frtti.
17560         * decl2.c: flag_rtti defaults to 1.
17562         * rtti.c (get_tinfo_var): The general class case is now smaller.
17563         (init_rtti_processing): Pack the latter three fields of base_info
17564         into 32 bits.
17566 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
17568         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
17570 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
17572         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
17573         (push_memoized_context): Split out code to undefer pop_type_level to
17574         (clear_memoized_cache): here.
17575         (pop_memoized_context): We can only handle one layer of deferral of
17576         pop_type_level so clear the cache, if there was a previous level.
17578 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17580         * rtti.c (init_rtti_processing): Build up base_info_type_node.
17581         (expand_class_desc): Use one pointer to an array of base_info
17582         structs, passed using a CONSTRUCTOR.
17584 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
17586         * class.c (build_vbase_path): Remove block extern for
17587         flag_assume_nonnull_objects here.
17588         (build_vfn_ref): Split out functionality into build_vtbl_ref.
17589         (build_vtbl_ref): New routine.
17590         (build_vtable): Set up rtti info here.
17591         (add_virtual_function): Note in CLASSTYPE_RTTI the best
17592         place where we can get the rtti pointers from to avoid having to
17593         search around for a place.
17594         (finish_base_struct): Likewise.
17595         (finish_struct_1): Likewise.  Never create totally new vtables
17596         with totally new vtable pointers for rtti.  Disable code to layout
17597         vtable pointers better until we want to break binary
17598         compatibility.
17599         * rtti.c (build_headof_sub): New routine to convert down to a
17600         sub-object that has an rtti pointer in the vtable.
17601         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
17602         maintainable.
17603         (build_dynamic_cast): Make sure we have saved it, if we need to.
17604         * search.c (dfs_init_vbase_pointers): Disable code that deals with
17605         a more efficient vtable layout, enable later.
17606         * call.c (flag_assume_nonnull_objects): Moved declaration to
17607         * cp-tree.h: here.  Declare build_vtbl_ref.
17608         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
17609         function calls that want a tree.
17611 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
17613         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
17614         other X subobjects in the most derived type.  Ack.
17616         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
17617         get_typeid will do it for us.
17618         (get_typeid_1): Break out call-building for expand_*_desc to use.
17619         (get_typeid): Call it.
17620         (expand_*_desc): Likewise.
17621         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
17622         and void *.
17623         (init_decl_processing): Lose builtin_type_tdescs lossage.
17624         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
17626 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
17628         * pt.c (tsubst): When calling set_nested_typename, use
17629         TYPE_NESTED_NAME (current_class_type) instead of
17630         current_class_name.
17632         * decl.c (pushdecl): Likewise.
17633         (pushdecl_class_level): Likewise.
17634         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
17635         set_nested_typename.
17637 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
17639         * rtti.c (synthesize_tinfo_fn): Handle arrays.
17641         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
17643 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
17645         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
17646         (init_rtti_processing): Lose bad_cast_type.
17647         (build_dynamic_cast): Use throw_bad_cast.
17649         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
17651         * decl2.c (finish_file): Don't synthesize artificial functions
17652         that are external and not inline.
17654         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
17656         * decl2.c (finish_file): Handle having new inlines added to
17657         saved_inlines by synthesis.
17659         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
17661 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17663         RTTI rewrite to initialize nodes as needed, not require that
17664         users #include <typeinfo>, complete functionality and reduce wasted
17665         space.
17666         * rtti.c (init_rtti_processing): New fn.
17667         (build_typeid): The vtable entry is now a function.
17668         (get_tinfo_var): New fn.
17669         (get_tinfo_fn): Likewise.
17670         (get_typeid): Use it.
17671         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
17672         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
17673         points __rtti_*.
17674         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
17675         (synthesize_tinfo_fn): New fn.
17676         * method.c (build_t_desc_overload): Lose.
17677         (build_overload_with_type): More generic.
17678         * decl.c (init_decl_processing): Call init_rtti_processing.
17679         * class.c (set_rtti_entry): Use get_tinfo_fn.
17680         * decl2.c (mark_vtable_entries): Mark the rtti function.
17681         (finish_prevtable_vardecl): Don't build_t_desc.
17682         (import_export_decl): Handle tinfo functions.
17683         (finish_file): Likewise.
17684         * typeck.c (inline_conversion): New fn.
17685         (build_function_call_real): Use it.
17686         * cp-tree.h: Add decls.
17688         * method.c (hack_identifier): Also convert component_refs from
17689         references.
17691         * lex.c (cons_up_default_function): Use the type, not the name, in
17692         declspecs.
17694         * decl2.c (import_export_vtable): Fix weak vtables.
17696 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
17698         * search.c (get_base_distance_recursive): Fix access checks for
17699         protected bases.
17701 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17703         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
17704         cp-tree.h.
17705         (convert_harshness): Add prototypes wrapped by PROTO.
17706         * decl2.c (grok_function_init): Likewise.
17707         (do_toplevel_using_decl): Change to void return type.
17708         * class.c (build_vtable_entry): Remove decl of make_thunk.
17709         (merge_overrides): Fix order of arg definitions.
17710         (finish_vtbls): Likewise.
17711         (fixup_vtable_deltas): Likewise.
17712         (modify_all_direct_vtables): Likewise.
17713         (modify_all_indirect_vtables): Likewise.
17714         * search.c (get_base_distance_recursive): Likewise.
17715         (get_abstract_virtuals_1): Likewise.
17716         (fixup_virtual_upcast_offsets): Likewise.
17717         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
17718         * init.c (perform_member_init): Fix order of arg definitions.
17719         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
17720         * cp-tree.h (make_thunk): Add decl.
17721         (overload_template_name, push_template_decl): Add decls.
17722         (do_toplevel_using_decl): Change to void return type.
17723         (vec_binfo_member): Add decl.
17725 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17727         * typeck.c (mark_addressable, convert_for_assignment,
17728         convert_for_initialization, pointer_int_sum, pointer_diff,
17729         unary_complex_lvalue): Add prototypes wrapped by PROTO.
17730         (convert_sequence): #if 0 fn decl, since definition also is.
17732 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
17734         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
17735         cast to pointer types for type searching.
17737 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17739         * typeck.c (get_delta_difference): Use cp_error, not error, in the
17740         case where BINFO == 0.
17742 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
17744         * call.c (build_method_call): Fix wording of error messages so
17745         constructors come out right.
17747 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
17749         * decl.c (push_overloaded_decl): Don't warn about hidden
17750         constructors when both the type and the function are declared
17751         in a system header file.
17753 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
17755         * class.c (finish_struct_1): Propagate the TYPE_PACKED
17756         flag for the type to the type's fields.
17758 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17760         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
17762 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
17764         * class.c (base_info, finish_base_struct): Replace
17765         needs_virtual_dtor with base_has_virtual.
17767         (finish_struct_1): Remove the old code that tried to make default
17768         destructors virtual.  Use base_has_virtual when checking if we need
17769         to add a vtable entry for the rtti code.
17771 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
17773         * pt.c (push_template_decl): Complain about template decl with
17774         inappropriate declaration.
17776 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
17778         * typeck.c (build_x_unary_op): Remove bogus check for taking
17779         the address of a member function.
17781 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
17783         * parse.y (constructor_declarator): Only push the class if
17784         we are not already in the class.
17786 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
17788         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
17789         Add additional argument to INIT_CUMULATIVE_ARGS.
17791 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
17793         * decl.c (shadow_tag): Fix error about anon union with methods.
17795         * parse.y (self_reference): Only generate a self-reference if this
17796         is a non-template class.
17797         (opt.component_decl_list): Only use it if it was generated.
17799         * parse.y (component_decl_1): Use constructor_declarator.
17800         (fn.def2): Likewise.
17801         (notype_component_declarator0): Likewise.
17803 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
17805         * typeck.c (build_x_unary_op): Add checks for taking the address
17806         of a TARGET_EXPR or of a member function, and give appropriate
17807         warnings.
17809 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
17811         * pt.c (process_template_parm): Allow template type parms to be
17812         used as types for template const parms.
17814 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
17816         * init.c (expand_vec_init): Ensure the eh cleanups are on the
17817         function_obstack.
17819 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
17821         * decl.c (lookup_name_real): Be even more picky about the
17822         ambiguous lookup warning.
17823         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
17824         * parse.y (constructor_declarator): Rather than here.
17826         * parse.y (constructor_declarator): New nonterminal.
17827         (fn.def1): Use it.
17828         (explicit_instantiation): Likewise.
17830 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17832         Add implicit declaration of class name at class scope.
17833         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
17834         * parse.y (self_reference): New nonterminal.
17835         (opt.component_decl_list): Use it.
17836         (fn.def1): Add nested_name_specifier type_name cases.
17837         * class.c (build_self_reference): New function.
17838         (finish_struct): Handle access_default later, move self-reference
17839         decl to the end.
17840         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
17841         * cp-tree.h: Adjust.
17843         * pt.c (do_function_instantiation): Separate handling of member
17844         functions and non-member functions properly.
17846 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
17848         * pt.c (process_template_parm): Improve error for 'volatile class K'.
17850         * class.c (finish_struct_1): Check the right slot for destructors.
17852         * decl.c (start_enum): Complain about enum templates.
17854 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
17856         * init.c (resolve_offset_ref): Offset pointers to member data by one.
17857         * typeck.c (unary_complex_lvalue): Likewise.
17859 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
17861         * typeck.c (c_expand_return): Check for a returned local
17862         array name, similar to the check for an ADDR_EXPR.
17864 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
17866         * decl.c (cp_finish_decl): Don't build cleanups for static
17867         variables here.
17869 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
17871         * typeck.c (build_modify_expr): Fix error messages to be more
17872         accurate.
17873         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
17874         assignment operators.
17875         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
17876         assignment operators.
17878 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
17880         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
17881         give an error if initialized.  pedwarn about nested type with the
17882         same name as its enclosing class.
17884         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
17886         * typeck.c (require_complete_type): Be sure to instantiate the
17887         MAIN_VARIANT of the type.
17889         * decl2.c (finish_file): Instantiate pending templates before
17890         processing static constructors and destructors.
17892         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
17893         unless at_eof.
17895 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
17897         * decl2.c (delete_sanity): If error_mark_node is passed
17898         in as an expression, quit while we're ahead.
17900         * decl.c (grokdeclarator): Give an error message if `friend'
17901         is combined with any storage class specifiers.
17903 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
17905         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
17906         definition of nonexistent nested type.
17908         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
17909         not to say 'typedef'.
17911 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17913         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
17914         * search.c (dfs_walk, dfs_init_vbase_pointers,
17915         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
17916         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
17918 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
17920         * except.c (build_throw): Support minimal parse.
17921         * pt.c (tsubst_copy): Support THROW_EXPR.
17922         * decl2.c (build_expr_from_tree): Likewise.
17924         * pt.c (mangle_class_name_for_template): Always allocate
17925         scratch_firstobj.
17927 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
17929         * cvt.c (cp_convert_to_pointer): Give an appropriate error
17930         when trying to cast from an incomplete type.
17932 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17934         * pt.c (instantiate_class_template): Don't bother setting up
17935         CLASSTYPE_TAGS explicitly, as the nested types will add
17936         themselves.
17938 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
17940         * decl.c (shadow_tag): Remove old error check for usage of
17941         an enum without a previous declaration.
17942         (xref_tag): Add error message about usage of enums without a
17943         previous declaration.
17945 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
17947         * lex.c (do_identifier): Only do name consistency check if we're
17948         parsing.
17950         * pt.c (push_template_decl): Don't crash if we get a member defn
17951         that doesn't match.
17953         * decl.c (xref_tag_from_type): New function to do an xref without
17954         always having to figure out code_type_node.
17955         * cp-tree.h: Declare it.
17956         * pt.c (instantiate_class_template): Use it for friend classes.
17957         (lookup_template_class): Use it.
17959         * typeck2.c (build_functional_cast): Pull out a single parm before
17960         passing it to build_c_cast.
17962 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
17964         * expr.c (do_case): Give an error message if a pointer is
17965         given as a case value.
17967 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
17969         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
17970         an overload list.
17972         * lex.c (cons_up_default_function): Really, now, interface hackery
17973         does not apply to synthesized methods.
17975 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
17977         * call.c (build_method_call): Ctors and dtors now have special names
17978         with respect to lookups.
17979         * class.c (add_method): Likewise.
17980         (grow_method): Likewise.
17981         (finish_struct_methods): Likewise.
17982         (warn_hidden): Likewise.
17983         (finish_struct_1): Likewise.
17984         * cvt.c (convert_to_reference): Likewise.
17985         (convert_to_aggr): Likewise.
17986         (cp_convert): Likewise.
17987         * decl2.c (check_classfn): Likewise.
17988         * init.c (expand_member_init): Likewise.
17989         (expand_default_init): Likewise.
17990         (expand_aggr_init_1): Likewise.
17991         (build_offset_ref): Likewise.
17992         (build_new): Likewise.
17993         (build_delete): Likewise.
17994         * lex.c (do_inline_function_hair): Likewise.
17995         * search.c (lookup_field_1): Likewise.
17996         (lookup_fnfields_here): Likewise.
17997         (lookup_field): Likewise.
17998         (lookup_fnfields): Likewise.
17999         (get_virtual_destructor): Likewise.
18000         (dfs_debug_mark): Likewise.
18001         (dfs_pushdecls): Likewise.
18002         (dfs_compress_decls): Likewise.
18003         * tree.c (layout_basetypes): Likewise.
18004         * typeck.c (build_component_ref): Likewise.
18005         (build_x_function_call): Likewise.
18006         (build_modify_expr): Likewise.
18007         (convert_for_initialization): Likewise.
18008         (build_functional_cast): Likewise.
18009         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
18010         (CTOR_NAME): New.
18011         (DTOR_NAME): New.
18012         * decl.c (ctor_identifier): New.
18013         (dtor_identifier): New.
18014         (init_decl_processing): Set them.
18016 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
18018         * typeck.c (build_component_ref): Don't get confused by fields whose
18019         context has no type name, like pointer to member functions.
18021 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
18023         * decl.c (grokdeclarator): Handle typedef without declarator.
18025         * pt.c (tsubst): Handle SCOPE_REF in declarator.
18027         * parse.y (bad_parm): Catch another case of missing `typename'.
18029         * lex.c (yyprint): Handle TYPE_DECLs.
18031         * decl.c (start_function): Don't try to be clever.
18033         * lex.c: Lose compiler_error_with_decl.
18034         * typeck2.c: Lose error_with_aggr_type.
18035         (incomplete_type_error): Use cp_* instead of old functions.
18036         (readonly_error): Likewise.
18037         * typeck.c (convert_arguments): Likewise.
18038         * search.c (lookup_nested_field): Likewise.
18039         * method.c (make_thunk): Likewise.
18040         * decl.c (grokparms): Likewise.
18041         * cp-tree.h: Update.
18043         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
18044         and value.
18046 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
18048         * method.c (build_opfncall): When deleting a pointer to an
18049         array, build a new pointer to the tree past any ARRAY_TYPE
18050         nodes.
18052 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18054         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
18056 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
18058         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
18059         and ! DECL_INLINE.
18061         * decl.c (finish_function): Don't set nested based on
18062         hack_decl_function_context.
18063         * parse.y (function_try_block): Check for nested function.
18064         (pending_inlines): Likewise.
18066         * decl2.c (build_expr_from_tree): If a unary op already has a
18067         type, just return it.
18069         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
18071         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
18072         (finish_file): Check the return value of walk_vtables.
18073         (finish_prevtable_vardecl): Return int.
18074         (finish_vtable_vardecl): Likewise.
18075         (prune_vtable_vardecl): Likewise.
18076         * lex.c (set_vardecl_interface_info): Likewise.
18077         * cp-tree.h: Adjust return types.
18079         * class.c (delete_duplicate_fields_1): Don't complain about
18080         duplicate nested types if they're the same type.
18081         (finish_struct): Remove check for duplicate.
18082         * decl2.c (grokfield): Don't check for typedef of anonymous type.
18084 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
18086         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
18088         * decl.c (grokdeclarator): Lose special handling of class-level
18089         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
18090         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
18092         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
18094         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
18096         * search.c (compute_access): Fix handling of anonymous union
18097         members.
18098         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
18099         from anonymous unions to their members.
18101         * typeck.c (build_x_function_call): For static member functions,
18102         hand off to build_member_call.
18104 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
18106         * typeck.c (build_component_ref): Handle OFFSET_REFs.
18108         * init.c (expand_vec_init): Fix init == 0 case.
18110 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
18112         * init.c (build_new): pedwarn about init and array new.
18113         (expand_vec_init): Handle lists, use convert_for_initialization.
18115         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
18116         when converting to an aggregate type.
18117         * cvt.c (cp_convert): Pass it through.
18119         * typeck.c (build_conditional_expr): Handle user-defined
18120         conversions to slightly different types.
18122         * decl.c (grokdeclarator): Force an array type in a parm to be
18123         permanent.
18125         * decl2.c (do_using_directive): Sorry.
18126         (do_namespace_alias): Likewise.
18127         * lex.c (real_yylex): Warn about using the `namespace' keyword.
18129 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
18131         * parse.y (datadef): Move call to note_list_got_semicolon up.
18133 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
18135         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
18137 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
18139         * decl.c (cp_finish_decl): The exception regions have to be
18140         nested, not overlapping.  We start the exception region for a
18141         decl, after it has been fully built, and all temporaries for it
18142         have been cleaned up.
18144 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
18146         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
18148 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
18150         * tree.def: Add RETURN_INIT.
18151         * pt.c (instantiate_decl): Handle RETURN_INIT.
18152         * decl.c (store_return_init): Handle minimal_parse_mode.
18154         * tree.c (cp_build_type_variant): Just return an error_mark_node.
18155         * decl.c (make_typename_type): Don't try to get the file and line
18156         of an identifier.
18157         * typeck.c (comptypes): Handle TYPENAME_TYPE.
18159 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
18161         * decl.c (poplevel): Make sure we clear out and restore old local
18162         non-VAR_DECL values by default when they go out of scope.
18164 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
18166         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
18167         referring to addresses of variables and functions.
18169         * error.c (dump_expr): Support SIZEOF_EXPR.
18171         * init.c (do_friend): Use the return value of check_classfn.
18173         * typeck.c (convert_arguments): Call complete_type.
18175         * method.c (hack_identifier): After giving an error, set value to
18176         error_mark_node.
18178 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
18180         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
18181         lossage for local classes.
18182         * cp-tree.h: Declare it.
18183         * decl.c (lookup_name_real): Evil, painful hack for local classes.
18184         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
18185         Use hack_decl_function_context.
18186         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
18187         (start_function): Use hack_decl_function_context.
18188         (finish_function): Likewise.
18189         * method.c (synthesize_method): Likewise.
18190         * lex.c (process_next_inline): Likewise.
18191         (do_pending_inlines): Likewise.
18192         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
18193         done with it.
18195 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
18197         * sig.c (build_signature_pointer_or_reference_type): Align
18198         signature pointers/references on 8-byte boundaries so they can be
18199         grabbed 2 words at a time on a Sparc.
18201 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
18203         * method.c (hack_identifier): Requiring a static chain is now a
18204         hard error.
18205         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
18206         functions.
18208 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
18210         * init.c (build_offset_ref): Call complete_type.
18212         * decl.c (pop_from_top_level): Always pop previous_class_type.
18214         * parse.y: Handle multiple decls in a for-init-statement.
18215         * pt.c (tsubst_expr): Likewise.
18217         * pt.c (tsubst): Use tsubst_expr for the second operand of an
18218         ARRAY_REF.
18220         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
18221         (poplevel_class): Set it here.
18222         (pop_from_top_level): Pop it here if we're returning to class scope.
18223         * class.c (pushclass): Don't set it here.
18225         * decl.c (maybe_push_to_top_level): Save current_template_parms,
18226         and clear it if !pseudo.
18227         (pop_from_top_level): Restore it.
18229         * decl2.c (finish_file): Push the dummy each time we walk the list
18230         of vtables.
18232         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
18233         something for CAST_EXPR.
18235 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
18237         * cvt.c (cp_convert): Warn about implicit conversion of the
18238         address of a function to bool, as it is always true.
18240 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
18242         * typeck.c (c_expand_return): Fix warning for local externs returned.
18244 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
18246         * tree.c (mapcar): Propagate const and volatile properly.
18248         * typeck.c (complete_type): Be sure to instantiate the
18249         MAIN_VARIANT of the type.
18251         * method.c (synthesize_method): Class interface hackery does not
18252         apply to synthesized methods.
18254 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
18256         * pt.c (comp_template_args): Use comptypes rather than just
18257         checking for TEMPLATE_TYPE_PARM equivalence.
18259         * typeck.c (build_x_function_call): Call complete_type before
18260         checking TYPE_OVERLOADS_CALL_EXPR.
18262 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
18264         * g++.c (main): Check also for new define ALT_LIBM.
18266 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
18268         * pt.c (instantiate_class_template): If we don't have a pattern
18269         yet, that's OK.
18270         (coerce_template_parms): If we see a local class, bail.
18272         * decl.c (grok_reference_init): Make sure there's a type before
18273         checking its code.
18275         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
18276         (push_template_decl): Likewise.
18278         * parse.y (named_class_head): Set
18279         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
18281         * decl.c (xref_tag): Diagnose redeclaration of template
18282         type-parameter name.
18284         * error.c (dump_type): Handle anonymous template type parms.
18286         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
18287         TYPE_STUB_DECL.
18288         (coerce_template_parms): Likewise.
18290 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
18292         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
18293         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
18295 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
18297         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
18298         before trying to get its STUB_DECL.
18299         (coerce_template_parms): Likewise.
18301         * parse.y (template_type_parm): If they didn't use 'class',
18302         pretend they did after giving an error.
18304         * pt.c (coerce_template_parms): Diagnose use of local class.
18306         * decl.c (grok_reference_init): Use instantiate_type.
18308         * error.c (dump_expr): Handle TEMPLATE_DECLs.
18310         * parse.y (named_class_head): Diagnose mismatching types and tags.
18312         * decl.c (pushdecl): Type decls and class templates clash with
18313         artificial type decls, not hide them.
18315         * decl.c (redeclaration_error_message): Diagnose redefinition of
18316         templates properly.
18317         (duplicate_decls): Diagnose disallowed overloads for template
18318         functions, too.
18320         * decl.c (start_decl): Call complete_type before checking for a
18321         destructor.
18323         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
18325         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
18327 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18329         * decl.c (grok_op_properties): Don't check for operator++(int) in
18330         a template.
18332         * tree.c (perm_manip): Return a copy of variable and function
18333         decls with external linkage.
18335         * tree.def: Change some of the min tree codes to type "1".
18336         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
18337         * method.c (build_overload_int): Emit something arbitrary for
18338         anything but an INTEGER_CST if we're in a template.
18340         * decl.c (cp_finish_decl): Call complete_type before deciding
18341         whether or not to lay out the decl.
18343         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
18345 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
18347         * typeck2.c (build_x_arrow): Call complete_type.
18349         * pt.c (add_pending_template): Broken out.
18350         (lookup_template_class): If -fexternal-templates, call it for all
18351         the methods of implemented types.
18352         (instantiate_class_template): Instead of instantiating them here.
18353         (instantiate_decl): Handle -fexternal-templates earlier.
18355 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18357         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
18358         memoized lookup stuff inside GATHER_STATISTICS.
18360 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
18362         * decl.c (start_decl): Complain about array of incomplete type
18363         here.
18364         (grokdeclarator): Not here.
18366         * parse.y (template_parm): Expand full_parm inline so we can set
18367         the rule's precedence.
18369         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
18370         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
18371         * decl2.c (grokbitfield): Don't check for integer constant here.
18372         * class.c (finish_struct_1): Check here.
18374         * decl.c (define_label): Make the min decl go on permanent_obstack.
18376         * pt.c (unify): Don't handle CONST_DECLs.
18377         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
18378         (tsubst_copy): Likewise.
18380         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
18381         CONST_DECL for a template parm.
18383 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
18385         * decl.c (grokdeclarator): Complain about array of incomplete type
18386         here.
18387         (start_decl_1): Not here.
18389         * pt.c (tsubst): Handle pointer-to-function declarators.
18391         * method.c (hack_identifier): If pedantic, diagnose local class
18392         methods that require a static chain.
18394         * decl.c (grok_op_properties): No longer static.
18395         * cp-tree.h: Declare it.
18396         * pt.c (tsubst): Call it for operators.
18397         Use tsubst_copy for TREE_VECs.
18399         * parse.y (template_arg): The expr has precedence like '>'.
18401 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
18403         * pt.c (coerce_template_parms): Don't coerce an expression using
18404         template parms.
18405         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
18406         (tsubst): Don't use build_index_2_type if the max_value uses template
18407         parms.
18408         * method.c (build_overload_int): Emit something arbitrary for an
18409         expression using template parms.
18411         * parse.y (template_close_bracket): New non-terminal to catch use
18412         of '>>' instead of '> >' in template class names.
18413         (template_type): Use it.
18414         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
18416         * tree.def: Add CAST_EXPR.
18417         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
18418         CONVERT_EXPR for minimal_parse_mode.
18419         * typeck.c (build_c_cast): Likewise.
18420         * pt.c (tsubst_copy): Likewise.
18421         * decl2.c (build_expr_from_tree): Likewise.
18422         * error.c (dump_expr): Likewise.
18424 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18426         * except.c (SetTerminate, SetUnexpected): Put back global vars.
18427         (init_exception_processing): Put back decl/init of
18428         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
18429         fns from libstdc++.
18431         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
18432         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
18433         Delete unused fns.
18434         * cp-tree.h (declare_uninstantiated_type_level,
18435         uninstantiated_type_level_p): Delete prototypes.
18437 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
18439         * pt.c (tsubst_expr): Add default return.
18441 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18443         * error.c (fndecl_as_string): Delete unused arg CNAME.
18444         * sig.c (build_signature_table_constructor,
18445         build_signature_method_call): Fix calls.
18447         * class.c (the_null_vtable_entry): Delete var definition.
18448         (init_class_processing): Delete tree the_null_vtable_entry init.
18449         * decl.c (no_print_{functions, builtins}): Declare as static.
18450         (__tp_desc_type_node): #if 0 var definition.
18451         (init_type_desc): #if 0 init of __tp_desc_type_node.
18452         (vb_off_identifier): Move var decl into init_decl_processing.
18453         (current_function_assigns_this): Declare as static.
18454         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
18455         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
18456         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
18457         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
18458         * init.c (BI_header_type, BI_header_size): Declare as static.
18459         * pt.c (template_classes): Delete unused var.
18460         (add_pending_template): Delete decl for non-existent fn.
18461         (lookup_template_class): Delete vars CODE and TAG_CODE.
18462         (instantiate_template): Delete unused var TARGS.
18463         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
18464         Delete decls.
18465         (__tp_desc_type_node): #if 0 var decl.
18466         (fndecl_as_string): Fix prototype.
18468 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
18470         * tree.def: Add GOTO_STMT.
18471         * pt.c (tsubst_expr): Support goto and labels.
18472         * decl.c (define_label): Support minimal parsing.
18473         * parse.y (simple_stmt): Likewise.
18475 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18477         * xref.c (GNU_xref_member): Only define/set var I if
18478         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
18479         used.
18480         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
18481         (GNU_xref_end): Fix call.
18482         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
18483         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
18485         * tree.c (build_exception_variant): Delete unused vars I, A, T,
18486         T2, and CNAME.
18487         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
18488         (mapcar): Delete unused var CODE.
18489         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
18490         (break_out_cleanups): Fix call.
18491         (bot_manip): Likewise.
18492         * call.c (build_method_call): Likewise.
18493         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
18494         Likewise.
18495         * typeck.c (unary_complex_lvalue, build_modify_expr,
18496         convert_for_initialization): Likewise.
18497         * typeck2.c (build_functional_cast): Likewise.
18498         * cp-tree.h (build_cplus_new): Fix prototype.
18500         * repo.c (open_repo_file): Delete unused var Q.
18501         (repo_compile_flags, repo_template_declared,
18502         repo_template_defined, repo_class_defined, repo_inline_used,
18503         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
18504         (repo_get_id, repo_vtable_used): Declare as static.
18505         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
18506         prototypes.
18508 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
18510         * parse.y (pending_inlines): Add function_try_block case.
18512         * pt.c (unify): Fix for template const parms.
18514 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18516         * lex.c (extract_interface_info): Delete forward decl.
18517         (default_copy_constructor_body, default_assign_ref_body): Delete
18518         decls for non-existent functions.
18519         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
18520         (init_lex): Delete setting them.
18521         (cons_up_default_function): Delete unused vars FUNC_BUF,
18522         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
18523         #if 0'd synth code.
18524         (toplevel, expression_obstack): Delete unused extern decls.
18525         (tree_node_kind): Delete unused enum.
18526         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
18527         GATHER_STATISTICS.
18528         (tree_node_kind_names): Delete unused extern decl.
18529         (synth_obstack): Delete unused var.
18530         (init_lex): Don't set it.
18531         (init_parse): Add decl before use.
18532         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
18533         (current_unit_{name, language}): Delete unused vars.
18534         (check_newline): Don't bother setting them, just accept the #pragma.
18535         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
18536         (current_unit_{name, language}): Delete decls.
18538         * search.c: Wrap all of the memoized functions, macros, and
18539         variables inside #ifdef GATHER_STATISTICS.
18540         (lookup_field, lookup_fnfields): Likewise.
18541         (init_search_processing): Likewise.
18542         (reinit_search_statistics): Wrap whole function.
18543         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
18545         * decl.c (finish_function): Only call pop_memoized_context if
18546         GATHER_STATISTICS is defined.
18547         (start_function): Likewise for push_memoized_context.
18548         * class.c (pushclass, popclass): Likewise.
18550         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
18551         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
18553         * cvt.c (cp_convert): Delete unused local var FORM.
18554         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
18555         prototypes.
18557 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18559         * pt.c (do_poplevel): Oops; really return what we get from
18560         poplevel this time.
18562 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18564         * cp-tree.h (is_aggr_type): Add prototype.
18566         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
18567         * method.c ({push,pop}_cp_function_context): Delete decls.
18568         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
18569         (SetUnexpected, SetTerminate): Delete unused vars.
18570         (init_exception_processing): Don't set SetUnexpected or
18571         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
18572         (output_exception_table_entry): Delete unused array LABEL.
18573         (expand_internal_throw): Delete unused var PARAMS.
18574         (expand_start_catch_block): Delete unused var CLEANUP.
18575         (emit_exception_table): Delete unused var EH_NODE_DECL.
18576         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
18577         GOTO_UNWIND_AND_THROW.  Don't set them.
18578         (end_eh_unwinder): Add top decl.
18579         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
18580         (exception_section, push_rtl_perm, do_function_call,
18581         lang_interim_eh, push_eh_cleanup, eh_outer_context,
18582         expand_end_eh_spec, end_eh_unwinder): Declare as static.
18583         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
18584         throw_used): Likewise.
18585         * cp-tree.h (expand_end_eh_spec): Delete prototype.
18587         * search.c (dfs_mark, dfs_mark_vtable_path,
18588         dfs_unmark_vtable_path, dfs_mark_new_vtable,
18589         dfs_unmark_new_vtable, dfs_clear_search_slot,
18590         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
18591         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
18592         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
18593         functions.
18594         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
18595         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
18596         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
18597         Only define #ifdef GATHER_STATISTICS.
18598         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
18599         is defined.
18600         (vbase_decl): Delete var definition.
18601         (init_search): Delete old decl.
18602         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
18603         never actually used.
18604         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
18605         (get_base_distance_recursive): Delete unused fourth arg
18606         BASETYPE_PATH.  Fix call .
18607         (get_base_distance): Fix call.
18608         (push_class_decls): Delete unused var ID.
18609         (make_memoized_table_entry): Declare as static.
18610         (breadth_first_search): Declare as static.
18611         (tree_has_any_destructor_p): Declare as static.
18612         (pop_class_decls): Delete unused arg pop_class_decls.
18613         * class.c (popclass): Fix call to pop_class_decls.
18614         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
18615         tree_has_any_destructor_p): Delete prototypes.
18617         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
18618         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
18619         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
18620         (build_user_desc): Delete unused var T.
18621         (build_class_desc): Delete unused vars T and OFF.
18622         (build_t_desc): Delete unused var NAME_STRING.
18623         (build_headof): Make static.
18624         (get_bad_cast_node): Likewise.
18625         (get_def_to_follow): Likewise.
18626         * cp-tree.h (init_type_desc): Add prototype.
18627         (build_headof): Remove prototype.
18629 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
18631         * pt.c (tsubst): Only look for matching decls at file scope for
18632         non-member functions.
18634         * call.c (build_scoped_method_call): Handle scoped destructor
18635         calls in templates.
18637         * decl.c (*_top_level): Also save previous_class_values.
18639         * pt.c (tsubst_expr): Support do {} while loops.
18640         * parse.y (simple_stmt): Likewise.
18641         * tree.def: Likewise.
18643         * method.c (build_overload_identifier): For a class nested in a
18644         template class, don't mangle in the template parms from our
18645         context.
18647         * lex.c, cp-tree.h: Remove support for template instantiations in
18648         the pending_inlines code.
18649         * pt.c: Remove dead functions and unused arguments.
18650         (uses_template_parms): TYPENAME_TYPEs always use template parms.
18651         * parse.y: Stop passing anything to end_template_decl.
18652         * tree.c (print_lang_statistics): Only print tinst info #ifdef
18653         GATHER_STATISTICS.
18655 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18657         * init.c (expand_recursive_init{,_1}): Delete decls.
18658         (sort_member_init): Delete unused var INIT.
18659         (emit_base_init): Delete unused var X.
18660         (build_offset_ref): Delete unused var CNAME.
18661         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
18662         (emit_base_init): Delete unused local var BASE.  Delete extern
18663         decl of IN_CHARGE_IDENTIFIER.
18664         (build_delete): Delete unused local var VIRTUAL_SIZE.
18666         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
18667         (build_delete): Fix call.
18668         * decl2.c (delete_sanity): Likewise.
18669         * cp-tree.h (build_vec_delete): Update prototype.
18671         * typeck.c (common_base_type): Delete unused var TMP.
18672         (build_binary_op): Delete local var ARGS_SAVE.
18673         (build_array_ref): Delete unused var ITYPE.
18674         (c_expand_return): Delete unused var USE_TEMP.
18676         * typeck.c (compexcepttypes): Delete unused arg STRICT.
18677         (comptypes): Fix calls.
18678         * decl.c (duplicate_decls): Likewise.
18679         * cp-tree.h (compexcepttypes): Delete extra arg.
18681         * decl2.c (check_classfn): Delete unused second arg CNAME.
18682         * decl.c (start_decl, grokfndecl): Fix calls.
18683         * init.c (do_friend): Likewise.
18684         * cp-tree.h (check_classfn): Update prototype.
18686         * cp-tree.h (signature_error, import_export_vtable,
18687         append_signature_fields, id_in_current_class, mark_used,
18688         copy_assignment_arg_p): Add decls.
18689         * decl2.c (mark_used): Delete decl.
18691         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
18693         * class.c (get_vtable_entry): Disable unused function.
18694         (doing_hard_virtuals): Delete unused static global var.
18695         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
18696         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
18697         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
18698         (modify_one_vtable): Delete unused var OLD_RTTI.
18699         (finish_struct_anon): Delete unused vars OFFSET and X.
18700         (finish_struct_bits): Delete unused var METHOD_VEC.
18701         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
18702         for-scope local variable METHODS.
18704         * call.c (user_harshness): Delete unused/unneeded arg PARM.
18705         (ideal_candidate): Delete unused args BASETYPE and PARMS.
18706         (build_method_call): Delete unused args passed into ideal_candidate.
18707         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
18708         * cp-tree.h (synthesize_method): Add decl.
18710         * decl.c (note_level_for_for): Give void return type.
18711         (pushdecl_nonclass_level): Likewise.
18712         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
18713         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
18714         (suspend_binding_level): Delete unused var LEVEL.
18715         (duplicate_decls): Delete unused var CTYPE.
18716         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
18717         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
18718         PTR_ENDLINK.
18719         (grokdeclarator): Delete unused var C.
18720         (grokdeclarator): Delete unused var SIZE_VARIES.
18721         (grokparms): Delete unused var SAW_VOID.
18722         (start_function): Delete unused var OLDDECL.
18723         (cplus_expand_expr_stmt): Delete unused var
18724         REMOVE_IMPLICIT_IMMEDIATELY.
18726         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
18728         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
18730 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18732         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
18733         (build_min_nt): Likewise.
18734         * pt.c (do_pushlevel): Emit line note.
18735         (do_poplevel): Return what we get from poplevel.
18736         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
18737         * parse.y: Use do_pushlevel and do_poplevel.
18738         * cp-tree.h: Declare do_poplevel.
18740         * cp-tree.h: Declare at_eof.
18741         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
18742         * decl2.c (import_export_decl): Renamed from import_export_inline.
18743         (finish_file): Call it to do interface handling for statics.
18744         * pt.c (tsubst_copy): Call mark_used on variables and functions
18745         used here.
18747         * decl2.c (finish_file): Don't emit statics we can't generate.
18748         * pt.c (instantiate_decl): Don't set interface on instantiations
18749         we can't generate.
18751         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
18752         * tree.c (print_lang_statistics): Print max template depth.
18753         * pt.c (push_tinst_level): Dump entire instantiation context.
18754         (instantiate_class_template): Use it and pop_tinst_level.
18755         (instantiate_decl): Likewise.
18757         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
18758         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
18760 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
18762         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
18763         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
18764         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
18765         the new template implementation.
18767 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18769         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
18771 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
18773         * decl.c (cp_finish_decl): Delay emitting the debug information for
18774         a typedef that has been installed as the canonical typedef, if the
18775         type has not yet been defined.
18777 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
18779         * decl2.c (grokfield): Still call pop_nested_class for access decls.
18781 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18783         * decl.c (lookup_label): Call label_rtx.
18785         * decl.c (make_binding_level): New function.
18786         (pushlevel, pushlevel_class): Call it instead of explicit
18787         duplicate calls to xmalloc.
18789         * decl.c (init_decl_processing): Delete useless build_pointer_type
18790         call.
18792         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
18793         (sizet_ftype_string): Delete variable.
18794         (init_decl_processing): Add built-in functions fabsf, fabsl,
18795         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
18796         variable strlen_ftype, used for strlen.
18798 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
18800         * decl.c (push_to_top_level): Start from current_binding_level
18801         again for now; the stl hacks depend on g++ being broken in this
18802         way, and it'll be fixed in the template rewrite.
18804         * tree.def: Add USING_DECL.
18805         * decl2.c (do_class_using_decl): Implement.
18806         (grokfield): Pass access decls off to do_class_using_decl instead of
18807         grokdeclarator.
18808         * error.c (dump_decl): Handle USING_DECLs.
18809         * decl.c (grokdeclarator): Remove code for handling access decls.
18810         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
18811         as access decls for now.
18812         (finish_struct): Don't check USING_DECLs for other uses of the name.
18814         * search.c (get_matching_virtual): Use cp_error_at.
18816 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18818         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
18819         match c-typeck.c.
18820         (self_promoting_args_p): Move the check that TYPE is non-nil
18821         before trying to look at its main variant.
18822         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
18824         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
18825         Delete macros.
18826         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
18827         (do_friend): Delete call to xref_friend.
18828         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
18830         * typeck.c (convert_sequence): #if 0 unused function.
18832         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
18833         be in decl_in_memory_p.
18834         (decl_in_memory_p): Delete decl.
18835         * expr.c (decl_in_memory_p): Delete fn.
18836         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
18838         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
18840 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
18842         * class.c (finish_struct_1): Check for a pure-specifier on a
18843         non-virtual function here.
18845         * decl2.c (grok_function_init): Don't check whether the function
18846         is virtual here.
18847         (grokfield): Don't call check_for_override here.
18849         * decl.c (push_to_top_level): Start from inner_binding_level,
18850         check class_shadowed in class levels.
18852 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
18854         * decl.c (resume_level): Ignore things that don't have names, instead
18855         of core dumping.
18857 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18859         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
18861 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
18863         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
18864         synthesized dtor.
18866         * parse.y (complete_type_name): Bind global_scope earlier.
18867         (complex_type_name): Likewise.
18868         (qualified_type_name): Remove.
18870 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
18872         * decl.c (grokfndecl): Move code that looks for virtuals in base
18873         classes...
18874         * class.c (check_for_override): ... to a new function.
18875         (finish_struct_1): Call it.
18877         * cp-tree.h: Declare warn_sign_compare.
18879         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
18880         rather than extra_warnings to decide whether to warn about
18881         comparison of signed and unsigned.
18883         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
18884         implies -Wsign-compare.  -Wall doesn't imply -W.
18886 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
18888         * typeck.c (build_component_ref): Fix to handle anon unions in base
18889         classes as well.
18891 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18893         * class.c (resolves_to_fixed_type_p): Delete code dealing with
18894         a WITH_CLEANUP_EXPR, since we don't generate them any more.
18895         * cvt.c (build_up_reference): Likewise.
18896         * decl.c (grok_reference_init): Likewise.
18897         (cp_finish_decl): Likewise.
18898         * error.c (dump_expr): Likewise.
18899         * tree.c (real_lvalue_p): Likewise.
18900         (lvalue_p): Likewise.
18901         (build_cplus_new): Likewise.
18902         (unsave_expr_now): Likewise.
18903         * typeck.c (unary_complex_lvalue, build_modify_expr,
18904         c_expand_return): Likewise.
18906 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18908         Make the C++ front-end pay attention to attributes for structures.
18909         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
18910         finish_struct_1.
18911         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
18912         Take out old round_up_size use and setting the DECL_ALIGN possibly
18913         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
18914         can override what the attribute set.
18915         * cp-tree.h (finish_struct): Update prototype.
18916         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
18917         attributes to finish_struct.
18918         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
18919         value down into finish_struct.
18920         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
18922 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
18924         * decl.c (poplevel):  Re-word dead for local handling.
18925         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
18926         (cp_finish_decl):  If is_for_scope, check for duplicates so
18927         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
18929         * lex.c (do_identifier):  Use global binding in preference of
18930         dead for local variable.
18932 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
18934         * init.c (initializing_context): Handle anon union changes, the
18935         context where fields of anon unions can be initialized now has to be
18936         found by walking up the TYPE_CONTEXT chain.
18938 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
18940         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
18941         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
18942         (obscure_complex_init): If bss is supported, always set
18943         DECL_INITIAL to error_mark_node.
18945 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18947         * init.c (is_friend): Make sure there's a context before we see if
18948         it's an aggr type.
18950 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
18952         * init.c (is_friend): Classes are not friendly with nested classes.
18954 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
18956         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
18957         and record its result.
18959 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
18961         * class.c (finish_struct_anon): Switch around code to not move anon
18962         union elements around, nor mess up their contexts, nor offsets,
18963         instead we now build up the right number of COMPONENT_REFs for all
18964         the anon unions that may be present at build_component_ref time.
18965         * typeck.c (lookup_anon_field): New routine to handle field lookup
18966         on fields without names.  We find them, based upon their unique type
18967         instead.
18968         * typeck.c (build_component_ref): Allow FIELD_DECL components.
18969         Handle finding components in anonymous unions, and ensure that a
18970         COMPONENT_REF is built for each level as necessary.
18972 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
18974         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
18975         code that ensures that copy ctors are used if appropriate.
18977 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18979         * init.c (build_vec_delete): Only give an error if base isn't an
18980         error_mark_node.
18982 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
18984         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
18985         (yylex): If we see `new', keep slurping.
18987 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
18989         * class.c (finish_struct_1): Move code for handling anon unions...
18990         (finish_struct_anon): to here.  Fixup so that we do the offset
18991         calculations right, and so that the fields are physically moved to
18992         the containers's chain.
18994 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18996         * decl.c (grokdeclarator): Avoid trying to get an operand off an
18997         identifier node.
18999 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
19001         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
19002         POINTER_SIZE to agree with expr.c.
19004 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
19006         * search.c (lookup_field): Don't report ambiguities if protect is 0,
19007         instead return NULL_TREE.
19009 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
19011         * class.c (finish_struct_1): Call warn_hidden if we want warnings
19012         about overloaded virtual functions.
19013         (warn_hidden): New routine to warn of virtual functions that are
19014         hidden by other virtual functions, that are not overridden.
19015         (get_basefndecls): New routine, used by warn_hidden.
19016         (mark_overriders): New routine, used by warn_hidden.
19017         * search.c (get_matching_virtual): Remove old warning that just
19018         isn't very useful.
19020 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19022         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
19024         * typeck.c (null_ptr_cst_p): Delete unused fn.
19025         (build_function_call_maybe): Delete unused fn.
19027         * expr.c (extract_init): #if 0 the code after unconditional return 0
19028         for now.
19030         Delete old cadillac code.
19031         * edsel.c: Remove file.
19032         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
19033         * Makefile.in (CXX_OBJS): Delete edsel.o.
19034         (edsel.o): Delete rule.
19035         * cp-tree.h (flag_cadillac): Delete var decl.
19036         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
19037         * decl2.c (flag_cadillac): Delete var definition.
19038         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
19039         (grokfield): Delete code depending on flag_cadillac.
19040         (finish_anon_union): Likewise.
19041         * class.c (finish_struct_1): Likewise.
19042         (pushclass): Likewise.
19043         (popclass): Likewise.
19044         (push_lang_context): Likewise.
19045         (pop_lang_context): Likewise.
19046         * decl.c (init_decl_processing): Likewise.
19047         (start_decl): Likewise.
19048         (cp_finish_decl): Likewise.
19049         (xref_tag): Likewise.
19050         (finish_enum): Likewise.
19051         (start_function): Likewise.
19052         (finish_function): Likewise.
19053         (finish_stmt): Likewise.
19054         * lex.c (lang_init): Likewise.
19055         (check_newline): Likewise.
19057         * lex.c (do_pending_inlines): Delete synthesized method kludge.
19059         Delete defunct, ancient garbage collection implementation.
19060         * rtti.c: New file with the RTTI stuff from gc.c.
19061         * gc.c: Removed file (moved the remaining stuff into rtti.c).
19062         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
19063         (rtti.o): New rule, replacing gc.o.
19064         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
19065         * cp-tree.h: Delete gc-related fn decls.
19066         (DECL_GC_OFFSET): Delete macro.
19067         (flag_gc): Delete extern decl.
19068         * decl.c (current_function_obstack_index): Delete var decl.
19069         (current_function_obstack_usage): Delete var decl.
19070         (start_function): Delete clearing of current_function_obstack_index
19071         and current_function_obstack_usage.
19072         (init_decl_processing): Delete code relying on -fgc.
19073         Delete call to init_gc_processing.
19074         (cp_finish_decl): Delete calls to build_static_gc_entry and
19075         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
19076         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
19077         and to expand_expr of a __gc_main call.
19078         (maybe_gc_cleanup): Delete var decl.
19079         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
19080         * decl2.c (flag_gc): Delete var decl.
19081         (lang_f_options): Delete offering of -fgc.
19082         (lang_decode_option): Delete -fgc and -fno-gc handling.
19083         (get_temp_regvar): Delete gc code.
19084         * init.c (build_new): Delete gc code.
19085         * lex.c (init_lex): Delete checking of flag_gc.
19087         * typeck.c (convert_arguments): Delete gc code.
19088         (build_component_addr): Delete -fgc warning.
19089         (build_modify_expr): Delete gc code.
19091         * decl2.c (build_push_scope): Delete fn.
19092         * cp-tree.h (build_push_scope): Delete decl.
19094         * search.c (clear_search_slots): Delete fn.
19095         * cp-tree.h (clear_search_slots): Delete decl.
19097         * search.c (tree_needs_constructor_p): Delete fn.
19098         * cp-tree.h (tree_needs_constructor_p): Delete decl.
19100         * tree.c (id_cmp): Delete fn.
19102         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
19103         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
19105         * tree.c (decl_value_member): Delete fn.
19106         * cp-tree.h (decl_value_member): Delete decl.
19108         * tree.c (list_hash_lookup_or_cons): Delete fn.
19109         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
19111         * method.c (cplus_exception_name): Delete fn.
19112         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
19114         * spew.c (shift_tokens): Delete fn.
19116 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
19118         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
19119         to cp_finish_decl.
19120         * parse.y: Likewise.
19122 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19124         * tree.c (build_cplus_staticfn_type): Delete function definition;
19125         never used.
19126         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
19128         * tree.c (virtual_member): Delete function definition; never used.
19129         * cp-tree.h (virtual_member): Delete decl.
19131 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
19133         * typeck.c (build_component_ref): Handle getting vbase pointers
19134         out of complex multiple inheritance better.
19136 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
19138         * typeck.c (build_object_ref): Make sure we use the real type, not
19139         any reference type.
19141 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
19143         * tree.c (build_exception_variant): Don't create new types if we
19144         don't have to, also build new types on the right obstack.
19146 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
19148         * decl.c (store_bindings): Split out from push_to_top_level.
19149         (push_to_top_level): Call it for b->type_shadowed on class binding
19150         levels.
19152 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
19154         * search.c (expand_upcast_fixups): Fix so that offsets stored in
19155         vbase_offsets are always right.  Fixes a problem where virtual base
19156         upcasting and downcasting could be wrong during conversions on this
19157         during virtual function dispatch at ctor/dtor time when dynamic
19158         vtable fixups for deltas are needed.  This only sounds easier than
19159         it is.  :-)
19160         (fixup_virtual_upcast_offsets): Change to reflect new calling
19161         convention for expand_upcast_fixups.
19163 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19165         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
19166         check that it's usable as the bitfield width.
19168 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19170         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
19171         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
19172         only ever used for functions in it.
19174 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
19176         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
19177         (nested_type): Likewise.
19178         (nested_name_specifier): Use lastiddecl.
19180         * decl.c (grokdeclarator): Adjust accordingly.
19181         * init.c (expand_member_init): Likewise.
19182         * parse.y (base_class): Likewise.
19183         * typeck2.c (build_functional_cast): Likewise.
19185         * typeck2.c (build_functional_cast): Fill in name after we've
19186         checked for non-aggr type.
19188 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
19190         * decl2.c (warn_pointer_arith): Default to on.
19192 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
19194         * lex.c (is_rid): New function.
19195         * decl.c (grokdeclarator): Diagnose reserved words used as
19196         declarator-ids.
19198 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
19200         * tree.c (get_decl_list): Don't lose cv-quals.
19202         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
19203         typespecs used as declarator-ids.
19205 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
19207         * decl.c (poplevel): When poping a level, don't give a warning for
19208         any subblocks that already exist.
19210 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
19212         * typeck.c (build_object_ref): Finish what I started.
19214         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
19216         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
19218         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
19219         scope.
19221 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
19223         * decl.c (xref_tag): Handle passing a type in directly.
19225         * parse.y (qualified_type_name): Pull out the type.
19226         (nested_type): Likewise.
19227         Take types directly instead of as identifiers.
19228         * call.c (build_scoped_method_call): Take types directly instead of
19229         as identifiers.
19230         * decl.c (xref_basetypes): Likewise.
19231         * init.c (expand_member_init): Likewise.
19232         (build_member_call): Likewise.
19233         (build_offset_ref): Likewise.
19234         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
19235         * method.c (do_build_assign_ref): Likewise.
19236         * decl.c (grokdeclarator): Handle a type appearing as the
19237         declarator-id for constructors.
19238         * method.c (do_build_copy_constructor): current_base_init_list now
19239         uses the types directly, not their names.
19240         * init.c (sort_base_init): Likewise.
19241         (expand_member_init): Likewise.
19242         * init.c (is_aggr_type): New function, like is_aggr_typedef.
19244 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
19246         * tree.c (layout_basetypes): Call build_lang_field_decl instead
19247         of build_lang_decl if first arg is a FIELD_DECL.
19249 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19251         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
19252         non-empty.
19253         * except.c (expand_start_catch_block): Set TREE_USED to avoid
19254         warnings about the catch handler.
19256 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
19258         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
19259         expand_target_expr.
19261 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19263         Fix access control to use trees rather than integers.
19264         * class.c (access_{default, public, protected, private,
19265         default_virtual, public_virtual, private_virtual}_node): Add
19266         definitions.
19267         (init_class_processing): Do creation of those nodes.
19268         * cp-tree.h (access_type): Delete enum decl.
19269         (access_{default, public, protected, private, default_virtual,
19270         public_virtual, private_virtual}_node): Add decls.
19271         (compute_access): Change return type.
19272         * search.c (compute_access): Have tree return type, instead of enum.
19273         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
19274         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
19275         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
19276         * parse.y (VISSPEC): Make ttype rather than itype.
19277         (base_class_access_list): Likewise.
19278         * *.[cy]: Change all refs of `access_public' to `access_public_node',
19279         etc.
19280         * call.c (build_method_call): Make ACCESS be a tree.
19281         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
19282         * cvt.c (convert_to_aggr): Likewise.
19283         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
19284         Likewise.
19285         * method.c (hack_identifier): Likewise.
19286         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
19288 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
19290         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
19291         frontend, and make it more consistent with respect to
19292         warn_pointer_arith.
19294 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
19296         * decl.c (pushdecl): Check for duplicate parameter names.
19298 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
19300         * decl.c (expand_static_init): Call assemble_external for atexit.
19302 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
19304         * except.c (do_unwind): Remove some generated dead code.
19305         (eh_outer_context): New routine, factor out some common code from
19306         expand_builtin_throw and end_eh_unwinder.  Add code to do return
19307         address masking for the PA.
19308         (expand_builtin_throw): Use eh_outer_context instead of open coding
19309         it here.
19310         (end_eh_unwinder): Likewise.
19312 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
19314         * except.c (expand_throw): Call assemble_external for __empty, if we
19315         use it.
19317 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
19319         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
19320         NORMAL_RETURN_ADDR_OFFSET.
19321         (end_eh_unwinder): Likewise.
19323 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
19325         * gc.c (build_dynamic_cast): Make sure we don't cast away const
19326         when dealing with references, and make sure we handle dynamic
19327         casting to a cv qualified reference.
19329 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
19331         * except.c (struct eh_context): New structure top hold eh context
19332         information.
19333         (push_eh_context): New routine.
19334         (pop_eh_context): Likewise.
19335         * decl.c (push_cp_function_context): Use them.
19336         (pop_cp_function_context): Likewise.
19338 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
19340         * decl2.c (finish_file): Also prune uninteresting functions in the
19341         inline emission loop.
19343 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
19345         * sig.c (build_signature_table_constructor): Mark functions
19346         in the signature as referenced.
19348 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
19350         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
19351         the inline emission stuff.
19353 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
19355         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
19356         weak symbols.
19357         * lang-options.h: Add -f{no-,}weak.
19358         * decl.c (init_decl_processing): If the target does not support weak
19359         symbols, don't use them.
19360         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
19362 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
19364         * init.c (expand_member_init): warning for base init after members.
19366 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
19368         * cvt.c (build_expr_type_conversion): Don't convert to a reference
19369         type.
19371 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
19373         * method.c (report_type_mismatch): Improve wording for volatile
19374         mismatches.
19376 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
19378         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
19379         expand_assignment, as the later doesn't handle things that have
19380         copy constructors well.  The compiler would do bitwise copying,
19381         instead of ctor calling in some cases.
19383 Wed Dec 13 17:05:54 1995  Paul Eggert  <eggert@twinsun.com>
19385         * g++.c (my_strerror): Return "cannot access" if errno is 0.
19386         (pfatal_with_name, perror_exec): Don't assume that
19387         the returned value from my_strerror contains no '%'s.
19388         (concat): Remove.
19389         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
19391 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
19393         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
19394         TYPE_METHODS/TREE_CHAIN mean what they used to.
19395         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
19396         instead of TYPE_METHODS.
19397         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
19398         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
19399         * cp-tree.h (CLASSTYPE_METHODS): Lose.
19400         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
19401         TYPE_METHODS.
19402         (struct lang_decl): Lose next_method field.
19403         (DECL_NEXT_METHOD): Lose.
19404         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
19405         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
19406         anymore.
19407         (finish_struct_methods): Don't mess with the TREE_CHAINs in
19408         fn_fields.
19410         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
19411         vector.
19413         * call.c (build_method_call): Synthesize here even when not inlining.
19414         * typeck.c (build_function_call_real): Likewise.
19416 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
19418         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
19419         == DBX_DEBUG, call dbxout_start_new_source_file and
19420         dbxout_resume_previous_source_file when appropriate.
19422 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
19424         * except.c (start_anon_func): Push to the top level.
19425         (end_anon_func): Pop from the top level.
19427 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
19429         * cp-tree.h (build_cleanup): New routine to build cleanups.
19430         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
19431         call at ctor time and use atexit to run it later.
19432         * decl2.c (build_cleanup): New routine, taken from finish_file.
19433         (finish_file): Use build_cleanup instead, and don't put function
19434         local statics in global dtor list.
19436 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
19438         * except.c (expand_throw): Ensure that we have cleanups, if we try
19439         and expand cleanups.
19441 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
19443         * except.c (expand_throw): Add logic to manage dynamic cleanups for
19444         the EH object.
19445         (expand_end_catch_block): Use the magic of expand_goto, instead of
19446         emit_jump so that we get the cleanup for any catch clause parameter
19447         and the cleanup for the exception object.  Update to reflect label
19448         changes.
19449         (push_eh_cleanup): New routine to register a cleanup for an
19450         exception object.
19451         (empty_fndecl): Used to default cleanup actions to
19452         nothing.
19453         (init_exception_processing): Setup empty_fndecl.  Setup
19454         saved_cleanup.
19455         (expand_start_catch_block): Update to reflect label changes.  Call
19456         push_eh_object to register the cleanup for the EH object.
19457         (start_anon_func): New routine to start building lambda expressions
19458         from trees.
19459         (end_anon_func): New routine to end them.
19460         (struct labelNode): Change so that we can use tree labels, or rtx
19461         labels.
19462         (saved_cleanup): Object to check for dynamic cleanups for the
19463         exception handling object.
19464         (push_label_entry): Change so that we can use tree labels, or rtx
19465         labels.
19466         (pop_label_entry): Likewise.
19467         (top_label_entry): Likewise.
19468         (expand_start_all_catch): Use tree label instead of rtx label, so
19469         that we can get the magic of expand_goto.
19470         (expand_end_all_catch): Update to reflect label changes.
19472         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
19473         use UNSAVE_EXPRs.
19474         * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
19475         building_cleanup logic, as we now use UNSAVE_EXPRs.
19476         * cp-tree.h (unsave_expr): Declare it.
19477         * decl.c (building_cleanup): Remove.
19478         (maybe_build_cleanup): Remove building_cleanup logic, and use
19479         UNSAVE_EXPR instead.
19481 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
19483         * gc.c (build_t_desc): Update error message to say <typeinfo>.
19485 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19487         * decl.c (pushdecl): Only warn about shadowing a local variable if
19488         warn_shadow is true.
19490 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
19492         * typeck.c (build_binary_op_nodefault): Added warning about
19493         comparisons between different enum types with -Wall, unless
19494         -fenum-int-equiv set.
19496 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
19498         * class.c (finish_struct_1): Skip down to the inner type in
19499         multidimensional arrays.  Ensures ctors will be made for types that
19500         need constructing.
19502 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
19504         * decl.c (last_dtor_insn): New to track the last compiler generated
19505         insn in a dtor.
19506         (store_parm_decls): Set it.
19507         (finish_function): Use it to see if the dtor is empty.  Avoid doing
19508         vtable setup all the time, if we can.
19509         (struct cp_function): Add last_dtor_insn.
19510         (push_cp_function_context): Save it.
19511         (pop_cp_function_context): Restore it.
19513 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
19515         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
19516         warnings.
19518 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
19520         * typeck.c (expand_target_expr): Make sure targets get put into the
19521         current temp_slot_level, so that the free_temp_slots call will reuse
19522         them.
19524 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
19526         * class.c (finish_struct_1): Delay delta fixups for virtual bases
19527         until after we have done the hard virtuals, to avoid a bogus `every
19528         virtual function must have a unique final overrider' for virtual
19529         functions that are only overridden by hard virtuals.
19531 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
19533         * pt.c (do_function_instantiation): Don't try to find a file-scope
19534         template for a member function.
19536 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
19538         * g++.c (main): Add handling of -nodefaultlibs.
19540 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
19542         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
19543         distinguish between direct bindings of reference variables, and
19544         indirect bindings of reference variables.
19545         * cvt.c (build_up_reference): Use it.
19546         * typeck.c (convert_arguments): Use it to indicate this is an
19547         indirect binding.
19548         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
19549         as they are unused.
19550         (expand_static_init): Likewise.
19551         (cplus_expand_expr_stmt): Likewise.
19552         * decl2.c (finish_file): Likewise.
19553         * init.c (perform_member_init): Likewise.
19554         (emit_base_init): Likewise.
19555         (expand_aggr_vbase_init_1): Likewise.
19557 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19559         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
19560         get a DECL_LANG_SPECIFIC node.
19561         * cp-tree.h (lang_decl_flags): Add new member `level'.
19562         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
19563         decl_flags level member.
19565 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19567         * call.c (build_method_call): Make sure instance has a
19568         TYPE_LANG_SPECIFIC node before we dive into it.
19570 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
19572         * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
19574 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
19576         * decl.c (duplicate_decls): When smashing decls, smash staticness in
19577         the usual way.
19579 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
19581         * decl.c (poplevel): Handle the merging of subblocks of cleanups
19582         when finishing blocks that have already been created (usually due to
19583         the fixup goto code).  Fixes bad debugging information.
19585 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
19587         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
19588         that's not a list of overloaded functions.
19590 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19592         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
19593         before trying to use DECL_ABSTRACT_VIRTUAL_P.
19595 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
19597         * decl2.c (mark_used): New function for hooking into setting of
19598         TREE_USED on decls.
19599         * call.c (build_method_call): Use it.
19600         * class.c (instantiate_type): Likewise.
19601         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
19602         for all like-named functions.
19603         * method.c (hack_identifier): Likewise.
19604         (emit_thunk): Don't call assemble_external.
19605         (make_thunk): Create thunk as a FUNCTION_DECL so that it
19606         gets the right mode and ENCODE_SECTION_INFO works.
19608         * parse.y: Use mark_used.  Pass operator names to do_identifier.
19609         * lex.c (do_identifier): Handle operator names.
19611         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
19613 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19615         * errfn.c: Include stdio.h.
19616         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
19618 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
19620         * typeck2.c (digest_init): Always convert initializers to the
19621         right type.
19623 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
19625         * init.c (member_init_ok_or_else): Don't allow member initializers
19626         for indirect members, as it is invalid.
19628 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19630         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
19632 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
19634         * parse.y (for.init.statement): Catch compound statements inside for
19635         initializations, if we're being pedantic.
19637 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
19639         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
19640         looking for.
19642 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
19644         * error.c (dump_expr): Don't core dump when a boolean expression is
19645         used as a default argument.
19647 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
19649         * class.c (finish_struct_bits): Check aggregate_value_p instead of
19650         RETURN_IN_MEMORY.
19652 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
19654         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
19655         BLKmode type that would otherwise be returned in registers.
19657 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19659         * g++.c (WITHLIBC): New macro.
19660         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
19661         saw_libc and pass it at the end if it was set.
19663 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19665         * parse.y (fn.def1): Call split_specs_attrs in
19666         declmods notype_declarator case.