* dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
[official-gcc.git] / gcc / cp / ChangeLog
blob15e22e4d99c40cd141d987f4670f288b78f5f080
1 1999-11-02  Mark Mitchell  <mark@codesourcery.com>
3         * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
5 1999-11-02  Scott Snyder  <snyder@fnal.gov>
7         * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
8         IMAGPART_EXPR.
9         * pt.c (tsubst_copy): Likewise.
11 1999-11-01  Jason Merrill  <jason@yorick.cygnus.com>
13         * decl2.c (maybe_make_one_only): Always make things comdat on
14         ELF targets, too.
16 1999-10-31  Mark Mitchell  <mark@codesourcery.com>
18         * decl.c (finish_function): Call free_after_parsing for functions
19         we are not immediately turning into RTL.
21 1999-10-31  Brendan Kehoe  <brendan@cygnus.com>
23         * cp-tree.h (flag_dump_translation_unit): Add decl.
25 Sat Oct 30 22:42:50 1999  Stephen L Moshier <moshier@mediaone.net>
27         * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
29 1999-10-30  Mark Mitchell  <mark@codesourcery.com>
31         * decl.c (pop_cp_function_context): Don't call free on a NULL
32         pointer.
33         * semantics.c: Include ggc.h.
34         (expand_body): Do garbage-collection after processing a template
35         function.  Clear DECL_SAVED_TREE after generating RTL for a
36         function.
37         * Makefile.in (semantics.o): Depend on ggc.h.
38         
39 1999-10-29  Mark Mitchell  <mark@codesourcery.com>
41         * cp-tree.h (make_typename_type): Change prototype.
42         * decl.c (make_typename_type): Only complain if so requested.
43         * parse.y (nested_name_specifier): Adjust calls.
44         (typename_sub0): Likewise.
45         (typename_sub1): Likewise.
46         * parse.c: Regenerated.
47         * pt.c (convert_template_argument): Pass complain to
48         make_typename_type.
49         (tsubst): Likewise.
50         
51 1999-10-28  Mark Mitchell  <mark@codesourcery.com>
53         * semantics.c (finish_handler): End the scope of the handler
54         before attaching it to the statement-tree.
56 1999-10-28  Ian Lance Taylor  <ian@zembu.com>
58         * rtti.c (build_dynamic_cast_1): Give a better error message for
59         an attempt to dynamic_cast from a non-polymorphic type.
61 1999-10-27  Mark Mitchell  <mark@codesourcery.com>
63         * cp-tree.h (make_temp_vec): Remove.
64         (make_scratch_vec): Likewise.
65         * call.c (add_function_candidate): Use make_tree_vec.
66         (add_conv_candidate): Likewise.
67         (build_builtin_candidate): Likewise.
68         (add_template_candidate_real): Likewise.
69         * class.c (resolve_address_of_overloaded_function): Likewise.
70         * decl.c (start_function): Don't fool with the momentary obstack.
71         (finish_function): Likewise.
72         * init.c (expand_direct_vtbls_init): Likewise.
73         (begin_init_stmts): Likewise.
74         (finish_init_stmts): Likewise.
75         * pt.c (add_to_template_args): Use make_tree_vec.
76         (check_explicit_specialization): Likewise.
77         (coerce_template_parms): Likewise.
78         (lookup_template_class): Don't fool with the momentary obstack.
79         (instantiate_class_template): Likewise.
80         (tsubst_template_arg_vector): Use make_tree_vec.
81         (tsubst_aggr_type): Don't fool with the momentary obstack.
82         (tsubst_decl): Likewise.  Use make_tree_vec.
83         (try_one_overload): Likewise.
84         (try_class_unification):  Don't fool with the momentary obstack.
85         (get_bindings_real): Use make_tree_vec.
86         (set_mangled_name_for_template_decl): Likewise.
87         * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
88         * semantics.c (finish_expr_stmt): Likewise.
89         (finish_do_stmt): Likewise.
90         (finish_for_expr): Likewise.
91         (finish_switch_cond): Likewise.
92         (do_pushlevel): Likewise.
93         (do_poplevel): Likewise.
94         * tree.c (make_temp_vec): Remove.
95         
96         * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs.  Dump
97         CLEANUP_P for a TRY_BLOCK.
98         * ir.texi: Document SAVE_EXPR.
100 Tue Oct 26 23:29:56 1999  Jeffrey A Law  (law@cygnus.com)
102         * call.c (build_over_call):  Check that the built-in function is
103         of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
104         * typeck.c (build_function_call_real): Similarly. 
106 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
108         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS.  Don't call
109         remember_end_note.
111 1999-10-24  Mark Mitchell  <mark@codesourcery.com>
113         * decl.c (push_overloaded_decl_1): Use pushdecl.
114         
115         * decl.c (auto_function): Replace #ifdef'd __inline with just
116         plain inline.
117         * lex.c (my_get_run_time): Likeise.
118         (yyprint): Likewise.
119         (identifier_type): Likewise.
120         * method.c (start_squangling): Likewise.
121         (end_squangling): Likewise.
122         (icat): Likewise.
123         (old_backref_index): Likewise.
124         (flush_repeats): Likewise.
125         (issue_ktype): Likewise.
126         * parse.y (empty_parms): Likewise.
127         * parse.c: Regenerated.
128         
129 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
131         * dump.c (dequeue_and_dump): Replace several uses of
132         queue_and_dump_index with dump_child.
134 1999-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
136         * expr.c: Include tm_p.h.
138 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
140         * cp-tree.h (SCOPE_PARTIAL_P): New macro.
141         (pushlevel_temporary): Remove.
142         (add_scope_stmt): New function.
143         * decl.c (pushlevel_temporary): Remove.
144         (poplevel): Use add_scope_stmt.
145         (start_decl_1): Likewise.
146         * semantics.c (add_scope_stmt): New function.
147         (do_pushlevel): Use it.
148         (do_poplevel): Use it.
149         (expand_stmt): Check SCOPE_PARTIAL_P.
150         
151         * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
152         * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
153         * expr.c (cplus_expand_expr): Expand it.
154         * ir.texi: Document EMPTY_CLASS_EXPR.
155         
156 1999-10-20  Mark Mitchell  <mark@codesourcery.com>
158         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
159         parameters as having namespace scope.
161 1999-10-19  Mark Mitchell  <mark@codesourcery.com>
163         * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
164         (mangling_flags): New type.
165         (build_overload_int): Change prototype.
166         (build_overload_value): Likewise.
167         (numeric_output_need_bar): Improve comment.
168         (mangle_expression): New function, broken out from ...
169         (build_overload_int): Here.
170         (build_overload_value): Adjust for use of mangling flags.  Don't
171         warn about real-valued template parameters here.  Do handle
172         complex expressions involving real-valued template parameters.
173         (build_template_parm_names): Encase non-type template parameters
174         in underscores, if necessary.
175         (process_overload_item): Remove conditional on
176         PARM_CAN_BE_ARRAY_TYPE.
178 1999-10-17  Mark Mitchell  <mark@codesourcery.com>
180         * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
182         * ir.texi: Clean up documentation of RETURN_INIT.
183         
184 1999-10-15  Greg McGary  <gkm@gnu.org>
186         * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
187         (lang_init): Set default for flag_bounds_check if still "unspecified".
189 1999-10-13  Andrew Haley  <aph@cygnus.com>
191         * class.c (finish_struct_1): Force alignment of non-bitfields to
192         BITS_PER_UNIT.
194 Wed Oct 13 22:01:35 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
196         * typeck2.c (process_init_constructor): Handle empty constructors.
198 1999-10-13  Jason Merrill  <jason@yorick.cygnus.com>
200         * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
202         * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
203         array error.
205 1999-10-13  Mark Mitchell  <mark@codesourcery.com>
207         * decl.c (make_rtl_for_local_static): Don't create register RTL
208         for addressable constants.
210 1999-10-13  Nathan Sidwell  <nathan@acm.org>
212         * cp-tree.h (build_x_va_arg): Prototype new function.
213         * call.c (build_x_va_arg): Define it.
214         * parse.y (unary_expr): Call build_x_va_arg.
215         
216         * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
217         * call.c (convert_type_from_ellipsis): Define it.
218         * decl.c (init_decl_processing): Set lang_type_promotes_to.
220         * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
222 1999-10-11  Jason Merrill  <jason@yorick.cygnus.com>
224         * class.c (fixed_type_or_null): Always set *nonnull.
226 1999-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
228         * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
229         __GNUC__ and __GNUC_MINOR__.
231 1999-10-09  Mark Mitchell  <mark@codesourcery.com>
233         * cp-tree.h (make_rtl_for_local_static): New function.  
234         * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
235         local statics ...
236         (make_rtl_for_local_static): Here.
237         * semantics.c (expand_stmt): Use make_rtl_for_local_static.
238         
239 1999-10-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
241         * method.c: Include tm_p.h.
243 1999-10-7   Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
245         * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
246         * lex.c (cp_make_lake_type): Likewise.
247         * tree.c (init_tree): Init make_lang_type_fn.
248         
249 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
251         * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
252         paramter.
253         
254         * semantics.c (expand_stmt): Don't pretend to have asmspecs for
255         local statics if we don't really have them.
257         * ir.texi: Improve documentation for STMT_EXPR.  Describe
258         CLEANUP_POINT_EXPR.
260 1999-10-07  Jason Merrill  <jason@yorick.cygnus.com>
262         * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
264 1999-10-07  Greg McGary  <gkm@gnu.org>
266         * class.c (finish_struct_1): Use simpler method of
267         removing elements of a singly-linked list which doesn't
268         lose for classes without data members.
270 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
272         * friend.c (make_friend_class): Robustify.
274         * semantics.c (finish_object_call_expr): Reject calls to template
275         types.
277 1999-10-06  Mark Mitchell  <mark@codesourcery.com>
279         * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
281         * cp-tree.h (CLASSTYPE_VFIELD): Remove.
282         * call.c (build_vfield_ref): Use TYPE_VFIELD, not
283         CLASSTYPE_VFIELD.
284         * class.c (get_vfield_offset): Likewise.
285         (finish_base_struct): Likewise.
286         (modify_one_vtable): Likewise.
287         (fixup_vtable_deltas): Likewise.
288         (finish_struct_1): Likewise.
289         * init.c (expand_virtual_init): Likewise.
290         * search.c (lookup_field_1): Likewise.
291         (expand_upcast_fixups): Likewise.
292         * typeck.c (build_component_ref): Likewise.
293         (build_binary_op_nodefault): Likewise.
294         
295         * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
296         * ir.texi: Document TYPE_VFIELD.
298 1999-10-06  Brendan Kehoe  <brendan@cygnus.com>
300         * decl.c (grokdeclarator): Only warn about non-zero arrays if
301         !in_system_header (linux socketbits.h can give this for
302         __cmsg_data, which is using a GNU extension).
304 1999-10-05  Mark Mitchell  <mark@codesourcery.com>
306         * decl2.c (start_static_storage_duration_function): Push the
307         function declaration so it ends up in namespace scope.
309         * dump.c (DUMP_CHILDREN): Remove.
310         (DUMP_BINFO): Adjust.
311         (struct dump_node_info): Remove dump_children_p.
312         (queue_and_dump_type): Remove dump_children_p parameter.
313         (queue): Don't set dump_children_p.
314         (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
315         queue_and_dump_index.
316         (dequeue_and_dump): Unconditionally print children.  Adjust calls
317         to functions mentioned above.
318         (dump_node):  Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
319         
320         * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
321         * dump.c (dequeue_and_dump): Dump them.
322         
323         * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
325         * decl.c (start_function): Set current_in_charge_parm for
326         constructors, too, where appropriate.
327         * search.c (fixup_all_virtual_upcast_offsets): New function.
328         (expand_indirect_vtbls_init): Use it.
329         
330 1999-10-04  Nathan Sidwell  <nathan@acm.org>
332         * decl2.c (grok_alignof): Don't decay lvalues.
333         
334         * init.c (build_new): Remove unused variable.
336 1999-10-04  Mark Mitchell  <mark@codesourcery.com>
338         * cp-tree.h (struct language_function): Remove static_labelno.
339         (static_labelno): Remove macro.
340         * method.c (build_overload_nested_name): Make static_labelno
341         static here.
342         
343         * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
344         to decide whether or not a function is defined.
346         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
347         situations where make_node will do it automatically.
348         * decl.c (grok_reference_init): Likewise.
349         (expand_static_init): Likewise.
350         (do_static_initialization): Likewise.
351         * init.c (perform_member_init): Likewise.
352         (expand_aggr_init_1): Likewise.
353         (build_new_1): Likewise.
354         * method.c (do_build_copy_constructor): Likewise.
355         (do_build_assign_ref): Likewise.
356         * search.c (expand_upcast_fixups): Likewise.
357         * semantics.c (finish_stmt_expr): Likewise.
358         * typeck.c (build_unary_op): Likewise.
359         (check_return_expr): Likewise.
361 1999-10-04  Jason Merrill  <jason@yorick.cygnus.com>
363         * init.c (build_vec_delete_1): Fold COND_EXPRs.
365 1999-10-03  Mark Mitchell  <mark@codesourcery.com>
367         * cp-tree.def (VEC_INIT_EXPR): Remove.
368         * cp-tree.h (struct stmt_tree): New type.
369         (struct saved_scope): Remove firstobj.  Add x_saved_tree,
370         x_stmt_tree.
371         (class_cache_firstobj): Remove.
372         (struct language_function): Remove stmts_are_full_exprs_p,
373         x_last_tree, and x_last_expr_type.  Add x_stmt_tree.
374         (current_stmt_tree): New macro.
375         (last_tree): Adjust.
376         (last_expr_type): Likewise.
377         (doing_semantic_analysis_p): Simplify.
378         (stmts_are_full_exprs_p): Adjust.
379         (begin_tree): Remove prototype.
380         (end_tree): Likewise.
381         (begin_stmt_tree): Change prototype.
382         (finish_stmt_tree): Likewise.
383         (building_stmt_tree): Simplify.
384         * decl.c (mark_stmt_tree): New function.
385         (mark_saved_scope): Use it.
386         (start_function): Rearrange slightly to call begin_stmt_tree 
387         earlier.
388         (save_function_data): Tweak.
389         (finish_function): Adjust call to finish_stmt_tree.
390         (mark_lang_function): Use mark_stmt_tree.
391         * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
392         * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
393         (build_vec_init): Remove creation of stand-in intializer.
394         * pt.c (begin_tree): Remove.
395         (end_tree): Likewise.
396         * semantics.c (SET_LAST_STMT): New macro.  Use it throughout.
397         (begin_compound_stmt): Handle a compound-statement outside of a
398         function.
399         (begin_stmt_expr): Handle a statement-expression outsidef of a
400         function.
401         (finish_stmt_expr): Likewise.
402         (begin_class_definition): Don't call begin_tree.
403         (finish_inline_definitions): Don't call end_tree.
404         (begin_stmt_tree): Take a pointer to tree, not a function as input.
405         (finish_stmt_tree): Likewise.
406         * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
407         (mapcar): Likewise.
408         
409         * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
410         * parse.c: Regenerated.
411         
412         * dump.c (dqueue_and_dump): Dump bitfieldness.
413         
414         * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
415         bitfields, rather than DECL_BIT_FIELD.
416         * ir.texi: Document how to tell whether or not a field is a
417         bitfield.
418         
419         * lex.c (make_lang_type): Fix typo in comment.
421 1999-10-01  Jason Merrill  <jason@yorick.cygnus.com>
423         * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
425 1999-10-01  Mark Mitchell  <mark@codesourcery.com>
427         * pt.c (tsubst_decl): If the type of a template instantiation is
428         bogus, so is the whole instantiation.
430 1999-09-30  Mark Mitchell  <mark@codesourcery.com>
432         * decl.c (initialize_local_var): Handle static variables here.
433         (cp_finish_decl): Tweak handling of function-scope static
434         variables.
435         * semantics.c (expand_stmt): Handle DECL_STMTs for static
436         variables.
438         * method.c (emit_thunk): Don't crash when -fsyntax-only.
440         * cp-tree.h (lang_decl_flags): Add global_ctor_p and
441         global_dtor_p.  Add init_priority.
442         (DECL_ACCESS): Adjust accordingly.
443         (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
444         (GLOBAL_INIT_PRIORITY): Likewise.
445         * decl.c (lang_mark_tree): Adjust accordingly.
446         (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 
447         and GLOBAL_INIT_PRIORITY.
448         * dump.c (dequeue_and_dump): Print them.
449         * ir.texi: Document them.
451         * decl2.c (struct priority_info_s): Remove initialization_sequence
452         and destruction_sequence.
453         (start_static_storage_duration_function): Return the body of the
454         function.  Convert for function-at-a-time mode.
455         (generate_inits_for_priority): Remove.
456         (finish_static_storage_duration_function): Change prototype.
457         Adjust for function-at-a-time mode.
458         (do_static_initialization): Likewise.
459         (do_static_destruction): Likewise.
460         (do_static_initialization_and_destruction): Remove.
461         (start_static_initialization_or_destruction): New function.
462         (finish_static_initialization_or_destruction): Likewise.
463         (get_priority_info): Don't manipulation initialization_sequence or
464         destruction_sequence.
465         (prune_vars_needing_no_initialization): New function.
466         (write_out_vars): Likewise.
467         (finish_file): Use the various new functions instead of the old.
468         
469 Thu Sep 30 00:13:27 1999  Dirk Zoller  <duz@rtsffm.com>
471         * cp-tree.h (warn_float_equal): Declare.
472         * decl2.c (warn_float_equal): Define.
473         (lang_decode_option): Recognize -W[no-]float-equal.
474         * typeck.c (build_binary_op_nodefault): Conditionally warn
475         about equality tests of floating point types.
477 1999-09-29  Jason Merrill  <jason@yorick.cygnus.com>
479         Support normal type_info-based EH mechanisms with -fno-rtti.
480         * except.c (build_eh_type_type): Remove special -fno-rtti handling.
481         (build_eh_type_type_ref): Likewise.
482         (build_eh_type): Remove.
483         (expand_throw): Call build_eh_type_type, not build_eh_type.
484         * decl2.c (import_export_decl): Don't associate the tinfo fn with
485         the vtable if -fno-rtti.
486         * decl.c (init_decl_processing): Always init_rtti_processing.
488         * rtti.c (get_typeid): Don't complain about -fno-rtti.
490         * class.c (class_cache_obstack, class_obstack): Remove.
491         (init_class_processing): Don't initialize class_obstack.
492         (push_cache_obstack): Remove.
493         (pushclass): Don't call it.
494         * cp-tree.h: Remove prototype for push_cache_obstack.
495         * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
496         (pushlevel_class): Don't push_decl_level.
497         (poplevel_class): Don't pop_stack_level.
498         (push_class_level_binding): Don't push_cache_obstack.
499         (init_decl_processing): Don't intialize decl_obstack.
500         * search.c (push_class_decls): Don't push_cache_obstack.
501         * tree.c (list_hash_add): Put hash node on permanent_obstack.
502         (hash_tree_cons): Don't mess with obstacks.
503         (print_lang_statistics): Don't print stats for class_obstack and
504         decl_obstack.
506 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
508         * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
509         * ir.texi: Document DECL_EXTERNAL.
511         * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
512         * ir.texi: Document THUNK_DECLs.
514         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
515         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
516         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
517         * error.c (dump_template_bindings): Remove unused parameter.
518         Handle multiple levels of template parameters.
519         (dump_template_decl): Use `parms', not `args', for template
520         parameters.  Fix thinko.
521         (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION.  Don't pass
522         flags to dump_template_bindings.
523         * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
524         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
525         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
526         (tsubst_copy): Clarify variable name.
527         (most_general_template): Robustify.
528         
529 1999-09-29  Nathan Sidwell  <nathan@acm.org>
531         * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
532         to change primary template rendering.
534 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
536         * cp-tree.h (UPT_TEMPLATE): Remove.
537         (UPT_PARMS): Likewise.
538         (DECL_NEEDED_P): New macro.
539         * decl2.c (finish_vtable_vardecl): Use it.
540         (finish_objects): Don't crash with -fsyntax-only.
541         (finish_file): Use DECL_NEEDED_P.  Don't prune vtables when
542         -fsyntax-only.
543         * pt.c (tsubst_friend_function): Remove FIXME that talks about
544         obstacks.
545         (tsubst_expr): Correct handling of function try-blocks.
546         * semantics.c: Include flags.h.
547         (expand_body): Don't do RTL generation if -fsyntax-only.
548         * Makefile.in (semantics.o): Depends on flags.h.
549         
550 1999-09-28  Gabriel Dos Reis  <gdr@codesourcery.com>
552         * pt.c (most_general_template): Adjust declaration.
554         * cp-tree.h: (most_general_template): Declare.
556         * error.c (dump_template_value): Rename to ...
557         (dump_template_argument): This.
558         (dump_template_argument_list): New function.
559         (dump_type): Use it.
560         (dump_template_parameter): New function.
561         (dump_template_decl): Use it.
562         (dump_template_bindings): New function.
563         (dump_function_decl): Use it. Pretty print function template
564         instantiations.
566 1999-09-28  Nathan Sidwell  <nathan@acm.org>
568         * decl.c (grokdeclarator): Distinguish parameter context for
569         diagnostics. Tidy up missing type diagnostic.
570         Diagnose `explicit' in one place. Diagnose `mutable' in one place.
572 1999-09-28  Mark Mitchell  <mark@codesourcery.com>
574         * ir.texi: Improve documentation for TARGET_EXPR.
576 1999-09-27  Nathan Sidwell  <nathan@acm.org>
578         Augment stringification of trees.
579         * cp-tree.h (tree_string_flags): New error stringifying enumeration.
580         (fndecl_as_string, type_as_string_real, args_as_string,
581         code_as_string, language_as_string, parm_as_string,
582         op_as_string, assop_as_string, cv_as_string): Remove.
583         (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
584         (context_as_string): Declare new function.
585         * error.c (cp_printers): Move definition.
586         (OB_UNPUT): Remove.
587         (OB_END_TEMPLATE_ID): Adjust.
588         (interesting_scope_p): Remove.
589         (dump_scope): New static function.
590         (dump_qualifiers): Adjust prototype, reimplement.
591         (dump_template_value): Use tree_string_flags.
592         (dump_type_real): Move back to dump_type.
593         (dump_type): Adjust prototype. Use tree_string_flags.
594         (dump_aggr_type): Likewise. Use dump_template_parms.
595         (dump_type_prefix): Adjust prototype. Use tree_string_flags.
596         Return pad flag.
597         (dump_type_suffix): Adjust prototype. Use tree_string_flags.
598         (dump_simple_decl): Likewise.
599         (dump_decl): Likewise. Use dump_template_decl.
600         (dump_template_decl): New static function broken out of dump_decl.
601         (dump_function_decl): Adjust prototype. Use tree_string_flags.
602         (dump_parameters): Likewise. Prefix space.
603         (dump_exception_spec): Adjust prototype. Use tree_string_flags.
604         (dump_function_name): Likewise. Use dump_template_parms.
605         (dump_template_parms): New static function broken out of
606         dump_function_name.
607         (dump_expr_list): Adjust prototype. Use tree_string_flags.
608         (dump_expr): Likewise.
609         (fndecl_as_string): Removed
610         (type_as_string_real): Removed
611         (dump_binary_op): Adjust prototype. Use tree_string_flags.
612         (dump_unary_op): Likewise.
613         (type_as_string): Likewise.
614         (expr_as_string): Likewise.
615         (decl_as_string): Likewise.
616         (context_as_string): New function.
617         (lang_decl_name): Adjust.
618         (decl_to_string): New static print callback.
619         (expr_to_string): Likewise.
620         (fndecl_to_string): Likewise.
621         (code_as_string): Renamed to ...
622         (code_to_string): ... here. Adjust.
623         (language_as_string): Renamed to ...
624         (language_to_string): ... here. Adjust.
625         (parm_as_string): Renamed to ...
626         (parm_to_string): ... here.
627         (op_as_string): Renamed to ...
628         (op_to_string): ... here.
629         (assop_as_string): Renamed to ...
630         (assop_to_string): ... here.
631         (type_to_string): New static print callback.
632         (args_as_string): Renamed to ...
633         (args_to_string): ... here. Adjust.
634         (cv_as_string): Renamed to ...
635         (cv_to_string): ... here. Adjust.
636         * pt.c (mangle_class_name_for_template): Use tree_string_flags.
637         (print_template_context): Likewise.
639 1999-09-26  Mark Mitchell  <mark@codesourcery.com>
641         * cp-tree.h (expand_throw): Remove prototype.
642         * except.c (expand_throw): Make it static.  Use tree-generation
643         functions, rather than RTL-generation functions.
644         (build_throw): Use it.
645         * expr.c: Include except.h.
646         (cplus_expand_expr): Don't call expand_throw here.
647         * Makefile.in (expr.o): Depend on except.h.
648         * ir.texi: Update documentation for THROW_EXPR.
649         
650         * decl.c (start_function): Set x_dont_save_pending_sizes rather
651         than calling get_pending_sizes.
652         * init.c (build_new): Don't save and restore
653         immediate_size_expand; instead, assert that it has the expected
654         value already.
656 1999-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
658         * lex.c (compiler_error): Add missing call to va_end().
660 1999-09-25  Mark Mitchell  <mark@codesourcery.com>
662         * dump.c (dequeue_and_dump): Handle RESULT_DECL.
663         * ir.texi: Document RESULT_DECL and DECL_RESULT.
665         * cp-tree.h (check_return_expr): New function.
666         * decl.c (finish_constructor_body): New function.
667         (pushdecl): Put global friend functions in namespace binding
668         level, not the class binding level.
669         (finish_destructor_body): Make sure the dtor_label is always
670         defined.  Fix typo in comment.
671         (finish_function): Move generation of constructor-termination code
672         to semantic-analysis time.  Move generation of implicit `main'
673         return value to semantic-analysis time.
674         * semantics.c (finish_return_stmt): Generate goto's to
675         ctor_label/dtor_label here.  Use check_return_expr to do semantic
676         analysis on the returned expression.
677         * typeck.c (maybe_warn_about_returning_address_of_local): New
678         function split out from c_expand_return.
679         (check_return_expr): Likewise.
680         (c_expand_return): Just generate the RTL for the return.
681         
682 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
684         * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
685         (cleanup_type): Likewise.
686         (search_tree): Change prototype.
687         * decl.c (local_variable_p): Adjust for new interface to
688         search_tree.
689         (check_default_argument): Likewise.
690         * error.c (dump_expr): Handle INIT_EXPR.
691         * except.c (expand_throw): Don't make cleanup_type a local static.
692         * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
693         * init.c (build_new): Call build_new_1 directly, rather than
694         building a NEW_EXPR.
695         (build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
696         processing file-scope initializers.
697         * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
698         * tree.c: Include splay-tree.h
699         (no_linkage_helper): Adjust for new interface to search_tree.
700         (search_tree): Pass around pointers to tree nodes, rather than the
701         nodes themselves.  Handle VEC_INIT_EXPR.
702         (no_linkage_check): Adjust for new interface to search_tree.
703         (mapcar): Handle VEC_INIT_EXPR.
704         (target_remap): New variable.
705         (bot_manip): Use it.
706         (bot_replace): New function.
707         (break_out_target_exprs): Use it to remap all variables used in a
708         default argument expression.
709         * typeck.c (build_modify_expr): Don't crash when outside a
710         function and presented with an INIT_EXPR assignment
711         * Makefile.in (tree.o): Depend on splay-tree.h.
713 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
715         * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
716         DECL_BUILT_IN.
717         (builtin_function): New arg CLASS.  Arg CODE now of type int.  All
718         callers changed.
719         Set the builtin's DECL_BUILT_IN_CLASS.
721 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
723         * decl.c (pushdecl): Don't make local declarations of extern
724         variables give the variable a DECL_CONTEXT for the function.
725         (make_rtl_for_nonlocal_decl): Don't fuss with obstacks.  Simplify.
726         Don't accidentally make RTL for local declarations.
727         (emit_local_var): Handle declarations with asm-specifiers here.
728         
729 1999-09-23  Mark Mitchell  <mark@codesourcery.com>
731         * ir.texi: Improve documentation for TARGET_EXPRs.  Discuss
732         STMT_IS_FULL_EXPR_P.
734         * cp-tree.h (language_function): Add cannot_inline.
735         * decl.c (start_function): Restore current_function_cannot_inline
736         from the saved value.
737         (save_function_data): Save current_function_cannot_inline.
738         * decl2.c (start_objects): Change prototype.  Build the function
739         in function-at-a-time mode.
740         (finish_objects): Likewise.
741         (generate_ctor_or_dtor_function): Adjust accordingly.
742         
743         * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
744         * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
745         Don't call expand_anon_union_decl here
746         * semantics.c (exapnd_stmt): Call it here, instead.
747         * typeck.c (mark_addressable): Addressed variables are implicitly
748         used.
749         
750 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
752         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
753         (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
754         (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
755         * cp-tree.h: Add tree checking macros to various tree access
756         macros. 
757         * ptree.c (print_lang_decl): Test for function or variable
758         before accessing template info.
760 1999-09-23  Jason Merrill  <jason@yorick.cygnus.com>
762         * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
763         * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
764         * decl2.c (lang_f_options): Add -fshort-wchar.
765         * cp-tree.h: Declare flag_short_wchar.
766         * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 
767         int' for wchar_t.
769 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
771         * ir.texi: Fix formatting errors and typos.
773 1999-09-22  Mark Mitchell  <mark@codesourcery.com>
775         * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
777         * decl.c (pushdecl): Do create a binding for extern "C" functions,
778         but not for their DECL_ASSEMBLER_NAMEs.
779         (lookup_name_current_level): Fix formatting.
780         (xref_tag): Likewise.
781         * decl2.c (start_objects): Mark static constructors and
782         destructors as used.
784 1999-09-22  Jason Merrill  <jason@yorick.cygnus.com>
786         * decl.c (define_case_label): Don't crash if we're not in a switch.
788         * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
789         * lang-options.h: Restore -fthis-is-variable.  Remove help strings
790         for unsupported flags.
792 1999-09-21  Jason Merrill  <jason@yorick.cygnus.com>
794         * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
795         Accept and warn about -fthis-is-variable.
797 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
799         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
800         CLEANUP_STMT, and SCOPE_STMT.
802         * decl2.c (lang_decode_option): Adjust, in the wake of recent
803         changes to option processing.
805 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
807         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
808         function pointer from pmfs with no object given.
809         (convert_for_assignment): Do not return error when converting
810         pmfs.
812 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
814         * lex.c (internal_filename): New variable.
815         (INTERNAL_FILENAME): New macro.
816         (init_parse): Allocate internal_filename and mark as root.  Use it
817         instead of a string constant.
819 1999-09-21  Nathan Sidwell  <nathan@acm.org>
821         Reimplement dynamic cast and catch matching.
822         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
823         * search.c (dynamic_cast_base_recurse): New function.
824         (get_dynamic_cast_base_type): New function for dynamic cast.
825         * rtti.c (build_dynamic_cast_1): Determine source and target
826         class relationship. Call __dynamic_cast_2.
827         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
828         (__user_type_info::dyncast): New dynamic cast dispatcher.
829         (__user_type_info::sub_kind): New nested enumeration.
830         (__user_type_info::contained_p): sub_kind predicate.
831         (__user_type_info::contained_public_p): Likewise.
832         (__user_type_info::contained_nonpublic_p): Likewise.
833         (__user_type_info::contained_nonvirtual_p: Likewise.
834         (__user_type_info::upcast_result): New nested struct.
835         (__user_type_info::dyncast_result): New nested struct.
836         (*::do_upcast): New catch function.
837         (*::do_dyncast): New dynamic cast function.
838         (__user_type_info::find_public_subobj): New dynamic cast
839         helper dispatcher.
840         (*::do_find_public_subobj): New dynamic cast helper function.
841         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
842         (__user_type_info::dyncast): Define dynamic cast dispatcher.
843         (*::do_upcast): Define catch function.
844         (*::do_dyncast): Define dynamic cast function.
845         (*::do_find_public_subobj): Define dynamic cast helper function.
846         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
847         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
848         (__dynamic_cast_2): New dynamic cast runtime.
850 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
852         * cp-tree.h (finish_stmt_expr): Change prototype.
853         * expr.c (cplus_expand_expr): Adjust call accordingly.
854         * init.c (finish_init_stmts): Likewise.
855         * parse.y (primary): Likewise.
856         * pt.c (tsubst_copy): Likewise.
857         * semantics.c (finish_stmt_expr): Don't take two parameters.
858         Don't remove generated BLOCKs from the block-tree.
860         Remove support for assigning to `this'.
861         * NEWS: Note that fact.
862         * class.c (build_vbase_path): Don't check flag_this_is_variable.
863         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
864         (language_function): Remove assigns_this, just_assigned_this, and
865         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
866         (base_init_expr): Remove.
867         (current_vcalls_possible_p): New macro.
868         (vtbls_set_up_p): Likewise.
869         (emit_base_init): Change prototype.
870         * decl.c (finish_destructor_body): New function, split out from
871         finish_function.
872         (current_function_assigns_this): Remove.
873         (current_function_just_assigned_this): Likewise.
874         (start_function): Don't set them.
875         (finish_function): Don't check them.  Don't emit
876         base-initialization code here.  Generate code for destructors when
877         doing semantic analysis.
878         (finish_stmt): Don't check current_function_just_assigned_this.
879         * decl2.c (lang_f_options): Remove this-is-variable.
880         (lang_decode_option): Likewise.
881         (grokclassfn): Don't check flag_this_is_variable.
882         * init.c (emit_base_init): Return the expression generated.
883         (construct_virtual_bases): Don't push/pop obstacks.  Fix
884         typo.
885         (build_new_1): Don't check flag_this_is_variable.
886         (get_temp_regvar): Don't set DECL_REGISTER.
887         (build_vec_init): Don't call use_variable.
888         * lang-options.h: Remove "-fthis-is-variable" and
889         "-fno-this-is-variable".
890         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
891         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
892         expand_expr_stmt.
893         * semantics.c (finish_expr_stmt_real): Rename to ...
894         (finish_expr_stmt): This.  Remove assigned_this parameter.
895         (begin_if_stmt): Call do_pushlevel before starting the statement.
896         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
897         blocks.
898         (setup_vtbl_ptr): Emit initialization code for bases and members
899         at semantic-analysis time.  Emit code to initialize vtables in
900         destructors here.
901         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
902         Don't handle CTOR_INITIALIZER any more.
903         * typeck.c (build_modify_expr): Don't check for assignments to
904         this.
905         (c_expand_return): Don't suggest assigning to `this'.
906         
907         * Makefile.in (decl.o): Depend on RTL_H.
908         (decl2.o): Likewise.
909         (class.o): Likewise.
910         (call.o): Likewise.
911         (method.o): Likewise.
912         (search.o): Likewise.
913         (tree.o): Likewise.
914         (pt.o): Likewise.
916         * decl.c (duplicate_decls): When a builtin function is redeclared
917         as static, make sure it is mangled correctly.
919         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
920         detail about the statement-tree.
921         
922 1999-09-20  Nathan Sidwell  <nathan@acm.org>
924         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
926 1999-09-20  Nick Clifton  <nickc@cygnus.com>
928         * decl2.c (lang_decode_option): Extend comment.
930 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
932         * typeck.c: Include "tm_p.h".
934 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
936         * ir.texi: New file.
938 1999-09-19  Paul Burchard <burchard@pobox.com>
940         * semantics.c (expand_stmt): Initialize return value.
942 1999-09-18  Paul Burchard <burchard@pobox.com>
944         * gxxint.texi: G++ now implements namespaces.
945         
946 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
948         * decl.c (pop_label): Don't warn about unused labels more than
949         once.
950         * semantics.c (finish_goto_stmt): Always marked used labels as
951         used.
953         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
954         even when the declaration is external.
955         (cp_finish_decl): Adjust call to layout_var_decl.
956         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
958 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
960         * typeck.c (get_member_function_from_ptrfunc): Always consider
961         virtuality inside member pointer.
963 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
965         Turn on function-at-a-time processing.  
966         * cp-tree.h (doing_semantic_analysis_p): New macro.
967         (SF_DEFAULT): Define to zero, not SF_EXPAND.
968         (start_handler_parms): Change prototype.
969         (expand_start_catch_block): Likewise.
970         (expand_end_catch_block): Likewise.
971         (expand_start_eh_spec): Likewise.
972         (expand_end_eh_spec): Declare.
973         (finish_handler_parms): Change prototype.
974         (begin_catch_block): Declare.
975         (finish_handler): Change prototype.
976         (do_pushlevel): Declare.
977         (do_poplevel): Likewise.  
978         * decl.c (pushlevel): Don't create
979         binding levels when not doing semantic analysis.
980         (poplevel): Don't pop them.
981         (pushdecl): Assert that we are never called when not doing
982         semantic analysis.
983         (pushdecl_top_level): Use push_to_top_level.
984         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
985         label when expanding.
986         (cp_finish_decl): Only inject for-scope variables when doing
987         semantic analysis.  Add comments.
988         (start_handler_parms): Return the handler parm.
989         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
990         already set.  Reinitialize from saved function data if available.
991         Don't pushlevel when not doing semantic analysis.
992         (store_parm_decls): Only generate RTL when expanding.  Only
993         pushdecl when doing semantic analysis.  Set
994         current_eh_spec_try_block if appropriate.
995         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
996         Combine common code.  Don't poplevel when not doing semantic
997         analysis.
998         (push_cp_function_context): Don't expand functions without an
999         explicit call to expand_body.
1000         (mark_lang_function): Make eh_spec_try_block and
1001         x_scope_stmt_stack.  
1002         * except.c (expand_end_eh_spec): Don't
1003         declare.
1004         (process_start_catch_block): Likewise.
1005         (push_eh_cleanup): Use finish_decl_cleanup.
1006         (initialize_handler_parm): New function.
1007         (expand_start_catch_block): Use it.
1008         (expand_end_catch_block): Use tree-generation functions, not
1009         RTL-generation functions.
1010         (expand_start_eh_spec): Likewise.
1011         (expand_end_eh_spec): Likewise.
1012         (expand_exception_blocks): Simplify.
1013         (start_anon_func): Use do_pushlevel.
1014         (end_anon_func): Use do_poplvel.  Call expand_body for the
1015         function.  
1016         * expr.c (do_case): Don't call define_case_label.  
1017         * init.c (create_temporary_var): Set DECL_CONTEXT for local
1018         variables.  
1019         * method.c (emit_thunk): Call expand_body for the
1020         thunk.
1021         (sythesize_method): Likewise.  
1022         * parse.y (handler_args): Give it ttype.
1023         (eat_saved_input): Call expand_body.
1024         (base_init): Use do_pushlevel.
1025         (pending_inline): Call expand_body.
1026         (handler): Adjust calls to finish_handler_parms and
1027         finish_handler.
1028         (handler_args): Don't call expand_start_catch_block.  Return the
1029         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
1030         * parse.c: Regenerated.
1031         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
1032         * semantics.c (do_pushlevel): Give it external linkage.  Build
1033         SCOPE_STMTs.
1034         (do_poplevel): Likewise.
1035         (finish_case_label): Call define_case_label when doing semantic
1036         analysis.
1037         (finish_goto_stmt): Create RTL for labels.
1038         (finish_function_try_block): Set in_function_try_handler
1039         unconditionally.
1040         (finish_function_handler_sequence): Unset it.
1041         (finish_handler_parms): Use expand_start_catch_block even when
1042         building a statement-tree.
1043         (begin_catch_block): New function.
1044         (finish_handler): Move a little RTL-generation logic here.
1045         (finish_decl_cleanup): Allow cleanups for empty declarations.
1046         (finish_named_return_value): Don't pushdecl when not doing
1047         semantic analysis.
1048         (expand_stmt): Don't do semantic analysis for variable
1049         declarations.  Handle START_CATCH_STMT.  Call expand_label
1050         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
1051         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
1052         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
1053         RETURN_INIT and function try blocks.
1054         
1055         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
1056         x_scope_stmt_stack.  Add x_in_charge_parm.
1057         (current_eh_spec_try_block): New macro.
1058         (current_scope_stmt_stack): Likewise.
1059         (current_in_charge_parm): Likewise.
1060         * decl.c (start_function): Initialize current_in_charge_parm.
1061         (finish_function): Use current_in_charge_parm rather than looking
1062         up __in_chrg.
1063         * search.c (expand_indirect_vtbls_init): Likewise.
1065         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
1066         (TRY_BLOCK): Likewise.
1067         (HANDLER): Likewise.
1068         (START_CATCH_STMT): New tree node.
1069         (SCOPE_STMT): Likewise.
1070         * cp-tree.h (SCOPE_BEGIN_P): New macro.
1071         (SCOPE_NULLIFIED_P): Likewise.
1072         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
1073         (struct lang_decl): Add saved_language_function.
1074         (DECL_PENDING_INLINE_INFO): Adjust documentation.
1075         (DECL_PENDING_INLINE_P): New macro.
1076         (TYPE_TI_ARGS): Fix typo in comment.
1077         (DECL_SAVED_TREE): Add to documentation.
1078         (DECL_SAVED_FUNCTION_DATA): New macro.
1079         (START_CATCH_TYPE): Likewise.
1080         (SCOPE_END_P): New macro.
1081         (declare_parm_level): Don't declare.
1082         * decl.c (mark_lang_function): New function, split out from
1083         mark_cp_function_context.
1084         (save_function_data): New function.
1085         (declare_parm_level): Remove.
1086         (finish_function): Use save_function_data to squirrel away
1087         important stuff for later use.
1088         (mark_cp_function_context): Use mark_function_data.
1089         (lang_mark_tree): Likewise.
1090         * lex.c (begin_definition_of_inclass_inline): Set
1091         DECL_PENDING_INLINE_P.
1092         (store_pending_inline): Clear it.
1093         * pt.c (tsubst_decl): Likewise.
1095 1999-09-17  Nathan Sidwell  <nathan@acm.org>
1097         * call.c (perform_implicit_conversion): Deal with error_mark_node.
1099 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
1101         * decl.c (warn_extern_redeclared_static): Don't get confused by
1102         static member functions.
1103         (duplicate_decls): Merge DECL_THIS_STATIC.
1105         * decl.c (expand_static_init): Make sure assignments to local
1106         statics actually occur.
1108 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
1110         * cp-tree.h (poplevel_class): Declare.
1111         * class.c (popclass): Use poplevel_class, not poplevel.
1112         * decl.c (poplevel_class): Don't make it static.  Don't return a
1113         value.
1114         (poplevel): Don't call poplevel_class; abort in a class
1115         binding level is seen.
1116         * semantics.c (finish_translation_unit): Use pop_everything.
1117         * parse.y (member_init): Allow errors.
1118         (pending_inline): Call finish_function.
1119         * parse.c: Regenerated.
1120         * Makefile.in (CONFLICTS): Adjust.
1122 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
1123         
1124         * error.c: Reduce code duplication.
1125         (dump_template_value): New function.
1126         (dump_type_real): Use it.
1127         (dump_decl): Likewise.
1128         (dump_function_name): Likewise.
1129         (dump_function_decl): Don't be too talkative about function return
1130         type variety.
1132 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1134         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
1136         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
1138 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
1140         * decl2.c (finish_file): Also call check_global_declarations for
1141         the pending_statics list.
1143 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
1145         * lex.c (cp_pragma_implementation): Allow #pragma implementation
1146         in header files.
1148 1999-09-15  Richard Henderson  <rth@cygnus.com>
1150         * lex.c (mark_impl_file_chain): Follow the next chain.
1152 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
1154         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
1155         problems with extern "C" functions redeclared as static.
1156         (duplicate_decls): When a builtin is redeclared static, make the
1157         new function have internal linkage.
1158         
1159 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
1161         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
1162         * pt.c (tsubst_copy): Likewise.
1163         * tree.c (search_tree): Likewise.
1164         (mapcar): Likewise.
1166 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1168         * typeck2.c (ack): Don't declare progname.
1170 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
1172         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
1173         filenames with ggc_alloc_string.
1175 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
1177         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
1178         TARGET_EXPR.
1179         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
1180         the TARGET_EXPR.
1181         * cvt.c (build_up_reference): Likewise.
1182         * tree.c (build_cplus_new): Likewise.
1183         (get_target_expr): Likewise.
1184         
1185 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
1187         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
1189 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
1191         * cp-tree.h (build_target_expr): New function.
1192         * call.c (build_conditional_expr): Use build_target_expr.
1193         (convert_like): Likewise.
1194         (build_over_call): Likewise.
1195         * cvt.c (build_up_reference): Likewise.
1196         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
1197         (destroy_local_var): Here.
1198         (build_target_expr): New function.
1199         * tree.c (build_cplus_new): Use it.
1200         (get_target_expr): Likewise.
1202 1999-09-13  Nathan Sidwell  <nathan@acm.org>
1204         * typeck.c (expr_sizeof): Don't decay arrays and functions.
1205         Remove misleading comment.
1206         (build_compound_expr): Don't decay arrays.
1208 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
1210         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
1211         class rvalues again.
1213 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1215         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
1217         * g++spec.c: Include gcc.h.
1218         (lang_specific_driver): Constify a char*.  Call xcalloc, not
1219         xmalloc/bzero.  All calls to the function pointer parameter now
1220         explicitly call `fatal'.
1222 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
1224         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
1225         * cvt.c (ocp_convert): Complete the from and destination types.
1226         Adjust warning about functions always being `true' in conditionals.
1227         * decl.c (duplicate_decls): Don't play funny games with abort.
1228         * error.c (dump_expr): Handle OVERLOADs.
1229         * spew.c (probe_obstack): Remove.
1230         * typeck.c (condition_conversion): Use perform_implicit_conversion.
1231         
1232 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
1234         * cp-tree.h (auto_function, define_function): Adjust prototypes.
1235         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
1236         changed.
1237         (auto_function): Likewise, for CODE arg.
1238         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
1239         (builtin_function): ... here.
1241 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
1243         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
1244         (init_decl_processing): Don't set TREE_PERMANENT for the
1245         error_mark_node.
1246         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
1247         (grokdeclarator): Likewise.
1248         (grokparms): Don't check TREE_PERMANENT when building up lists.
1249         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
1250         (mark_inline_for_output): Likewise.
1251         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
1252         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
1253         * lex.c (check_newline): Don't check ggc_p; it is always one.
1254         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
1255         * spew.c (yylex): Don't copy_node or probe_obstacks for
1256         non-permanent CONSTANTs and STRINGs.
1257         * tree.c (build_cplus_array_type_1): Don't fuss with
1258         TREE_PERMANENT on ARRAY_TYPEs.
1259         
1260         * cp-tree.def (CLEANUP_STMT): New node.
1261         * cp-tree.h (language_function): Add name_declared.
1262         (current_function_name_declared): New macro.
1263         (CLEANUP_DECL): New macro.
1264         (CLEANUP_EXPR): Likewise.
1265         (emit_local_var): Likewise.
1266         (finish_decl_cleanup): New function.
1267         * cvt.c (build_up_reference): Simplify.
1268         (ocp_convert): Remove dead code.
1269         * decl.c (start_decl): Remove call to add_decl_stmt.
1270         (grok_reference_init): Adjust, to handle bindings temporaries to
1271         references.  Remove dead code.
1272         (initialize_local_var): Don't generate RTL for
1273         declarations here, or build cleanups here.  Don't fuss with
1274         obstacks.  Replace expand_start_target_temps calls with explicit
1275         setting of stms_are_full_exprs_p.
1276         (destroy_local_var): New function.
1277         (emit_local_var): Likewise.
1278         (cp_finish_decl): Use them, as appropriate.
1279         (start_function): Announce template functions.
1280         (store_parm_decls): Don't call declare_function_name here.
1281         (finish_stmt): Don't start emit base-initialization code when just
1282         building the statement-tree.
1283         * init.c (create_temporary_var): Move add_decl_stmt call ...
1284         (get_temp_regvar): Here.
1285         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
1286         cp_finish_decl would expect.  Don't call add_decl_stmt.
1287         * semantics.c (begin_compound_stmt): Call declare_function_name,
1288         if appropriate.
1289         (finish_decl_cleanup): New function.
1290         (expand_stmt): Use emit_local_var to output variables.          
1291         (expand_body): Set current_funtion_name_declared.
1292         
1293 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
1295         * cp-tree.h (finish_cleanup_try_block): New function.
1296         * semantics.c (finish_cleanup_try_block): Add comment.
1298 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
1300         * cp-tree.h: Delete declarations for all tree nodes now moved to
1301         global_trees.
1302         * decl.c: Delete their definitions.
1303         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
1304         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
1305         provide defaults.
1306         (init_decl_processing): Call build_common_tree_nodes and
1307         build_common_tree_nodes_2 instead of building their nodes here.
1308         Don't add gc roots for them.
1310 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
1312         * cp-tree.h (language_function): Rename expanding_p to
1313         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
1314         (expanding_p): Adjust accordingly.
1315         (TREE_VIA_PRIVATE): Fix typo in comment.
1316         (DECL_REFERENCE_SLOT): Remove.
1317         (SET_DECL_REFERENCE_SLOT): Likewise.
1318         * decl.c (named_label_uses): Adjust. Remove chicken comment.
1319         (push_overloaded_decl): Don't truncate the chain of bindings when
1320         adding an overloaded function.
1321         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
1322         (initialize_local_var): Fix typo in comment.
1323         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
1324         * decl2.c (start_objects): Make the fact that we are expanding
1325         the generated function right away explicit.
1326         (start_static_storage_duration_function): Likewise.
1327         (finish_file): Fix typo in comment.
1328         * init.c (build_vec_init): Correct bugs in handling cleanups.
1329         * semantics.c (maybe_convert_cond): New function.
1330         (FINISH_COND): Always store the condition, even if there's
1331         a declaration.
1332         (finish_if_stmt_cond): Use maybe_convert_cond.
1333         (finish_while_stmt_cond): Likewise.
1334         (finish_do_stmt): Likewise.
1335         (finish_for_cond): Likewise.
1336         (expand_cond): Adjust.
1337         
1338         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
1339         * init.c (perform_member_init): Remove obstack machinations.
1340         (expand_cleanup_for_base): Likewise.
1341         (finish_init_stmts): Mark the statement-expression as used.
1342         * method.c (emit_thunk): Use tree-generating functions, not
1343         RTL.
1344         (do_build_copy_constructor): Likewise.
1345         (do_build_assign_ref): Likewise.
1346         (synthesize_method): Likewise.  Keep track of line numbers.
1347         * pt.c (tsubst_expr): Handle various kinds of try blocks.
1348         * semantics.c (expand_stmts): Remove.
1349         (begin_function_try_block): Set FN_TRY_BLOCK_P.
1350         (finish_function_try_block): Be careful rechaining 
1351         function try blocks.
1352         (expand_stmt): Loop through all the statements at a given level.
1353         (exapnd_body): Be careful with line-numbers here too.  Prepare for
1354         being called directly from the parser.
1356         * cp-tree.h (finish_function): Adjust prototype.
1357         * decl.c (finish_function): Return the function compiled.
1358         * pt.c (instantiate_decl): Don't play games with obstacks.
1359         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
1360         (search_tree): Likewise.
1361         * typeck.c: Fix typo in comment.
1362         * typeck2.c (store_init_value): Add comment.
1364         * cp-tree.h (CPTI_ATEXIT): New macro.
1365         (atexit_node): Likewise.
1366         * decl.c (destroy_local_static): New function, broken out from ...
1367         (expand_static_init): Here.
1369         * rtti.c (get_tinfo_var): These should always be global
1370         (expand_si_desc): Use tree, not RTL, functions to generate code.
1371         (expand_class_desc): Likewise.
1372         (expand_ptr_desc): Likewise.
1373         (expand_attr_desc): Likewise.
1374         (expand_generic_desc): Likewise.
1375         (synthesize_tinfo_fn): Likewise.
1377 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
1379         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
1380         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
1381         RECHAIN_STMTS. 
1382         (RECHAIN_STMST_FROM_CHAIN): Likewise.
1384         * parse.y (simple_stmt): Fix typo in last change.
1386         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
1387         (STMT_IS_FULL_EXPR_P): Likewise.
1388         (STMT_LINENO_FOR_FN_P): Likewise.
1389         (prep_stmt): New function.
1390         (building_stmt_tree): Tweak for safety.
1391         * pt.c (tsubst_expr): Use prep_stmt throughout.
1392         (add_tree): Move it to semantics.c
1393         * semantics.c (add_tree): Move it here.
1394         (finish_expr_stmt_real): New function.
1395         (finish_expr_stmt): Use it.
1396         (finish_if_stmt_cond): Use FINISH_COND.
1397         (finish_while_stmt_cond): Likewise.
1398         (finish_for_cond): Likewise.
1399         (finish_stmt_tree): Tweak line-number handling.
1400         (prep_stmt): New function.
1401         (expand_stmt): Use it.
1402         
1403         * cp-tree.h (begin_switch_stmt): Adjust prototype.
1404         (finish_switch_cond): Likewise.
1405         * parse.y (simple_stmt): Adjust accordingly.
1406         * parse.c: Regenerated.
1407         * pt.c (tsubst_expr): Adjust accordingly.
1408         * semantics.c (expand_cond): New function.
1409         (FINISH_COND): New macro.
1410         (begin_switch_stmt): Build the SWITCH_STMT here.
1411         (finish_switch_stmt_cond): Not here.
1412         (expand_stmt): Adjust calls to begin_switch_stmt and
1413         finish_switch_cond.  Use expand_cond throughout.
1415         * dump.c (dequeue_and_dump): Dump types for constants.
1416         Describe DECL_ARG_TYPE more intuitively.
1417         Handle ARRAY_REF.
1419         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
1420         (lang_cleanup_tree): Remove.
1421         * lex.c (make_lang_type): Use ggc_alloc to allocate
1422         TYPE_LANG_SPECIFIC.
1424         Reorganize per-function data.
1425         * cp-tree.h (saved_scope): Add function_decl, bindings.
1426         (language_function): Rename binding_level to bindings.
1427         (cp_function_chain): Use the current_function, not the
1428         outer_function_chain.
1429         (current_class_ptr): Make it work, even when there's no 
1430         current function.
1431         (current_class_ref): Likewise.
1432         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
1433         macros.
1434         (clear_temp_name): Remove.
1435         * decl.c (check_function_type): New function, broken out from
1436         start_function.
1437         (current_binding_level): Adjust definition.
1438         (pushlevel): Simplify.
1439         (poplevel): Don't use named_label_uses when we're outside
1440         a function scope.
1441         (mark_saved_scope): Mark function_decl and bindings.
1442         (maybe_push_to_top_level): Don't unconditionally push a new
1443         function context.  Save bindings and the current_function_decl.
1444         Don't clear named_labels.
1445         (pop_from_top_level): Pop function context if appropriate.
1446         (init_decl_processing): Set init_lang_status and free_lang_status,
1447         rather than save_lang_status and restore_lang_status.
1448         (start_function): Take SF_* flags.  Don't clear per-function data.
1449         Reorder and simplify to use new per-function data code.  Add
1450         asserts.
1451         (store_parm_decls): Don't call init_function_start here.
1452         (finish_function): Adjust for new handling of per-function data.
1453         (push_cp_function_context): Simplify.
1454         (mark_cp_function_context): Change binding_level to bindings.
1455         * decl2.c (clear_temp_name): Remove.
1456         (start_objects): Use SF flags to start_function.
1457         (start_static_storage_duration_function): Likewise.
1458         * except.c (start_anon_func): Remove redundant calls to 
1459         push_function_context_to.  Use SF flags to start function.
1460         (end_anon_func): Remove redundant call to pop_function_context
1461         from.
1462         * lex.c (reinit_parse_for_function): Don't initialize per-function 
1463         data.
1464         * method.c (emit_thunk): Clear current_function after calling
1465         assemble_end_function.  Use SF flags for start_function.
1466         (synthesize_method): Use SF flags for start_function.
1467         * parse.c: Regenerated.
1468         * parse.y (fn.defpen): Likewise.
1469         (pending_inline): Clear current_function, even if something goes
1470         wrong.
1471         * pt.c (instantiate_decl): Use SF flags to start_function.
1472         Don't save and restore expanding_p.
1473         (add_tree): Handle the case where we are outside any function.
1474         (end_tree): Likewise.
1475         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
1476         * semantics.c (begin_function_definition): Likewise.
1477         (expand_body): Likewise.
1478         
1479 1999-09-09  Nathan Sidwell  <nathan@acm.org>
1481         * cp-tree.h (convert_to_void): Prototype new function.
1482         (require_complete_type_in_void): Remove prototype.
1483         * cvt.c (convert_to_void): New function.
1484         (ocp_convert): Use convert_to_void.
1485         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
1486         expressions.
1487         * typeck.c (require_complete_type_in_void): Remove function.
1488         (build_compound_expr): Use convert_to_void.
1489         (build_static_cast): Likewise.
1490         (build_c_cast): Likewise.
1491         * semantics.c (finish_expr_stmt): Do not decay full expressions.
1492         
1493         * typeck.c (build_x_compound_expr): Add FIXME.
1495 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
1497         * cp-tree.h (scratch_tree_cons): Remove.
1498         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
1499         and perm_tree_cons with plain tree_cons.
1500         * class.c: Likewise.
1501         * decl.c: Likewise.
1502         * decl2.c: Likewise.
1503         * except.c: Likewise.
1504         * expr.c: Likewise.
1505         * init.c: Likewise.
1506         * lex.c: Likewise.
1507         * method.c: Likewise.
1508         * parse.y: Likewise.
1509         * pt.c: Likewise.
1510         * repo.c: Likewise.
1511         * rtti.c: Likewise.
1512         * search.c: Likewise.
1513         * typeck.c: Likewise.
1514         * parse.c: Regenerated.
1515         * tree.c (build_srcloc): Simplify.
1516         
1517 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
1519         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
1520         Remove next.
1521         (LANG_DECL_PERMANENT): Remove.
1522         * decl.c (duplicate_decls): Don't mess about with obstacks trying
1523         to free memory.
1524         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
1525         * lex.c (free_lang_decl_chain): Remove.
1526         (build_lang_decl): Don't use obstacks.
1527         (retrofit_lang_decl): Likewise.
1528         (copy_lang_decl): Likewise.
1530         * cp-tree.h (saved_scope): Remove old_binding_level and 
1531         function_decl.  Tidy up.
1532         * decl.c (mark_saved_scope): Don't set them.
1533         (maybe_push_to_top_level): Clear memory.
1535         * decl.c (layout_var_decl): Change prototype.  Don't complete
1536         types for external objects.
1537         (check_initializer): Likewise.  Tidy.
1538         (initialize_local_var): Complete types here.
1539         (cp_finish_decl): Not here.  Reorganize a little.
1540         (grokvardecl): Don't complete types here.
1542         * decl.c (start_function): Clear last_dtor_insn and
1543         last_parm_cleanup_insn. 
1544         (push_cp_function_context): Just copy over a little of
1545         the old context, not all of it.
1547         * cp-tree.h (copy_to_permanent): Remove.
1548         (permanent_p): Likewise.
1549         * decl.c (building_typename_type): Don't use copy_to_permanent.
1550         (start_decl): Likewise.
1551         (grok_reference_init): Likewise.
1552         (cp_finish_decl): Likewise.
1553         * init.c (build_new_1): Don't use mapcar.
1554         (build_vec_delete_1): Don't use copy_to_permanent.
1555         (build_vec_init): Likewise.
1556         * parse.y (primary): Likewise.
1557         * parse.c: Regenerated.
1558         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
1559         (lookup_template_class): Likewise.
1560         (tsubst_friend_function): Likewise.
1561         (instantiate_class_template): Likewise.
1562         (tsubst_decl): Likewise.
1563         (tsubst): Likewise.
1564         (instantiate_template): Likewise.
1565         (unify): Likewise.
1566         * rtti.c (get_tinfo_fn): Likewise.
1567         (build_dynamic_cast): Likewise.
1568         * semantics.c (finish_if_stmt_cond): Likewise.
1569         (finish_while_stmt_cond): Likewise.
1570         (finish_do_stmt): Likewise.
1571         (finish_for_cond): Likewise.
1572         (finish_for_expr): Likewise.
1573         (finish_cleanup): Likewise.
1574         (add_decl_stmt): Likewise.
1575         (finish_named_return_value): Likewise.
1576         (finish_qualified_call_expr): Likewise.
1577         * tree.c (perm_manip): Remove.
1578         (build_exception_variant): Don't use copy_to_permanent.
1579         (permanent_p): Remove.
1580         (copy_to_permament): Remove.
1581         (build_min_nt): Don't use copy_to_permanent.
1582         (build_min): Likewise.
1583         (min_tree_cons): Likewise.
1584         * typeckc.c (build_static_cast): Likewise.
1585         (build_reinterpret_cast): Likewise.
1586         (build_const_cast): Likewise.
1587         
1588 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
1590         * decl.c (ggc_p): Set it to 1.
1591         (mark_saved_scope): Add prototype.
1593 1999-09-07  Richard Henderson  <rth@cygnus.com>
1595         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
1596         * typeck.c (self_promoting_args_p): Delete.
1598 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
1600         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
1601         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
1603 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
1605         * Makefile.in (tree.o): Depend on ggc.h.
1606         * class.c (make_method_vec): Remove.
1607         (free_method_vec): Likewise.
1608         (free_method_vecs): Remove.
1609         (add_method): Don't use them.
1610         * cp-tree.def (PTRMEM_CST): Make it longer.
1611         (TEMPLATE_PARM_INDEX): Make it shorter.
1612         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
1613         (template_parm_index): Remove RTL field.
1614         (ptrmem_cst): Add RTL field.
1615         (finish_function): Removed parameter.
1616         (process_next_inline): Change prototype.
1617         (init_cplus_unsave): Rename to init_tree.
1618         (binding_init): Remove.
1619         * decl.c (free_binding_nodes): Remove.
1620         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
1621         (pop_binding): Don't use free_binding_nodes.
1622         (free_binding_vecs): Remove.
1623         (store_bindings): Don't use them.
1624         (pop_from_top_level): Likewise.
1625         (lookup_namespace_name): Simplify.
1626         (build_typename_type): Don't use obstack_free.
1627         (unqualified_namespace_lookup): Simplify.
1628         (lookup_name_real): Simplify.
1629         (start_function): Remove comment about leaks.
1630         (finish_function): Removed nested parameter.  Call
1631         expand_end_bindings even when building_stmt_tree.
1632         Call ggc_push_context and ggc_pop_context around
1633         rest_of_compilation, if necessary.
1634         (mark_cp_function_context): Handle a NULL language-context.
1635         (lang_mark_false_label_stack): Fix typo.
1636         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
1637         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
1638         pointer to method types.
1639         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
1640         * decl2.c (finish_objects): Adjust call to finish_function.
1641         (finish_static_store_duration_function): Likewise.
1642         (do_nonmember_using_decl): Remove call to binding_init.
1643         * except.c (end_anon_func): Adjust call to finish_function.
1644         * lex.c (mark_impl_file_chain): New function.
1645         (init_parse): Call init_tree, not init_cplus_unsave.
1646         Add GC roots.
1647         (cp_pramga_interface): Use xmalloc, not permalloc.
1648         (cp_pragma_implementation): Likewise.
1649         (begin_definition_of_inclass_inline): Simplify.
1650         (process_next_inline): Adjust prototype.
1651         (do_scoped_id): Don't call binding_init.
1652         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
1653         * method.c (emit_thunk): Adjust call to finish_function.
1654         (synthesize_method): Likewise.
1655         * parse.y (%union): Add a new `pi' variant.
1656         (PRE_PARSED_FUNCTION_DECL): Use it.
1657         (fn.defpen): Likewise.
1658         (fndef): Adjust call to finish_function.
1659         * pt.c (instantiate_decl): Likewise.
1660         * rtti.c (syntheisze_tinfo_fn): Likewise.
1661         * semantics.c (expand_body): Likewise.
1662         * tree.c: Include ggc.h.
1663         (mark_list_hash): New function.
1664         (binding_init): Remove.
1665         (init_cplus_unsave): Rename to ...
1666         (init_tree): This.  Add GC roots.
1667         
1668 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
1670         Get ready for garbage collection.
1671         * Makefile.in (CXX_TREE_H): Add varray.h
1672         (lex.o): Depend on ggc.h.
1673         (decl.o): Likewise.
1674         (decl2.o): Likewise.
1675         (method.o): Likewise.
1676         (search.o): Likewise.
1677         (pt.o): Likewise.
1678         (repo.o): Likewise.
1679         * class.c: Include ggc.h.
1680         (current_class_name): Remove.
1681         (current_class_type): Likewise.
1682         (current_access_specifier): Likewise.
1683         (previous_class_type): Likewise.
1684         (previous_class_values): Likewise.
1685         (class_cache_firstobj): Likewise.
1686         (current_lang_base): Likewise.
1687         (current_lang_stack): Likewise.
1688         (current_lang_stacksize): Likewise.
1689         (lang_name_c): Likewise.
1690         (lang_name_cplusplus): Likewise.
1691         (lang_name_java): Likewise.
1692         (current_lang_name): Likewise.
1693         (base_layout_decl): Likewise.
1694         (access_default_node): Likewise.
1695         (access_public_node): Likewise.
1696         (access_protected_node): Likewise.
1697         (access_private_node): Likewise.
1698         (access_default_virtual_node): Likewise.
1699         (access_public_virtual_node): Likewise.
1700         (access_protected_virtual_node): Likewise.
1701         (access_private_virtual_node): Likewise.
1702         (signed_zero_node): Likewise.
1703         (init_class_processing): Don't build base_layout_decl.
1704         (push_lang_context): Adjust now that current_lang_base is a varray.
1705         (pop_lang_context): Likewise.
1706         * cp-tree.h: Include varray.h.
1707         (cp_global_trees): Add access_default, access_public,
1708         access_protected, access_private, access_default_virtual,
1709         access_public_virtual, access_protected_virtual,
1710         access_private_virtual, ctor_identifier, delta2_identifier, 
1711         delta_identifier, dtor_identifier, in_charge_identifier,
1712         index_identifier, nelts_identifier, this_identifier,
1713         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
1714         lang_name_c, lang_name_cplusplus, lang_name_java,
1715         empty_except_spec, null, jclass, minus_one, terminate.
1716         (saved_scope): Move here from decl.c.  Define globals in terms of
1717         saved_scope: current_namespace, current_class_name,
1718         current_class_type, current_access_specifier, current_lang_stack,
1719         current_lang_base, current_lang_name, current_function_parms,
1720         current_template_parms, processing_template_decl,
1721         processing_specialization, processing_explicit_instantiation,
1722         previous_class_type, previous_class_values, class_cache_firstobj.
1723         (scope_chain): New variable.
1724         (init_pt): New function.
1725         * decl.c (current_namespace): Remove.
1726         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
1727         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
1728         (delta_identifier, delta2_identifier): Likewise.
1729         (pfn_or_delta2_identifier, tag_identifier): Likewise
1730         (vt_off_identifier, empty_except_spec, null_node): Likewise.
1731         (current_function_parms, current_lang_base): Remove.
1732         (current_lang_stack, previous_class_values): Remove.
1733         (class_binding_level): Macroize.
1734         (saved_scope): Remove.
1735         (current_saved_scope): Rename to scope_chain.
1736         (mark_saved_scope): Adjust for new scope structure.
1737         (maybe_push_to_top_level): Likewise.
1738         (pop_from_top_level): Likewise.
1739         (duplicate_decls): Adjust now that current_lang_base is a varray.
1740         (build_typename_type): Call ggc_add_tree_hash_table_root.
1741         (init_decl_processing): Call init_pt.  Call push_to_top_level to
1742         set up globals.  Add GC roots.
1743         (xref_basetypes): Adjust now that current_lang_base is a varray.
1744         * decl.h (this_identifier): Remove.
1745         (in_charge_identifier): Likewise.
1746         * decl2.c: Don't include varray.h.
1747         (current_namespace): Remove.
1748         (init_decl2): Add GC roots.
1749         * except.c (Terminate): Remove. 
1750         (init_exception_processing): Use terminate_node instead.
1751         (build_terminate_handler): Likewise.
1752         * init.c (nc_nelts_field_id): Remove.
1753         (minus_one): Likewise.
1754         (init_init_processing): Use minus_one_node and nelts_identifier
1755         instead.  Add GC roots.
1756         (jclass_node): Remove.
1757         (build_new_1): Use nelts_identifier.
1758         (build_vec_init): Likewise.
1759         (build_vec_delete): Likewise.
1760         * lex.c: Include ggc.h.
1761         (defarg_fn): Move declaration early.
1762         (defarg_parms): Likewise.
1763         (init_parse): Add GC roots.
1764         (handle_cp_pragma): Remove redundant declaration of
1765         pending_vtables.
1766         * method.c: Include ggc.h.
1767         (btypelist): Make it a varray.  All uses changed.
1768         (ktypelist): Likewise.
1769         (init_method): Add GC roots.
1770         * pt.c: Don't include varray.h.  Include ggc.h.
1771         (current_template_parms): Remove.
1772         (processing_template_decl): Likewise.
1773         (processing_specialization): Likewise.
1774         (processing_explicit_instantiation): Likewise.
1775         (init_pt): New function.
1776         * repo.c: Include ggc.h.
1777         (init_repo): Add GC roots.
1778         * search.c: Don't include varray.h.
1779         (_vptr_name): Remove.
1780         (lookup_field_1): Use vtpr_identifier instead.
1781         (expand_indirect_vtbls_init): Remove redundant declaration of
1782         in_charge_identifier.
1783         (init_search_processing): Use vptr_identifier.
1784         
1785 1999-09-05  Richard Henderson  <rth@cygnus.com>
1786             Bernd Schmidt <bernds@cygnus.co.uk>
1787             Mark Mitchell  <mark@codesourcery.com>
1789         * Makefile.in (parse.o): Depend on ggc.h.
1790         (decl2.o): Depend on ggc.h.
1791         (init.o): Depend on ggc.h.
1792         * cp-tree.h (init_decl2): Declare.
1793         (cp_parse_init): Likewise.
1794         * decl.c (ggc_p): Define to zero.
1795         (mark_saved_scope): New function.
1796         (init_decl_processing): Call cp_parse_init, and cp_decl2.
1797         Register GC roots.
1798         (expand_static_init): Add GC roots.
1799         * decl2.c: Include ggc.h.
1800         (init_decl2): New function.
1801         * init.c: Include ggc.h.
1802         (init_init_processing): Add GC roots.
1803         * parse.y: Include ggc.h.
1804         (cp_parse_init): New function.
1805         
1806 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
1808         * decl.c (init_decl_processing): Set mark_lang_status.
1809         (lang_mark_false_label_stack): Adjust prototype.
1810         * decl2.c (grok_function_init): Remove extraneous declaration of
1811         abort_fndecl.
1813         * Make-lang.in (cc1plus): Remove dependency on GGC.
1814         * Makefile.in (OBJS): Don't mention ggc-simple.o.
1815         (OBJDEPS): Don't mention ggc-simple.o.
1817         * Make-lang.in (cc1plus): Depend on $(GGC).
1818         * Makefile.in (OBJS): Add ggc-simple.o.
1819         (OBJDEPS): Likewise.
1820         * cp-tree.h (language_function): Rename members to `x_' versions;
1821         we now have x_named_labels, x_ctor_label, x_dtor_label,
1822         x_base_init_list, x_member_init_list, x_base_init_expr,
1823         x_current_class_ptr, x_current_class_ref, x_last_tree,
1824         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
1825         x_result_rtx. 
1826         (dtor_label, ctor_label, current_base_init_list,
1827         current_member_init_list, base_init_expr, current_class_ptr,
1828         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
1829         * decl.c: Include ggc.h.
1830         (last_dtor_insn): Adjust to use x_ names.
1831         (last_parm_cleanup_insn): Likewise.
1832         (original_result_rtx): Likewise.
1833         (named_labels): Likewise.
1834         (mark_binding_level): New function.
1835         (mark_cp_function_context): Likewise.
1836         (mark_false_label_stack): Likewise.
1837         (lang_mark_tree): Likewise.
1838         (lang_cleanup_tree): Likewise.
1839         
1840 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
1842         * Makefile.in (CXX_TREE_H): Include function.h.
1843         (decl.o): Don't depend on function.h.
1844         (decl2.o): Likewise.
1845         (typeck.o): Likewise.
1846         (init.o): Likewise.
1847         (method.o): Likewise.
1848         * cp-tree.h: Include function.h.
1849         (cp_function): Rename to language_function.  Remove next.
1850         (cp_function_chain): Make it a macro, not a variable.
1851         (push_cp_function_context): Don't declare.
1852         (pop_cp_function_context): Likewise.
1853         * decl.c: Don't include function.h.
1854         (push_cp_function_context): Make it static.  Make it suitable for
1855         a save_lang_status callback.
1856         (pop_cp_function_context): Likewise.
1857         (maybe_push_to_top_level): Call push_function_context_to, not
1858         push_cp_function_context.
1859         (pop_from_top_level): Call pop_function_context_from, not
1860         pop_cp_function_context.
1861         (init_decl_processing):  Set save_lang_status and
1862         restore_lang_status.  Call push_function_context_to, not
1863         push_cp_function_context.
1864         (cp_function_chain): Remove.
1865         * decl2.c: Don't include function.h.
1866         * except.c: Don't include function.h.
1867         (start_anon_func): Call push_function_context_to, not
1868         push_cp_function_context.
1869         (end_anon_func):  Call pop_function_context_from, not
1870         pop_cp_function_context.
1871         * init.c: Don't include function.h.
1872         * lex.c (begin_definition_of_inclass_inline): Call
1873         push_function_context_to, not push_cp_function_context. 
1874         (process_next_inline):  Call pop_function_context_from, not
1875         pop_cp_function_context.
1876         * method.c: Don't include function.h.
1877         (synthesize_method): Call push_function_context_to, not
1878         push_cp_function_context.  Call pop_function_context_from, not
1879         pop_cp_function_context.
1880         * typeck.c: Don't include function.h.
1881         
1882         * decl.c (expand_static_init): Tweak handling of static
1883         initializations for objects without constructors.
1885 1999-09-03  Nathan Sidwell  <nathan@acm.org>
1887         * typeck.c (build_indirect_ref): Reject dereference of pointer to
1888         void.
1890 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
1892         * cp-tree.h (cp_function): Move here, from decl.c.
1893         (cp_function_chain): Declare.
1894         (dtor_label): New macro, instead of variable.
1895         (ctor_label): Likewise.
1896         (current_base_init_list): Likewise.
1897         (current_member_init_list): Likewise.
1898         (base_init_expr): Likewise.
1899         (current_class_ptr): Likewise.
1900         (current_class_ref): Likewise.
1901         (last_tree): Likewise.
1902         (last_expr_type): Likewise.
1903         (current_function_returns_value): Likewise.
1904         (current_function_returns_null): Likewise.
1905         (current_function_just_assigned_this): Likewise.
1906         (current_function_parms_stored): Likewise.
1907         (temp_name_counter): Likewise.
1908         (static_labelno): Likewise.
1909         (expanding_p): Likewise.
1910         (stmts_are_full_exprs_p): Likewise.
1911         (in_function_try_handler): Likewise.
1912         (lang_type): Remove nested type_flags.  All uses changed.
1913         * call.c (ctor_label): Remove.
1914         (dtor_label): Likewise.
1915         * class.c (current_class_ptr): Remove.
1916         (current_class_ref): Likewise.
1917         * decl.c (static_labelno): Remove.
1918         (dtor_label): Likewise.
1919         (last_dtor_insn): New macro, instead of variable.
1920         (last_parm_cleanup_insn): Likewise.
1921         (original_result_rtx): Likewise.
1922         (in_function_try_handler): Remove.
1923         (named_label_uses): New macro, instead of variable.
1924         (named_labels): Likewise.
1925         (current_function_returns_value): Remove.
1926         (current_function_returns_null): Likewise.
1927         (current_function_assigns_this): New macro, instead of variable.
1928         (current_function_just_assigned_this): Likewise.
1929         (current_binding_level): Likewise.
1930         (init_decl_processing): Call push_cp_function_context.
1931         (cp_function): Move to cp-tree.h
1932         (cp_function_chain): Make it global.
1933         (temp_name_counter): Remove.
1934         (push_cp_function_context): Simplify.
1935         (pop_cp_function_context): Likewise.
1936         * decl2.c (temp_name_counter): Remove.
1937         * init_c (current_base_init_list): Likewise.
1938         (current_member_init_list): Likewise.
1939         (base_init_expr): Likewise.
1940         * method.c (static_labelno): Likewise.
1941         * pt.c (last_tree): Likewise.
1942         * semantics.c (expanding_p): Likewise.
1943         (stmts_are_full_exprs_p): Likewise.
1944         (last_expr_type): Likewise.
1945         * typeck.c (dtor_label): Likewise.
1946         (ctor_label): Likewise.
1947         
1948 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
1950         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
1951         (arg_assoc_class): Use arg_assoc_template_arg for template
1952         arguments. 
1953         (arg_assoc): Likewise.
1954         * pt.c (mangle_class_name_for_template): Allow member template
1955         template arguments.
1957 1999-09-02  Nathan Sidwell  <nathan@acm.org>
1959         * call.c (build_conditional_expr): Warn on enum mismatches.
1960         (convert_arg_to_ellipsis): Move non-pod check to after
1961         conversion.
1963 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1965         * gxx.gperf (hash, is_reserved_word): Add prototypes.
1967         * init.c (build_vec_init): Initialize variable `try_block'.
1969         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
1970         Likewise for bzero/memset.
1971         (token_getch, token_put_back): Add static prototypes.  Remove
1972         `inline' from the definitions.
1973         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
1975 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
1977         * cp-tree.h (lang_type): Move align into type_flags.
1978         (CLASSTYPE_ALIGN): Adjust accordingly.
1979         * call.c (direct_reference_binding): Remove misleading comment.
1981 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1983         * parse.y (language_string): Constify.
1985 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1987         * repo.c (getpwd): Don't prototype.
1988         * xref.c (getpwd): Likewise
1990 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1992         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
1993         Remove hacks for stuff which now comes from libiberty.
1995 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
1997         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
1999 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
2001         * cp-tree.h (begin_init_stmts): Declare.
2002         (finish_init_stmts): Likewise.
2003         * cvt.c (build_up_reference): Wrap the declaration of a temporary
2004         in a statement-expression so that we will see it when expanding
2005         tree structure later.
2006         * init.c (begin_init_stmts): Don't make it static.
2007         (finish_init_stmts): Likewise.
2009         * cp-tree.h (start_handler_parms): New function.
2010         (expand_start_catch_block): Take only one parameter.
2011         (start_handler_parms): New function.
2012         * decl.c (start_handler_parms): Define it.
2013         * except.c (process_start_catch_block): Take only one parameter.
2014         Don't call grokdeclarator here.
2015         (expand_start_catch_block): Don't call grokdeclarator here,
2016         either.
2017         * parse.y (handler_args): Adjust call to
2018         expand_start_catch_block.  Use start_handler_parms.
2019         * pt.c (push_template_decl_real): Make permanent lists have
2020         permanent elements.
2021         (tsubst_expr): Adjust calls to expand_start_catch_block
2022         appropriately.
2023         * semantics.c (expand_stmt): Likewise.
2024         
2025 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
2027         * pt.c (push_template_decl_real): Use template declaration from
2028         class type if it exists.
2030 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
2032         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
2033         (maybe_inject_for_scope_var): Declare it.
2034         (initialize_local_var): Likewise.
2035         * decl.c (maybe_inject_for_scope_var): Make it global.
2036         (initialize_local_var): Likewise.  Move cleanup handling here,
2037         from cp_finish_decl.
2038         (make_rtl_for_nonlocal_decl): Use
2039         push_obstacks_nochange/pop_obstacks, rather than
2040         end_temporary_allocation/resume_temporary_allocation.
2041         (cp_finish_decl): Try to complete the type of a variable when it
2042         is declared.  Move cleanup-handling to initialize_local_var.
2043         (expand_static_init): Use tree-building code, rather than
2044         RTL-building code.
2045         * decl2.c (get_temp_name): Assert non-initializedness of
2046         temporaries.
2047         * init.c (create_temporary_var): Move RTL-assigning code to ...
2048         (get_temp_regvar): Here.
2049         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
2050         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
2051         call initialize_local_var to generate initialization code.
2052         
2053 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2055         * cp-tree.h (fndecl_as_string, type_as_string,
2056         type_as_string_real, args_as_string, decl_as_string,
2057         expr_as_string, code_as_string, language_as_string,
2058         parm_as_string, op_as_string, assop_as_string, cv_as_string,
2059         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
2061         * errfn.c (cp_printer): Likewise.
2063         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
2064         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
2065         cp_file_of, code_as_string, language_as_string, parm_as_string,
2066         op_as_string, assop_as_string, args_as_string, cv_as_string):
2067         Likewise.
2069         * tree.c (lang_printable_name): Likewise.
2071 1999-08-28  Richard Henderson  <rth@cygnus.com>
2073         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
2075 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
2077         * cp-tree.h (strip_array_types): New function.
2078         * decl.c (maybe_deduce_size_from_array_init): New function, split
2079         out from cp_finish_decl.
2080         (layout_var_decl): Likewise.
2081         (maybe_commonize_var): Likewise.
2082         (maybe_inject_for_scope_var): Likewise.
2083         (initialize_local_var): Likewise.
2084         (build_cleanup_on_safe_obstack): Likewise.
2085         (check_initializer): Likewise.
2086         (make_rtl_for_nonlocal_decl): Likewise.
2087         (cp_finish_decl): Use them.
2088         * typeck.c (strip_array_types): New function.
2089         
2090         * cp-tree.def (LABEL_STMT): New tree node.
2091         * cp-tree.h (LABEL_STMT_LABEL): New macro.
2092         (shadow_label): Remove.
2093         (declare_local_label): New function.
2094         (finish_label_decl): Likewise.
2095         * decl.c (make_label_decl): New function, split out from
2096         lookup_label.
2097         (shadowed_labels): Remove.
2098         (binding_level): Add shadowed_labels.
2099         (clear_binding_level): Remove.
2100         (push_binding_level): Just bzero the new binding level.
2101         (pushlevel): Fix indentation.
2102         (pop_label): New function.
2103         (pop_labels): Likewise, split out from poplevel.
2104         (poplevel): Pop local labels.  Use pop_labels.
2105         (maybe_push_to_top_level): Don't clear shadowed_labels.
2106         (lookup_label): Use make_label_decl.
2107         (shadow_label): Remove.
2108         (declare_local_label): New function.
2109         (define_label): Simplify.
2110         (start_function): Don't clear shadowed_labels.
2111         (cp_function): Remove shadowed_labels.
2112         (push_cp_function_context): Don't save shadowed_labels.
2113         (pop_cp_function_context): Don't restore it.
2114         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
2115         * parse.y (label_decl): Use finish_label_decl.
2116         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
2117         declarations.
2118         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
2119         building_stmt_tree.
2120         (finish_label_decl): New function.
2121         (expand_stmt): Handle LABEL_STMTs and local label declarations.
2122         
2123 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
2125         * decl.c (lookup_label): Build labels on the permanent obstack
2126         when building statement trees.  Don't build RTL for labels when
2127         building statement trees.
2128         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
2129         building statement trees.
2130         (finish_label_stmt): Likewise.
2131         (expand_stmt): Adjust accordingly.
2132         * pt.c (tsubst_expr); Likewise.
2133         (do_decl_instantiation): Robustify.
2134         
2135         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
2136         * tree.c (build_cplus_new): Set it.
2137         * expr.c (cplus_expand_expr): Use it.
2138         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
2139         
2140         * decl.c (store_parm_decls): Reset immediate_size_expand.
2141         (finish_function): Likewise.
2142         
2143         * tree.c (cplus_unsave_expr_now): Don't return a value.
2145         * semantics.c (do_poplevel): Always initialize the return value.
2147 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
2149         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
2150         * tree.h (cplus_unsave_expr_now) : Same.
2152 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
2154         * decl.c (grokdeclarator): Amend comment.
2155         * except.c (expand_start_catch_block): Call push_template_decl for
2156         catch-block parameters.
2157         * method.c (synthesize_method): Build an empty compound statement
2158         for the body of a constructor.
2160 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
2162         * tree.c (cp_build_qualified_type_real): If we're asking for the
2163         same quals we already have, just return.
2165 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
2167         * cp-tree.def (SUBOBJECT): New tree node.
2168         * cp-tree.h (CLEANUP_P): New macro.
2169         (SUBOBJECT_CLEANUP): Likewise.
2170         (keep_next_level): Add parameter.
2171         (get_temp_regvar): Don't declare.
2172         (emit_base_init): Remove parameter.
2173         (expand_aggr_init): Rename to build_aggr_init.
2174         (expand_vec_init): Rename to build_vec_init.
2175         (do_pushlevel): Remove.
2176         (do_poplevel): Likewise.
2177         (finish_cleanup): New function.
2178         (finish_subobject): Likewise.
2179         (stmts_are_full_exprs_p): New variable.
2180         * decl.c (keep_next_level): Add parameter.
2181         (cp_finish_decl): Use build_aggr_init, not
2182         expand_aggr_init.  Use finish_expr_stmt to expand the code.
2183         (expand_static_init): Use tree-generating, not RTL-generating,
2184         functions to handle the initialization.
2185         (start_function): Remove dead code.  Always have a momentary
2186         obstack inside the function, even before hitting the first curly
2187         brace.
2188         (cplus_expand_expr_stmt): Move calls to
2189         expand_{start,end}_target_temps into semantics.c.
2190         (cp_function): Add stmts_are_full_exprs_p.
2191         (push_cp_function_context): Save it.
2192         (pop_cp_function_context): Restore it.
2193         * decl2.c (get_temp_regvar): Move to init.c.
2194         (do_static_initialization): Use build_{aggr,vec}_init.
2195         (do_static_destruction): Fix typo in comment.
2196         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
2197         * except.c (expand_throw): Use create_temporary_var.
2198         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
2199         * init.c (expand_vec_init_try_block): Remove.
2200         (expand_vec_init_catch_clause): Likewise.
2201         (get_temp_regvar): New function.
2202         (begin_init_stmts): Likewise.
2203         (finish_init_stmts): Likewise.
2204         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
2205         structure here.
2206         (emit_base_init): Likewise.  Remove unused parameter.
2207         (expand_virtual_init): Likewise.
2208         (expand_cleanup_for_base): Use finish_subobject.
2209         (expand_aggr_vbase_init_1): Simplify.
2210         (construct_virtual_bases): Use tree-generating functions to build
2211         up initialization.
2212         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
2213         (expand_default_init): Likewise.
2214         (expand_aggr_init_1): Likewise.
2215         (expand_vec_init): Rename to build_vec_init.
2216         * method.c (do_build_copy_constructor): Use tree-generating
2217         functions.  Don't call clear_last_expr.
2218         (do_build_assign_ref): Likewise.
2219         (synthesize_method): Call clear_last_expr here.
2220         * parse.y (base_init): Don't call clear_last_expr here.
2221         (nodecls): Likewise.
2222         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
2223         * semantics.c (do_pushlevel): Move to here.
2224         (do_poplevel): Likewise.
2225         (stmts_are_full_exprs_p): New variable.
2226         (finish_expr_stmt): Handle logic for temoprary cleanup here.
2227         (finish_for_stmt): Use finish_expr_stmt.
2228         (finish_cleanup): New function.
2229         (finish_function_try_block): Fix indentation.
2230         (finish_subobject): New function.
2231         (setup_vtbl_ptr): Call keep_next_level here.
2232         (finish_stmt_expr): Handle a block with no scope inside the
2233         statement-expression.
2234         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
2235         SUBOBJECT.
2236         * tree.c (search_tree): Handle INIT_EXPR.
2237         (mapcar): Likewise.
2238         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
2239         * typeck2.c (store_init_value): Change expand_aggr_init to
2240         build_aggr_init in comment.
2241         
2242 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
2244         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
2246 1999-08-25  Nathan Sidwell  <nathan@acm.org>
2248         * decl2.c (handle_class_head): Be graceful about additional
2249         scope qualifiers. Adjust comments to reflect reality.
2251 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
2253         * call.c (build_conditional_expr): Fix typo.
2254         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
2255         lvalue before trying to mess with the sides.
2257         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
2259 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
2261         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
2263 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
2265         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
2266         Return arbitrary pointer or NULL.
2267         (check_eh_spec): Call __throw_type_match_rtti_2.
2268         * tinfo.h (*::dcast): Return int.  Add valp parm.
2269         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
2270         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
2271         (__throw_type_match_rtti): Now just a wrapper.
2273         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
2274         (init_exception_processing): Don't initialize them.
2276 1999-08-23  Paul Burchard <burchard@pobox.com>
2278         * decl.c (check_default_argument): Fix typo.
2280 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
2282         * cp-tree.def (STMT_EXPR): Fix typo in node name.
2284         * dump.c (dump_next_stmt): New function.
2285         (dequeue_and_dump): Use it.
2286         
2287         * pt.c (tsubst_copy): Make sure to initialize return value for a
2288         STMT_EXPR, even when processing_template_decl.
2289         * semantics.c (finish_stmt_expr): A statement-expression whose
2290         last statement is not an expression-statement has type `void'.  
2291         
2292 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
2294         * semantics.c (finish_stmt_expr): Fix typo in comment.
2295         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
2296         (mapcar): Likewise.
2297         * init.c (build_vec_delete_1): Make the children of a permanent
2298         BIND_EXPR permanent.
2299         * pt.c (register_specialization): Don't register a specialization
2300         more than once.
2301         
2302 1999-08-18  Andrew Haley  <aph@cygnus.com>
2304         * method.c (process_overload_item): Call build_mangled_C9x_name ()
2305         for all integer parameter types larger than long long.
2307 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
2309         * pt.c (redeclare_class_template): Merge default template
2310         arguments in both directions.
2312         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
2313         compiler_error message.
2315 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
2317         * cp-tree.h: Declare flag_use_repository.
2318         * pt.c (do_decl_instantiation): Don't complain about duplicate
2319         instantiation with -frepo.
2320         (do_type_instantiation): Likewise.
2322         * pt.c (push_template_decl_real): Complain about everything
2323         that isn't a valid template.
2325         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
2326         affect inlines.
2328 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
2330         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
2331         * decl2.c (build_expr_from_tree): Handle it.
2332         * error.c (dump_expr): Likewise.
2333         * pt.c (for_each_template_parm): Likewise.
2334         (tsubst_copy): Likewise.
2335         * tree.c (search_tree): Likewise.
2336         * semantics.c (finish_pseudo_destructor_call): Create it.
2337         
2338 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
2340         * search.c (setup_class_bindings): Robustify.
2341         * typeck.c (common_type): Use same_type_p, not pointer equality,
2342         to compare types.
2344         * cp-tree.h (build_lang_field_decl): Remove.
2345         * class.c (build_vtable): Replace calls to build_lang_field_decl
2346         with build_lang_decl.
2347         (prepare_fresh_vtable): Likewise.
2348         (finish_struct_1): Likewise.
2349         (init_class_processing): Likewise.
2350         * decl.c (push_using_decl): Likewise.
2351         (init_decl_processsing): Likewise.
2352         (grokvardecl): Likewise.
2353         (build_ptrmemfunc_type): Likewise.
2354         (grokdeclarator): Likewise.
2355         (build_enumerator): Likewise.
2356         * decl2.c (grok_x_components): Likewise.
2357         (do_class_using_decl): Likewise.
2358         * except.c (call_eh_info): Likewise.
2359         * init.c (init_init_processing): Likewise.
2360         * rtti.c (expand_class_decl): Likewise.
2361         * tree.c (build_base_fields): Likewise.
2362         (build_vbase_pointer_fields): Likewise.
2363         * lex.c (build_lang_decl): Build declarations on the permanent
2364         obstack if we're building statmeent trees.
2365         (retrofit_lang_decl): Handle both the full lang_decl and also the
2366         smaller lang_decl_flags here.
2367         (build_lang_field_decl): Remove.
2368         * pt.c (push_template_decl_real): Issue errors for variable
2369         declarations that are not static members.
2371 1999-08-18  Richard Henderson  <rth@cygnus.com>
2373         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
2374         (mapcar): Likewise.
2376 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
2378         * cp-tree.h (back_end_hook): New variable.
2379         * decl2.c (back_end_hook): Define it.
2380         (finish_file): If it's non-NULL, call it.
2382         * decl.c (add_decl_to_level): New function.
2383         (push_local_binding): Use it.
2384         (find_binding): Fix typo in comment.
2385         (pushdecl): Use add_decl_to_level.  Put templates on the
2386         corresponding namespace-scope binding levels.
2387         * dump.c (dequeue_and_dump): Print the specializations of a
2388         template.
2389         * pt.c (push_template_decl_real): Don't push a template multiple
2390         times.
2392 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
2394         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
2395         (CALL_DECLARATOR_QUALS): Likewise.
2396         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
2397         * decl.c (grokdeclarator): Adjust to use them.
2398         * decl2.c (grokfield): Likewise.
2399         (reparse_absdcl_as_casts): Likewise.
2400         * lex.c (make_call_declarator): Likewise.
2401         (set_quals_and_spec): Likewise.
2402         * pt.c (tsubst): Likewise.
2403         * tree.c (mapcar): Remove special hack to handle third operand of
2404         a CALL_EXPR.
2406 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
2408         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
2409         * class.c (build_vtable): Use build_lang_field_decl to build the
2410         VAR_DECLs for vtables.
2411         (prepare_fresh_vtable): Likewise.
2412         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
2413         CAN_HAVE_FULL_LANG_DECL_P.
2414         (push_using_decl): Use build_lang_decl to build USING_DECLs.
2415         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
2416         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
2417         (build_lang_field_decl): Likewise.
2418         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
2419         to copy.
2420         
2421         * cp-tree.def (STMT_EXPR): New tree node.
2422         * cp-tree.h (STMT_EXPR_STMT): New macro.
2423         (store_return_init): Change prototype.
2424         (finish_named_return_value): New function.
2425         (expand_stmt): Likewise.
2426         (expand_body): Likewise.
2427         (begin_stmt_tree): Likewise.
2428         (finish_stmt_tree): Likewise.
2429         (expanding_p): New variable.
2430         (last_expr_type): Likewise.
2431         (building_stmt_tree): New macro.
2432         * decl.c (start_function): Use building_stmt_tree, not
2433         processing_template_decl, where appropriate.
2434         (store_parm_decls): Likewise.
2435         (store_return_init): Move most of the body to semantics.c.
2436         (finish_function): Use building_stmt_tree.
2437         (finish_stmt): Clear last_expr_type here.
2438         (cp_function): Add expanding_p, last_tree, last_expr_type.
2439         (push_cp_function_context): Save them.
2440         (pop_cp_function_context): Restore them.
2441         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
2442         * error.c (dump_expr): Handle STMT_EXPR.
2443         * except.c (expand_start_catch_block): Use building_stmt_tree.
2444         Use add_decl_stmt.
2445         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
2446         (do_case): Move add_tree call to semantics.c.
2447         * parse.y (return_init): Use finish_named_return_value.
2448         (for.init.statement): Use finish_expr_stmt.
2449         * parse.c: Regenerated.
2450         * pt.c (do_pushlevel): Move to semantics.c.
2451         (do_poplevel): Likewise.
2452         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
2453         (tsubst_expr): Don't expand all the way to RTL here.  Handle
2454         RETURN_INIT and CTOR_INITIALIZER.
2455         (instantiate_decl): Call expand_body after tsubst'ing into
2456         DECL_SAVED_TREE.
2457         * semantics.c (expand_stmts): New function.
2458         (expanding_p): New variable.
2459         (last_expr_type): Likewise.
2460         (finish_expr_stmt): Use building_stmt_tree.
2461         (begin_if_stmt): Likewise.
2462         (finish_if_stmt_cond): Likewise.
2463         (finish_then_clause): Likewise.
2464         (begin_else_clause): Likewise.
2465         (finish_else_clause): Likewise.
2466         (begin_while_stmt): Likewise.
2467         (finish_while_stmt_cond): Likewise.
2468         (finish_while_stmt): Likewise.
2469         (finish_do_body): Likewise.
2470         (finish_do_stmt): Likewise.
2471         (finish_return_stmt): Likewise.
2472         (begin_for_stmt): Likewise.
2473         (fnish_for_init_stmt): Likewise.
2474         (finish_for_cond): Likewise.
2475         (finish_for_expr): Likewise.
2476         (finish_for_stmt): Likewise.
2477         (finish_break_stmt): Likewise.
2478         (finish_continue_stmt): Likewise.
2479         (finish_switch_cond): Likewise.
2480         (finish_switch_stmt): Likewise.
2481         (finish_case_label): Call add_tree here if necessary.
2482         (finish_goto_statement): Use building_stmt_tree.
2483         (begin_try_block): Likewise.
2484         (begin_function_try_block): Likewise.
2485         (finish_try_block): Likewise.
2486         (finish_function_try_block): Likewise.
2487         (finish_handler_sequence): Likewise.
2488         (finish_function_handler_sequence): Likewise.
2489         (begin_handler): Likewise.
2490         (finish_handler_parms): Likewise.
2491         (finish_handler): Likewise.
2492         (begin_compound_stmt): Likewise.
2493         (finish_compound_stmt): Likewise.
2494         (finish_asm_stmt): Likewise.
2495         (finish_label_stmt): Likewise.
2496         (finish_named_return_value): New function.
2497         (setup_vtbl_ptr): Moved here from decl2.c.
2498         (do_pushlevel): Moved here from pt.c.
2499         (do_poplevel): Likewise.
2500         (begin_stmt_expr): Use building_stmt_tree.
2501         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
2502         when building_stmt_tree.
2503         (begin_stmt_tree): New function.
2504         (finish_stmt_tree): Likewise.
2505         (expand_stmt): Likewise.
2506         (expand_body): Likewise.
2507         * tree.c (build_cplus_method_type): Make sure the argument types
2508         end up on the same obstack as the METHOD_TYPE.
2509         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
2510         THROW_EXPR, STMT_EXPR.
2511         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
2512         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
2513         sorry, if an unsupported node is encountered.
2514         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
2515         (c_expand_return): Don't call add_tree here.
2516         
2517 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
2519         * pt.c (check_default_tmpl_args): Don't check in local scopes.
2520         (tsubst_decl): Make sure the declaration is on a saveable
2521         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
2522         variable.
2523         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
2524         
2525 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
2527         Speed up Koenig lookup.
2528         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
2529         to return namespaces we've looked at.
2530         * decl2.c (lookup_using_namespace): Likewise.
2531         (add_function): Don't call ovl_member.
2532         (lookup_arg_dependent): Initialize k.namespaces to the list of 
2533         namespaces seen in unqualified lookup.
2534         * call.c (equal_functions): Move here from tree.c.
2535         (joust): Use it to handle duplicate candidates.
2536         * tree.c (ovl_member): Use ==.
2538 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
2540         * cp-tree.def (DECL_STMT): Make it smaller.
2541         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
2542         (lang_decl): ... here.  Add next.
2543         (DECL_SAVED_TREE): Adjust accordingly.
2544         (DECL_IMPLICIT_TYPEDEF_P): New macro.
2545         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
2546         (DECL_STMT_DECL): Likewise.
2547         (create_implicit_typedef): New function.
2548         (maybe_push_decl): Likewise.
2549         (tsubst_default_argument): New function.
2550         (at_function_scope_p): Likewise.
2551         (add_decl_stmt): Likewise.
2552         (push_permanent_obstack): Likewise.
2553         * call.c (convert_default_arg): Use tsubst_default_argument.
2554         * class.c (add_method): Use push_permanent_obstack.
2555         (build_self_reference): Create a TEMPLATE_DECL for the
2556         self-reference, if necessary.
2557         * decl.c (pseudo_global_level_p): Only look at the current binding
2558         level.
2559         (push_binding): Use push_permanent_obstack.
2560         (create_implicit_typedef): New function.
2561         (pushtag): Use it.
2562         (duplicate_decls): Use push_permanent_obstack.
2563         (maybe_push_decl): New function.
2564         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
2565         (start_decl_1): Remove dead code.
2566         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
2567         pseudo_global_level_p.
2568         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
2569         template.
2570         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
2571         pseudo_global_level_p.
2572         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
2573         a template.
2574         (get_sentry): Use push_permanent_obstack.
2575         * dump.c (dequeue_and_dump): Enable DECL_STMT.
2576         * except.c (call_eh_info): Use push_permanent_obstack.
2577         (build_eh_type_ref): Likewise.
2578         (do_pop_exception): Likewise.
2579         (expand_eh_spec): Likewise.
2580         (alloc_eh_object): Likewise.
2581         (expand_throw): Likewise.
2582         * init.c (build_java_class_ref): Likewise.
2583         * lex.c (get_time_identifier): Likewise.
2584         (free_lang_decl_chain): Correct type.
2585         (retrofit_lang_decl): Adjust accordingly.
2586         (build_lang_field_decl): Likewise.
2587         * lex.h (free_lang_decl_chain): Likewise.
2588         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
2589         * parse.c: Regenerated.
2590         * pt.c (tsubst_default_arguments): New function.
2591         (retrieve_local_specialization): Likewise.
2592         (register_local_specialization): Likewise.
2593         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
2594         pseudo_global_level_p to determine whether or not a template is
2595         primary.
2596         (lookup_template_class): Likewise.  Use create_implicit_typedef.
2597         (instantiate_class_template): Call tsubst_default_arguments for
2598         member functions, if appropriate.
2599         (tsubst_default_argument): New function.
2600         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
2601         * search.c (at_function_scope_p): New function.
2602         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
2603         (finish_label_stmt): Likewise.
2604         (add_decl_stmt): New function.
2605         (begin_class_definition): Likewise.
2606         (finish_typeof): Likewise.
2607         * tree.c (copy_template_template_parm): Likewise.
2608         (copy_to_permanent): Likewise.
2609         (push_permanent_obstack): Define.
2610         (mark_addressable): Use it.
2611         * typeck.c (mark_addressable): Likewise.
2612         
2613 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
2615         * cp-tree.h (init_cplus_unsave): New.
2616         (cplus_unsave_expr_now): New.
2617         * lex.c (init_parse): Call init_cplus_unsave.
2618         * tree.c (init_cplus_unsave): New.
2619         (cplus_unsave_expr_now): New.
2621 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
2623         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
2624         decl_constant_value to simplify array bounds.
2626 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
2628         * lang-options.h: Add -fms-extensions.
2629         * cp-tree.h: Declare flag_ms_extensions.
2630         * decl2.c: Define it.
2631         * class.c (instantiate_type): Don't complain about taking the address
2632         of a bound member function if -fms-extensions.
2633         * typeck.c (build_unary_op): Likewise.
2634         * decl.c (grokdeclarator): Or about implicit int.
2635         * init.c (resolve_offset_ref): Or about implicit '&'.
2637 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
2639         * cp-tree.h (minimal_parse_mode): Remove.
2640         (finish_label_stmt): New function.
2641         * decl.c (saved_scope): Remove minimal parse mode.
2642         (maybe_push_to_top_level): Don't save it.
2643         (pop_from_top_level): Don't restore it.
2644         (define_label): Split out template-handling code to semantics.c.
2645         (start_decl): Don't use minimal_parse_mode.
2646         (cp_finish_decl): Likewise.
2647         (start_function): Don't increment it.
2648         (store_return_init): Don't use it.
2649         (finish_function): Don't decrement it.
2650         * parse.y (label_colon): Use finish_label_stmt throughout.
2651         * parse.c: Regenerated.
2652         * pt.c (minimal_parse_mode): Don't define it.
2653         (tsubst_expr): Use finish_label_stmt.
2654         * semantics.c (finish_label_stmt): New function.
2656         * dump.c (queue): Be careful when computing bitmasks.
2657         (dequeue_and_dump): Describe binfos as binfos, not as
2658         vectors.
2659         
2660         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
2661         throughout.     
2662         * parse.c: Regenerated.
2663         
2664         * Make-lang.in (CXX_SRCS): Remove sig.c.
2665         * Makefile.in (CXX_OBJS): Remove sig.o.
2666         (sig.o): Remove.
2667         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
2668         (CPTI_SIGNATURE_TYPE): Likewise.
2669         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
2670         (opaque_type_node): Likewise.
2671         (signature_type_node): Likewise.
2672         (sigtable_entry_type): Likewise.
2673         (flag_handle_signatures): Likewise.
2674         (lang_type): Remove is_signature, is_signature_pointer,
2675         is_signature_reference, has_opaque_typedecls,
2676         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
2677         signature_pointer_to, signature_reference_to.
2678         (IS_SIGNATURE): Remove.
2679         (SET_SIGNATURE): Remove.
2680         (CLEAR_SIGNATURE): Remove.
2681         (IS_SIGNATURE_POINTER): Remove.
2682         (IS_SIGNATURE_REFERENCE): Remove.
2683         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
2684         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
2685         (CLASSTYPE_SIGNATURE): Remove.
2686         (SIGNATURE_TYPE): Remove.
2687         (SIGNATURE_METHOD_VEC): Remove.
2688         (SIGNATURE_POINTER_TO): Remove.
2689         (SIGNATURE_REFERENCE_TO): Remove.
2690         (lang_decl_flags): Remove is_default_implementation.  Rename
2691         memfunc_pointer_to to saved_tree.
2692         (IS_DEFAULT_IMPLEMENTATION): Remove.
2693         (DECL_MEMFUNC_POINTER_TO): Remove.
2694         (DECL_MEMFUNC_POINTING_TO): Remove.
2695         (DECL_SAVED_TREE): Adjust definition.
2696         (tag_types): Remove signature_type_node.
2697         (SIGNATURE_FIELD_NAME): Remove.
2698         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
2699         (SIGNATURE_OPTR_NAME): Likewise.
2700         (SIGNATURE_SPTR_NAME): Likewise.
2701         (SIGNATURE_POINTER_NAME): Likewise.
2702         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
2703         (SIGNATURE_REFERENCE_NAME): Likewise.
2704         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
2705         (SIGTABLE_PTR_TYPE): Likewise.
2706         (SIGTABLE_NAME_FORMAT): Likewise.
2707         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
2708         (SIGTABLE_TAG_NAME): Likewise.
2709         (SIGTABLE_VB_OFF_NAME): Likewise.
2710         (SIGTABLE_VT_OFF_NAME): Likewise.
2711         (finish_base_specifiers): Change prototype.
2712         (build_signature_pointer_type): Remove.
2713         (build_signature_reference_type): Remove.
2714         (build_signature_pointer_constructor): Remove.
2715         (build_signature_method_call): Remove.
2716         (build_optr_ref): Likewise.
2717         (append_signature_fields): Likewise.
2718         (signature_error): Likewise.
2719         * call.c (build_this): Remove signature support.
2720         (build_over_call): Likewise.
2721         (build_new_method_call): Likewise.
2722         * class.c (add_implicitly_declared_members): Likewise.
2723         (finish_struct_1): Likewise.
2724         (finish_struct): Likewise.
2725         * cvt.c (cp_convert_to_pointer): Likewise.
2726         (convert_to_pointer_force): Likewise.
2727         (ocp_convert): Likewise.
2728         * decl.c (sigtable_decl_p): Remove.
2729         (init_decl_processing): Remove support for signatures.
2730         (cp_finish_decl): Likewise.
2731         (grokdeclarator): Likewise.
2732         (grokparms): Likewise.
2733         (xref_tag): Likewise.
2734         (start_function): Likewise.
2735         (start_method): Likewise.
2736         * decl2.c (finish_sigtable_vardecl): Remove.
2737         (flag_handle_signatures): Remove.
2738         (lang_f_options): Remove handle-signatures.
2739         (grokfield): Remove support for signatures.
2740         (grokbitfield): Likewise.
2741         (finish_file): Likewise.
2742         (reparse_absdcl_as_casts): Likewise.
2743         * error.c (dump_type_real): Likewise.
2744         (dump_function_decl): Likewise.
2745         * friend.c (make_friend_class): Likewise.
2746         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
2747         * hash.h: Regenerated.
2748         * init.c (build_new_1): Remove support for signatures.
2749         * lang-options.h: Remove -fhandle-signatures,
2750         -fno-handle-signatures. 
2751         * lex.c (init_parse): Remove support for signatures.
2752         (yyprint): Likewise.
2753         * lex.h (rid): Remove RID_SIGNATURE.
2754         * method.c (build_decl_overload_real): Remove support for
2755         signatures. 
2756         (hack_identifier): Likewise.
2757         * parse.y (base_class): Likewise.
2758         (base_class.1): Likewise.
2759         (access_specifier): Likewise.
2760         * search.c (lookup_member): Likewise.
2761         * semantics.c (finish_qualified_object_call_expr): Likewise.
2762         (finish_template_type_parm): Likewise.
2763         (begin_class_definition): Likewise.
2764         (finish_base_specifier): Likewise.
2765         * sig.c: Remove.
2766         * tree.c (build_cplus_method_type): Remove support for signatures.
2767         * typeck.c (require_complete_type): Likewise.
2768         (c_sizeof): Likewise.
2769         (c_alignof): Likewise.
2770         (build_object_ref): Likewise.
2771         (build_component_ref): Likewise.
2772         (build_indirect_ref): Likewise.
2773         (build_c_cast): Likewise.
2774         (build_modify_expr): Likewise.
2775         (convert_for_initialization): Likewise.
2776         * typeck2.c (signature_error): Remove.
2777         (store_init_value): Remove support for signatures.
2778         (digest_init): Likewise.
2779         (build_x_arrow): Likewise.
2780         (build_functional_cast): Likewise.
2781         * xref.c (GNU_xref_decl): Likewise.
2782         
2783 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
2785         * lex.c (do_identifier): Remove unnecessary lookup of class field.
2787 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
2789         * decl2.c (set_decl_namespace): Do not complain about non-matching
2790         decls if processing a template.
2792 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
2794         * decl.c (build_ptrmemfunc_type): Handle qualified
2795         pointer-to-member types here.
2796         * tree.c (cp_build_qualified_type_real): Simplify handling here.
2798 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2800         * lex.c (lang_identify): Likewise.
2802 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
2804         * Makefile.in: Update dependencies.
2805         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
2806         NULL_RTX.
2807         * decl.c: Include "function.h"
2808         (cleanup_label, return_label): Delete declarations.
2809         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
2810         (finish_function): Rename last_parm_insn variable to
2811         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
2812         * decl2.c: Include "function.h".
2813         (rtl_expr_chain): Delete declaration.
2814         * method.c: Include "function.h"
2815         * tree.c (build_vbase_pointer_fields): Don't initialize
2816         DECL_SAVED_INSNS with NULL_RTX.
2817         * typeck.c: Include "function.h"
2819 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
2821         * semantics.c (begin_function_try_block, finish_function_try_block,
2822         finish_function_handler_sequence): New fns.
2823         * parse.y (function_try_block): Use them.
2824         * pt.c (instantiate_decl): Likewise.
2826         * cp-tree.h: Declare in_function_try_handler.
2827         * decl.c: Define it.
2828         (start_function): Clear it.
2829         (struct cp_function, push_cp_function_context): Save it.
2830         (pop_cp_function_context): Restore it.
2831         * parse.y (function_try_block): Set and clear it.
2832         * except.c (expand_end_catch_block): Rethrow if we reach the end
2833         of a function-try-block handler in a ctor or dtor.
2834         * typeck.c (c_expand_return): Complain about returning from a
2835         function-try-block handler of a ctor.
2837         * parse.y (function_try_block): Call end_protect_partials
2838         before expand_start_all_catch.
2840 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
2842         * decl.c (struct binding_level): Add eh_region field.
2843         (push_binding_level): Set it.
2844         (define_label): Complain about jumping into an EH block.
2846         * ptree.c (print_lang_type): Print the real type of a PMF.
2847         Print what exceptions a fn type throws.
2849 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2851         * class.c (count_fields, add_fields_to_vec): Add static prototype.
2853         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
2854         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
2855         char*.
2857         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
2858         Constify a char*.
2860         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
2861         char*.
2863         * dump.c (queue_and_dump_index, dump_int, dump_string,
2864         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
2865         a char*.
2866         (dump_stmt): Add static prototype.
2868         * errfn.c (cp_thing): Constify a char*.
2870         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
2871         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
2872         dump_expr): Constify a char*.
2874         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
2875         read_line_number): Add static prototype.
2876         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
2877         (real_yylex): Move label `letter' into the scope where it is used.
2879         * method.c (build_mangled_template_parm_index, build_overload_int,
2880         build_decl_overload_real, get_id_2): Constify a char*.
2882         * search.c (check_final_overrider): Make static.
2884         * typeck.c (composite_pointer_type): Constify a char*.
2886 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
2888         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
2889         we're looking at a class.
2891         * decl.c (lookup_name_real): Set the complain flag if we're
2892         looking for a namespace member.
2894         * lex.c (real_yylex): We can have a number with no digits.
2896         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
2898         * search.c (binfo_from_vbase): New fn.
2899         * cp-tree.h: Declare it.
2900         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
2901         from pointer to member of virtual base.  
2902         * typeck.c (get_delta_difference): Likewise.
2904 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
2906         * pt.c (tsubst): Use build_index_type to build in-template array
2907         index type.  Fixes g++.oliva/dwarf1.C.
2908         * decl.c (grokdeclarator): Likewise, just for consistency, as it
2909         doesn't seem to trigger the bug without it.
2911 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
2913         * typeck2.c (add_exception_specifier): Use complete_type.
2915 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
2917         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
2918         (dump_binary_op): Bulletproof.
2919         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
2920         * tree.c (search_tree): Don't enumerate all the nodes of classes
2921         `1', `2', and `<'; handle them generically.  Don't be sorry about
2922         "unrecognized tree codes"; just abort.
2923         (no_linkage_check): Don't do linkage checks for templates.
2924         
2925         * tree.c (cp_build_qualified_type_real): Handle
2926         pointer-to-member-function types correctly.
2928 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
2930         * decl.c (pushdecl): Only give an error for shadowing a parm 
2931         from *this* function.
2933 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
2935         * typeck2.c: Update URLs and mail addresses.
2937 1999-08-04  Nathan Sidwell  <nathan@acm.org>
2939         * cp-tree.h (empty_except_spec): New global var.
2940         (compexcepttypes): Remove prototype.
2941         (comp_except_specs): Prototype new global function.
2942         (add_exception_specifier): Prototype new global function.
2943         * decl.c (empty_except_spec): Define new global var.
2944         (duplicate_decls): Use comp_except_specs, reword error message.
2945         (init_decl_processing): Initialize empty_except_spec.
2946         Adjust build_exception_variant calls.
2947         * parse.y (exception_specification_opt): Use empty_except_spec.
2948         (ansi_raise_identifier): Call check_for_new_type.
2949         (ansi_raise_identifiers): Use add_exception_specifier.
2950         * pt.c (tsubst): Use add_exception_specifier to build exception
2951         specifier.
2952         * search.c (check_final_overrider): New static function, broken
2953         out of get_matching_virtual. Check throw specifiers, reword
2954         diagnostics.
2955         (get_matching_virtual): Use check_final_overrider.
2956         * tree.c (build_exception_variant): Use comp_except_specs.
2957         * typeck.c (compexcepttypes): Remove.
2958         (comp_except_types): New static function, helper for
2959         comp_except_specs. Compare two types as exception specifiers.
2960         (comp_except_specs): New global function, compare two exception
2961         specifiers.
2962         (comptypes): Adjust for comp_except_specs.
2963         * typeck2.c (add_exception_specifier): New global function.
2964         
2965         * class.c (check_for_override): Reword error message.
2967 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2969         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
2970         * cp-tree.h (struct lang_type): Added non_pod_class flag.
2971         (CLASSTYPE_NON_POD_P): New macro to access it.
2972         * class.c (finish_struct_1): Determine non-PODness.
2973         Check for arrays of pointers (-Weffc++).
2974         Remove array inspection duplicated code.
2975         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
2976         Use CLASSTYPE_NON_POD_P.
2978 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2980         * class.c (duplicate_tag_error): Preserve template information.
2982 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2984         * decl.c (start_enum): Show location of previous definition.
2985         * parse.y (enumlist_opt): New reduction.
2986         (structsp): Simplify enum rules to use enumlist_opt.
2988 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
2990         * lex.c (yyprint): Handle PFUNCNAME.
2992         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
2993         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
2995 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
2997         * decl.c (start_decl): Set attributes before duplicate_decls call.
2999 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
3001         * Make-lang.in (CXX_SRCS): Add dump.c.
3002         * Makefile.in (CXX_OBJS): Add dump.o.
3003         (dump.o): New target.
3004         * cp-tree.h (DECL_CONV_FN_P): Document.
3005         (DECL_OVERLOADED_OPERATOR_P): New function.
3006         (TYPE_PTRMEM_CLASS_TYPE): New macro.
3007         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
3008         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
3009         (ASM_VOLATILE_P): New macro.
3010         (STMT_LINENO): Likewise.
3011         (cp_namespace_decls): New function.
3012         (dump_node_to_file): New function.
3013         * decl.c (cp_namespace_decls): New function.
3014         (walk_namespaces_r): Use it.
3015         (wrapup_globals_for_namespace): Likewise.
3016         * decl2.c (flag_dump_translation_unit): New variable.
3017         (lang_decode_option): Handle -fdump-translation-unit.
3018         (finish_file): If flag_dump_translation_unit is set, dump the
3019         translation unit.
3020         * dump.c: New file.
3021         * lang-options.h: Add -fdump-translation-unit.
3022         * pt.c (tsubst_template_parms): Robustify.
3023         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
3024         (tsubst_expr): Use STMT_LINENO.
3025         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
3026         for invalid cv-qualifiers even while building templates.
3027         
3028 1999-08-02  Richard Henderson  <rth@cygnus.com>
3030         * call.c: Include defaults.h instead of expr.h.
3031         * decl.c: Likewise.
3032         * pt.c: Likewise.
3033         * typeck.c: Include defaults.h.
3035 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
3037         * lex.c (errorcount, sorrycount): Don't declare.
3038         * repo.c (errorcount, sorrycount): Likewise.
3039         * typeck2.c (errorcount, sorrycount): Likewise.
3041 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
3043         * call.c (convert_default_arg, build_over_call): Change all uses of
3044         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
3045         Ensure expr.h is included.
3046         * decl.c (grokparams): Ditto.
3047         * pt.c (tsubst_decl): Ditto.
3048         * typeck.c (convert_arguments): Ditto.
3050 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
3052         * class.c (mark_overriders): Fix order of args to overrides.
3053         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
3054         functions with the same name.
3056 1999-08-02  Richard Henderson  <rth@cygnus.com>
3058         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
3060 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
3062         * call.c (build_conditional_expr): Fix typo in comment.
3064 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
3066         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
3067         case_stack; use in_control_zone_p.
3068         * typeck.c (c_expand_return): Likewise.
3070 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
3072         * except.c (catch_clauses): Delete declaration.
3074 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
3076         * call.c (build_conditional_expr): Call convert_from_reference to
3077         avoid reference/non-reference type confusion.  Fix typo.
3079 1999-07-30  Richard Henderson  <rth@cygnus.com>
3081         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
3082         * cp-tree.h (initializer_constant_valid_p): Remove.
3084 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
3086         * call.c (conditional_conversion): Don't build BASE_CONVs for
3087         conversions between things that have the same type.
3088         (build_conditional_expr): Tweak.
3089         (convert_like): Some BASE_CONVs really do require the generation
3090         of code.
3091         
3092         * init.c (perform_member_init): Don't go through build_modify_expr
3093         for simple initializations.
3095 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
3097         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
3098         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
3099         virtual functions and MI.  Simplify.
3101         * method.c: Remove prototype for largest_union_member.
3102         * pt.c (determine_specialization): Fix uninitialized warning.
3103         * lex.c (real_yylex): Likewise.
3105 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
3107         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
3108         here too.
3110         * cp-tree.h (BINFO_VIRTUALS): Document new format.
3111         * class.c (modify_one_vtable): Change prototype accordingly.
3112         (modify_all_vtables): Likewise.
3113         (modify_all_direct_vtables): Likewise.
3114         (modify_all_indirect_vtables): Likewise.
3115         (build_vtable_entry_for_fn): New function.
3116         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
3117         (modify_vtable_entry): Likewise.
3118         (add_virtual_function): Likewise.
3119         (build_vtbl_initializer): New function.
3120         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
3121         (fixup_vtable_deltas1): Likewise.
3122         (fixup_vtable_deltas): Likewise.
3123         (override_one_vtable): Likewise.
3124         (finish_struct_1): Likewise.
3126         * error.c (dump_expr): Likewise.
3127         * search.c (get_abstract_virtuals_1): Likewise.
3128         (get_abstract_virtuals): Likewise.
3129         (expand_upcast_fixups): Likewise.
3130         * tree.c (debug_binfo): Likewise.
3131         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
3132         __pure_virtual here.
3133         
3134 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
3136         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
3137         as per 1999-07-26 change.
3139         * typeck.c (c_sizeof): Don't allow non-static data members.
3140         (expr_sizeof): Likewise.
3142 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
3144         * input.c (feed_input): Only touch lineno and input_filename
3145         if !USE_CPPLIB.  Save the old values before setting the new ones.
3147         * input.c (feed_input): Add file, line parms.
3148         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
3149         (real_yylex): Check linemode before input_redirected().
3151         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
3152         from op new to warning.
3154 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
3156         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
3157         * call.c: All uses changed.
3158         * typeck.c: Likewise.
3160 1999-07-26  Nathan Sidwell  <nathan@acm.org>
3162         * exception.cc (__cplus_type_matcher): Match __eh_matcher
3163         prototype.
3165 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
3167         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
3168         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
3169         (strip_top_quals): Declare.
3170         (ncp_convert): Likewise.
3171         (type_after_usual_arithmetic_converions): Likewise.
3172         (composite_pointer_type): Likewise.
3173         * call.c (strip_top_quals): Don't make it static.
3174         (promoted_arithmetic_type_p): New function.
3175         (conditional_conversion): Likewise.
3176         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
3177         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
3178         for converting a type to itself.
3179         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
3180         (implicit_conversion): Make sure the from and to types are
3181         complete.
3182         (add_builtin_candidate): Correct handling of ?: operator.
3183         (add_builtin_candidates): Improve documentation.
3184         (build_conditional_expr): New function.
3185         (can_convert): Implement in terms of can_convert_arg.
3186         (ncp_convert): New function.
3187         * typeck.c (type_after_usual_arithmetic_conversions): New
3188         function, split out from common_type.
3189         (composite_pointer_type): New function, split out from
3190         build_conditional_expr.
3191         (common_type): Use type_after_usual_arithmetic_conversions.
3192         Remove redundant attribute merging.
3193         (comptypes): Tidy.  Handle COMPLEX_TYPE.
3194         (build_binary_op_nodefault): Use null_ptr_cst_p.
3195         (build_conditional_expr): Remove.
3196         (convert_for_assignment): Use new conversion functions.
3197         
3198         * cp-tree.h (abstract_virtuals_error): Change declaration.
3199         * typeck2.c (abstract_virtuals_error): Check to see if an error
3200         ocurred, and return a boolean value accordingly.
3201         (build_functional_cast): Adjust accordingly.
3202         * class.c (finish_struct_1): Likewise.
3203         * cvt.c (ocp_convert): Likewise.
3204         * decl.c (cp_finish_decl): Likewise.
3205         (grokparams): Likewise.
3206         (grok_op_properties): Likewise.
3207         (start_function): Likewise.
3208         * init.c (build_new_1): Likewise.
3210         * pt.c (unify): Don't get confused by pointers-to-member functions.
3212         * search.c (build_cplus_new): Robustify.
3213         
3214 1999-07-24  Richard Henderson  <rth@cygnus.com>
3216         * gxx.gperf (__builtin_va_arg): New.
3217         * parse.y (VA_ARG): New token.
3218         (unary_expr): Recognize it.
3220 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
3222         * g++FAQ.texi: Deleted per Joe Buck's request.
3223         * Makefile.in: Corresponding changes.
3225 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
3227         * lex.c: Sync with C frontend.
3228         (whitespace_cr): New fn.
3229         (skip_white_space): Use it.
3230         (init_parse): Reorder.
3231         (yyprint): Support CONSTANT.
3232         (pragma_getc, pragma_ungetc): Bring back.
3233         (read_line_number): Change in_system_header directly.
3234         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
3235         (parse_float): Update to C version.
3236         (yylex): Handle '$' under the letter case.
3237         Remove looking_for_typename handling.
3238         Support hex floating point constants.
3239         Follow C's lead for choosing type of integer constants.
3240         Rearrange stuff to match C frontend.
3241         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
3242         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
3244 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
3246         * call.c (reference_binding): Tweak.
3247         (mayble_handle_implicit_object): Use direct_reference_binding to
3248         create the right implicit conversion sequence.
3250 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
3252         * pt.c (convert_nontype_argument): Don't call decl_constant_value
3253         if we're converting to a reference type.
3255         * call.c (NEED_TEMPORARY_P): New macro.
3256         (standard_conversion): Set it, for derived-to-base conversions.
3257         (reference_related_p): New function.
3258         (reference_compatible_p): Likewise.
3259         (convert_class_to_reference): Likewise.
3260         (direct_reference_binding): Likewise.
3261         (reference_binding): Rework for standards-compliance.
3262         (convert_like): Adjust accordingly.
3263         (maybe_handle_ref_bind): Simplify; the right conversion sequences
3264         are now built up in reference_binding.
3265         (initialize_reference): New function.
3266         * cp-tree.h (ICS_USER_FLAG): Document.
3267         (ICS_THIS_FLAG): Likewise.
3268         (ICS_BAD_FLAG): Likewise.
3269         (NEED_TEMPORARY_P): Likewise.
3270         (cp_lvalue_kind): New type.
3271         (real_lvalue_p): Return it.
3272         * error.c (dump_expr): Provide more accurate representation for
3273         AGGR_INIT_EXPRs.
3274         * init.c (expand_default_init): Do not try to perform implicit
3275         conversions for a brace-enclosed initializer.
3276         * search.c (lookup_conversions): Document.
3277         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
3278         appropriately.
3279         (real_lvalue_p): Adjust accordingly.
3280         (lvalue_p): Likewise.
3281         (build_cplus_new): Don't allow the creation of an abstract class.
3282         * typeck.c (convert_for_initialization): Use initialize_reference.
3283         
3284 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
3286         * lex.c (real_yylex) : Correct the test for overflow when lexing
3287         integer literals.
3289 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
3291         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
3292         not DECL_BUILT_IN, to determine if a function is internally declared.
3293         (duplicate_decls): Likewise.  Improve handling of builtins.
3294         (push_overloaded_decl): Remove special handling of builtins.
3296         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
3298         * decl.c (grokdeclarator): Pull out decl_constant_value in
3299         templates, too.
3301         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
3302         * cp-tree.h, pt.c, semantics.c: Adjust.
3303         * method.c (largest_union_member): Remove.
3305         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
3307         * lex.c (token_getch, token_put_back): New fns.
3308         (real_yylex): Use them.
3310         * lex.c (lang_init): Generalize.
3311         (lang_init_options): Tell cpplib this is C++.
3312         (nextchar): Remove.  Replace uses with put_back.
3313         (skip_white_space): Handle linemode here.  Optimize for cpplib.
3314         (extend_token_buffer_to): New fn.
3315         (extend_token_buffer): Use it.
3316         (read_line_number, check_newline): Just deal with tokens.
3317         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
3318         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
3319         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
3320         * parse.y (PAREN_STAR_PAREN): Remove.
3321         * input.c: Don't use the putback machinery with cpplib.
3322         (sub_getch): Fold back into getch.
3323         (getch): Don't handle linemode here.
3324         (feed_input): Unget any text in the token buffer.
3326         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
3327         nextyychar, nextyylval): Remove.
3329 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
3330             Jason Merrill  <jason@yorick.cygnus.com>
3332         * lex.c (indent_level): New variable.
3333         (init_parse): Set cpp_token to CPP_DIRECTIVE.
3334         (consume_string): Make this smart about USE_CPPLIB.
3335         (yyungetc): Use put_back function.
3336         (pragma_getc, pragma_ungetc): Functions deleted.
3337         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
3338         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
3339         pragma_ungetc.
3340         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
3341         Also, clean up cases where we redundantly set token_buffer[0].
3342         (read_line_number): New fn.
3343         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
3344         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
3345         (sub_getch): Conditionalize out code that's not appropriate if
3346         USE_CPPLIB.
3347         (put_back): Rewrite in case USE_CPPLIB is defined.
3348         (input_redirected): Ditto.
3350 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
3352         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
3353         c_global_trees and accessor macros defined in c-common.h.
3354         (cp_tree_index): New enumeration.
3355         (cp_global_trees): Declare new array.  Add accessor macros for it, and
3356         delete declarations of tree nodes replaced by it.
3357         (builtin_function): Delete macro, add declaration for new function.
3358         Include c-common.h.
3359         * decl.c: Delete definitions for tree nodes that were replaced by
3360         cp_global_trees and c_global_trees.
3361         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
3362         to generate the common builtins here.
3363         (builtin_function): New function.
3364         * decl2.c (abort_fndecl): Delete declaration.
3365         * except.c (expand_builtin_return_address): Delete declaration.
3366         (builtin_return_address_fndecl): Delete variable.
3367         (const_ptr_type_node): Delete declaration.
3368         * lex.c (cons_up_default_function): Delete declaration of
3369         void_list_node.
3370         * parse.y (void_list_node): Delete declaration.
3371         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
3372         Delete variables.
3373         (const_string_type_node): Delete declaration.
3374         * search.c (abort_fndecl): Delete declaration.
3375         * Makefile.in: Update dependencies.
3377 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
3379         * pt.c (check_default_tmpl_args): Move test for missing default
3380         arguments here, from ...
3381         (end_template_parm_list): Here.
3383 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
3385         * decl.c (lookup_nested_type): Remove.
3386         (pushtag): Don't call it.
3388 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
3390         * Makefile.in (INTERFACE): Bump to 2.
3392 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
3393         
3394         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
3395         instructions to gcc.gnu.org.  Removed e-mail address.
3397 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
3399         * pt.c (determine_specialization): Tighten error-checking.
3400         (end_template_parm_list): Likewise.
3402 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
3404         * pt.c (check_default_tmpl_args): Handle friends defined in the
3405         class just like member functions defined in the class.
3407 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
3408             Jason Merrill  <jason@yorick.cygnus.com>
3410         * cp-tree.h (struct lang_decl): Added field for storing sorted
3411         FIELD_DECLs (used in TYPE_DECLs).
3412         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
3413         (DECL_SORTED_FIELDS): New macro.
3414         * class.c (method_name_cmp): New function.
3415         (finish_struct_methods): Modified to support sorting and searching
3416         methods.
3417         (finish_struct_anon): Changed code in inner loop to use ELT rather 
3418         than UELT (which required an extra indirection for every reference).
3419         (field_decl_cmp): New function to support sorting FIELD_DECLs.
3420         (finish_struct_1): Sort fields.
3421         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
3422         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
3423         Also, switch to using array indexing rather than a changing pointer.
3424         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
3425         DECL_SORTED_FIELDS.
3427 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
3429         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
3430         casts in system headers or extern "C" blocks.
3432         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
3433         errors to pedwarn.
3435 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
3437         * decl2.c (write_virtuals): Deleted declaration.
3438         * cp-tree.h (write_virtuals): Deleted extern declaration.
3439         * class.c (finish_struct_1): Removed #if 0'd code that mentions
3440         write_virtuals.
3441         * semantics.c (begin_class_definition): Rewrite code to not depend
3442         on write_virtuals.
3444         * lex.c (cp_pragma_interface): New function.
3445         (cp_pragma_implementation): Likewise.
3446         (handle_cp_pragma): Call them.
3448         * typeck.c (comptypes): Simplify C code in look_hard.
3450         * xref.c (PALLOC): Use xcalloc, not calloc.
3451         (SALLOC): Use xmalloc, not malloc.
3453         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
3455         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
3456         is NO_DEBUG.
3458         * decl.c (duplicate_decls): If a redeclaration doesn't match the
3459         initial declaration, then don't save the inline info and by all
3460         means don't mark the function as a builtin function.
3462         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
3463         CURRENT_CLASS_TYPE is 0.
3465         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
3466         NULL_TREE.
3468         * ptree.c (print_lang_type): Added vtable-needs-writing.
3470 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
3472         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
3474 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
3476         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
3477         Merged into c-common.
3479 1999-07-05  Dave Brolley  <brolley@cygnus.com>
3481         * lex.c (errorcount): Declare it.
3482         (finish_parse): Update errorcount for when using CPPLIB.
3484 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
3486         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
3487         parameters.
3488         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
3489         * decl.c (push_class_binding): Use it.
3490         (lookup_name_real): Likewise.
3492 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
3494         * cp-tree.h (widest_integer_literal_type_node,
3495         widest_unsigned_literal_type) : New.
3496         * decl.c (widest_integer_literal_type_node,
3497         widest_unsigned_literal_type) : New.
3498         (init_decl_processing): Handle/use the two new types.
3499         * lex.c (real_yylex): Same.
3500         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
3501         Same. 
3503 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
3505         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
3506         to anonymous cv-qualified types.
3508 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
3510         * lex.c (real_yylex) : Change integer literal overflow handling to
3511         be like c-lex.c.
3513         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
3515 1999-06-28  Richard Henderson  <rth@cygnus.com>
3517         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
3519 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
3521         * error.c (dump_type_real): Handle TREE_LIST again.
3523         * typeck.c (comp_target_parms): Don't complain about 
3524         converting from () to (...) if !flag_strict_prototype.
3526         * decl.c (grokdeclarator): Update the names of all variants when
3527         de-anonymizing.
3529 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
3531         * init.c (expand_aggr_vbase_init): Rename to
3532         construct_virtual_bases.  Conditionalize construction here, 
3533         rather than ...
3534         (emit_base_init): Here.
3536 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
3538         * semantics.c (finish_asm_statement): Apply decay conversions to
3539         input operands.
3541         * decl.c (expand_static_init): When building an anonymous function
3542         for use with atexit, compute its body before and after entering
3543         the function.
3545         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
3546         EXIT_EXPR.
3547         
3548 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
3550         * init.c (expand_aggr_vbase_init): Add flag parameter.
3551         (build_partial_cleanup_for): Remove, inlining into ..
3552         (expand_cleanup_for_base): ... here.  Take flag parameter.
3553         (emit_base_init): Pass the in_chrg parameter to
3554         emit_aggr_vbase_init. 
3555         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
3556         
3557 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
3559         * decl2.c (import_export_decl): Use same_type_p, rather than
3560         relying on pointer-equality for types.
3562         * method.c (do_build_copy_constructor): Simplify.
3564         * call.c (build_method_call): Remove bogus code for two-argument
3565         delete.
3566         * init.c (build_new_1): Expand on comment, and remove dead code.
3568         * init.c (expand_cleanup_for_base): New function, split out
3569         from ...
3570         (emit_base_init): Here.
3571         (expand_aggr_vbase_init): Use it.
3573 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
3575         * cp-tree.h (class_cache_firstobj): Declare.
3576         (maybe_push_cache_obstack): Rename to push_cache_obstack.
3577         * class.c (permanent_obstack): Remove declaration.
3578         (class_cache_firstobj): Make it global.
3579         (add_method): Don't use permanent_obstack directly.
3580         (pushclass): Only free the class_cache_obstack if we know how far
3581         back to free it.
3582         (maybe_push_cache_obstack): Rename to push_cache_obstack.
3583         * decl.c: Remove dead comment.
3584         (saved_scope): Add class_cache_firstobj.
3585         (push_to_top_level): Save it.
3586         (pop_from_top_level): Restore it.
3587         (push_class_level_binding): Use push_cache_obstack, not
3588         maybe_push_cache_obstack.
3589         * search.c (push_class_decls): Likewise.
3590         
3591 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3593         * pt.c (tsubst_friend_function): Push into namespace of friend
3594         function before pushdecl'ing it.
3596 1999-06-14  Nathan Sidwell  <nathan@acm.org>
3598         * call.c (build_new_op): Remove REF_BIND from all operands.
3600 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
3602         * init.c (build_new_1): Look up operator delete even if there was
3603         no explicit new placement.
3605 1999-06-08  Nathan Sidwell  <nathan@acm.org>
3607         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
3608         of ...
3609         (build_throw): ... here. Call it.
3610         (process_start_catch_block): Call it.
3612 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
3614         * search.c (convert_pointer_to_single_level): Reimplement without
3615         using get_binfo.
3617 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
3619         * method.c (is_back_referenceable_type): Back-reference bools when
3620         not squangling.
3622 1999-06-07  Dave Brolley  <brolley@cygnus.com>
3624         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
3625         * input.c (putback_buffer): New structure type.
3626         (putback): Replaces putback_char member.
3627         (putback): Replaces putback_char static variable.
3628         (feed_input): Use putback.
3629         (end_input): Use putback.
3630         (sub_getch): Use putback.
3631         (put_back): Use putback.
3633 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
3635         * decl.c (grokdeclarator): Fix typo in last change.
3637 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
3639         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
3640         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
3642 1999-06-04  Nathan Sidwell  <nathan@acm.org>
3644         * except.c (build_throw): Check throw expression validity.
3646 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
3648         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
3649         just because flag_signed_bitfields is false.
3651 1999-06-03  Nathan Sidwell  <nathan@acm.org>
3653         * semantics.c (begin_class_definition): Update the struct's
3654         location here ...
3655         * class.c (finish_struct): ... rather than here.
3657         * decl.c (make_typename_type): Don't rely on uninitialized
3658         variable.
3660 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3662         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
3664 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
3666         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
3667         and friends rather than messing with current_obstack directly.
3668         (cp_build_qualified_type_real): Rework ARRAY_TYPE
3669         allocation to match practice throughout the rest of the 
3670         compiler.
3672 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
3674         * lex.c (make_lang_type): Create TYPE_BINFO for
3675         TEMPLATE_TYPE_PARMs just like for non-template types.
3677         * decl.c (start_decl): Move checks on initialization to ...
3678         (cp_finish_decl): Here.  Tidy formatting slightly.
3680 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
3682         * decl.c (add_binding): Don't complain about a redeclaration of a
3683         semantically identical typedef in a local scope.
3685 1999-05-28  Nathan Sidwell  <nathan@acm.org>
3687         * decl.c (complete_array_type): Allocate off same obstack. Fix
3688         DO_DEFAULT comment to match reality.
3690         * friend.c (make_friend_class): Fix diagnostic typo.
3692 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
3694         * decl.c (lookup_namespace_name): Handle getting a
3695         TEMPLATE_ID_EXPR.
3696         (expand_static_init): Don't call pushdecl for implicitly declared
3697         `atexit' used to register destructors.
3699 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
3701         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
3702         intialize a vtable.
3704         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
3705         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
3706         by combining TEMPLATE_INFO and LEVEL into a single union.
3707         (DECL_TEMPLATE_INFO): Reformat.
3708         (DECL_SAVED_TREE): Document.
3709         (DECL_TEMPLATE_INJECT): Remove.
3710         * class.c (finish_struct): Remove code to deal with
3711         DECL_TEMPLATE_INJECT. 
3713         * decl.c (maybe_process_template_type_declaration): Handle all new
3714         types in templates uniformly.
3715         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
3716         DECL_CONTEXT.
3717         * pt.c (lookup_template_class): Inject template instantiations of
3718         forward-declarations.
3719         (instantiate_class_template): Remove code processing
3720         DECL_TEMPLATE_INJECT.
3721         
3722         * pt.c (lookup_template_class): Tweak lookup to find member
3723         templates.
3725         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
3726         ASM_CV_QUAL.
3727         * semantics.c (finish_asm_stmt): Make strings permanent if they're
3728         used in a template.
3729         
3730 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
3732         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
3733         parts of pointer to data member types.
3735 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
3737         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
3738         and then make it look like `abort'.  Just use `abort' instead.
3739         
3740         * typeck.c (build_static_cast): Don't allow static_casts that cast
3741         away constness.
3742         (casts_away_constness_r): New function.
3743         (casts_away_constness): Likewise.
3745         * decl.c (lookup_tag): Remove code no longer needed after
3746         name-lookup improvements.
3747         * decl2.c (handle_class_head): Make error-recovery more robust.
3748         * friend.c (make_friend_class): Reject templated typename types.
3749         * lex.c (is_global): A template parameter isn't global.
3750         * parse.y (class_head): Robustify.
3751         * parse.c: Regenerated.
3752         
3753 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
3755         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
3756         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
3757         
3758         * cp-tree.h (push_nested_namespace): Declare.
3759         (pop_nested_namespace): Likewise.
3760         * decl.c (push_nested_namespace): New function.
3761         (pop_nested_namespace): Likewise.
3762         * pt.c (instantiate_class_template): Use them.
3764         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
3766         * cp-tree.h (cplus_expand_constant): Declare.
3767         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
3768         converted from one pointer-to-object type to another.
3769         * expr.c (cplus_expand_constant): Don't make it static.
3770         * typeck.c (build_component_ref): Don't crash when presented with
3771         a component which is a TEMPLATE_DECL.
3772         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
3773         cast from a pointer-to-member constant to its own type does not
3774         result in a valid non-type template argument.
3776 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
3777             Nathan Sidwell  <nathan@acm.org>
3778         
3779         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
3780         * cp-tree.h: Fix typo in documentation on pointers-to-members.
3781         (cp_build_qualified_type): Make it a macro.
3782         (cp_build_qualified_type_real): Declare.
3783         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
3784         problem with template parameters and restrict-qualification.
3785         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
3786         * hash.h: Regenerated.
3787         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
3788         the enumeration.
3789         (NORID): Remove definition.
3790         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
3791         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
3792         (fn_type_unification): Check that the function type resulting from
3793         the deduction is legal.
3794         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
3795         (unify): Use cp_build_qualified_type_real.
3796         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
3797         (cp_build_qualified_type): Rename to ...
3798         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
3799         and modify appropriately.
3800         
3801         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
3802         reveal optimization opportunities.
3804         * pt.c (tsubst): Don't issue error messages when we're not
3805         complaining, even if we see a qualified function type.
3806         (check_cv_quals_for_unify): Don't allow a qualified function
3807         type.
3809 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
3811         * class.c (instantiate_type): Downgrade errors for object-dependent
3812         memfn refs to pedwarn.
3814 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
3816         * decl.c (grokdeclarator): Don't treat [] as indicating a
3817         zero-sized array in a typedef.
3819         * call.c (build_object_call): Don't look at DECL_NAME for a type.
3820         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
3821         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
3823         * pt.c (for_each_template_parm): Rework to match documentation.
3824         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
3826 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
3828         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
3830         * class.c (finish_base_struct): Allow non-COM bases for COM classes
3831         except at the leftmost position.
3832         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
3833         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
3834         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
3836         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
3837         (build_cplus_new): Make sure that what we return is of the right type.
3839 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
3841         * cp-tree.h (make_ptrmem_cst): New function.
3842         * expr.c (cplus_expand_constant): Split out from ...
3843         (cplus_expand_expr): Here.  Use cplus_expand_constant.
3844         (init_cplus_expand): Set lang_expand_constant.
3845         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
3847         * tree.c (make_ptrmem_cst): Define.
3848         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
3849         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
3851 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
3853         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
3855         * decl2.c (start_static_storage_duration_function): Fix comment.
3856         (finish_file): Create static storage duration functions lazily.
3858 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
3860         Implement anonymous structs.
3861         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
3862         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
3863         * class.c (finish_struct_1): Remove redundant check for anon struct.
3864         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
3865         (check_tag_decl): Check for anonymous struct here.
3866         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
3867         * init.c (sort_member_init, emit_base_init): Handle getting fields
3868         as well as names in current_member_init_list.
3869         (perform_member_init): Handle getting an anon aggr.
3870         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
3871         (do_build_copy_constructor): Likewise.
3873 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
3875         * tree.c (cp_build_qualified_type): Don't allow qualified function
3876         types.
3878 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
3880         * gxxint.texi: Fix typo.
3882 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
3884         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
3885         * class.c (finish_struct_1): Use CLASS_TYPE_P.
3886         * ptree.c (print_lang_type): Likewise.
3887         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
3888         IS_AGGR_TYPE_CODE.
3889         * typeck2.c (digest_init): Likewise.
3891 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
3893         * call.c (joust): Compare the types of the conv ops, not the
3894         target types of the conversions.
3896 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
3898         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
3899         was not given.
3901 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
3903         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
3904         * decl.c (grokfndecl): Don't allow inline declarations of friend
3905         template specializations, or friend template specializations with
3906         default arguments.
3907         * pt.c (tsubst): Handle substitution into array types that does
3908         not yield a fixed upper bound, even when not processing a
3909         template.
3910         (tsubst_copy): Deal with the fact that the second operand to a
3911         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
3912         * search.c (marked_pushdecls_p): Don't descend into
3913         TEMPLATE_TYPE_PARMs and the like.
3914         (unmarked_pushdecls_p): Likewise.
3915         
3916         * call.c (build_over_call): Don't throw away
3917         initializations/copies of empty classes; use MODIFY_EXPR and
3918         INIT_EXPR as for non-empty classes.
3919         * class.c (finish_struct_1): Put the padding byte for an empty
3920         class on the TYPE_NONCOPIED_PARTS list for the class.
3922 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
3924         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
3925         indicate a reference to a field that is a qualified name.
3927 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
3929         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
3930         ASM_OUTPUT_CONSTRUCTOR.
3932         * friend.c (do_friend): Add attrlist arg.  Remove support for
3933         getting a non-decl as 'decl'.
3934         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
3935         rtl.
3936         (grokdeclarator): Adjust.
3937         * cp-tree.h: Adjust.
3939 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
3941         * cp-tree.h (permanent_p): New function.
3942         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
3943         possibly complex tree node.
3944         * tree.c (mapcar): Adjust comments, and follow coding standards in
3945         conditional.
3946         (permanent_p): New function.
3948 1999-05-13  Per Bothner  <bothner@cygnus.com>
3950         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
3951         primitive Java types, if we actually see `extern "Java"'.
3953 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
3955         * lang-specs.h: Pass -$ to the preprocessor.
3957 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
3959         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
3960         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
3961         (resolve_offset_ref): Don't handle a raw baselink.
3962         * cvt.c (build_expr_type_conversion): Likewise.
3963         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
3964         convert_for_initialization): Likewise.
3965         * class.c (instantiate_type): Handle seeing a baselink under an
3966         OFFSET_REF.
3967         * error.c (dump_expr): Likewise.        
3968         * pt.c (for_each_template_parm): Likewise.
3969         (resolve_overloaded_unification): Likewise.
3970         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
3971         * typeck.c (expr_sizeof): Also complain about other permutations
3972         of overloaded functions.
3974 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
3976         * init.c (resolve_offset_ref): Don't return a raw method.
3977         Use BASELINK_P.
3978         * typeck.c (decay_conversion): Don't handle a raw method.
3979         Resolve all OFFSET_REFs.
3980         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
3981         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
3982         same_type_p for pmf bits.  Don't use build_binary_op to compare
3983         raw pointers to methods.
3984         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
3985         to decide when to call resolve_offset_ref.
3986         (build_c_cast, convert_for_initialization): Likewise.
3987         * cvt.c (build_expr_type_conversion): Likewise.
3989 1999-05-06  Nathan Sidwell  <nathan@acm.org>
3991         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
3993 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
3995         * decl2.c (start_objects): Don't let static constructors and
3996         destructors get inlined.
3998         * parse.y (nested_name_specifier): Make sure ordinary types are
3999         complete, just like template types.
4000         * parse.c: Regenerated.
4002         * pt.c (check_explicit_specialization): Improve error messages.
4004 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4006         * typeck.c (string_conv_p): Use same_type_p to check whether we
4007         try to convert between char and wchar_t.
4009 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
4011         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
4012         lookup to error_mark_node here.
4013         (lookup_member): Revise documentation.  Add comments.  Don't set
4014         the TREE_TYPE to error_mark_node here, and don't build up an extra
4015         TREE_LIST for ambiguous lookups.
4016         (setup_class_bindings): Adjust accordingly.
4017         (push_class_decls): Revise out-of-date comments.
4018         
4019         * typeck.c (build_const_cast): Tighten checks for legality.
4021 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4023         * init.c (build_member_call): Lookup names coming from
4024         namespace-scoped LOOKUP_EXPR.
4026 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
4028         * gxxint.texi: Add documentation for 'I'.
4030 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4032         * tinfo.cc (operator==): Qualify type_info with std::.
4034 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
4036         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
4037         (DECL_COMDAT): Remove definition.
4039 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
4041         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
4042         change.
4044 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
4046         * class.c (build_vtable): Use build_lang_decl when building
4047         vtables, not just build_decl.
4048         (prepare_fresh_vtable): Likewise.
4049         * decl.c (wrapup_globals_for_namespace): Mark vtables as
4050         DECL_EXTERNAL when calling wrapup_global_declarations.
4051         * decl2.c (priority_info_s): Add initializations_p and
4052         destructions_p members.
4053         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
4054         when deciding what vtables to write out.
4055         (ssdf_decls): New variable.
4056         (ssdf_decls_used): Likewise.
4057         (start_static_storage_duration_function): Deal with being called
4058         multiple times.  Avoid inlining this function.
4059         (generate_inits_for_priority): Deal with reuse of priority map.
4060         (get_priority_info): Clear initializations_p and destructions_p.
4061         (do_static_initialization): Tweak comment.
4062         (do_static_destruction): Likewise.  Fix condition on sentries for
4063         destruction.
4064         (generate_ctor_or_dtor_function): Call all of the static storage
4065         duration functions.
4066         (generate_ctor_or_dtor_function_for_priority): Check
4067         initializations_p and destructions_p to see what priorities need
4068         initialization functions.
4069         (finish_file): Rework to generate multiple static storage duration
4070         functions, rather than just one.
4072         * typeck.c (build_const_cast): Tweak last change to handle
4073         templates correctly.
4075         * typeck.c (build_const_cast): Disallow use of const_cast to
4076         anything but a pointer or reference type.
4078 1999-04-30  Nathan Sidwell  <nathan@acm.org>
4080         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
4081         signature type.
4083 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
4085         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
4086         (finish_file): Indent comments properly.
4088 1999-04-29  Richard Henderson  <rth@cygnus.com>
4090         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
4091         (do_static_destruction): Likewise.
4093 1999-04-29  Nathan Sidwell  <nathan@acm.org>
4095         * cp-tree.h (TYPE_NOTHROW_P): New macro.
4096         * decl2.c (delete_sanity): Warn on deleting void *.
4097         * init.c (build_new_1): Use TYPE_NOTHROW_P.
4098         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
4099         throwing operator new.
4101 1999-04-28  Nathan Sidwell  <nathan@acm.org>
4103         * cp-tree.h (build_component_addr): Remove prototype.
4104         * typeck.c (build_component_addr): Make static. Remove MSG
4105         argument.
4106         (build_component_addr): Remove MSG parameter, clean up
4107         comment.
4108         (build_x_function_call): Use cp_error.
4109         (build_unary_op): Adjust call of build_component_addr.
4111 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
4113         * pt.c (tsubst_friend_class): Check for NULL.
4115 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
4117         * search.c (binfo_for_vtable): Initialize bfvi.var.
4119 1999-04-27  Nathan Sidwell  <nathan@acm.org>
4121         * rtti.c (build_x_typeid): Check rtti is enabled.
4123 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
4125         * search.c (is_subobject_of_p): Make sure we're looking at the
4126         right baseclasses.
4128 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
4130         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
4132 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
4134         * decl2.c (finish_file): Tweak handling of extern inlines so that
4135         they are not unnecessarily put out.
4137         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
4138         such as base classes.
4140 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
4142         * tree.c (build_exception_variant): Fix typo: use the chain of U,
4143         not trying V, while cycling through U.
4145 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
4147         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
4148         preserves_first_arg.  Enlarge dummy accordingly.
4149         (DECL_TINFO_FN_P): New macro.
4150         (SET_DECL_TINFO_FN_P): Likeiwse.
4151         (DECL_RETURNS_FIRST_ARG): Remove.
4152         (DECL_PRESERVES_THIS): Likewise.
4153         (DECL_INIT_PRIORITY): New macro.
4154         (finish_struct_1): Change prototype.
4155         (cat_namespace_levels): Remove prototype.
4156         (vtable_decl_p): New prototype.
4157         (vtype_decl_p): Likewise.
4158         (sigtable_decl_p): Likewise.
4159         (walk_globals_pred): New typedef.
4160         (walk_globals_fn): Likewise.
4161         (walk_globals): New prototype.
4162         (walk_namespaces_fn): New typedef.
4163         (walk_namespaces): New prototype.
4164         (wrapup_globals_for_namespace): Likewise.
4165         (walk_vtables): Remove prototype.
4166         (walk_sigtables): Likewise.
4167         (instantiate_pending_templates): New prototype.
4168         * class.c (finish_struct_1): Don't return a value.
4169         * decl.h (pending_statics): Remove declaration.
4170         * decl.c (walk_namespaces_r): New function.
4171         (walk_globals_r): Likewise.
4172         (vtable_decl_p): Likewise.
4173         (vtype_decl_p): Likewise.
4174         (sigtable_decl_p): Likewise.
4175         (walk_namespaces): Likewise.
4176         (walk_globals_data): New type.
4177         (walk_globals): New function.
4178         (wrapup_globals_for_namespace): Likewise.
4179         (expand_static_init): Remove assertion.  Remove redundancy in
4180         conditional.  Don't put static data members in static_aggregates
4181         Tidy.
4182         (finish_function): Remove redundancy in conditional.  Don't set
4183         DECL_RETURNS_FIRST_ARG.
4184         (cat_namespace_levels): Remove.
4185         * decl2.c: Include splay-tree.h and varray.h.
4186         (priority_info_s): New structure.
4187         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
4188         conventions.
4189         (prune_vtable_vardecl): Likewise.
4190         (finish_sigtable_vardecl): Likewise.
4191         (setup_initp): Remove.
4192         (do_dtors): Remove.
4193         (do_ctors): Remove.
4194         (start_static_storage_duration_function): New function.
4195         (generate_inits_for_priority): Likewise.
4196         (finish_static_storage_duration_function): Likewise.
4197         (get_priority_info): Likewise.
4198         (do_static_initialization): Likewise.
4199         (do_static_destruction): Likewise.
4200         (do_static_initialization_and_destruction): Likewise.
4201         (generate_ctor_or_dtor_function): Likewise.
4202         (generate_ctor_and_dtor_functions_for_priority): Likewise.
4203         (pending_statics): Make it a varray.
4204         (pending_statics_used): New variable.
4205         (saved_inlines): Make it a varray.
4206         (saved_inlines_used): New variable.
4207         (finish_static_data_member): Change method of updating
4208         pending_statics.
4209         (mark_inline_for_output): Remove #if 0'd code.  Change method of
4210         updating saved_inlines.
4211         (walk_vtables): Remove.
4212         (walk_sigtables): Likewise.
4213         (import_export_decl): Use DECL_TINFO_FN_P.
4214         (pending_templates): Remove declaration.
4215         (maybe_templates): Likewise.
4216         (static_aggregates_initp): Likewise.
4217         (setup_initp): Likewise.
4218         (finish_objects): Simplify.
4219         (INITIALIZE_P_IDENTIFIER): New macro.
4220         (PRIORITY_IDENTIFIER): New macro.
4221         (SSDF_IDENTIFIER): New macro.
4222         (initialize_p_decl): New variable.
4223         (priority_decl): Likewise.
4224         (ssdf_decl): Likewise.
4225         (priority_info_map): Likewise.
4226         (finish_file): Recode output of static intializers and other
4227         file-scope finalization tasks.
4228         * error.c (OB_END_TEMPLATE_ID): New macro.
4229         (dump_type_real): Use it.
4230         (dump_decl): Likewise.
4231         (dump_function_name): Likewise.
4232         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
4233         interface.
4234         (check_newline): Use walk_globals, not walk_vtables.
4235         * pt.c (pending_tempalte_expansions): Remove.
4236         (set_vardecl_interface_info): Likewise.
4237         (pending_templates): Make static.
4238         (maybe_templates): Likewise.
4239         (instantiate_class_template): Adjust call to finish_struct_1.
4240         (instantiate_pending_templates): New function.
4241         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
4242         * tree.c (static_aggregates_initp): Remove.
4243         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
4244         instead.
4245         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
4247         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
4248         with the RTL code RETURN.
4249         * hash.h: Regenerated.
4250         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
4251         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
4252         * parse.c: Regenerated.
4253         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
4254         it.
4255         (inline_parm_levels): New variable.
4256         (inline_parm_levels_used): Likewise.
4257         (maybe_begin_member_template_processing): Update them.
4258         (maybe_end_member_template_processing): Use them, rather than
4259         guessing how many levels to pop.
4261         * decl.c (make_typename_type): Tighten error-checking.
4263 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
4265         * cp-tree.h (build_binary_op): Remove unneeded parameter.
4266         * class.c (build_vrable_entry_ref): Adjust call to
4267         build_binary_op.
4268         * decl.c (expand_static_init): Likewise.
4269         (grokdeclarator): Likewise.
4270         (finish_function): Likewise.
4271         * decl2.c (delete_sanity): Likewise.
4272         (do_dtors): Likewise.
4273         (do_ctors): Likewise.
4274         * error.c (dump_type_suffix): Likewise.
4275         * expr.c (cplus_expand_expr): Likewise.
4276         * init.c (resolve_offset_ref): Likewise.
4277         (build_new): Likewise.
4278         (build_new_1): Likewise.
4279         (build_vec_delete_1): Likewise.
4280         (expand_vec_init_catch_clause): Likewise.
4281         (build_delete): Likewise.
4282         * pt.c (tsubst): Likewise.
4283         * rtti.c (synthesize_tinfo_fn): Likewise.
4284         * search.c (expand_upcast_fixups): Likewise.
4285         (expand_direct_vtbls_init): Likewise.
4286         * typeck.c (get_member_function_from_ptrfunc): Likewise.
4287         (build_binary_op_nodefault): Likewise.
4288         (point_int_sum): Likewise.
4289         (pointer_diff): Likewise.
4290         (build_unary_op): Likewise.
4291         (build_modify_expr): Likewise.
4292         (get_delta_difference): Likewise.
4293         (build_ptrmemfunc): Likewise.
4294         (expand_ptrmemfunc_cst): Likewise.
4296 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
4298         * decl.c (grokfndecl): Always call cplus_decl_attributes.
4299         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
4301 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
4303         * cp-tree.h (finish_static_data_member_decl): New function.
4304         * decl2.c (finish_static_data_member_decl): Split out from ...
4305         (grokfield): Here.
4306         * pt.c (instantiate_class_template): Use it here instead of
4307         trying to fake it.
4308         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
4309         finish_static_data_member_decl will do that.  Explicit set
4310         DECL_EXTERNAL to match non-template processing.
4312 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
4314         * cp-tree.h (finish_class_definition): Add parameter.
4315         * parse.y (structsp): Use it.  Don't call pop_scope here.
4316         * parse.c: Regenerated.
4317         * semantics.c (finish_class_definition): Pop it here.
4319 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
4321         * decl.c (xref_tag): Revise handling of nested template
4322         declarations.
4323         * pt.c (check_explicit_specialization): Tweak handling of friend
4324         templates in template classes.
4325         (tsubst_friend_class): Handle friend declarations for nested
4326         member template classes.
4328 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
4330         * class.c (finish_struct): Remove unused variable.
4331         (pushclass): Likewise.
4332         (invalidate_class_lookup_cache): Likewise.
4333         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
4334         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
4335         doesn't get obliterated.
4336         (make_typename_type): Handle template classes correctly.
4338         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
4339         (storetags): Declare.
4340         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
4341         (pushclass): Likewise.  Use storetags to install tag declarations,
4342         not pushtag.
4343         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
4344         * decl.c (storetags): Make it global.
4345         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
4346         implicit typename declaration.
4347         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
4348         * method.c (hack_identifier): Likewise.
4349         * search.c (lookup_member): Likewise.
4351         * decl.c (warn_about_implicit_typename_lookup): New function.
4352         (lookup_name_real): Use it.  Rework handling of implicit typename
4353         extension.
4355 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
4357         * cp-tree.h (lookup_nested_field): Remove.
4358         * class.c (push_nested_class): Handle UNION_TYPEs.
4359         (pop_nested_class): Likewise.
4360         * decl.c (lookup_name_real): Don't call lookup_nested_field.
4361         (start_decl): Use push_nested_class, not just pushclass.
4362         (cp_finish_decl): Use pop_nested_class, not just popclass.
4363         * search.c (lookup_nested_field): Remove.
4365         * cp-tree.h (lang_type): Add documentation.
4366         * decl2.c (handle_class_head): Create template declarations here,
4367         as appropriate.
4368         * parse.y (class_head): Return whether or not we entered a new
4369         scope, as well as the type named.
4370         (named_class_head): Likewise.
4371         (named_complex_class_head_sans_basetype): Likewise.
4372         (structsp): Adjust accordingly.  Pop scope when required.
4373         * parse.c: Regenerated.
4374         * pt.c (check_default_tmpl_args): Robustify.
4375         (redeclare_class_template): Likewise.
4376         (instantiate_class_template): An instantiation of an
4377         anonymous union is itself an anonymous union.
4378         * semantics.c (begin_class_definition): Don't create template
4379         declarations here.
4381 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
4383         * parse.y (after_type_declarator_intern): New nonterminal.
4384         (after_type_declarator): Use it.
4385         (direct_after_type_declarator): Likewise.  Move above
4386         nonnested_type to fix reduce/reduce conflict resolution.
4387         (declmods): Reducing from just 'attributes' has EMPTY precedence.
4388         * Makefile.in (CONFLICTS): Update.
4390         * decl.c (define_label): Downgrade error for jumping over a
4391         non-POD decl to pedwarn.
4393 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
4395         * cp-tree.h (popclass): Change declaration.
4396         (pop_nested_class): Likewise.
4397         (poplevel_class): Remove declaration.
4398         * call.c (convert_default_argument): Pass no arguments to
4399         popclass.
4400         * class.c (finish_struct_1): Likewise.
4401         (finish_struct): Likewise.
4402         (popclass): Remove argument.  Simplify code accordingly.
4403         (pop_nested_class): Likewise.
4404         * decl.c (poplevel_class): Declare it here, and make it static.
4405         (poplevel): Handle class scopes.
4406         (poplevel_class): Don't take an rgument.  Simplify.
4407         (pop_everything): Pass no arguments to pop_nested_class.
4408         (cp_finish_decl): Pass no arguments to popclass.
4409         (grokdeclarator): Pass no arguments to pop_nested_class.
4410         (finish_function): Likewise.
4411         * decl2.c (grokfield): Likewise.
4412         (pop_scope): Pass no arguments to popclass.
4413         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
4414         * pt.c (instantiate_class_template): Move call to pushclass, and
4415         document.  Pass no arguments to popclass.
4416         (regenerate_decl_from_template): Likewise.
4418 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
4420         * typeck.c (build_unary_op): Handle taking the address of a unique
4421         bound non-static member function.
4423 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4425         * lang-options.h (-Wdeprecated): New flag.
4426         * decl2.c (warn_deprecated): New flag.
4427         (lang_decode_option): Deprecated this-is-variable,
4428         external-templates, alt-external-templates.
4429         Support -Wdeprecated.
4430         * errfn.c (cp_deprecated): New function.
4432 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
4434         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
4435         of the decls themselves.
4437         * pt.c (tsubst_function_type): Copy attributes over.
4439         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
4440         and com_interface.
4441         * cp-tree.h: Add prototype.
4442         * decl.c (init_decl_processing): Set valid_lang_attribute.
4444 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
4446         * class.c (finish_struct_1): Look at the const-ness of the field's
4447         type, not the TREE_READONLY-ness of the declaration.
4448         * method.c (synthesize_method): Likewise.
4449         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
4450         creating new declarations.
4452 1999-04-13  Mike Stump  <mrs@wrs.com>
4454         * decl2.c (import_export_decl): Because vtables always reference
4455         virtual functions, even if they are inlined, don't allow
4456         -fno-implement-inlines to not emit them, instead, emit them with
4457         the vtable.
4458         * decl.c (start_function): Likewise.
4460 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
4462         * cp-tree.h (struct lang_type): Add com_interface.
4463         (CLASSTYPE_COM_INTERFACE): New macro.
4464         * class.c (set_rtti_entry): COM interface classes have no RTTI
4465         entries in their vtables; adjust.
4466         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
4467         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
4468         finish_struct_1): Likewise.
4469         * decl2.c (mark_vtable_entries): Likewise.
4470         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
4471         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
4472         expand_upcast_fixups): Likewise.
4473         * tree.c (debug_binfo): Likewise.
4475         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
4476         * typeck.c (comptypes): If we get it, ignore attributes.
4477         * class.c (instantiate_type): Use BASELINK_P.  Change complain
4478         parameter to flags; 2 means ignore attributes.
4479         * call.c (build_op_delete_call): Pass it.
4481         * decl.c (xref_tag): Only complain once about using a typedef-name
4482         with 'struct'.  Downgrade to pedwarn.
4484         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
4486         * parse.y (absdcl_intern): New nonterminal.
4487         (absdcl, direct_abstract_declarator): Use it.
4489         * pt.c (lookup_template_class): Look through implict typename.
4491 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
4493         * friend.c (add_friend): Deal gracefully with error_mark_node.
4494         * method.c (build_overload_value): Handle pointers-to-members as
4495         template parameters.
4497         * decl.c (push_binding): Fix typo in comment.
4499 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
4501         * error.c (dump_type_real): If a typename is a template-id, put
4502         out the template arguments.
4503         (dump_expr): Handle TEMPLATE_ID_EXPR.
4504         * pt.c (lookup_template_class): Now that full arguments are
4505         available everywhere, remove code that tried to guess them.
4507 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
4509         * decl.c (make_typename_type): Complain if we don't find a type
4510         when trying to make a typename type for a non-template type.
4512 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
4514         * decl.c (start_decl): Pass attributes to grokdeclarator.
4515         (grokdeclarator): Handle attributes on constructor-syntax
4516         initializers.
4518 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
4520         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
4521         don't have types.
4523         * search.c (template_self_reference_p): Tweak.
4525 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
4527         * init.c (build_offset_ref): Don't build yet another weird data
4528         structure to describe overloaded functions.
4530 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
4532         * cp-tree.h (BASELINK_P): New macro.
4533         (SET_BASELINK_P): Likewise.
4534         * init.c (build_member_call): Remove needless assignment in if
4535         statement.
4536         * search.c (lookup_field_r): Fix handling when we are looking
4537         specifically for a type; these are not hidden by functions and
4538         variables.
4539         (lookup_member): Use SET_BASELINK_P.
4540         * tree.c (is_overloaded_fn): Use BASELINK_P.
4541         (really_overloaed_fn): Likewise.
4542         (get_first_fn): Likewise.
4544 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
4546         * decl.c (lookup_name_current_level): Tweak, and improve
4547         documentation.
4549         * class.c (maybe_fixup_vptrs): Remove declaration.
4550         (build_class_init_list): Likewise.
4551         * decl.c (pushdecl_class_level): Call check_template_shadow here
4552         ...
4553         (push_class_level_binding): ... not here.
4554         * search.c (dfs_push_type_decls): Only avoid
4555         template-self-reference TYPE_DECLs if they are from base classes.
4557 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
4559         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
4560         nodes.  Tidy.
4562 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
4564         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
4565         (finish_struct_1): Don't call build_class_init_list.
4567 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
4569         * tinfo.h (__class_type_info): Fix illegal declaration.
4571         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
4572         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
4573         (IDENTIFIER_CLASS_VALUE): Improve documentation.
4574         (is_properly_derived_from): Declare.
4575         (invalidate_class_lookup_cache): Likewise.
4576         (maybe_maybe_note_name_used_in_class): Likewise.
4577         (note_name_declared_in_class): Likewise.
4578         (push_using_decl): Remove duplicate declaration.
4579         (id_in_current_class): Remove declaration.
4580         (push_class_binding): Change prototype.
4581         (clear_identitifer_class_values): Declare.
4582         * call.c (is_properly_derived_from): Make it global.
4583         (build_new_function_call): Be careful about updating candidates.
4584         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
4585         asked to make illegal calls.
4586         * class.c: Include splay-tree.h.
4587         (class_stack_node): Add names_used slot.
4588         (check_member_decl_is_same_in_complete_scope): Remove.
4589         (add_method): Fix comment.  Push the declaration into class
4590         scope.
4591         (finish_struct_1): When popping the class, pop the bindings too.
4592         Remove check for data member/function member conflict.
4593         (finish_struct): Remove calls to
4594         check_member_decl_is_same_in_complete_scope.  Change calls to
4595         popclass.
4596         (pushclass): Clear names_used in the class stack entry.
4597         Use invalidate_class_lookup_cache to remove cached entries, rather
4598         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
4599         before entering a new class.  Remove dead code.  Don't mess with
4600         current_function_decl when pushing declarations.
4601         (invalidate_class_lookup_cache): New function, split out from ...
4602         (popclass): Here.  Clean up names_used on our way out.
4603         (instantiate_type): Adjust.
4604         (build_self_reference): Don't push the declaration here.
4605         (maybe_note_name_used_in_class): New function.
4606         (note_name_declared_in_class): Likewise.
4607         * decl.c (add_binding): Change prototype.
4608         (find_class_binding_level): New function.
4609         (innermost_nonclass_level): Likewise.
4610         (current_binding_level): Update documentation.
4611         (inner_binding_level): Remove.  Replace with current_binding_level
4612         throughout.
4613         (push_binding_level): Remove special handling of
4614         class_binding_level.
4615         (pop_binding_level): Likewise.  Use find_class_binding_level.
4616         (suspend_binding_level): Likewise.
4617         (global_bindings_p): Use innermost_nonclass_level.
4618         (toplevel_bindings_p): Likewise.
4619         (namespace_bindings_p): Likewise.
4620         (pseudo_global_level_p): Likewise.
4621         (push_binding): Clear INHERITED_VALUE_BINDING_P.
4622         (add_binding): Check for illegal multiple declarations.  Return a
4623         value indicating whether or not the new binding was legal.
4624         (push_local_binding): Skip over class binding levels.  Check
4625         return value from add_binding.
4626         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
4627         note_name_declared_in_class.
4628         (pushlevel_class): Remove "fake out the rest of the compiler"
4629         code.
4630         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
4631         (clear_identifier_class_values): New function.
4632         (pop_from_top_level): Use it.
4633         (pop_everything): Tweak.
4634         (maybe_process_template_type_declaration): Don't push the
4635         declaration for the template here.
4636         (pushtag): Don't push tag declarations into class scope here.
4637         (pushdecl): Apply DeMorgan's law for readability.
4638         (pushdecl_class_level): Remove special-case code for
4639         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
4640         (push_class_level_bindng): Deal with inherited bindings.
4641         (lookup_name_real): Remove special-case code for
4642         TYPE_BEING_DEFINED, and some implicit typename magic.
4643         (grokdeclarator): Handle COMPONENT_REF for a template function.
4644         (build_enumerator): Don't call pushdecl_class_level here.
4645         (id_in_current_class): Remove.
4646         * decl2.c (grokfield): Don't call pushdecl_class_level or
4647         check_template_shadow.
4648         * errfn.c (cp_file_of): Don't declare.
4649         (cp_line_of): Likewise.
4650         * error.c (dump_decl): Handle an OVERLOAD.
4651         (cp_file_of): Likewise.
4652         (cp_line_of): Likewise.
4653         * init.c (build_member_call): Handle a COMPONENT_REF.
4654         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
4655         pushdecl_class_level.
4656         * method.c (hack_identifier): Build COMPONENT_REFs for references
4657         to member templates as well as member functions.  Remove dead
4658         code.
4659         * parse.y (left_curly): Remove.
4660         (nonnested_type): Call maybe_note_name_used_in_class, not
4661         pushdecl_class_level.
4662         * parse.c: Regenerated.
4663         (nested_name_specifier_1): Likewise.
4664         * pt.c (check_explicit_specialization): Adjust, for robustness.
4665         (check_template_shadow): Handle OVERLOADs.
4666         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
4667         TEMPLATE_DECL, if appropriate.
4668         * search.c (envelope_add_decl): Remove.
4669         (dfs_pushdecls): Likewise.
4670         (dfs_compress_decls): Likewise.
4671         (dfs_push_decls): New function.
4672         (dfs_push_type_decls): Likewise.
4673         (setup_class_bindings): Likewise.
4674         (template_self_reference_p): Likewise.
4675         (lookup_field_r): Use it.
4676         (looup_member): Remove old comment.  Deal with ambiguity.
4677         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
4678         and remove envelope processing.
4679         * semantics.c (begin_class_definition): Let pushclass push
4680         declarations for base classes.
4681         (finish_member_declaration): Push declarations into class scope.
4682         * typeck.c (build_component_ref): Just put an OVERLOAD into the
4683         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
4684         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
4685         * Makefile.in (class.o): Depend on splay-tree.h.
4687 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
4689         * cvt.c (convert_pointer_to_real): Use same_type_p.
4690         * typeck.c (comp_target_types): Use same_type_p.
4692 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
4694         * semantics.c (begin_inline_definitions,
4695         finish_inline_definitions): Rename from finish_default_args and
4696         begin_inline_definitions, respectively, to something that isn't a
4697         total lie.  :)
4698         * parse.y (structsp): Adjust.
4700         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
4701         (list_hash_lookup): Likewise.
4702         (hash_tree_chain): Adjust.
4703         * pt.c (tsubst): Adjust.
4704         (tsubst_arg_types): Use plain hash_tree_cons.
4705         * cp-tree.h (hash_tree_cons_simple): Lose.
4706         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
4708 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4710         * Makefile.in (hash.h): Generate using gperf language 'C', not
4711         'KR-C', so gperf uses the `const' keyword on strings.
4713         * gxx.gperf (resword): Const-ify a char*.
4715 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
4717         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
4718         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
4719         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
4720         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
4721         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
4722         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
4723         tree.c: Adjust.
4725 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
4727         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
4729 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
4731         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
4733 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
4735         * cp-tree.h (add_friend): Declare.
4736         (add_friends): Likewise.
4737         * friend.c (add_friend): Make it global.  Don't add to
4738         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
4739         (add_friends): Make it global.
4740         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
4741         befriending class is a template.
4742         * parse.y (component_decl_1): Fix typo in comment.
4743         * parse.c: Regenerated.
4744         * pt.c (instantiate_class_template): Use add_friend and
4745         add_friends rather that duplicating some of their functionality
4746         here.
4748 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
4750         * call.c (build_field_call): Unify 'this' and non-'this' cases.
4752         * typeck.c (build_indirect_ref): Check for 'this' sooner.
4754 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4756         * call.c (op_error): Const-ify a char*.
4757         (add_candidate, source_type, add_warning): Add static prototype.
4758         (print_z_candidates): Const-ify a char*.
4760         * class.c (resolve_address_of_overloaded_function,
4761         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
4762         (get_vtable_name, finish_struct_1): Const-ify a char*.
4764         * cvt.c (convert_to_reference): Likewise.
4766         * decl.c (redeclaration_error_message, record_builtin_type,
4767         record_unknown_type, member_function_or_else, bad_specifiers):
4768         Likewise.
4769         (find_binding, select_decl, unqualified_namespace_lookup,
4770         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
4771         Add static prototype.
4772         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
4773         implicitly_declare, record_builtin_java_type, define_function,
4774         grok_op_properties, tag_name): Const-ify a char*.
4776         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
4777         (define_function, finish_builtin_type): Const-ify a char*.
4778         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
4779         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
4780         (file_name_nondirectory): Const-ify a char*.
4781         (init_filename_times): Don't prototype.
4782         (compiler_error): Prototype.
4783         (yyerror, init_repo): Const-ify a char*.
4784         (build_srcloc): Don't prototype.
4785         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
4786         Const-ify a char*.
4787         (warn_for_assignment): Don't prototype.
4788         (convert_for_initialization, readonly_error, check_for_new_type,
4789         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
4790         Const-ify a char*.
4792         * decl2.c (acceptable_java_type, output_vtable_inherit,
4793         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
4794         merge_functions, decl_namespace, validate_nonmember_using_decl,
4795         do_nonmember_using_decl): Add static prototype.
4796         (lang_f_options): Const-ify a char*.
4797         (finish_builtin_type): Likewise.
4798         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
4799         prototype.
4801         * errfn.c: Include cp-tree.h.
4802         (cp_thing): Add static prototype.
4803         (compiler_error): Don't protoptype.
4804         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
4805         passing it to `cp_thing'.
4807         * error.c (interesting_scope_p): Add static prototype.
4809         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
4810         a char*.
4812         * init.c (compiler_error): Don't prototype.
4813         (member_init_ok_or_else): Const-ify a char*.
4814         (build_java_class_ref): Add static prototype.
4816         * lex.c (compiler_error): Don't prototype.
4817         (get_time_identifier, interface_strcmp, extend_token_buffer,
4818         handle_cp_pragma): Const-ify a char*.
4819         (is_global, init_filename_times): Add static prototype.
4820         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
4821         (compiler_error): Change from fixed args to variable args.
4822         (yyerror): Const-ify a char*.
4824         * parse.y (cond_stmt_keyword): Const-ify a char*.
4825         (parse_decl): Add static prototype.
4827         * pt.c (template_args_equal, print_template_context): Likewise.
4828         (print_candidates, check_default_tmpl_args): Const-ify a char*.
4829         (instantiate_class_template): Likewise.
4831         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
4833         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
4834         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
4836         * search.c (lookup_field_info, lookup_member): Likewise.
4837         (lookup_member): Cast the first argument of `bzero' to a PTR.
4839         * sig.c (compiler_error): Don't prototype.
4840         (build_signature_pointer_or_reference_nam): Const-ify a char*.
4841         (get_sigtable_name, build_member_function_pointer): Likewise.
4843         * tree.c (compiler_error): Don't prototype.
4844         (no_linkage_helper, build_srcloc): Add static prototype.
4845         (build_vbase_pointer_fields): Const-ify a char*.
4846         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
4848         * typeck.c (compiler_error): Don't prototype.
4849         (convert_for_assignment): Const-ify a char*.
4850         (comp_cv_target_types): Add static prototype.
4851         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
4852         build_component_addr, build_unary_op, convert_for_initialization):
4853         Const-ify a char*.
4855         * typeck2.c (ack): Add static prototype and change from fixed args
4856         to variable args.
4857         (readonly_error, check_for_new_type): Const-ify a char*.
4859         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
4860         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
4861         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
4862         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
4863         gen_assign, GNU_xref_member): Const-ify a char*.
4865 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4867         * gxxint.texi: Remove old discussion on copying virtual bases.
4869 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
4871         * Make-lang.in: Remove all references to g++.o/g++.c.
4872         Link g++ from gcc.o.
4874 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
4876         * decl2.c (comdat_linkage): Treat vtables like functions.
4878 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
4880         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
4882 1999-03-25  Nathan Sidwell  <nathan@acm.org>
4884         * decl.c (init_decl_processing): Add `signed' type as a synonym
4885         for `int'.
4887 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
4889         * typeck.c (common_type): Handle cv-qual unification for pointers
4890         to members.
4892         * decl.c (unqualified_namespace_lookup): Return error_mark_node
4893         on error.
4894         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
4895         * lex.c (do_identifier): If we got error_mark_node, call
4896         lookup_name again.
4898 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4900         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
4901         classes.
4903 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
4905         * decl.c (lookup_name_real): Do nested field lookup regardless of
4906         TYPE_BEING_DEFINED.
4908 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
4910         * cp-tree.h (lang_type): Remove has_assignment and
4911         has_real_assignment.  Add befriending_classes.
4912         (TYPE_HAS_ASSIGNMENT): Remove.
4913         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
4914         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
4915         (lang_decl): Document.
4916         (DECL_BEFRIENDING_CLASSES): New macro.
4917         (FRIEND_NAME): Move declaration to more obvious location.
4918         (FRIEND_DECLS): Likewise.
4919         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
4920         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
4921         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
4922         (grok_op_properties): Likewise.
4923         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
4924         (add_friend): Likewise.  Don't do weird things with assignment
4925         operators.  Update DECL_BEFRIENDING_CLASSES.
4926         (add_friends): Don't do weird things with assignment operators.
4927         (make_friend_class): Likewise.  Update
4928         CLASSTYPE_BEFRIENDING_CLASSES.
4929         * pt.c (instantiate_class_template): Don't set
4930         TYPE_HAS_ASSIGNMENT.
4931         (tsubst_copy): Substitute the TREE_TYPE for more unary
4932         expressions.
4933         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
4934         * search.c (protected_accessible_p): New function.
4935         (friend_accessible_p): Likewise.
4936         (accessible_p): Use them.
4938 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
4940         * pt.c (convert_nontype_argument): Don't create things that aren't
4941         PTRMEM_CSTs when applying a qualification conversion to a
4942         PTRMEM_CST.
4944 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
4946         * Makefile.in (OBJS): Don't mention hash.o.
4947         (OBJDEPS): Likewise.
4949 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
4951         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
4952         * decl.c (expand_static_init): Make sure we don't add any after
4953         then.
4955         * decl.c (cp_finish_decl): Move intelligence about handling
4956         DECL_COMDAT for variables from here...
4957         * decl2.c (comdat_linkage): ...to here.
4958         (maybe_make_one_only): Tweak.
4959         (import_export_decl): Call comdat_linkage for variables, too.
4960         (finish_file): Handle template statics properly.
4962 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
4964         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
4965         Document internals of pointer-to-member-functions.
4966         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
4967         (PFN_FROM_PTRMEMFUNC): Likewise.
4968         (build_type_conversion): Remove unused parameter.
4969         (build_ptrmemfunc1): Declare.
4970         (expand_ptrmemfunc_cst): New function.
4971         (delta2_from_ptrmemfunc): Likewise.
4972         (pfn_from_ptrmemfunc): Likewise.
4973         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
4974         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
4975         (convert_to_reference): Remove unused parameter to
4976         build_type_conversion.
4977         (ocp_convert): Likewise.
4978         (build_user_type_conversion): Likewise.
4979         * error.c (dump_expr): Handle NULL pointer-to-member functions.
4980         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
4981         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
4982         open when handling pointer-to-member functions.
4983         * pt.c (convert_nontype_argument): Clean up error messages.  Be
4984         more stringent with pointers-to-members.
4985         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
4986         (build_unary_op): Tidy ever-so-slightly.
4987         (build_conditional_expr): Remove extra parameter to
4988         build_type_conversion.
4989         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
4990         we're using.
4991         (expand_ptrmemfunc_cst): Define.
4992         (delta2_from_ptrmemfunc): Likewise.
4993         (pfn_from_ptrmemfunc): Likewise.
4995 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
4997         * init.c (build_member_call): Handle template-id expressions
4998         correctly.
4999         * typeck.c (build_x_function_call): Likewise.
5001 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
5003         * friend.c (make_friend_class): Avoid core dump when
5004         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
5006 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
5008         * decl.c (start_function): Suppress normal linkage heuristics
5009         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
5011 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
5013         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
5014         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
5016 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5018         * parse.y (named_complex_class_head_sans_basetype):
5019         Do not push a scope for error_mark_node.
5020         (maybe_base_class_list): Likewise.
5022         * decl.c (start_decl): Check for error_mark_node as a type.
5023         Detected by g++.brendan/array-refs.C.
5024         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
5025         (maybe_build_cleanup_1): Likewise.  Detected by
5026         g++.jason/incomplete1.C.
5028         * tree.c (build_dummy_object): Use void_zero_node instead of the
5029         error_mark_node.
5030         (is_dummy_object): Check for such a node.
5031         Detected by g++.bob/inherit1.C
5033 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
5035         * method.c (old_backref_index): Split out...
5036         (flush_repeats): From here.  Rename back from try_old_backref.
5037         (build_mangled_name): Put back some old-style repeat handling.
5039 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5041         * lex.c: Don't include setjmp.h.
5042         (parse_float): New static function.
5043         (pf_args): New struct.
5044         (real_yylex): Use them in call to `do_float_handler'.
5046 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
5048         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
5049         * tree.c (layout_basetypes): Not here.
5050         * search.c (dfs_search): Remove; no longer used.
5052 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
5054         * decl2.c (validate_nonmember_using_decl): Issue sensible
5055         error-messages on bogus qualifiers.
5057 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
5059         * call.c (add_function_candidate): Fix uninitialized variable.
5061         * Makefile.in (search.o): Add dependency on varray.h.
5063 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
5065         * decl.c (duplicate_decls): Use same_type_p.
5066         * method.c (try_old_backref): Renamed from flush_repeats.  Use
5067         same_type_p.  Don't try to handle repeats.  Return success.
5068         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
5069         calls from old-style code, too.
5070         (check_ktype): Use same_type_p.
5071         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
5072         (build_qualified_name): Simplify logic.
5073         (process_overload_item): Strip typedefs and quals at the top.
5074         (build_mangled_name_for_type_with_Gcode): Remove call to
5075         type_canonical_variant.
5076         (build_mangled_name): Likewise.  Remove support for old-style
5077         repeats, which have been disabled since 2.7.2.  Don't mess with
5078         TREE_USED.
5079         (build_decl_overload_real): Don't mess with TREE_USED.
5081 1999-03-13  Nathan Sidwell  <nathan@acm.org>
5083         * error.c (cp_printers): Add 'F' escape character.
5084         (dump_type_real): Remove TREE_LIST (fnargs) printing.
5085         Functionality moved to dump_parameters.
5086         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
5087         (dump_function_decl): Extend meaning of V parameter.  Use
5088         dump_parameters and dump_exception_spec.
5089         (dump_parameters): New static function.
5090         (dump_exception_spec): New static function.
5091         (fndecl_as_string): Change argument semantics.  Use
5092         dump_function_decl directly.
5094         * sig.c (build_signature_table_constructor): Use cp_error.
5096 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5098         * semantics.c (finish_switch_cond): Handle error cases gracefully.
5099         Detected by g++.law/enum5.C.
5101         * typeck.c (build_modify_expr): Check for errors after resolving
5102         offsets.  Detected by g++.brendan/static1.C.
5104         * decl.c (complete_array_type): Ignore initial_value if it is an
5105         error.  Detected by g++.benjamin/17930.C.
5107         * typeck2.c (process_init_constructor): Return error if one argument
5108         is in error.  Detected by g++.benjamin/13478.C.
5110 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5112         * decl.c (select_decl): Allow class templates when we need types.
5113         * decl2.c (ambiguous_decl): Likewise.
5115 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
5117         * lex.c (do_identifier): Correct call to enforce_access.
5118         * search.c (accessible_p): Tweak comment.
5120 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
5122         * semantics.c (begin_class_definition): Call build_self_reference.
5123         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
5125         * search.c (assert_canonical_unmarked): Fix typo in prototype.
5127         * search.c (dfs_canonical_queue): New function.
5128         (dfs_assert_unmarked_p): Likewise.
5129         (assert_canonical_unmarked): Likewise.
5130         (access_in_type): Use it.
5131         (accessible_p): Likewise.  Walk the whole tree when umarking.
5133         * sig.c (build_signature_table_constructor): Use accessible_p
5134         instead of compute_access.
5136 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
5138         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
5140 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
5142         * cp-tree.h (flag_access_control): Declare.
5143         (TREE_VIA_PPUBLIC): Document.
5144         (DECL_NONSTATIC_MEMBER_P): New macro.
5145         (enforce_access): Return an indication of whether or not access
5146         was permitted.
5147         (build_self_reference): Change prototype.
5148         (compute_access): Replace with ...
5149         (accessible_p): New function.
5150         (dfs_walk): Change prototype.
5151         (dfs_unmark): Likewise.
5152         (markedp): Likewise.
5153         * call.c (enforce_access): Use accessible_p.
5154         * class.c (build_self_reference): Insert the declaration into the
5155         list of members for this type, and make it public.
5156         * decl.c (xref_basetypes): Avoid ill-timed recursion.
5157         * init.c (build_offset_ref): Use lookup_member, not three separate
5158         name-lookups.  Call enforce_access rather than checking for
5159         illegal accesses here.
5160         (resolve_offset_ref): Likewise.
5161         * lex.c (do_identifier): Likewise.
5162         * method.c (hack_identifier): Likewise.
5163         * parse.y (self_reference): Remove.
5164         (opt_component_decl_list): Don't use it.
5165         * parse.c: Regenerated.
5166         * pt.c (print_candidates): Generalize to handle lists of
5167         overloaded functions.
5168         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
5169         not set.
5170         (get_template_base): Use new calling convention for dfs_walk.
5171         * search.c: Include varray.h.  Add prototypes.
5172         (dfs_walk): Accept a data pointer to pass to the work functions.
5173         All callers changed.  All work functions changed.
5174         (breadth_first_search): Rename to bfs_walk, and make consistent
5175         with dfs_walk.
5176         (dfs_walk_real): New function.
5177         (canonical_binfo): New function.
5178         (context_for_name_lookup): Likewise.
5179         (shared_marked_p): Likewise.
5180         (shared_unmarked_p): Likewise.
5181         (lokup_field_queue_p): Likewise.
5182         (lookup_field_r): Generalize to handle both functions and fields.
5183         (lookup_field): Just call lookup_member.
5184         (lookup_fnfields): Likewise.
5185         (lookup_member): Move body of lookup_field here and generalize.
5186         (dfs_accessible_queue_p): Likewise.
5187         (dfs_accessible_p): Likewise.
5188         (dfs_access_in_type): Likewise.
5189         (access_in_type): Likewise.
5190         (compute_access): Remove, and replace with ...
5191         (accessible_p): New function.
5192         (vbase_types): Remove.
5193         (vbase_decl_ptr_intermediate): Likewise.
5194         (vbase_decl_ptr): Likewise.
5195         (vbase_init_result): Likewise.
5196         (closed_envelopes): Likewise.
5197         (bvtable): Likewise.
5199 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
5201         * call.c (add_function_candidate): Check for proper number of args
5202         before checking the validity of those args.
5204 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
5206         * cp-tree.h (struct lang_type): Add anon_union field.
5207         (ANON_UNION_TYPE_P): Use it instead of examining type.
5208         (SET_ANON_UNION_TYPE_P): New macro.
5209         * decl.c (check_tag_decl): Use it.
5211         * search.c (compute_access): Handle non-type contexts earlier, and
5212         handle NULL_TREE.
5214         * tree.c (build_exception_variant): Use copy_to_permanent.
5216         * decl2.c (setup_initp): Give statics with no priority the default
5217         priority here.
5218         (do_dtors, do_ctors, finish_file): Remove special handling of
5219         non-prioritized statics.
5221 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
5223         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
5224         * decl.c (make_typename_type): Don't issue an error if an
5225         immediate lookup fails; it migt be resolved later.
5226         * friend.c (is_friend): Add comment.
5227         * search.c (breadth_first_search): Add POSTFN and DATA
5228         parameters.  Tidy.  All callers changed.
5229         (lookup_field_queue_p): New function.
5230         (lookup_field_r): Likewise.
5231         (lookup_field_post): Likewise.
5232         (lookup_field): Use them, via breadth_first_search, instead of
5233         duplicating logic.
5234         (compute_access): Robustify.
5235         (lookup_fnfield_info): New structure.
5237 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
5239         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
5241 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
5243         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
5244         cc happy.
5246         * decl2.c (import_export_class): Also return if
5247         CLASSTYPE_INTERFACE_ONLY is set.
5249 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5251         * decl.c (push_overloaded_decl): Only overwrite the old binding if
5252         there was one.
5253         * decl2.c (do_local_using_decl): Fix loop termination.
5255 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
5257         * cp-tree.h (determine_specialization): Don't declare.
5258         * pt.c (determine_specialization): Make it static.  Eliminate
5259         complain parameter.  Note that decl is always non-NULL now, and
5260         simplify accordingly.
5262         * decl.c (maybe_push_to_top_level): Always call
5263         push_cp_function_context.
5264         (pop_from_top_level): Always call pop_cp_function_context.
5266 1999-02-26  Nathan Sidwell  <nathan@acm.org>
5268         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
5269         diagnostics.
5270         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
5271         * init.c (build_new_1): Extra arg to complete_type_or_else.
5272         (build_delete): Likewise.
5273         * typeck.c (require_complete_type): Likewise.
5274         (pointer_int_sum): Likewise.
5275         (pointer_diff): Likewise.
5276         (build_component_ref): Likewise.
5278         * typeck2.c (incomplete_type_error): Always use cp_error.
5279         Show declaration of undefined type, if appropriate.
5280         Deal with UNKNOWN_TYPE nodes.
5282         * typeck.c (require_complete_type): Use TYPE_SIZE as
5283         size_zero_node to mean incomplete type.
5284         (require_complete_type_in_void): New function.
5285         (build_compound_expr): Call complete_type_in_void for LHS.
5286         (build_c_cast): Call complete_type_in_void for void cast.
5287         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
5288         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
5289         require_complete_type_in_void.  Call it.
5290         * cp-tree.h (require_complete_type_in_void): Prototype new function.
5292         * typeck.c (convert_arguments): Use alternative format for
5293         function decls.  Don't require_complete_type here.  Simplify
5294         diagnostic printing.
5295         (convert_for_initialization): Don't require_complete_type on RHS yet.
5296         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
5298         * call.c (build_over_call): Cope with qualified void return type.
5299         * semantics.c (finish_call_expr): Likewise.
5300         * typeck.c (build_function_call_real): Likewise.
5301         (c_expand_return): Likewise.
5302         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
5304         * call.c (print_z_candidates): Use alternate print format, to be
5305         consistent with (pt.c) print_candidates.
5306         * method.c (hack_identifier): List candidate members.
5307         * search.c (lookup_field): Build ambiguous list, and show it, if
5308         ambiguous.
5310 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
5312         * typeck.c (decay_conversion): Don't confuse constant array
5313         variables with their initializers.
5315         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
5316         merging decls.
5317         * pt.c (regenerate_decl_from_template): Tweak for clarity.
5318         (instantiate_decl): Mark a decl instantiated before regenerating
5319         it to avoid recursion.
5320         * tree.c (mapcar): Don't call decl_constant_value unless we know
5321         something is TREE_READONLY_DECL_P.
5323         * class.c (check_for_override): Don't stop checking when we find
5324         the first overridden function.  Delete #if 0'd code.
5325         * search.c (get_matching_virtual): Likewise.
5327 1999-02-25  Richard Henderson  <rth@cygnus.com>
5329         * lang-specs.h: Define __FAST_MATH__ when appropriate.
5331 1999-02-24  Mike Stump  <mrs@wrs.com>
5333         * typeck.c (convert_for_assignment): Allow boolean integral constant
5334         expressions to convert to null pointer.
5336 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
5338         * decl.c (lookup_namespace_name): Resolve namespace aliases.
5340         * class.c (push_nested_class): Allow namespaces.
5342         * decl2.c (set_decl_namespace): Add friendp parameter.
5343         * decl.c (grokfndecl): Pass it.
5344         (grokvardecl): Likewise.
5345         * cp-tree.h: Change declaration.
5347 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
5349         * pt.c (tsubst): Allow an array of explicit size zero.
5351 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
5353         * errfn.c: Change varargs code to look like toplev.c.
5355         * method.c (process_modifiers): Don't prepend 'U' for char or
5356         wchar_t.
5358 1999-02-20  Craig Burley  <craig@jcb-sc.com>
5360         * Make-lang.in (cplib2.ready): Don't consider updating
5361         cplib2 stuff if the current directory isn't writable, as
5362         it won't work (such as during a `make install').
5364 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
5366         * decl2.c (start_objects): Make file scope constructors and
5367         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
5368         ASM_OUTPUT_DESTRUCTOR are defined.
5370 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
5372         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
5373         (fn_type_unification): Adjust prototype.
5374         (lookup_fnfields_1): Declare.
5375         * call.c (add_template_candidate_real): Adjust call to
5376         fn_type_unification.
5377         * class.c (add_method): Don't allow duplicate declarations of
5378         constructors or destructors.
5379         (resolve_address_of_overloaded_function): Remove unused variable.
5380         Adjust call to fn_type_unification.
5381         * decl.c (grokfndecl): Be more robust in the face of illegal
5382         specializations.
5383         * decl2.c (check_classfn): Remove hokey handling of member
5384         templates.
5385         * pt.c (determine_specialization): Improve comments.  Adjust to
5386         handle template argument deduction as per the standard.
5387         (check_explicit_specialization): Fix comment spacing.  Handle
5388         type-conversion operators correctly.  Improve error-recovery.
5389         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
5390         (get_bindings_real): Simplify handling of static members.
5391         * search.c (lookup_fnfields_1): Make it have external linkage.
5392         * typeck.c (compparms): Fix comment.
5393         (build_unary_op): Don't try to figure out which template
5394         specialization is being referred to when when the address-of
5395         operator is used with a template function.
5397 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5399         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
5400         keyword to match an analogous change at the top level.
5402         * tree.c (lvalue_or_else): Likewise.
5404 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
5406         * decl.c (xref_basetypes): Comment.
5407         * pt.c (instantiate_class_template): Use xref_basetypes.
5409 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
5411         * cp-tree.h (tsubst): Change prototype.
5412         (tsubst_expr): Likewise.
5413         (tsubst_copy): Likewise.
5414         (type_unification): Remove prototype.
5415         * call.c (convert_default_arg): Adjust call to tsubst_expr.
5416         * class.c (resolve_address_of_overloaded_function): Just use
5417         fn_type_unification.
5418         * decl.c (grokdeclarator): Adjust call to tsubst.
5419         * method.c (build_template_parm_names): Likewise.
5420         * pt.c (GTB_VIA_VIRTUAL): New macro.
5421         (GTB_IGNORE_TYPE): Likewise.
5422         (resolve_overloaded_unification): Add `complain' parameter.
5423         (try_one_overload): Likewise.
5424         (tsubst_template_arg_vector): Likewise.
5425         (tsubst_template_parms): Likewise.
5426         (tsubst_aggr_type): Likewise.
5427         (tsubst_arg_types): Likewise.
5428         (tsubst_call_declarator_parms): Likewise.
5429         (unify): Remove explicit_mask.
5430         (type_unification_real): Likewise.
5431         (get_template_base_recursive): Likewise.
5432         (coerce_template_template_parms): Provide prototype.
5433         (tsubst_function_type): Likewise.
5434         (try_class_unification): New function.
5435         All callers changed to use new complain parameter.
5436         (get_template_base): Use try_class_unification.
5437         (unify): Adjust handling of classes derived from template types.
5438         (fn_type_unification): Substitute explicit arguments before
5439         unification.
5441 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5443         * decl.c (pushdecl): Remove dead code.
5445 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
5447         * decl2.c (finish_objects): Fix code I missed in previous change.
5449 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
5451         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
5452         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
5454         * pt.c (maybe_process_partial_specialization): Complain about
5455         'template <>' on non-specialization.
5457 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
5459         * decl.c (grokdeclarator): Catch wierd declarators.
5460         * decl2.c (finish_file): Don't abort because of namespace parsing
5461         failure.
5462         (check_decl_namespace): Remove.
5464 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
5466         * cp-tree.h (get_template_base): Don't declare.
5467         (dfs_walk): Declare.
5468         (dfs_unmark): Likewise.
5469         (markedp): Likewise.
5470         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
5471         targs to get_template_base.
5472         (get_template_base_recursive): Move here from search.c.  Check to
5473         see that the base found can be instantiated to form the desired
5474         type.
5475         (get_template_base): Likewise.
5476         (get_class_bindings): Simplify.
5477         * search.c (get_template_base_recursive): Move to pt.c.
5478         (get_template_base): Likewise.
5479         (markedp): Make it global.
5480         (dfs_walk): Likewise.
5481         (dfs_unmark): Likewise.
5483 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
5485         * pt.c (maybe_process_partial_specialization): Complain about
5486         specialization in wrong namespace.
5487         * tree.c (decl_namespace_context): New fn.
5489 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5491         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
5492         * pt.c (coerce_template_template_parms): Handle nested
5493         template template parameters.
5495 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
5497         * typeck2.c: Update email addresses.
5499 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5501         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
5502         turned off.
5504 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
5506         * lex.c (retrofit_lang_decl): Split out...
5507         (build_lang_decl): From here.
5508         * decl.c (pushdecl): Call it for functions generated by the middle
5509         end that don't have DECL_LANG_SPECIFIC.
5510         * cp-tree.h: Declare it.
5512         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
5513         (start_objects, finish_objects): Only use special
5514         init_priority code if the user specified a priority.
5515         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
5516         objects.
5518 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
5520         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
5521         mkstemp.o.  Get them from libiberty now.
5522         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
5524 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
5526         * decl2.c (lang_decode_option): Use read_integral_parameter.
5528 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
5530         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
5531         before calling complete_type_or_else.
5533 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5535         * input.c (inline): Don't define, its handled by system.h.
5537 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
5539         * decl2.c: Don't define flag_no_ident here.  Don't process
5540         -f(no-)ident here.
5541         * cp-tree.h: Don't declare flag_no_ident here.
5542         * lang-specs.h: Map -Qn to -fno-ident.
5544 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
5546         * cp-tree.h (struct tree_binding): Replace scope field with a union.
5547         (BINDING_SCOPE): Adjust.
5548         * decl.c (BINDING_LEVEL): Adjust.
5550 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
5552         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
5553         member constants.
5555         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
5556         a ctor initializer.
5558         * tree.c (equal_functions): Fix name in prototype.
5560         * decl.c (push_local_binding): Add FLAGS argument.
5561         (pushdecl, push_overloaded_decl): Pass it.
5562         * decl2.c (do_local_using_decl): Likewise.
5563         * cp-tree.h: Adjust prototype.
5564         * decl.c (poplevel): Fix logic.
5566         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
5567         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
5568         (cat_namespace_levels): Don't loop forever.
5570 1999-01-25  Richard Henderson  <rth@cygnus.com>
5572         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
5574 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
5576         * class.c (resolve_address_of_overloaded_function): Mark the
5577         chosen function used.
5579         * call.c (build_call): Make sure that a function coming in has
5580         been marked used already.
5581         * decl.c (expand_static_init): Call mark_used instead of
5582         assemble_external.
5583         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
5584         alloc_eh_object, expand_throw): Likewise.
5585         * init.c (build_builtin_delete_call): Likewise.
5586         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
5587         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
5588         expand_generic_desc): Likewise.
5590 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5592         * tree.c (equal_functions): New function.
5593         (ovl_member): Call it.
5595 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
5597         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
5599 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
5601         * decl.c (decls_match): Return 1 if old and new are identical.
5602         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
5604 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
5606         * decl.c (start_function): Make member functions one_only on windows.
5607         * decl2.c (import_export_decl): Likewise.
5609         * decl.c (grokdeclarator): Don't complain about implicit int in
5610         a system header.  Change same-name field check to not complain in
5611         a system header instead of within extern "C".
5613 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
5615         * cp-tree.h (PUSH_GLOBAL): New macro.
5616         (PUSH_LOCAL): Likewise.
5617         (PUSH_USING): Likewise.
5618         (namespace_bindings_p): Declare.
5619         (push_overloaded_decl): Likewise.
5620         * decl.c (push_overloaded_decl): Don't make it static.  Check for
5621         illegal declarations after using declarations here.
5622         (namespace_bindings_p): Likewise.
5623         (duplicate_decls): Don't consider declarations from different
5624         namespaces to be the same.
5625         (pushdecl): Use symbolic PUSH_ constants in calls to
5626         push_overloaded_decl.
5627         (push_overloaded_decl_1): Likewise.
5628         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
5629         (do_nonmember_using_decl): Check for illegal using declarations
5630         after ordinary declarations here.
5631         (do_local_using_decl): Call pushdecl to insert declarations.
5633 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
5635         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
5637 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
5639         * tree.c (build_cplus_array_type_1): Don't call build_array_type
5640         for types involving template parameters.
5642         * cp-tree.h (PARM_DECL_EXPR): Delete.
5643         (convert_default_arg): Change prototype.
5644         (check_default_argument): Declare.
5645         (search_tree): Likewise.
5646         * call.c (convert_default_arg): Take the function to which the
5647         default argument belongs as a parameter, and do any necessary
5648         instantiation here, instead of ...
5649         (build_over_call): Here.
5650         * decl.c (local_variable_p): New function.
5651         (check_default_argument): Likewise, split out and tidied from ...
5652         (grokparms): Here.
5653         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
5654         * pt.c (tsubst_call_declarator_parms): New function.
5655         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
5656         with CALL_EXPRs, rather than trying to be clever.
5657         (tsubst): Use tsubst_call_declarator_parms.
5658         * tree.c (search_tree): Don't make it static.
5659         * typeck.c (convert_arguments): Use new interface to
5660         convert_default_arg.
5662 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
5664         * error.c (dump_function_decl): Don't print the argument types for
5665         a function when the verbosity level is negative.
5667         * call.c (build_over_call): Check format attributes at call-time.
5669         * pt.c (tsubst_copy): Fix comment.
5670         (unify): Don't allow unification with variable-sized arrays.
5672         * semantics.c (finish_stmt_expr): When processing a template make
5673         the BIND_EXPR long-lived.
5675 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
5677         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
5678         (import_export_vtable): Not here.
5680 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
5682         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
5683         non-static member function.
5685 1999-01-18  Nathan Sidwell  <nathan@acm.org>
5687         * class.c (instantiate_type): Only diagnose illegal address of member
5688         function if complaining.
5690         * decl.c (lookup_name_real): Remove duplicate code.
5692 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
5694         * tree.c (copy_template_template_parm): Use permanent_obstack.
5696 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5698         * pt.c (unify): Remove restrictions on deduction of argument
5699         of template template parameters.
5701 1999-01-18  Nathan Sidwell  <nathan@acm.org>
5703         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
5705         * class.c (resolve_address_of_overloaded_function): Show list of
5706         all candidates, when none of them match.
5708 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
5710         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
5711         definition of 'casting away const' in reinterpret_cast<>.
5713 1999-01-18  Graham  <grahams@rcp.co.uk>
5715         * cvt.c: Add include for decl.h, remove extern for
5716         static_aggregates which is now provided by decl.h.
5718         * Makefile.in (cvt.o): Add dependency for decl.h and missing
5719         dependencies for convert.h and flags.h.
5721 1999-01-18  Nathan Sidwell  <nathan@acm.org>
5723         * decl2.c (do_dtors): Set current location to that of the
5724         decl, for sensible diagnostics and debugging.
5725         (check_classfn): Issue `incomplete type' error, if
5726         class is not defined.
5728 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
5730         * cp-tree.h: Add prototype for bound_pmf_p.
5732 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
5733             Manfred Hollstein <manfred@s-direktnet.de>
5735         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
5736         -Wreturn-type.
5738 1999-01-16  Nathan Sidwell  <nathan@acm.org>
5740         * cp-tree.h (struct lang_type): Added has_mutable flag.
5741         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
5742         (TYPE_HAS_MUTABLE_P): New macro to read it.
5743         (cp_has_mutable_p): Prototype for new function.
5744         * class.c (finish_struct_1): Set has_mutable from members.
5745         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
5746         it contains a mutable.
5747         * typeck.c (cp_has_mutable_p): New function.
5749 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
5751         * pt.c (process_template_parm): Ignore top-level qualifiers on
5752         non-type parameters.
5754         * decl.c (start_function): Use current_function_parms in the call
5755         to require_complete_type_for_parms, not the probably empty
5756         DECL_ARGUMENTS.
5758 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
5760         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
5762         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
5763         that we don't suppress the other copies.
5764         * lex.c (handle_cp_pragma): Likewise.
5766 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
5768         * decl.c (grokdeclarator): Undo 1998-12-14 change.
5769         * tree.c (build_cplus_array_type_1): Likewise.
5770         * pt.c (instantiate_class_template): Remove misleading comment.
5771         (tsubst_aggr_type): Substitute if there are template parameters,
5772         regardless of whether or not they use template arguments.
5773         (unify): Likewise, but for unification.
5775 1999-01-12  Richard Henderson  <rth@cygnus.com>
5777         * cp-tree.h (flag_permissive): Declare extern.
5779 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
5781         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
5782         here.
5783         (lang_type): Add is_partial_instantiation.  Decrease width of
5784         dummy.
5785         (PARTIAL_INSTANTIATION_P): New macro.
5786         (OPERATOR_TYPENAME_P): Remove.
5787         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
5788         OPERATOR_TYPENAME_P.
5789         (grok_op_properties): Likewise.
5790         * friend.c (do_friend): Handle friends that are member functions
5791         correctly.
5792         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
5793         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
5794         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
5795         any more partial instantiation than is absolutely necessary for
5796         implicit typename.  Set PARTIAL_INSTANTIATION_P.
5797         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
5798         * semantics.c (begin_class_definition): Handle partial
5799         specializations of a type that was previously partially
5800         instantiated.
5802 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
5804         * g++spec.c (LIBSTDCXX): Provide default definition.
5805         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
5807 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5809         * Make-lang.in (g++.o): Depend on prefix.h.
5811 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
5813         * tree.c (bound_pmf_p): New fn.
5814         * typeck.c (build_c_cast): Use it.
5816         * decl.c (grok_op_properties): Use same_type_p.
5818 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5820         * Makefile.in (cvt.o): Depend on toplev.h.
5822         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
5824         * cvt.c: Include toplev.h.
5826         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
5827         definitions.
5829         * init.c (expand_vec_init): Initialize variable `itype'.
5831         * lex.c (yyerror): Cast the argument passed to a ctype function to
5832         an unsigned char.
5834         * method.c (build_mangled_C9x_name): Wrap prototype and definition
5835         in "HOST_BITS_PER_WIDE_INT >= 64".
5837         * typeck.c (build_binary_op): Mark parameter `convert_p' with
5838         ATTRIBUTE_UNUSED.
5840 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
5842         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
5843         * tree.c (build_exception_variant): Don't crash on empty throw
5844         specs.
5846 1998-12-18  DJ Delorie  <dj@cygnus.com>
5848         * cvt.c (convert_to_reference): Check for both error_mark_node
5849         and NULL_NODE after call to convert_for_initialization.
5851 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
5853         * error.c (interesting_scope_p): New fn.
5854         (dump_simple_decl): Use it.
5855         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
5856         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
5858 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
5860         * class.c (resolve_address_of_overloaded_function): Do conversion
5861         to correct type here, rather than ...
5862         (instantiate_type): Here.
5864         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
5865         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
5866         (decl_template_parm_p): Remove.
5867         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
5868         parameter.
5869         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
5870         * pt.c (push_inline_template_parms_recursive): Set it.
5871         (decl_template_parm_p): Remove.
5872         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
5873         (process_template_parm): Set it.
5875 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
5877         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
5878         if configured with cpplib.
5880 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
5882         * decl.c (poplevel): Make sure ns_binding is initialized.
5884         * decl.c (finish_function): Undo inadvertent change in previous
5885         patch.
5887 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
5889         * class.c (pushclass): Tweak handling of class-level bindings.
5890         (resolve_address_of_overloaded_function): Update pointer-to-member
5891         handling.
5892         (instantiate_type): Likewise.
5893         * cvt.c (cp_convert_to_pointer): Likewise.
5894         * decl.c (pop_binding): Take the DECL to pop, not just the name.
5895         Deal with `struct stat' hack.
5896         (binding_level): Add to documentation.
5897         (push_binding): Clear BINDING_TYPE.
5898         (add_binding): New function.
5899         (push_local_binding): Use it.
5900         (push_class_binding): Likewise.
5901         (poplevel): Adjust calls to pop_binding.
5902         (poplevel_class): Likewise.
5903         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
5904         declarations to current binding level.
5905         (push_class_level_binding): Likewise.
5906         (push_overloaded_decl): Adjust handling of OVERLOADs in local
5907         bindings.
5908         (lookup_namespace_name): Don't crash when confronted with a
5909         TEMPLATE_DECL.
5910         (lookup_name_real): Do `struct stat' hack in local binding
5911         contexts.
5912         (build_ptrmemfunc_type): Adjust documentation.
5913         (grokdeclarator): Don't avoid building real array types when
5914         processing templates unless really necessary.
5915         (finish_method): Adjust calls to pop_binding.
5916         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
5917         not reparse_decl_as_expr.
5918         (build_expr_from_tree): Deal with a template-id as the function to
5919         call in a METHOD_CALL_EXPR.
5920         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
5921         (maybe_adjust_types_For_deduction): Don't do peculiar things with
5922         METHOD_TYPEs here.
5923         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
5924         pointer-to-member types where necessary.
5925         * tree.c (build_cplus_array_type_1): Don't avoid building real
5926         array types when processing templates unless really necessary.
5927         (build_exception_variant): Compare the exception lists correctly.
5929 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
5931         * cp-tree.def (CPLUS_BINDING): Update documentation.
5932         * cp-tree.h (LOCAL_BINDING_P): New macro.
5933         (lang_identifier): Rename local_value to bindings.
5934         (tree_binding): Make `scope' of type `void*', not `tree'.
5935         (BINDING_SCOPE): Update documentation.
5936         (IDENTIFIER_LOCAL_VALUE): Remove.
5937         (IDENTIFIER_CLASS_VALUE): Document.
5938         (IDENTIFIER_BINDING): New macro.
5939         (IDENTIFIER_VALUE): Likewise.
5940         (TIME_IDENTIFIER_TIME): Likewise.
5941         (TIME_IDENTIFIER_FILEINFO): Likewise.
5942         (IMPLICIT_TYPENAME_P): Likewise.
5943         (set_identifier_local_value): Remove.
5944         (push_local_binding): New function.
5945         (push_class_binding): Likewise.
5946         * class.c (pushclass): Update comments; use push_class_binding.
5947         * decl.c (set_identifier_local_value_with_scope): Remove.
5948         (set_identifier_local_value): Likewise.
5949         (push_binding): New function.
5950         (pop_binding): Likewise.
5951         (binding_level): Update documentation.  Remove shadowed.
5952         (BINDING_LEVEL): New macro.
5953         (free_binding_nodes): New variable.
5954         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
5955         BLOCK_VARs when doing for-scope extension.  Remove effectively
5956         dead code.
5957         (pushlevel_class): Tweak formatting.
5958         (poplevel_class): Adjust for new name-lookup scheme.
5959         (print_binding_level): Likewise.
5960         (store_bindings): Likewise.
5961         (pushdecl): Likewise.
5962         (pushdecl_class_level): Likewise.
5963         (push_class_level_binding): Likewise.
5964         (push_overloaded_decl): Update comments.  Adjust for new
5965         name-lookup scheme.
5966         (lookup_name_real): Likewise.
5967         (lookup_name_current_level): Likewise.
5968         (cp_finish_decl): Likewise.
5969         (require_complete_types_for_parms): Likewise.  Remove misleading
5970         #if 0'd code.
5971         (grok_parms): Likewise.  Don't call
5972         require_complete_types_for_parms here.
5973         (grok_ctor_properties): Don't treat templates as copy
5974         constructors.
5975         (grop_op_properties): Or as assignment operators.
5976         (start_function): Document.  Adjust for new name-lookup scheme.
5977         (finish_function): Likewise.
5978         * decl2.c (do_local_using_decl): Use push_local_binding.
5979         * lex.c (begin_definition_of_inclass_inline): New function, split
5980         out from ...
5981         (do_pending_inlines): Here, and ...
5982         (process_next_inline): Here.
5983         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
5984         (init_filename_times): Likewise.
5985         (extract_interface_info): Likewise.
5986         (ste_typedecl_interface_info): Likewise.
5987         (check_newline): Likewise.
5988         (dump_time_statistics): Likewise.
5989         (handle_cp_pragma): Likewise.
5990         (do_identifier): Adjust for new name-lookup scheme.
5991         * parse.y (function_try_block): Return ctor_initializer_opt value.
5992         (fndef): Use it.
5993         (fn.defpen): Pass appropriate values to start_function.
5994         (pending_inline): Use functor_try_block value, and pass
5995         appropriate values to finish_function.
5996         * pt.c (is_member_template): Update documentation; remove handling
5997         of FUNCTION_DECLs.  As per name, this function should deal only in
5998         TEMPLATE_DECLs.
5999         (decl_template_parm_p): Change name of olddecl parameter to decl.
6000         (check_template_shadow): Adjust for new name-lookup scheme.
6001         (lookup_template_class): Likewise.
6002         (tsubst_decl): Tweak so as not to confuse member templates with
6003         copy constructors and assignment operators.
6004         (unify): Handle UNION_TYPEs.
6005         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
6006         (lang_print_xnode): Adjust for new name-lookup scheme.
6007         * typeck.c (mark_addressable): Likewise.
6008         (c_expand_return): Likewise.
6010 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
6012         * decl.c (grokdeclarator): Allow field with same name as class
6013         in extern "C".
6015         * decl.c (lookup_name_real): Don't limit field lookup to types.
6016         * class.c (check_member_decl_is_same_in_complete_scope): No error
6017         if icv and x are the same.
6018         * lex.c (do_identifier): Tweak error message.
6020 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
6022         * decl.c (start_enum): Use push_obstacks, not
6023         end_temporary_allocation.
6024         (finish_enum): Call pop_obstacks.
6026 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
6028         * class.c (instantiate_type): Return error_mark_node rather than
6029         junk.
6031 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
6033         * cp-tree.h (most_specialized_instantiation): New function.
6034         (print_candidates): Likewise.
6035         * class.c (validate_lhs): Remove.
6036         (resolve_address_of_overloaded_function): New function, split out
6037         and then substantially reworked, from ...
6038         (instantiate_type): Use it.  Simplify.
6039         * cvt.c (convert_to_reference): Complain when caller has indicated
6040         that's the right thing to do.  Don't crash if instantiate_type
6041         fails.
6042         * pt.c: Substitute `parameters' for `paramters' throughout.
6043         (print_candidates): Don't make it static.
6044         (most_specialized_instantiation): Split out from ...
6045         (most_specialized): Here.
6047 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
6049         * lex.c (lang_init_options): Initialize cpplib.
6050         * decl2.c (parse_options,cpp_initialized): Removed.
6051         (lang_decode_option): Move initialization of cpplib to
6052         lang_init_options.
6054 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
6056         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
6057         well as the TYPE_DECL, when a typedef name is assigned to a
6058         previously anonymous type.
6060 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
6062         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
6063         __cp_eh_info for getting the eh info pointer.  Add table_index to
6064         field list.
6065         (push_eh_cleanup): Don't increment 'handlers' data field.
6066         (process_start_catch_block): Don't set the 'caught' field.
6068         * cp/exception.cc (CP_EH_INFO): New macro for getting the
6069         exception info pointer within library routines.
6070         (__cp_eh_info): Use CP_EH_INFO.
6071         (__start_cp_handler): Get exception info pointer, set caught field,
6072         and increment the handlers field.  Avoids this being done by handlers.
6073         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
6074         (uncaught_exception): Use CP_EH_INFO macro.
6076 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
6078         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
6080 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
6082         * lex.c (check_newline): Add support for \ as `natural'
6083         characters in file names in #line to be consistent with #include
6084         handling.  We support escape processing in the # 1 "..." version of
6085         the command.  See also support in cp/lex.c.
6087 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6089         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
6090         structure.
6092 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
6094         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
6096         * error.c (dump_simple_decl): Also print namespace context.
6097         (dump_function_decl): Likewise.
6099         * decl2.c (ambiguous_decl): Don't print old value if it's
6100         error_mark_node.
6102         * decl.c (lookup_name_real): Fix handling of local types shadowed
6103         by a non-type decl.  Remove obsolete code.
6104         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
6106         * lang-options.h: Add -fpermissive.
6107         * decl2.c: Likewise.
6108         * cp-tree.h: Add flag_permissive.
6109         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
6110         were specified, set flag_pedantic_errors.
6111         * call.c (build_over_call): Turn dropped qualifier messages
6112         back into pedwarns.
6113         * cvt.c (convert_to_reference): Likewise.
6114         * typeck.c (convert_for_assignment): Likewise.
6116 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
6118         * decl2.c (coerce_new_type): Use same_type_p.
6119         (coerce_delete_type): Likewise.
6121         * call.c (check_dtor_name): Return 1, not error_mark_node.
6123 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
6125         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
6126         if MULTIPLE_SYMBOL_SPACES.
6128         * pt.c (check_template_shadow): New fn.
6129         * decl2.c (grokfield): Use it.
6130         * decl.c (pushdecl): Likewise.
6131         (pushdecl_class_level): Likewise.
6132         (start_method): Likewise.
6133         (xref_tag): Don't try to use 't' if we're defining.
6135         * call.c (check_dtor_name): Just return an error_mark_node.
6136         * pt.c (lookup_template_class): Complain about using non-template here.
6137         * parse.y (apparent_template_type): Not here.
6139         * pt.c (check_explicit_specialization): Complain about specialization
6140         with C linkage.
6142         * lang-options.h: Add -f{no-,}implicit-inline-templates.
6144         * pt.c (convert_nontype_argument): Don't assume that any integer
6145         argument is intended to be a constant-expression.
6147 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
6149         * class.c (handle_using_decl): Fix comment.  Don't lookup
6150         constructors in base classes.
6151         (validate_lhs): Fix typo in comment.
6152         * search.c (lookup_field_1): Don't return a USING_DECL.
6154         * cp-tree.h (DECL_ACCESS): Improve documentation.
6156         * decl.c (expand_static_init): Don't set the initialization-done
6157         flag until the initialization is done.
6159 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
6161         * decl2.c (validate_nonmember_using_decl): Complain about using
6162         declarations for class members.
6164 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
6166         * typeck2.c (process_init_constructor): Use same_type_p.
6168         * decl.c (check_tag_decl): Don't warn about null decl inside a
6169         class.
6171         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
6172         UNIFY_ALLOW_NONE.
6173         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
6174         (resolve_overloaded_unification): Strip baselinks.
6176 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6178         * g++spec.c: Don't prototype xmalloc.
6180 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
6182         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
6184         * decl.c (check_tag_decl): Do complain about null friend decl at
6185         file scope.
6187 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
6189         * lex.c (make_lang_type): Clear the whole struct lang_type, not
6190         only the first multiple of sizeof (int).
6192 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
6194         * decl.c (start_decl): An explicit specialization of a static data
6195         member is only a definition if it has an initializer.
6197         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
6198         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
6199         cp_finish_decl.
6200         * init.c (expand_default_init): Check for DIRECT_BIND instead of
6201         DECL_ARTIFICIAL.
6203         * call.c (build_over_call): Use build_decl.
6205         * except.c (expand_throw): Just use convert, not
6206         build_reinterpret_cast.
6208         * lex.c (handle_generic_pragma): Use token_buffer.
6210         * decl.c (check_tag_decl): Don't complain about null friend decl.
6212 1998-11-24  Dave Pitts  <dpitts@cozx.com>
6214         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
6215         first position.
6216         * lex.c (check_newline): Use ISALPHA.
6217         (readescape): Use ISGRAPH.
6218         (yyerror): Use ISGRAPH.
6220 1998-11-24  Nathan Sidwell  <nathan@acm.org>
6222         * search.c (get_abstract_virtuals): Do not use initial
6223         CLASSTYPE_ABSTRACT_VIRTUALS.
6224         * typeck2.c (abstract_virtuals_error): Show location of abstract
6225         declaration.
6226         * call.c (build_new_method_call): Use
6227         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
6228         * class.c (finish_struct_bits): Don't bother working out whether
6229         get_abstract_virtuals will do anything, just do it.
6231 1998-11-24  Graham  <grahams@rcp.co.uk>
6233         * typeck.c (build_component_ref): Remove unused statement.
6235 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
6237         * class.c (add_method): Catch invalid overloads.
6239         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
6240         * search.c (lookup_conversions): Handle getting real OVERLOADs.
6241         (add_conversions): Likewise.  Revert last change.
6242         * call.c (add_conv_candidate): Pass totype to add_candidate instead
6243         of fn.  Don't add a new candidate if the last one was for the same
6244         type.
6245         (print_z_candidates): Handle getting a type as a function.
6246         (joust): If we got two conversion candidates to the same type,
6247         just pick one.
6248         (build_object_call): Lose 'templates'.
6249         (build_user_type_conversion_1): Handle getting real OVERLOADs.
6251 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
6253         * typeck2.c (process_init_constructor): If there are elements
6254         that don't have initializers and they need to have constructors
6255         run, supply them with initializers.
6257         * class.c (finish_struct_1): A class with a 0-width bitfield is
6258         still empty.
6260 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
6262         * pt.c (instantiate_class_template): Don't try to figure out what
6263         specialization to use for a partial instantiation.  Correct
6264         typos in a couple of comments.  Avoid calling uses_template_parms
6265         multiple times.
6267 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
6269         * method.c (process_overload_item): Add call to
6270         build_mangled_C9x_name for intTI_type_nodes.
6271         (build_mangled_C9x_name): Add prototype, define.
6272         * decl.c (init_decl_processing): Add names for
6273         TImode_type_node.
6275 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
6277         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
6279         * class.c (finish_struct_1): Set things up for 0-width bitfields
6280         like we do for others.
6282         * decl.c (check_tag_decl): New fn.
6283         (shadow_tag): Split out from here.
6284         * decl2.c (grok_x_components): Call it.
6286 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
6288         * decl.c: Lose warn_about_return_type.
6289         (grokdeclarator): Always complain about implicit int, except for
6290         `main () { ... }'.
6292         * decl.c (tag_name): New fn.
6293         (xref_tag): Complain about using typedef-name after class-key.
6295         * init.c (expand_vec_init): Also keep going if from_array.
6297         * tree.c (is_overloaded_fn): Also handle the output of
6298         build_offset_ref.
6300         * decl.c (grokdeclarator): Use constructor_name when comparing
6301         field name against enclosing class.
6302         * class.c (finish_struct_anon): Likewise.
6304 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
6306         * decl.c (poplevel): Remove code to handle KEEP == 2.
6307         (finish_function): Don't confuse BLOCK-order when
6308         processing a destructor.
6310 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
6312         * decl.c (require_complete_types_for_parms): Call layout_decl
6313         after we've completed the type.
6315 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6317         * decl2.c (validate_nonmember_using_decl): Allow using templates
6318         from the global namespace.
6320 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
6322         Handle specifying template args to member function templates.
6323         * tree.c (build_overload): Always create an OVERLOAD for a template.
6324         * search.c (add_conversions): Handle finding an OVERLOAD.
6325         * decl2.c (check_classfn): Likewise.
6326         * lex.c (identifier_type): See through a baselink.
6327         * parse.y (do_id): Don't call do_identifier if we got a baselink.
6328         * class.c (instantiate_type, case TREE_LIST): Recurse.
6330         * decl.c (grokdeclarator): Allow a boolean constant for array
6331         bounds, odd as that sounds.
6333         * pt.c (unify): Be more strict about non-type parms, except for
6334         array bounds.
6335         (UNIFY_ALLOW_INTEGER): New macro.
6337 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
6339         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
6341 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
6343         * semantics.c (begin_class_definition): Call
6344         maybe_process_partial_specialization before push_template_decl.
6345         Don't call push_template_decl for a specialization.
6346         * search.c (lookup_field): Do return a member template class.
6347         * decl2.c (handle_class_head): Handle member template classes.
6349         * decl.c (grokdeclarator): A parm type need not be complete.
6351         * pt.c (convert_nontype_argument): Fix thinko.
6353 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
6355         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
6356         (global_delete_fndecl): New variable.
6357         * decl.c (global_delete_fndecl): Define it.
6358         (init_decl_processing): Set it.
6359         * init.c (build_builtin_delete_call): Use it.
6360         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
6361         nodes.
6363 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
6365         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
6366         type.
6368         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
6369         * call.c (build_object_call): Also support references to functions.
6370         * typeck.c (convert_for_initialization): Don't decay a function
6371         if the target is a reference to function.
6373         * search.c (add_conversions): Get all the overloads from a class.
6375         * decl.c (grok_ctor_properties): Complain about any constructor
6376         that will take a single arg of the class type by value.
6378         * typeck2.c (build_functional_cast): Can't create objects of
6379         abstract classes this way.
6380         * cvt.c (ocp_convert): Likewise.
6382         * decl.c (grokfndecl): Member functions of local classes are not
6383         public.
6385 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
6387         * Make-lang.in (cc1plus): Add dependency on hash.o.
6389 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
6391         * search.c (get_abstract_virtuals): Complain about virtuals with
6392         no final overrider.
6393         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
6394         with no final overrider.
6395         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
6396         on virtuals with no final overrider.
6398         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
6400         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
6401         after layout_type.
6403         * friend.c (do_friend): Don't set_mangled_name_for_decl.
6405         * class.c (finish_struct_anon): Complain about non-fields.
6406         * decl2.c (build_anon_union_vars): Likewise.
6408         * decl.c (grokdeclarator): Normal data members can't have the same
6409         name as the class, either.
6410         * class.c (finish_struct_anon): Neither can members of an
6411         anonymous union.
6413 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
6415         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
6416         (TYPE_BINFO): Likewise.
6417         (IS_AGGR_TYPE): Tweak.
6418         (SET_IS_AGGR_TYPE): New macro.
6419         (CLASS_TYPE_P): Tweak.
6420         (lang_type): Group mark bitfields together.  Remove linenum.
6421         (CLASSTYPE_SOURCE_LINE): Remove macro.
6422         (CLASSTYPE_MARKED_N): New macro.
6423         (SET_CLASSTYPE_MARKED_N): Likewise.
6424         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
6425         (CLASS_TYPE_MARKED_*): Use them.
6426         (SET_CLASSTYPE_MARKED_*): Likewise.
6427         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
6428         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
6429         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
6430         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
6431         * class.c (class_cache_obstack): New variable.
6432         (class_cache_firstobj): Likewise.
6433         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
6434         (pushclass): Free the cache, when appropriate.
6435         (popclass): Tidy.
6436         (maybe_push_cache_obstack): Use class_cache_obstack.
6437         * decl.c (include hash.h).
6438         (typename_hash): New function.
6439         (typename_compare): Likewise.
6440         (build_typename_type): Check the hash table to avoid creating
6441         duplicates.
6442         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
6443         (grokdeclarator): Use CLASS_TYPE_P.
6444         (xref_basetypes): Likewise.
6445         (start_function): Likewise.  Don't put current_class_ref on the
6446         permanent obstack.
6447         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
6448         and TYPE_TI_ARGS.
6449         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
6450         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
6451         fields for types other than class types.  Do clear TYPE_ALIAS_SET
6452         for types other than class types, though.
6453         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
6454         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6455         * pt.c (process_template_parm): Don't set
6456         CLASSTYPE_GOT_SEMICOLON.
6457         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6458         Coerce arguments on the momentary obstack.
6459         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6460         (instantiate_class_template): Calculate template arguments on the
6461         momentary obstack.  Tidy.
6462         (tsubst_template_arg_vector): Use make_temp_vec.
6463         (tsubst_aggr_type): Put template arguments on the momentary
6464         obstack.
6465         (tsubst_decl): Likewise.
6466         (tsubst): Copy the array bounds index to the permanent obstack
6467         before building index types.  Use new macros.
6468         (unify): Use new macros.
6469         (do_type_instantiation): Likewise.
6470         * search.c (lookup_fnfields_1): Use new macros.
6471         (dfs_pushdecls): Build envelopes on the cache obstack.
6472         (dfs_compress_decls): Use new macros.
6473         (push_class_decls): Build on the cache obstack.
6474         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
6475         * sign.c (build_signature_pointer_or_reference_type): Use
6476         SET_IS_AGGR_TYPE.
6477         * tree.c (make_binfo): Check CLASS_TYPE_P.
6478         (copy_template_template_parm): Adjust.
6479         (make_temp_vec): Use push_expression_obstack.
6480         * typeck.c (complete_type): Use new macros.
6481         (comptypes): Likewise.
6483 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
6485         * pt.c (tsubst): Add diagnostics for invalid array, reference
6486         and pointer to member types.
6488 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
6490         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
6492         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
6493         Simplify.
6495         * parse.y (structsp): Fix cut-and-paste error.
6497         * init.c (build_new): Complain about non-integral size.
6499         * parse.y (unary_expr): Complain about defining types in sizeof.
6501         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
6503         * rtti.c (build_x_typeid): Complain about typeid without
6504         including <typeinfo>.
6505         (get_typeid): Likewise.  Complain about typeid of incomplete type.
6506         (get_tinfo_fn_dynamic): Likewise.
6507         (get_typeid_1): Not static anymore.
6508         * except.c (build_eh_type_type): Use get_typeid_1.
6510         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
6511         ambiguous or private bases.  Fix warning for reference cast.
6513 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
6515         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
6516         * decl.c (duplicate_decls): Remove special-case code to deal with
6517         template friends, and just do the obvious thing.
6518         * pt.c (register_specialization): Tweak for clarity, and also to
6519         clear DECL_INITIAL for an instantiation before it is merged with a
6520         specialization.
6521         (check_explicit_specialization): Fix indentation.
6522         (tsubst_friend_function): Handle both definitions in friend
6523         declaration and outside friend declarations.
6524         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
6525         (regenerate_decl_from_template): Tweak accordingly.
6526         (instantiate_decl): Likewise.
6528 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
6530         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
6531         member function reference to error.
6532         * cvt.c (ocp_convert): Complain about converting an overloaded
6533         function to void.
6535         * init.c (build_offset_ref): Just return a lone static member
6536         function.
6538         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
6539         not internal ones.
6541         * typeck.c (build_binary_op_nodefault): Improve error handling.
6543         * decl.c (grokfndecl): Complain about making 'main' a template.
6545         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
6547         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
6548         TYPE_DECL in a template.
6550 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
6552         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
6554         * decl.c (struct cp_function): Add named_label_uses.
6555         (push_cp_function_context): Save it.
6556         (pop_cp_function_context): Restore it.
6557         (define_label): Also complain about jumping into the scope of
6558         non-POD objects that don't have constructors.
6559         * tree.c (pod_type_p): New fn.
6561         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
6562         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
6563         (get_tinfo_fn): Not here.
6564         * repo.c (repo_get_id): Abort if we get called for an incomplete
6565         type.
6567 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
6569         * except.c (expand_throw): Make sure first argument to
6570         __cp_push_exception is of type `void*' to avoid spurious error
6571         messages.
6573 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
6575         * pt.c (try_one_overload): Take orig_targs again.  Only check for
6576         mismatches against them; we don't care what a previous call found.
6577         (resolve_overloaded_unification): Adjust.
6579         * search.c (lookup_field): Don't return anything for a non-type
6580         field from a dependent type.
6581         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
6582         in an array declarator.
6583         (start_decl): Push into the class before looking for the field.
6585 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
6587         * method.c (build_overload_value): Handle REFERENCE_TYPE.
6589 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6591         * decl.c (grokdeclarator): Allow namespace-scoped members if they
6592         are friends.
6594 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
6596         * pt.c (tsubst_decl): Don't mess with the global value of an
6597         un-mangled DECL_ASSEMBLER_NAME.
6599 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
6601         * decl.c (init_decl_processing): Remove CYGWIN conditional
6602         since CYGWIN is now able to deal with trapping signals.
6604 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6606         * cp-tree.h: Don't include gansidecl.h.
6607         * exception.cc: Include gansidecl.h (since we don't include config.h)
6608         * g++spec.c: Don't include gansidecl.h.
6610 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
6612         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
6613         size of dummy.
6614         (DECL_DEFINED_IN_CLASS_P): New macro.
6615         (TEMPLATE_PARMS_FOR_INLINE): Document.
6616         (check_static_variable_definition): New function.
6617         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
6618         appropriate.
6619         (check_static_variable_definition): Split out from ...
6620         (grokdeclarator): Here.
6621         * pt.c (check_default_tmpl_args): New function, split out from ...
6622         (push_template_decl_real): Here.
6623         (instantiate_template): Fix comment.
6625 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
6627         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
6628         (CP_TYPE_VOLATILE_P): Likewise.
6629         (CP_TYPE_RESTRICT_P): Likewise.
6631 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
6633         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
6635 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
6637         * class.c (instantiate_type): Be more helpful.
6639         * decl2.c (import_export_decl): Call import_export_class.
6641         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
6642         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
6643         * pt.c (tsubst_copy): Likewise.
6645 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
6647         * init.c (expand_vec_init): Fix off-by-one error.
6649 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
6651         * parse.y (apparent_template_type): New type.
6652         (named_complex_class_head_sans_basetype): Use it.
6653         * Makefile.in (CONFLICTS): One new conflict.
6654         * parse.c: Regenerated.
6656 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
6658         * cp-tree.h (COMPARE_STRICT): New macro.
6659         (COMPARE_BASE): Likewise.
6660         (COMPARE_RELAXED): Likewise.
6661         (COMPARE_REDECLARATION): Likewise.
6662         (same_type_p): Likewise.
6663         (same_or_base_type_p): Likewise.
6664         * call.c (standard_conversion): Use them, in place of comptypes
6665         with numeric arguments.
6666         (reference_binding): Likewise.
6667         (convert_like): Likewise.
6668         (build_over_call): Likewise.
6669         (is_subseq): Likewise.
6670         (is_properly_derived_from): Likewise.
6671         (compare_ics): Likewise.
6672         (joust): Likewise.
6673         * class.c (delete_duplicate_fields_1): Likewise.
6674         (resolves_to_fixed_type_p): Likewise.
6675         (instantiate_type): Likewise.  Remove #if 0'd code.
6676         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
6677         (pushdecl): Likewise.
6678         (lookup_name_real): Likewise.
6679         (grokdeclarator): Likewise.  Check for illegal array declarations.
6680         (grokparms): Likewise.
6681         (grok_op_properties): Likewise.
6682         * decl2.c (check_classfn): Likewise.
6683         * friend.c (is_friend): Likewise.
6684         (make_friend_class): Likewise.
6685         * init.c (expand_aggr_init): Likewise.
6686         (expand_vec_init): Likewise.
6687         * pt.c (is_member_template_class): Remove declaration.
6688         (is_specialization_of): Use COMPARE_* and new macros.
6689         (comp_template_parms): Likewise.
6690         (convert_nontype_argument): Likewise.
6691         (coerce_template_template_parms): Likewise.
6692         (template_args_equal): Likewise.
6693         (lookup_template_class): Likewise.
6694         (type_unification_real): Likewise.
6695         (unify): Likewise.
6696         (get_bindings_real): Likewise.
6697         * search.c (covariant_return_p): Likewise.
6698         (get_matching_virtual): Likewise.
6699         * sig.c (match_method_types): Likewise.
6700         * tree.c (vec_binfo_member): Likewise.
6701         (cp_tree_equal): Likewise.
6702         * typeck.c (common_type): Likewise.
6703         (comp_array_types): Likewise.  Get issues involving unknown array
6704         bounds right.
6705         (comptypes): Update comments.  Use new flags.
6706         (comp_target_types): Use new macros.
6707         (compparms): Likewise.
6708         (comp_target_parms): Likewise.
6709         (string_conv_p): Likewise.
6710         (build_component_ref): Likewise.
6711         (build_indirect_ref): Likewise.
6712         (build_conditional_expr): Likewise.
6713         (build_static_cast): Likewise.
6714         (build_reinterpret_cast): Likewise.
6715         (build_const_cast): Likewise.
6716         (build_modify_expr): Likewise.
6717         (convert_for_assignment): Likewise.
6718         (comp_ptr_ttypes_real): Likewise.
6719         (ptr_reasonably_similar): Likewise.
6720         (comp_ptr_ttypes_const): Likewise.
6722 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
6724         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
6726 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
6728         * decl2.c (delete_sanity): Pass integer_zero_node, not
6729         integer_two_node, to build_vec_delete.
6730         * init.c (build_array_eh_cleanup): Remove.
6731         (expand_vec_init_try_block): New function.
6732         (expand_vec_init_catch_clause): Likewise.
6733         (build_vec_delete_1): Don't deal with case that auto_delete_vec
6734         might be integer_two_node anymore.
6735         (expand_vec_init): Rework for initialization-correctness and
6736         exception-correctness.
6737         * typeck2.c (process_init_constructor): Make mutual exclusivity
6738         of cases more obvious.
6740 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
6742         * decl.c (lookup_name_real): OK, only warn if not lexing.
6743         Simplify suggested fix.
6745         * cp-tree.h (IDENTIFIER_MARKED): New macro.
6746         * search.c (lookup_conversions): Use breadth_first_search.
6747         (add_conversions): Avoid adding two conversions to the same type.
6748         (breadth_first_search): Work with base binfos, rather
6749         than binfos and base indices.
6750         (get_virtual_destructor): Adjust.
6751         (tree_has_any_destructor_p): Adjust.
6752         (get_matching_virtual): Adjust.
6754         * pt.c (push_template_decl_real): Generalize check for incorrect
6755         number of template parms.
6756         (is_member_template_class): #if 0.
6758 1998-10-29  Richard Henderson  <rth@cygnus.com>
6760         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
6761         last.
6763 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6765         * lex.c: Call check_newline from lang_init always.  After
6766         calling cpp_start_read, set yy_cur and yy_lim to read from the
6767         cpplib token buffer.
6769 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
6771         * class.c (instantiate_type): Don't consider templates for a normal
6772         match.
6774         * class.c (finish_struct_1): Don't complain about non-copy
6775         assignment ops in union members.
6777         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
6778         (prepare_fresh_vtable): Likewise.
6779         (finish_struct_1): Don't call import_export_class.
6780         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
6781         (finish_prevtable_vardecl): Lose.
6782         (finish_file): Don't call it.
6783         * pt.c (instantiate_class_template): Likewise.
6784         * cp-tree.h: Remove it.
6786         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
6787         * decl.c (finish_function): Not here.
6788         (start_function): Do set DECL_INITIAL.
6790         * pt.c (push_template_decl_real): Complain about default template
6791         args for enclosing classes.
6793         * call.c (add_function_candidate): Treat conversion functions
6794         as coming from the argument's class.
6795         * cp-tree.h (DECL_CONV_FN_P): New fn.
6796         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
6797         * class.c (add_method): Use DECL_CONV_FN_P.
6798         * decl2.c (check_classfn): Likewise.
6799         * error.c (dump_function_name): Likewise.
6800         (dump_function_decl): Likewise.
6801         * pt.c (fn_type_unification): Likewise.
6802         * search.c (add_conversions): Likewise.
6804 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
6806         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
6807         * method.c (hack_identifier): Also check for using RESULT_DECL
6808         from outer context.
6810 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
6812         * decl.c (grokdeclarator): Use type_quals, rather than constp,
6813         consistently.
6815 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
6817         * call.c (standard_conversion): instantiate_type here.
6818         (reference_binding): And here.
6819         (implicit_conversion): Not here.
6820         (build_op_delete_call): No need to cons up an OVERLOAD.
6821         * cvt.c (cp_convert_to_pointer): instantiate_type here.
6822         (convert_to_reference): And here.
6823         * decl.c (grok_reference_init): Not here.
6824         (grokparms): Or here.
6825         * typeck2.c (digest_init): Or here.
6826         * typeck.c (decay_conversion): Take the address of overloaded
6827         functions, too.
6828         (require_instantiated_type): Lose.
6829         (convert_arguments): Don't handle unknown types here.
6830         (build_c_cast): Likewise.
6831         (build_binary_op): Gut.
6832         (build_conditional_expr): Don't require_instantiated_type.
6833         (build_modify_expr): Likewise.
6834         (build_static_cast): Don't instantiate_type.
6835         (build_reinterpret_cast): Likewise.
6836         (build_const_cast): Likewise.
6837         (convert_for_initialization): Likewise.
6838         (build_ptrmemfunc): Use type_unknown_p.
6839         (convert_for_assignment): Also do default_conversion on overloaded
6840         functions.  Hand them off to ocp_convert.
6842 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
6844         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
6845         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
6847         * class.c (finish_struct_1): Use build_cplus_array_type to build
6848         array types.
6849         * decl.c (init_decl_processing): Likewise.
6850         * except.c (expand_end_eh_spec): Likewise.
6851         * search.c (expand_upcast_fixups): Simplify very slightly.
6853 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6855         * decl.c (grokdeclarator): Complain about a variable using
6856         constructor syntax coming back null from start_decl.
6858         * friend.c (make_friend_class): Complain about trying to make
6859         a non-class type a friend.
6861         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
6862         (start_function): Not here.
6864 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
6866         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
6868 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6870         * typeck2.c (process_init_constructor): Only skip anonymous fields
6871         if they are bitfields.
6873         * cp-tree.def (TYPEOF_TYPE): New code.
6874         * error.c (dump_type_real): Handle it.
6875         * pt.c (tsubst): Likewise.
6876         * tree.c (search_tree): Likewise.
6877         * semantics.c (finish_typeof): New fn.
6878         * parse.y (typespec): Use it.
6879         * cp-tree.h: Declare it.
6881 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
6883         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
6885 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6887         * typeck.c (convert_arguments): Don't handle pmf references
6888         specially.
6890         * init.c (build_member_call): Don't try to convert to the base type
6891         if it's ambiguous or pedantic.
6893         * typeck2.c (check_for_new_type): Only depend on pedantic for
6894         C-style casts.
6896 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
6898         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
6899         non-converting constructors.
6901 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6903         * gxxint.texi: Correct documentation for n, N, Q, and B.
6905 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6907         * parse.y (condition): Convert VAR_DECL from reference to indirect
6908         reference.
6910 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
6912         * exception.cc (__cp_pop_exception): Free the original exception
6913         value, not the potentially coerced one.
6915 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
6917         * Makefile.in (hash.h): Run gperf when necessary.
6919         * cp-tree.h (CP_TYPE_READONLY): Remove.
6920         (CP_TYPE_VOLATILE): Likewise.
6921         (CP_TYPE_QUALS): New macro.
6922         (CP_TYPE_CONST_P): Likewise.
6923         (CP_TYPE_VOLATILE_P): Likewise.
6924         (CP_TYPE_RESTRICT_P): Likewise.
6925         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
6926         (cp_build_type_variant): Rename to ...
6927         (cp_build_qualified_type): New function.
6928         (c_apply_type_quals_to_decl): Declare.
6929         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
6930         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
6931         (cp_type_qual_from_rid): New function.
6932         (compparms): Remove unused parameter.  All callers changed.
6933         (cp_type_quals): New function.
6934         (at_least_as_qualified_p): Likewise.
6935         (more_qualified_p): Likewise.
6937         * call.c (standard_conversion): Replace calls to
6938         cp_build_type_variant with cp_build_qualified_type.  Use
6939         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
6940         compare them.  Use CP_TYPE_* macros to check qualifiers.
6941         (reference_binding): Likewise.
6942         (implicit_conversion): Likewise.
6943         (add_builtin_candidates): Likewise.
6944         (build_over_call): Likewise.
6945         * class.c (overrides): Compare all qualifiers, not just `const',
6946         on method declarations.
6947         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
6948         (convert_pointer_to_real): Likewise.
6949         (type_promotes_to): Likewise.
6950         * decl.c (check_for_uninitialized_const_var): New function.
6951         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
6952         (cp_finish_decl): Use check_for_uninitialized_const_var.
6953         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
6954         handle `restrict'.
6955         (grok_ctor_properties): Likewise.
6956         (grok_op_properties): Likewise.
6957         (start_function): Likewise.
6958         (rever_static_member_fn): Likewise.
6959         * decl2.c (grok_method_quals): Likewise.
6960         (grokfield): Likewise.
6961         * error.c (dump_readonly_or_volatile): Rename to ...
6962         (dump_qualifiers): New function.  Handle `restrict'.
6963         (dump_type_real): Use it.
6964         (dump_aggr_type): Likewise.
6965         (dump_type_prefix): Likewise.
6966         (dump_type_suffix): Likewise.
6967         (dump_function_decl): Likewise.
6968         (cv_as_string): Likewise.
6969         * gxx.gperf: Add __restrict and __restrict__.
6970         * gxxint.texi: Document `u' as used for `__restrict', and a few
6971         other previously undocumented codes.
6972         * hash.h: Regenerated.
6973         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
6974         (build_member_call): Likewise.
6975         (build_new_1): Likewise.
6976         * lex.c (init_parse): Add entry for RID_RESTRICT.
6977         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
6978         (cp_type_qual_from_rid): Define.
6979         * lex.h (enum rid): Add RID_RESTRICT.
6980         * method.c (process_modifiers): Deal with `restrict'.
6981         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
6982         * parse.c: Regenerated.
6983         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
6984         (tsubst_aggr_type): Likewise.
6985         (tsubst): Likewise.
6986         (check_cv_quals_for_unify): Likewise.
6987         (unify): Likewise.
6988         * rtti.c (init_rtti_processing): Likewise.
6989         (build_headof): Likewise.
6990         (get_tinfo_var): Likewise.
6991         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
6992         (expand_class_desc): Likewise.
6993         (expand_attr_desc): Likewise.
6994         (synthesize_tinfo_fn): Likewise.
6995         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
6996         (get_matching_virtual): Likewise.
6997         (expand_upcast_fixups): Likewise.
6998         * sig.c (build_signature_pointer_or_reference_name): Take
6999         type_quals, not constp and volatilep.
7000         (build_signature_pointer_or_reference_type): Likewise.
7001         (match_method_types): More CP_TYPE_QUALS conversion, etc.
7002         (build_signature_pointer_constructor): Likewise.
7003         (build_signature_method_call): Likewise.
7004         * tree.c (build_cplus_array_type): Likewise.
7005         (cp_build_type_variant): Rename to ...
7006         (cp_build_qualified_type): New function.  Deal with `__restrict'.
7007         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
7008         (build_exception_variant): Likewise.
7009         (mapcar): Likewise.
7010         * typeck.c (qualif_type): Likewise.
7011         (common_type): Likewise.
7012         (comptypes): Likewise.
7013         (comp_cv_target_types): Likewise.
7014         (at_least_as_qualified_p): Define.
7015         (more_qualified_p): Likewise.
7016         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
7017         (compparms): Likewise.
7018         (inline_conversion): Likewise.
7019         (string_conv_p): Likewise.
7020         (build_component_ref): Likewise.
7021         (build_indirect_ref): Likewise.
7022         (build_array_ref): Likewise.
7023         (build_unary_op): Likewise.
7024         (build_conditional_expr): Likewise.
7025         (build_static_cast): Likewise.
7026         (build_c_cast): Likewise.
7027         (build_modify_expr): Likewise.
7028         (convert_For_assignment): Likewise.
7029         (comp_ptr_ttypes_real): Likewise.
7030         (cp_type_quals): New function.
7032 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
7034         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
7035         (CP_TYPE_VOLATILE): Likewise.
7036         * decl.c (grokdeclarator): Use them.
7037         * tree.c (canonical_type_variant): Likewise.
7039 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7041         * parse.y (named_class_head): Push into class while parsing the
7042         base class list.
7043         * decl2.c (push_scope, pop_scope): New functions.
7044         * cp-tree.h: Declare them.
7045         * init.c (build_new_1): Delay cleanup until end of full expression.
7047 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
7049         * typeck.c (build_component_ref): Use of a type here is an error.
7051 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
7053         Revamp references to member functions.
7054         * method.c (hack_identifier): Call build_component_ref for a
7055         reference to a member function.
7056         * typeck.c (build_component_ref): Only return a single function
7057         if it's static.  Otherwise, return a COMPONENT_REF.
7058         (build_x_function_call): Handle a COMPONENT_REF.
7059         (build_unary_op): Handle all unknown-type things.
7060         * decl2.c (arg_assoc): Handle COMPONENT_REF.
7061         * class.c (instantiate_type): Complain if the function we get is a
7062         nonstatic member function.  Remove code for finding "compatible"
7063         functions.
7064         * pt.c (tsubst_copy): Handle NOP_EXPR.
7065         * tree.c (build_dummy_object): New fn.
7066         (maybe_dummy_object): New fn.
7067         (is_dummy_object): New fn.
7068         * cp-tree.h: Declare them.
7069         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
7070         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
7071         * init.c (build_member_call): Use maybe_dummy_object and
7072         is_dummy_object.
7073         (build_offset_ref): Use maybe_dummy_object.
7074         (resolve_offset_ref): Use is_dummy_object.
7075         * typeck.c (build_x_function_call): Call build_dummy_object.
7076         (unary_complex_lvalue): Call is_dummy_object.
7078         * typeck.c (build_component_addr): Make sure field is a field.
7080         * call.c (build_new_op): Delete obsolete code.
7082         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
7084 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7086         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
7087         std if std is ignored.
7089 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
7091         * decl.c (grokvardecl): Fix thinko.
7093         * decl.c (grokdeclarator): Embedded attrs bind to the right,
7094         not the left.
7096         * parse.y (fn.def2): Fix 'attrs' format.
7098 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
7100         * Makefile.in (CONFLICTS): Update.
7101         * parse.y (expr_or_declarator_intern): New rule.
7102         (expr_or_declarator, direct_notype_declarator, primary,
7103         functional_cast): Use it.
7104         (notype_declarator_intern): New rule.
7105         (notype_declarator, complex_notype_declarator): Use it.
7107 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
7109         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
7110         (grokvardecl): Likewise.
7112 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7114         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
7115         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
7117         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
7119         * pt.c (process_partial_specialization): Cast 1st argument of
7120         `bzero' to (PTR).
7122         * tree.c (build_base_fields): Cast `base_align' to (int) when
7123         comparing against one.
7125 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
7127         * decl.c (lookup_name_real): Handle template parameters for member
7128         templates where said parameters have the same name as the
7129         surrounding class.
7131         * decl.c (expand_static_init): Build cleanups before entering the
7132         anonymous function used to do them to avoid access-checking
7133         confusion.
7135         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
7136         accidentally removed by previous change, and make DECL_RTL here.
7137         * class.c (add_method): Don't make DECL_RTL here.
7139         * pt.c (for_each_template_parm): Don't examine uninstantiated
7140         default arguments.
7142 1998-10-16  Dave Brolley  <brolley@cygnus.com>
7144         * lex.c (real_yylex): Fix unaligned access of wchar_t.
7146 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
7148         * class.c (add_method): Fix documentation to reflect previous
7149         changes.  Check for duplicate method declarations here.
7150         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
7151         correctly; such things never match.
7152         (grokfndecl): Don't look for duplicate methods here.
7153         * decl2.c (check_classfn): Don't assume names are mangled.
7154         Don't add bogus member function declarations to a class before the
7155         class type is complete.
7156         (grokfield): Reformat error message.
7157         * method.c (set_mangled_name_for_decl): Don't mangle names while
7158         processing_template_decl.
7160 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
7162         * typeck.c (build_indirect_ref): Complain about a pointer to data
7163         member, too.
7164         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
7165         data member.
7166         * init.c (resolve_offset_ref): Don't undo the above.
7168         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
7169         (struct lang_decl_flags): Add `bitfield'.
7170         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
7171         DECL_BIT_FIELD.
7172         * decl2.c (grokbitfield, grok_alignof): Likewise.
7173         * init.c (build_offset_ref): Likewise.
7174         * typeck.c (build_component_addr, expr_sizeof): Likewise.
7175         * cvt.c (build_up_reference): Don't crash if taking the address
7176         returns error_mark_node.
7178         * decl.c (grokfndecl): Also check ctype when checking for ::main().
7180 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
7182         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
7183         Do mangling here.
7184         (grokdeclarator): Instead of here.
7185         * friend.c (do_friend): Lose special handling of ::main and
7186         __builtin_*.
7187         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
7189         * spew.c (yylex): Clear looking_for_typename if we got
7190         'enum { ... };'.
7192 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
7194         * class.c (maybe_warn_about_overly_private_class): Improve error
7195         messages for class with only private constructors.
7197         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
7198         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
7199         (build_typename_type): New function.
7200         * decl.c (build_typename_type): Broken out from ...
7201         (make_typename_type): Use it.
7202         * search.c (lookup_field): Likewise.
7204 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
7206         * pt.c (convert_nontype_argument): Check against type_referred_to.
7207         * decl.c (grokvardecl): Check for declarator name before building
7208         DECL_ASSEMBLER_NAME.
7210 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
7212         * pt.c (lookup_template_class): Add comment.
7213         (instantiate_class_template): Don't mark the _TYPE node for
7214         member class templates as an instantiation.
7216 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
7218         * decl.c (grokfndecl): Fix my thinko.
7220 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
7222         * tinfo2.cc (fast_compare): Remove.
7223         (before): Just use strcmp.
7224         * tinfo.cc (operator==): Just use strcmp.
7226 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
7228         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
7229         declarations.
7231 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
7233         * cp-tree.h (specializations_of_same_template_p): Remove.
7234         * search.c (get_template_base): Don't use it.
7235         (get_template_base_recursive): Likewise.
7236         * pt.c (specializations_of_same_template_p): Remove.
7237         (unify): Don't use it.
7238         (lookup_template_class): Find the correct parent when setting
7239         CLASSTYPE_TI_TEMPLATE.
7241 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
7243         * tinfo.cc (operator==): Always compare names.
7245 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
7247         * decl.c (start_function): Fix cut-and-paste error.
7249 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
7251         * inc/typeinfo: Add #pragma interface.
7252         (operator!=): Just call operator==.
7253         * tinfo.cc: Add #pragma implementation.
7254         (operator==): Move from inc/typeinfo and tinfo2.cc.
7255         Check __COMMON_UNRELIABLE instead of _WIN32.
7257         * typeck2.c (my_friendly_abort): Add URL.
7259 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
7261         * decl.c (start_method): Added extra parameter for attributes.
7262         * cp-tree.h (start_method): Update prototype.
7263         * parse.y (fn.def2): Update start_method parameter list.
7265 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
7267         * cp-tree.h (specializations_of_same_template_p): Declare.
7268         * pt.c (specializations_of_same_template_p): New function.
7269         (unify): Use it.
7270         * search.c (get_template_base): Use it.
7271         (get_template_base_recursive): Likewise.
7273 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
7275         * decl2.c (start_objects): Add new variable `joiner' and
7276         initialize it properly.
7278 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
7280         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
7281         change to vtable types.
7283         * cvt.c (ocp_convert): Avoid infinite recursion caused by
7284         1998-10-03 change.
7286 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
7288         * pt.c (resolve_overloaded_unification): New fn.
7289         (try_one_overload): Likewise.
7290         (unify): Don't fail on unknown type.
7291         (type_unification_real): Likewise.  Use resolve_overloaded_unification
7292         to handle an overloaded argument.
7293         (template_args_equal): Split out...
7294         (comp_template_args): From here.
7295         (determine_specialization): Also allow a template with more
7296         parms than were explicitly specified.
7297         * cp-tree.h: Add template_args_equal.
7298         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
7300 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
7302         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
7303         change.
7305 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
7307         * typeck.c (unsigned_type): Only return TItype nodes when
7308         HOST_BITS_PER_WIDE_INT is >= 64 bits.
7309         (signed_type): Likewise.
7310         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
7311         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
7312         (init_decl_processing): Only create TItype nodes when
7313         HOST_BITS_PER_WIDE_INT is >= 64 bits.
7314         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
7315         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
7317 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7319         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
7320         (gxx.gperf): Update comments describing invocation flags.
7321         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
7323 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
7325         * class.c (finish_struct_1): Add commentary on previous change.
7327         * cp-tree.h (vtbl_ptr_type_node): New variable.
7328         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
7329         already of the right type.
7330         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
7331         Simplify code to grow vtable.
7332         * decl.c (vtbl_ptr_type_node): Define.
7333         (init_decl_processing): Initialize it.
7335 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
7337         * cp-tree.def (PTRMEM_CST): New tree node.
7338         * cp-tree.h (ptrmem_cst): New type.
7339         (lang_type): Remove local_typedecls.
7340         (dummy): Increase to 12 bits from 11.
7341         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
7342         (PTRMEM_CST_CLASS): New macro.
7343         (PTRMEM_CST_MEMBER): Likewise.
7344         (current_access_specifier): New variable.
7345         (current_class_type): Remove duplicate declaration.
7346         (finish_struct): Change prototype.
7347         (unreverse_member_declarations): New function.
7348         (pushdecl_class_level): Change prototype.
7349         (grok_enum_decls): Remove.
7350         (fixup_anonymous_union): New function.
7351         (grok_x_components): Change prototype.
7352         (tsubst_chain): Remove.
7353         (finish_member_template_decl): Likewise.
7354         (check_explicit_specialization): Fix indentation.
7355         (finish_class_definition): Change prototype.
7356         (finish_member_class_template): Likewise.
7357         (finish_member_declaration): New function.
7358         (check_multiple_declarators): Likewise.
7359         * class.c (class_stack_node_t): New type.
7360         (current_class_base): Remove.
7361         (current_class_stack): Change type.
7362         (current_access_specifier): New variable.
7363         (grow_method): Remove.
7364         (check_member_decl_is_same_in_complete_scope): Break out from
7365         finish_struct.
7366         (make_method_vec): New function.
7367         (free_method_vec): Likewise.
7368         (add_implicitly_declared_members): Break out from finish_struct_1.
7369         (free_method_vecs): New variable.
7370         (add_method): Rework for direct use from parser.
7371         (handle_using_decl): Watch for NULL_TREE while iterating through
7372         CLASSTYPE_METHOD_VEC.
7373         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
7374         just do some error-checking.
7375         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
7376         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
7377         (finish_struct): Change prototype.  Simplify; fields and methods
7378         are already set up at this point.
7379         (init_class_processing): Set up current_class_stack.
7380         (pushclass): Save current_access_specifier.
7381         (popclass): Restore it.
7382         (currently_open_class): Simplify.
7383         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
7384         * decl.c (saved_scope): Add access_specifier.
7385         (maybe_push_to_top_level): Save it.
7386         (pop_from_top_level): Restore it.
7387         (maybe_process_template_type_declaration): Use
7388         finish_member_declaration.
7389         (pushtag): Likewise.
7390         (pushdecl_class_level): Don't return a value.
7391         (fixup_anonymous_union): Break out from grok_x_components.
7392         (shadow_tag): Use it.
7393         (xref_tag): Complain about using an elaborated type specifier to
7394         reference a template type parameter or typedef name.
7395         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
7396         (current_local_enum): Remove.
7397         (build_enumerator): Call finish_member_declaration.
7398         (grok_enum_decls): Remove.
7399         * decl2.c (grok_x_components): Simplify.
7400         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
7401         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
7402         (merge_functions): Add to comment.
7403         (arg_assoc_type): Prototype.
7404         (arg_assoc): Pass as many arguments as there are parameters.
7405         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
7406         OFFSET_REF.
7407         * expr.c (cpls_expand_expr): Remove dead code.  Handle
7408         PTRMEM_CST.
7409         * friend.c (do_friend): Lookup friends when in nested classes.
7410         Change comments.
7411         * init.c (build_offset_ref): Do lookup even for classes that are
7412         only partially defined.
7413         (decl_constant_value): Remove dead code.
7414         * method.c (build_overload_value): Remove hack where by TYPE was
7415         not a TYPE.  Handle PTRMEM_CST.
7416         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
7417         should go.
7418         * parse.y (components, notype_components, component_decl,
7419         component_decl_1, component_declarator, component_declarator0):
7420         Now all are itype rather than ttype.  Rework to add members to
7421         classes on the fly.
7422         (typesqpecqual_reserved): Use check_multiple_declarators.
7423         (structsp): Update class to finish_class_definition.
7424         (do_xref_defn): Unsplit into named_class_head.
7425         (access_specifier): Set current_access_specifier.
7426         * pt.c (set_current_access_from_decl): New function.
7427         (finish_member_template_decl): Don't take the parameters.
7428         (comp_template_args): Make more robust.
7429         (lookup_template_class): Don't use current_local_enum.
7430         (for_each_template_parm): Handle PTRMEM_CST.
7431         (instantiate_class_template): Use set_current_access_from_decl,
7432         finish_member_declaration and unreverse_member_declarations.  Set
7433         lineno/input_filename before generating implicit member functions.
7434         (type_unification_real): Don't assume back-unification happens
7435         only for the last argument.
7436         (regenerate_decl_from_template): Call pushclass a bit earlier.
7437         (tsubst_chain): Remove.
7438         (tsubst_enum): Use set_current_access_from_decl.
7439         (set_mangled_name_for_template_decl): Fix indentation.
7440         * search.c (lookup_fnfields_1): Change iteration through
7441         CLASSTYPE_METHOD_VEC.
7442         (dfs_pushdecls): Likewise.
7443         (dfs_compress_decls): Likewise.
7444         (add_conversions): Likewise.
7445         * semantics.c (finish_class_definition): Don't take components.
7446         Change call to finish_struct.
7447         (finish_member_declaration): New function.
7448         (finish_member_class_template): Don't take template parameters.
7449         Change call to grok_x_components.  Call finish_member_template_decl.
7450         (check_multiple_declarators): New function.
7451         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
7452         a passed in fieldlist.
7453         * tree.c (search_tree): Handle PTRMEM_CST.
7454         (mapcar): Likewise.
7455         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
7456         INTEGER_CSTs, for pointer-to-data members.
7458         * call.c (resolve_args): Resolve template specializations, if
7459         possible.
7461 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7463         * Makefile.in (spew.o): Depend on toplev.h.
7465         * call.c (compare_ics): Initialize variables `deref_from_type2',
7466         `deref_to_type1' and `deref_to_type2'.
7468         * except.c (get_eh_type): Hide prototype and definition.
7469         (process_start_catch_block_old): Remove unused static prototype.
7471         * pt.c (tsubst_decl): Initialize variable `argvec'.
7473         * spew.c: Include toplev.h.
7475 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
7477         * pt.c (instantiate_decl): Do save and restore file position.
7479 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7481         * method.c (build_decl_overload_real): Clear
7482         numeric_output_need_bar after __.
7484 1998-10-05  Nathan Sidwell  <nathan@acm.org>
7486         * call.c (build_new_method_call): Issue 'incomplete type' error,
7487         if class is not defined.
7489 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7491         * call.c (build_object_call): Move declaration of variable
7492         `fn' into the scope where it is used.  Don't access variable
7493         `fn' when it is uninitialized, instead use `fns'.
7495 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
7497         * errfn.c (cp_thing): Print buf as a string not as a printf format
7498         to avoid problems with the operator%.  Consequently, `%%' sequences
7499         in format are copied as `%' in buf.
7501 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
7503         * pt.c (pop_tinst_level): Call extract_interface_info.
7504         (instantiate_decl): Don't save and restore file position.
7506         * decl.c (cp_finish_decl): Make statics in extern inlines and
7507         templates common, if possible and the target doesn't support weak
7508         symbols.
7510         * decl.c (grokdeclarator): Remove redundant calls to
7511         build_type_variant and some duplicated code.
7512         * sig.c (build_signature_reference_type): Only take the type parm.
7513         (build_signature_pointer_type): Likewise.
7514         * tree.c (build_cplus_method_type): Adjust.
7515         * cp-tree.h: Update.
7517 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
7519         * call.c (build_over_call): Make pedwarns about dropped qualifiers
7520         into full-fledged errors.
7521         * cvt.c (convert_to_reference): Likewise.
7522         * typeck.c (convert_for_assignment): Likewise.
7524         * search.c (expand_upcast_vtables): In addition to unsetting
7525         TREE_READONLY, remove top-level const type qualifier.
7527 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
7529         * class.c (current_class_ptr, current_class_ref): Clarify
7530         documentation.
7531         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
7532         NOP type conversions.
7533         * decl.c (decls_match): Use comptypes directly; ignore
7534         qualifiers on the DECL.
7535         (duplicate_decls): Remove qualifier checks on DECL.
7536         (grokdeclarator): Make the type built up include top-level
7537         qualifiers.
7538         * decl2.c (do_dtors): Fix spelling error.
7539         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
7540         when printing type information.
7541         * init.c (build_new_1): Add documentation.  Deal with the fact
7542         that type of allocated memory now contains qualifiers.
7543         * lex.c (is_global): Improve error-recovery.
7544         * sig.c (build_member_function_pointer): Don't cast away const
7545         on fields of sigtable_entry_type.
7546         * tree.c (lvalue_type): Don't look at top-level qualifiers on
7547         expressions.
7548         * typeck.c (decay_conversion): Likewise.
7549         (build_component_ref): Make sure the type of the COMPONENT_REF
7550         contains top-level qualifiers, as appropriate.  Improve
7551         error-handling.
7552         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
7553         (build_array_ref): Likewise.
7554         (build_unary_op): Improve error-recovery.
7555         (unary_complex_lvalue): Make taking the address a bound member
7556         function an error, not a sorry.
7557         (build_conditional_expr): Look at the type qualifiers, not the
7558         qualifiers on the expression itself.
7560 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
7562         * decl2.c (merge_functions): Remove duplicates.
7564         * decl2.c: Add -f{no-,}implicit-inline-templates.
7565         (import_export_decl): Check it.
7567         * decl.c (lookup_name_real): Template parms also take precedence
7568         over implicit typename.  Only warn if yylex.
7570         * typeck.c (build_conditional_expr): Only fold if ifexp is an
7571         INTEGER_CST.
7573         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
7574         instead of linkage.
7576 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
7578         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
7579         * class.c (build_vbase_pointer): Use it.
7580         * rtti.c (expand_class_desc): Likewise.
7581         * tree.c (build_vbase_pointer_fields): Likewise.
7583 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
7585         * decl.c (start_decl): Add invocation of
7586         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
7587         (start_function): Add invocation of
7588         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
7590         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
7591         HANDLE_GENERIC_PRAGMAS.
7593 1998-09-28  Anthony Green  <green@cygnus.com>
7595         * semantics.c (finish_asm_stmt): Always permit volatile asms.
7597 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
7599         * decl.c (grokdeclarator): Tighten checks for invalid
7600         destructors.  Improve error-messages and error-recovery.
7601         * decl2.c (check_classfn): Don't assume that mangled destructor
7602         names contain type information.
7604 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
7606         * search.c (get_base_distance): Remove assert.
7608         * decl2.c (build_anon_union_vars): Don't process a field with no
7609         name.
7610         (finish_anon_union): Also complain about local anon unions with no
7611         members.
7613 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7615         * decl.c (lookup_namespace_name): If the name is a namespace,
7616         return it immediately.
7618 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7620         * cp-tree.h (define_case_label): Remove unused parameter.
7621         (check_java_method): Likewise.
7622         (grokclassfn): Likewise.
7623         (expand_aggr_init): Likewise.
7624         (build_x_delete): Likewise.
7625         (maybe_end_member_template_processing): Likewise.
7626         (unshare_base_binfos): Add prototype.
7627         (string_conv_p): Likewise.
7628         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
7630         * cvt.c (build_up_reference): Remove unused parameter
7631         `checkconst', all callers changed.
7632         (build_type_conversion): Mark parameter `code' with
7633         ATTRIBUTE_UNUSED.
7634         (build_expr_type_conversion): Initialize variable `conv'.
7636         * decl.c (push_namespace): Initialize variable `d'.
7637         (define_case_label): Remove unused parameter `decl', all callers
7638         changed.
7640         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
7641         `argc' with ATTRIBUTE_UNUSED.
7642         (grokclassfn): Remove unused parameter `cname', all callers
7643         changed.
7644         (check_java_method): Likewise for parameter `ctype'.
7645         (copy_assignment_arg_p): Mark parameter `virtualp' with
7646         ATTRIBUTE_UNUSED.
7647         (finish_prevtable_vardecl): Likewise for parameter `prev'.
7649         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
7651         * init.c (expand_aggr_init_1): Remove unused parameter
7652         `alias_this', all callers changed.
7653         (expand_aggr_init): Likewise.
7654         (expand_default_init): Likewise.
7655         (build_new_1): Initialize variable `susp'.
7656         (build_x_delete): Remove unused parameter `type', all callers
7657         changed.
7659         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
7660         ATTRIBUTE_UNUSED.
7661         (readescape): Use (unsigned) value in shift.
7662         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
7663         comparing to a signed quantity.
7665         * pt.c (maybe_end_member_template_processing): Remove unused
7666         parameter `decl', all callers changed.
7667         (check_explicit_specialization): Add braces around empty body in
7668         an else-statement.
7669         (current_template_args): Initialize variable `args'.
7670         (lookup_template_class): Likewise for variable `prev_local_enum'.
7671         (tsubst_decl): Likewise for variable `r'.
7672         (set_mangled_name_for_template_decl): Initialize variable
7673         `context'.
7675         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
7676         Likewise for variable `i'.
7677         (yylex): Initialize variable `trrr'.
7679         * typeck.c (compparms): Mark variable `strict' with
7680         ATTRIBUTE_UNUSED.
7682         * xref.c (simplify_type): Cast argument of ctype function to
7683         `unsigned char'.
7685 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
7687         * cp-tree.h (language_lvalue_valid): Remove.
7688         * decl.c (grokdeclarator): Don't disallow references to functions.
7689         * tree.c (lvalue_p_1): New function, combining duplicated
7690         code from ...
7691         (lvalue_p): Use it.
7692         (real_lvalue_p): Likewise.
7693         * typeck.c (language_lvalue_valid): Remove.
7694         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
7695         they don't have TREE_READONLY set.
7696         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
7698 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7700         * spew.c (yylex): Give diagnostic.
7701         * hash.h (is_reserved_word): Add export.
7702         * gxx.gperf: Likewise.
7703         * lex.h (rid): Add RID_EXPORT.
7704         * lex.c (init_parse): Likewise.
7706 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
7708         * friend.c (do_friend): Make warning a full sentence.
7710 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
7712         * parse.y (component_decl_list): Improve error-recovery.
7714 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7716         * decl.c (make_typename_type): Move error to point where name
7717         variable can be used by dump_type.
7719 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
7721         * decl.c (grokfndecl): Improve error-recovery.
7722         * decl2.c (grokfield): Likewise.
7723         * pt.c (finish_member_template_decl): Likewise.
7725 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7727         * method.c (hack_identifier): Finding multiple members is always
7728         an error.
7730 1998-09-21  Per Bothner  <bothner@cygnus.com>
7732         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
7734 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
7736         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
7738 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
7740         * class.c (maybe_warn_about_overly_private_class): Reformat.
7742 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
7744         * exception.cc (__cplus_type_matcher): Realign some code.
7746 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
7748         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
7749         (tinfo2.o): Likewise.
7750         (exception.o): Likewise.
7751         (new.o): Likewise.
7752         (opnew.o): Likewise.
7753         (opnewnt.o): Likewise.
7754         (opvnew.o): Likewise.
7755         (opvnewnt.o): Likewise.
7756         (opdel.o): Likewise.
7757         (opdelnt.o): Likewise.
7758         (opvdel.o): Likewise.
7759         (opvdelnt.o): Likewise.
7761 1998-09-16  Richard Henderson  <rth@cygnus.com>
7763         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
7765 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
7767         * call.c (build_field_call): Handle static data members too.
7769         * typeck.c (comptypes): When comparing pointer types, check
7770         whether referred types match even in strictest modes.
7772 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
7774         * cp-tree.h: Revert previous change.
7775         (finish_struct_methods): Remove declaration.
7776         * class.c: Revert previous change.
7777         (maybe_warn_about_overly_private_class): New function.
7778         (finish_struct_methods): Declare here, and make static.  Remove
7779         unnecessary parameters.  Tidy slightly.  Use
7780         maybe_warn_about_overly_private_class.
7781         (finish_struct_1): Adjust.  Remove check for private constructors,
7782         now done elsewhere.
7783         (finish_struct): Adjust.
7785 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
7787         * except.c (expand_start_catch_block): No need to check for new
7788         exception model.
7789         (process_start_catch_block_old): Deleted.
7790         (process_start_catch_block): Add call to start_decl_1().
7791         (expand_end_catch_block): Add call to end_catch_handler().
7792         * exception.cc (__cplus_type_matcher): Only check the exception
7793         language if there is an exception table.
7795 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
7797         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
7798         as used to prevent conflicts with virtual function tables.
7800 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
7802         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
7803         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
7804         * class.c (maybe_class_too_private_p): New function.
7805         (finish_struct_methods): Use it.
7806         (finish_struct_1): Likewise.
7807         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
7808         appropriate.
7810         * pt.c (check_specialization_scope): Fix spelling error.
7811         (check_explicit_specialization): Remove code to handle explicit
7812         specializations in class scope; they are now correctly diagnosed
7813         as errors.
7815 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
7817         * decl.c (pushdecl): Don't copy types if the
7818         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
7819         type.
7821 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
7823         * class.c (get_enclosing_class): New function.
7824         (is_base_of_enclosing_class): Likewise.
7825         * cp-tree.h (get_enclosing_class): Declare.
7826         (is_base_of_enclosing_class): Likewise.
7827         * pt.c (coerce_template_parms): Use them.
7829 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
7831         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
7832         null to decide whether to use it.
7834         * error.c (dump_type_real): Handle NAMESPACE_DECL.
7835         * parse.y (base_class.1): Avoid crash on error.
7837 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7839         * decl.c (make_typename_type): If context is a namespace, the code
7840         is in error.
7842 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
7844         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
7846 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
7848         * cp-tree.h (anonymous_namespace_name): Declare.
7849         * decl.c: Define it.
7850         (push_namespace): Use anonymous_namespace_name, rather than local
7851         static anon_name.
7852         * error.c (dump_decl): If a namespace is named
7853         anonymous_namespace_name, call it {anonymous}.
7855         * decl.c (grokparms): Distinguish between references and pointers
7856         in error message.
7858 1998-09-08  Richard Henderson  <rth@cygnus.com>
7859             Mark Mitchell  <mark@markmitchell.com>
7861         * pt.c (process_partial_specialization): Consistently allocate
7862         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
7863         tpd.parms, where appropriate.
7865 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
7867         * Makefile.in (INCLUDES): Update after recent toplevel gcc
7868         reorganizations.
7870 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
7872         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
7873         * class.c (finish_struct): Remove hackery to deal with explicit
7874         specializations in class scope.
7875         * decl.c (grokfndecl): Improve error-recovery.
7876         * decl2.c (grokfield): Likewise.
7877         * pt.c (check_specialization_scope): New function.
7878         (begin_specialization): Call it.
7879         (process_partial_specialization): New function, split out from
7880         push_template_decl.  Check partial specializations more
7881         stringently.
7882         (push_template_decl): Call it.
7883         (check_explicit_specialization): Don't attempt to handle explicit
7884         specializations in class scope.
7885         (template_parm_data): Document.  Add current_arg and
7886         arg_uses_template_parms.
7887         (mark_template_parm): Set it.
7888         (tsubst_arg_types): Remove unused variable.
7889         * semantics.c (begin_class_definition): Tweak.
7891 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
7893         * inc/typeinfo (type_info::type_info(const char*)): Make
7894         `explicit'.
7896         * cp-tree.h (hash_tree_cons_simple): New macro.
7897         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
7898         (coerce_template_parms): Use make_temp_vec, instead of
7899         make_tree_vec.  Document this behavior.
7900         (lookup_template_class): Likewise.
7901         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
7902         Remove dead code (and add assertion to check its deadness).  Fix
7903         bug w.r.t. exception specifications.
7905 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
7907         * decl2.c (import_export_vtable): Always make artificials comdat.
7908         (import_export_decl): Likewise.
7909         * pt.c (mark_decl_instantiated): Likewise.
7911 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
7913         * cp-tree.h (finish_globally_qualified_member_call_expr):
7914         Rename to ...
7915         (finish_qualified_call_expr).
7916         * semantics.c: Likewise.
7917         * parse.y (primary): Use it.
7918         * method.c (hack_identifier): Remove redundant code.
7920         * init.c (resolve_offset_ref): Call convert_from_reference to
7921         handle members of reference type.  Improve error recovery.
7923 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
7925         * cp-tree.h: Declare warn_nontemplate_friend.
7926         * decl2.c (lang_decode_option): Set.
7927         * lang-options.h: Add -Wnon-template-friend.
7928         * friend.c (do_friend): Use to toggle non-template function warning.
7930 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
7932         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
7933         corresponding INTEGER_CSTs when processing_template_decl.
7934         * pt.c (tsubst_enum): Tweak accordingly.
7936 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
7938         * decl.c (pushdecl_class_level): Add warning here.
7939         (pushdecl): Tweak.
7941 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
7943         * cvt.c (convert_pointer_to_real): Tidy.
7944         * search.c (get_base_distance_recursive): Simplify.
7945         (get_base_distance): Likewise.
7947         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
7948         parms.
7950 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
7952         * lex.c (check_newline):  Call HANDLE_PRAGMA before
7953         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
7954         if unknown pragmas are encountered.
7955         (handle_sysv_pragma): Interpret return code from
7956         handle_pragma_token ().  Return success/failure indication rather
7957         than next unprocessed character.
7958         (pragma_getc): New function: retrieves characters from the
7959         input stream.  Defined when HANDLE_PRAGMA is defined.
7960         (pragma_ungetc): New function: replaces characters back into the
7961         input stream.  Defined when HANDLE_PRAGMA is defined.
7963 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
7965         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
7966         * class.c (build_vtable_entry_ref): Likewise.
7968 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
7970         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
7971         * decl2.c (import_export_decl): Likewise.
7972         * pt.c (instantiate_decl): Use it.
7974 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
7976         * decl.c (lookup_name_real): Also do implicit typename thing for
7977         artificial TYPE_DECLs.
7978         * search.c (lookup_field): Likewise.
7979         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
7980         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
7981         (enter_scope_of): Extract type from implicit typename.
7982         (begin_class_definition): Likewise.
7983         * lex.c (identifier_type): Handle implicit typename when checking
7984         for SELFNAME.
7986         * cp-tree.h: Declare flag_strict_prototype.
7987         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
7988         -fstrict-prototype.
7989         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
7990         specified, set it to the value of pedantic.
7992 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
7994         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
7996 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
7998         * decl.c (finish_enum): Handle member enums of classes declared in
7999         template functions.
8001         * decl2.c (grok_x_components): Strip attributes before calling
8002         groktypename.
8004 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
8006         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
8007         -fenum-int-equivalence and -fno-nonnull-objects.
8008         * class.c (check_for_override): Remove support for -fall-virtual.
8009         (finish_struct_1): Likewise.
8010         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
8011         * typeck.c (build_binary_op_nodefault): Likewise.
8012         * cvt.c (ocp_convert): Likewise.
8013         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
8014         * class.c (build_vbase_path): Likewise.
8016 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
8018         * Makefile.in (INTERFACE): New, set to 1.
8020 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
8022         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
8023         comparing with global_namespace.
8024         (dump_aggr_type): Likewise.
8026         * decl.c (grokfndecl): Issue error on declaration of friend
8027         templates with explicit template arguments.
8029         * pt.c (convert_template_argument): New function, split out
8030         from...
8031         (coerce_template_parms): Here.
8032         (tsubst): Attempt better error-recovery.
8034 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
8036         * pt.c (decl_template_parm_p): Add checks for
8037         TEMPLATE_TEMPLATE_PARM.
8039 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
8041         * lex.c (do_identifier): Fix thinko in previous change.
8043 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
8045         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
8046         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
8048 1998-08-28  Richard Henderson  <rth@cygnus.com>
8050         Add support for discarding unused virtual functions.
8051         * lang-options.h: Add -fvtable-gc.
8052         * cp-tree.h: Add flag_vtable_gc.
8053         * decl2.c (output_vtable_inherit): New fn.
8054         (finish_vtable_vardecl): Call it.
8055         * class.c (build_vtable_entry_ref): New fn.
8056         (build_vtbl_ref): Call it.
8058 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
8060         * cp-tree.h (build_enumerator): Take the enumeration type as a
8061         parameter.
8062         * decl.c (finish_enum): Don't set the TREE_TYPE for the
8063         enumeration constant values if we're processing_template_decls.
8064         Don't set the type for the CONST_DECLs either; that's done in
8065         build_enumerator.
8066         (build_enumerator): Take the enumeration type as a
8067         parameter.
8068         * lex.c (do_identifier): Don't resolve enumeration constants while
8069         processing template declarations, even if they happen to be
8070         TEMPLATE_PARM_INDEXs.
8072         * parse.y (current_enum_type): New variable.
8073         (primary): Don't allow statement-expression in local classes just
8074         as we don't in global classes.
8075         (structsp): Use current_enum_type.
8076         (enum_list): Likewise.
8077         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
8078         finish_enum; they no longer occur.
8080         * cp-tree.h (finish_base_specifier): New function.
8081         * parse.y (base_class): Use it.
8082         * semantics.c (finish_base_specifier): Define it.
8084         * parse.y (structsp): Warn on use of typename outside of template
8085         declarations.
8087 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
8089         * lex.c (handle_cp_pragma): Remove #pragma vtable.
8090         * lang-options.h: Remove +e options.
8091         * decl2.c (lang_decode_option): Likewise.
8092         (import_export_vtable): Don't check write_virtuals.
8093         (finish_vtable_vardecl, finish_file): Likewise.
8094         * search.c (dfs_debug_mark): Likewise.
8095         * semantics.c (begin_class_definition): Likewise.
8096         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
8098         * call.c (build_over_call): Check flag_elide_constructors.
8099         * decl2.c: flag_elide_constructors defaults to 1.
8100         * typeck.c (convert_arguments): Remove return_loc parm.
8101         (build_function_call_real): Adjust.
8103         * search.c: Tear out all mi_matrix and memoize code.
8104         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
8105         * lang-options.h: Remove documentation for -fhandle-exceptions,
8106         -fmemoize-lookups and -fsave-memoized.
8107         * cp-tree.h: Lose mi_matrix and memoize support.
8108         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
8109         * class.c: Lose struct class_level.
8110         (pushclass, popclass): Lose memoize support.
8111         * init.c (build_offset_ref): Likewise.
8113         Never change BINFO_INHERITANCE_CHAIN.
8114         * init.c (emit_base_init): Change modification of
8115         BINFO_INHERITANCE_CHAIN to an assert.
8116         * search.c (get_base_distance_recursive): Likewise.
8117         (get_base_distance): Likewise.
8118         (lookup_member): Likewise.
8119         (convert_pointer_to_single_level): Likewise.
8120         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
8121         (lookup_fnfields): Likewise.
8122         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
8123         (unshare_base_binfos): Don't call propagate_binfo_offsets.
8124         (layout_basetypes): Call propagate_binfo_offsets instead of
8125         unshare_base_binfos.
8126         * decl.c (xref_basetypes): Call unshare_base_binfos.
8127         * pt.c (instantiate_class_template): Likewise.
8128         * tree.c (reverse_path): Remove 'copy' parm; always make a
8129         temporary copy.
8130         * class.c (build_vbase_path): Just call it.
8131         * search.c (compute_access): Likewise.  Don't re-reverse.
8133 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
8135         * class.c (build_vbase_path): Use reverse_path.
8136         (finish_base_struct): Move warnings for inaccessible bases to
8137         layout_basetypes.
8138         (modify_one_vtable): Remove check of TREE_USED (binfo).
8139         (fixup_vtable_deltas1): Likewise.
8140         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
8141         (xref_tag): Remove binfos parameter.
8142         (make_binfo): Remove chain parameter.
8143         (reverse_path): Add copy parameter.
8144         * decl.c (init_decl_processing): Change calls to xref_tag.
8145         (xref_tag): Remove binfos parameter.
8146         (xref_basetypes): Change calls to make_binfo.
8147         * decl2.c (grok_x_components): Change calls to xref_tag.
8148         (handle_class_head): Likewise.
8149         * friend.c (do_friend): Likewise.
8150         * lex.c (make_lang_type): Change calls to make_binfo.
8151         * parse.y (structsp): Change calls to xref_tag.
8152         (named_complex_class_head_sans_basetype): Likewise.
8153         (named_class_head): Likewise.
8154         * rtti.c (init_rtti_processing): Likewise.
8155         * search.c (compute_access): Change calls to reverse_path.
8156         (dfs_get_vbase_types): Change calls to make_binfo.
8157         (get_vbase_types): Remove dead code.
8158         * tree.c (unshare_base_binfos): Change calls to make_binfo.
8159         (layout_basetypes): Warn here about inaccessible bases.
8160         (make_binfo): Remove chain parameter.
8161         (reverse_path): Add copy parameter.
8163 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
8165         * class.c: #if 0 complete_type_p.
8166         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
8167         * method.c (process_overload_item): Likewise.
8168         * typeck.c (comp_target_types): Likewise.
8170         Stop sharing binfos for indirect virtual bases.
8171         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
8172         (layout_basetypes): Likewise.
8173         (unshare_base_binfos): Copy vbases, too.
8174         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
8175         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
8176         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
8177         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
8178         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
8179         reference to BINFO_VIA_PUBLIC.
8180         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
8181         (push_class_decls): Use them.
8182         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
8183         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
8185 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
8187         * decl.c (build_enumerator): Set DECL_CONTEXT for the
8188         CONST_DECLs.
8190 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
8192         * cp-tree.h (finish_enum): Change prototype.
8193         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
8194         VALUES parameter.  Don't try to compute mins/maxs if
8195         processing_template_decl.
8196         * parse.y (structsp): Use new calling sequence for finish_enum.
8197         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
8198         (lookup_template_class): Remove unused variables.  Tweak.
8199         Register enums on instantiation list before substituting
8200         enumeration constants.
8201         (tsubst_decl): Remove unused variables.
8202         (regenerate_decl_from_template): Likewise.
8204         * decl.c (duplicate_decls): Don't obliterate the
8205         DECL_TEMPLATE_INFO for a template if we're not replacing it with
8206         anything.
8208         * lex.c (do_identifier): Fix typo in comment.
8210 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8212         * errfn.c: Remove stdarg.h/varargs.h.
8213         * tree.c: Likewise.
8215 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
8217         * pt.c (tsubst_copy): Only do typename overloading on an
8218         IDENTIFIER_NODE that happens to look like a typename if it actually
8219         has a type for us to use.
8221 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
8223         * typeck.c (comp_cv_target_types): Split out...
8224         (comp_target_types): From here.  Don't allow cv-qual changes under
8225         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
8226         (build_ptrmemfunc): Pass 1 to nptrs.
8227         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
8229 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
8231         * search.c (dependent_base_p): Don't compare a binfo to
8232         current_class_type; use the TREE_TYPE of the binfo instead.
8234         * cp-tree.h (CLASS_TYPE_P): Revise definition.
8236 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
8238         * decl.c (duplicate_decls): Don't complain about different
8239         exceptions from an internal decl even if pedantic.
8241         * typeck.c (convert_for_assignment): Converting from pm of vbase
8242         to derived is an error, not a sorry.
8244         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
8245         * class.c (fixed_type_or_null): Rename from
8246         resolves_to_fixed_type_p.  Return the dynamic type of the
8247         expression, if fixed, or null.
8248         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
8249         does not match the static type.
8250         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
8251         resolves_to_fixed_type_p again.
8253 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
8255         * pt.c (tsubst_decl): Move special case code for dealing with
8256         tricky friend templates here from ...
8257         (regenerate_decl_from_template): Here.
8259 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
8261         * decl.c (start_decl): Remove redundant linkage check.
8263 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
8265         * typeck.c (c_expand_return): Handle the case that valtype
8266         is wider than the functions return type.
8268 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
8270         * cp-tree.h (CLASS_TYPE_P): New macro.
8271         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
8272         * pt.c (process_template_parm): Undo previous change.
8274 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
8276         * cp-tree.h: Declare.
8277         * pt.c (decl_template_parm_p): New function.
8278         * decl.c (pushdecl): Check decls for redeclaring template parms.
8279         (xref_tag): Make redeclaration an error, print decl.
8280         * decl2.c (grokfield): Check field_decls for redeclaration as well.
8282 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
8284         * parse.y (primary): Fix up the type of string constants.
8286 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
8288         * typeck.c (convert_for_initialization): Move check for odd uses
8289         of NULL to avoid duplicate warnings.
8291 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
8293         * tree.c (lvalue_type): Fix for arrays.
8294         * typeck.c (string_conv_p): New fn.
8295         (convert_for_assignment): Use it.
8296         (build_unary_op): Use lvalue_type.
8297         * call.c (standard_conversion, convert_like): Use string_conv_p.
8298         (add_function_candidate): Use lvalue_type.
8299         * cvt.c (convert_to_reference): Likewise.
8300         * decl2.c (lang_decode_option): Ignore -traditional.
8301         * decl.c (init_decl_processing): flag_writable_strings inhibits
8302         flag_const_strings.
8304 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
8306         * lang-options.h (lang_options): Add fconst-strings to the list
8307         of valid options.
8308         * decl2.c (lang_f_options, lang_decode_option): Likewise.
8310 1998-08-24  Nathan Sidwell  <nathan@acm.org>
8312         * lex.c (real_yylex): Don't warn about long long constants if
8313         we're allowing long long.
8315 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8317         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
8318         accessing bindings directly.
8320         * search.c (my_tree_cons): Reimplement.
8322         * lang-specs.h: Remove __HONOR_STD.
8323         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
8325 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
8327         * decl.c (grokdeclarator): Complain about in-class initialization
8328         of aggregates and/or references.
8329         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
8330         TEMPLATE_TYPE_PARMs.
8332         * decl2.c (grok_array_decl): Add comment.
8333         (mark_used): Don't instantiate an explicit instantiation.
8334         * friend.c (make_friend_class): Remove bogus comment.  Fix check
8335         for partial specializations.
8336         * pt.c (check_explicit_specialization): Don't
8337         SET_DECL_EXPLICIT_INSTANTIATION here.
8338         (mark_decl_instantiated): Or here.
8339         (do_decl_instantiation): Do it here, instead.  Add checks for
8340         duplicate explicit instantiations, etc.  Tidy.
8341         (do_type_instantiation): Likewise.
8342         (instantiate_decl): Improve comments.  Complain about explicit
8343         instantiations where no definition is available.
8345         * cp-tree.h (ansi_null_node): Remove.
8346         * call.c (build_over_call): Warn about converting NULL to an
8347         arithmetic type.
8348         * cvt.c (build_expr_type_conversion): Likewise.  Use
8349         null_ptr_cst_p instead of expanding it inline.
8350         * decl.c (ansi_null_node): Remove.
8351         (init_decl_processing): Make null_node always have integral type.
8352         * except.c (build_throw): Warn about converting NULL to an
8353         arithmetic type.
8354         * lex.c (init_parse): Remove handling of ansi_null_node.
8355         * pt.c (type_unification_real): Don't convert NULL to void* type.
8356         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
8357         (convert_for_assignment): Warn about converting NULL to an
8358         arithmetic type.
8359         (convert_for_initialization): Likewise.
8361 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
8363         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
8364         * pt.c (coerce_template_parms): Use no_linkage_check.
8365         * decl.c (grokvardecl): Likewise.
8366         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
8368         * method.c (process_overload_item): Remove useless code.
8370 1998-08-20  Per Bothner  <bothner@cygnus.com>
8372         Handle new'ing of Java classes.
8373         * init.c (build_class_classref):  New function.
8374         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
8375         constructor does not return this;  don't need to exception-protect.
8377         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
8378         * decl2.c (acceptable_java_type):  Handle template-derived types.
8380 1998-08-20  Per Bothner  <bothner@cygnus.com>
8382         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
8384 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
8386         * decl.c (duplicate_decls): Always merge the old and new patterns
8387         for templates, regardless of whether or not the new one has
8388         DECL_INITIAL.  Don't throw away specializations.  Merge
8389         DECL_SAVED_TREE.
8390         * pt.c (tsubst_decl): Use the right pattern when calculating the
8391         complete args for a new template instance.
8392         (do_decl_instantiation): Fix typo in comment.
8393         (regenerate_decl_from_template): Deal with tricky friend template
8394         case.
8395         (instantiate_decl): Likewise.
8397 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
8399         * init.c (build_builtin_delete_call): Add missing assemble_external
8400         call.
8402 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
8404         * parse.y (notype_unqualified_id): Also accept ~A<int>.
8406 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
8408         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
8409         arithmetic.
8410         * except.c (build_throw): Warn when NULL is thrown, even with
8411         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
8412         thrown expression.
8414         * cp-tree.h (ansi_null_node): New variable.
8415         * decl.c (ansi_null_node): New variable.
8416         (init_decl_processing): Initialize its type.
8417         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
8418         for null_node in non-ANSI mode.
8419         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
8420         place of null_node to avoid spurious errors.
8422 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
8424         * cp-tree.h (enter_scope_of): New function.
8425         * parse.y (complex_direct_notype_declarator): Use it.
8426         * semantics.c (enter_scope_of): New function.
8428 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
8430         * decl.c (grokparms): No, here.
8432         * decl.c (grokdeclarator): Catch parm with pointer to array of
8433         unknown bound here...
8434         * method.c (process_overload_item): ...not here.
8436         * gxxint.texi: Remove obsolete documentation of overloading code.
8438         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
8439         * class.c (finish_struct_bits): Likewise.
8441         * tree.c (lvalue_type): Fix for arrays.
8442         * typeck.c (build_unary_op): Use lvalue_type.
8443         * call.c (add_function_candidate): Likewise.
8444         * cvt.c (convert_to_reference): Likewise.
8446         * decl2.c (lang_decode_option): Ignore -traditional.
8448         * init.c (build_offset_ref): Don't mess with error_mark_node.
8449         * lex.c (do_scoped_id): Use cp_error.
8451         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
8453 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
8455         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
8457 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
8459         * cp-tree.h (set_identifier_local_value): Provide prototype.
8461         * decl2.c (do_namespace_alias): Remove unused variables `binding'
8462         and `old'.
8464 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
8466         * Makefile.in: Rename BBISON to BISON so that it can be properly
8467         inherited from the parent makefile.
8469 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
8471         * lang-options.h: Add -finit-priority.
8472         * decl2.c: Likewise.  Check flag_init_priority instead of
8473         USE_INIT_PRIORITY.
8475         * decl2.c (setup_initp): New fn.
8476         (start_objects, finish_objects, do_ctors): Handle init_priority.
8477         (do_dtors, finish_file): Likewise.
8479 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
8481         * pt.c (tsubst_copy): Hush warning.
8483         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
8485 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
8487         * pt.c (print_template_context): Don't abort when instantiating a
8488         synthesized method.
8490         * decl.c (grokdeclarator): Issue errors on namespace qualified
8491         declarators in parameter lists or in class scope.
8493 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
8495         * pt.c (check_explicit_specialization): Don't abort on bogus
8496         explicit instantiations.
8498 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
8500         * typeck.c (require_complete_type): Use complete_type_or_else.
8501         (complete_type_or_else): Always return NULL_TREE on failure, as
8502         documented.
8504         * pt.c (tsubst_aggr_type): Prototype.
8505         (tsubst_decl): New function, split out from tsubst.  Set
8506         input_filename and lineno as appropriate.
8507         (pop_tinst_level): Restore the file and line number saved in
8508         push_tinst_level.
8509         (instantiate_class_template): Set input_filename and lineno as
8510         appropriate.
8511         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
8512         context for a TYPENAME_TYPE is complete.
8514         * decl2.c (grokbitfield): Issue errors on bitfields declared with
8515         function type.
8516         (do_dtors): As in do_ctors, pretend to be a member of the same
8517         class as a static data member while generating a call to its
8518         destructor.
8520         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
8521         conversions, even in complex virtual base class hierarchies.
8523 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
8525         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
8526         (TYPE_TEMPLATE_INFO): Likewise.
8527         (SET_TYPE_TEMPLATE_INFO): Likewise.
8528         (ENUM_TI_TEMPLATE): Likewise.
8529         (ENUM_TI_ARGS): Likewise.
8530         (lookup_nested_type_by_name): Remove.
8531         * decl.c (maybe_process_template_type_declaration): Handle enums.
8532         (start_enum): Don't check for primary-template enum declarations
8533         here.
8534         (finish_enum): Clean up, document.  Make sure template enum
8535         constants get the correct type.
8536         (build_enumerator): Copy initializers for template enumerations,
8537         too.
8538         (grok_enum_decls): Document.
8539         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
8540         better.  Build LOOKUP_EXPRs for local variables, even if they are
8541         TREE_PERMANENT.
8542         * pt.c (tsubst_enum): Remove field_chain parameter.
8543         (template_class_depth): Include the depth of surrounding function
8544         contexts.
8545         (push_template_decl): Check for primary-template enum declarations
8546         here.  Deal with enumeration templates.
8547         (lookup_template_class): Likewise.
8548         (for_each_template_parm): Likewise.
8549         (instantiate_class_template): Don't call tsubst_enum directly,
8550         call tsubst instead, to instantiate enums.  Deal with all
8551         field_chain issues here, not in tsubst_enum.
8552         (lookup_nested_type_by_name): Remove.
8553         (tsubst_aggr_type): Revise handling of enumeration types.
8554         (tsubst): Likewise.
8555         (tsubst_copy): Likewise.
8556         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
8558 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
8560         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
8561         uses template parameters.
8562         * method.c (build_template_parm_names): Use the full set of
8563         template arguments for tsubst'ing.
8564         (build_overload_identifier): Pass the full set of template
8565         arguments to build_template_parm_names, not just the
8566         innermost_args.
8567         * pt.c (TMPL_ARGS_DEPTH): Define using
8568         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
8569         (NUM_TMPL_ARGS): New macro.
8570         (add_outermost_template_args): Deal with the case where the outer
8571         args will be completely discarded.
8572         (coerce_template_parms): Use the full set of template arguments
8573         for tsubst'ing.  Simplify.  Add some asserts.  Improve
8574         error messages.
8575         (lookup_template_class): Pass the full set of template arguments
8576         to coerce_template_parms.
8577         (tsubst): Add assertion.
8578         (do_type_instantiation): Don't instantiate member template
8579         classes.
8581         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
8582         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
8584 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
8586         * method.c (set_mangled_name_for_decl): Change return type to void.
8588         * decl.c (lookup_name_real): A namespace-level decl takes priority
8589         over implicit typename.  Avoid doing the same lookup twice.
8591         * search.c (dependent_base_p): New fn.
8592         (dfs_pushdecls, dfs_compress_decls): Use it.
8594         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
8595         virtual functions if the type doesn't have any.
8597 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
8599         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
8600         uses template parameters.
8602 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
8604         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
8605         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
8606         * lex.c (do_identifier): Don't use a second argument, or a type,
8607         when building LOOKUP_EXPRs.
8608         (do_identifier): Likewise.
8609         (do_scoped_id): Likewise.
8610         * method.c (hack_identifier): Improve error message.
8611         * pt.c (lookup_template_function): Don't needlessly call
8612         copy_to_permanent or build_min.
8613         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
8614         necessary.
8615         (do_decl_instantiation): Improve error message.
8616         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
8617         (build_min): Copy the type to the permanent obstack, too.
8619 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
8621         * init.c (init_init_processing): Remove BI* handling.
8622         (build_builtin_call): Remove.
8623         (build_builtin_delete_call): New fn.
8624         (build_delete): Use it.
8626 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
8628         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
8629         (maybe_check_template_type): New function.
8630         * decl.c (maybe_process_template_type_declaration): New function,
8631         split out from pushtag  Call maybe_check_template_type.
8632         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
8633         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
8634         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
8635         * pt.c (template_class_depth_real): Generalization of ...
8636         (template_class_depth): Use it.
8637         (register_specialization): Use duplicate_decls for duplicate
8638         declarations of specializations.
8639         (maybe_check_template_type): New function.
8640         (push_template_decl_real): Fix comment.
8641         (convert_nontype_argument): Likewise.
8642         (lookup_template_class): Likewise.  Avoid an infinite loop on
8643         erroneous code.
8644         (tsubst_friend_function): Fix comment.
8645         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
8646         an IDENTIFIER_NODE.
8647         * semantics.c (begin_function_definition): Use
8648         reset_specialization to note that template headers don't apply
8649         directly to declarations after the opening curly for a function.
8651 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
8653         * decl.c (push_overloaded_decl): Use current_namespace instead of
8654         DECL_CONTEXT (decl) to determine where we go.
8656         * decl.c (lookup_name_real): Fix typo.
8658 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
8660         * friend.c (is_friend): Be lenient with member functions to deal
8661         with nested friends.
8663 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
8665         * class.c (finish_struct_1): Convert integer_zero_node to
8666         ssizetype before passing it to set_rtti_entry.
8667         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
8668         of any size to a pointer.
8670 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
8672         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
8673         (build_template_decl_overload): Remove.
8674         (set_mangled_name_for_decl): New function.
8675         (innermost_args): Remove is_spec parameter.
8676         (most_specialized, most_specialized_class): Remove declarations.
8677         (lookup_template_class): Add entering_scope parameter.
8678         (maybe_process_partial_specialization): New function.
8679         (finish_template_decl): Likewise.
8680         (finish_template_type): Likewise.
8681         * class.c (finish_struct): Clean up processing of member template
8682         specializations.
8683         * decl.c (pushtag): Fix formatting.
8684         (lookup_tag): Improve handling of pseudo-global levels.
8685         (make_typename_type): Adjust call to lookup_template_class.
8686         (shadow_tag): Use maybe_process_partial_specialization.
8687         (xref_tag): Improve handling of member friends.
8688         (start_function): Call push_nested_class before
8689         push_template_decl.  Don't call push_template_decl for
8690         specializations.
8691         * decl2.c (grok_x_components): Don't call xref_tag for
8692         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
8693         (grokclassfn): Use set_mangled_name_for_decl.
8694         (arg_assoc_class): Adjust call to innermost_args.
8695         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
8696         * error.c (dump_function_name): Improve printing of template
8697         function names.
8698         * friend.c (is_friend): Don't compare types of decls to determine
8699         friendship, unless flag_guiding_decls.
8700         (make_friend_class): Partial specializations cannot be friends.
8701         (do_friend): Use set_mangled_name_for_decl.  Call
8702         push_template_decl_real instead of push_template_decl.
8703         * method.c (build_decl_overload_real): Remove prototype.  Give it
8704         external linkage.
8705         (build_overload_identififer): Adjust call to innermost_args.
8706         (build_template_decl_overload): Remove.
8707         (set_mangled_name_for_decl): New function.
8708         * parse.y (.finish_template_type): New non-terminal.
8709         (template_def): Use finish_template_decl.  Use template_extdef
8710         instead of extdef.
8711         (template_extdef, template_datadef): New non-terminals, containing
8712         only those rules for things which can be templates.
8713         (datadef): Tidy.
8714         (template_type, self_template_type): Use .finish_template_type.
8715         (named_class_head): Use maybe_process_partial_specialization.
8716         * pt.c (mangle_class_name_for_template): Remove context parameter.
8717         (get_class_bindings): Remove outer_args parameter.
8718         (complete_template_args): Remove.
8719         (add_outermost_template_args): New function.
8720         (register_specialization): Return the specialization.
8721         (unregister_specialization): New function.
8722         (tsubst_template_parms): Likewise.
8723         (most_specialized, most_specialized_class): Prototype here as
8724         static.
8725         (original_template): Rename to most_general_template.
8726         (tsubst_template_parms): New function.
8727         (set_mangled_name_for_template_decl): Likewise.
8728         (TMPL_ARGS_DEPTH): New macro.
8729         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
8730         (TMPL_ARGS_LEVEL): New macro.
8731         (SET_TMPL_ARGS_LEVEL): Likewise.
8732         (TMPL_ARG): Likewise.
8733         (SET_TMPL_ARG): Likewise.
8734         (TMPL_ARGS_DEPTH): Likewise.
8735         (finish_member_template_decl): Use finish_template_decl.
8736         (maybe_process_partial_specialization): New function, split out
8737         from tsubst.
8738         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
8739         (maybe_begin_member_template_processing): Use new macros.
8740         (is_member_template): Likewise.
8741         (is_member_template_class): Likewise.
8742         (add_to_template_args): Likewise.  Deal with multiple levels of
8743         args.
8744         (maybe_process_partial_specialization): New function.
8745         (retrieve_specialization): Add consistency check.
8746         (determine_specialization): Return full argument list.
8747         (check_explicit_specialization): Tweak friend handling.  Use full
8748         argument lists.  Simplify.
8749         (current_template_args): Use new macros.
8750         (push_template_decl_real): Change ill-named mainargs to specargs.
8751         Check that a partial specialization actually specializes at least
8752         one parameter.   Improve friend handling.  Modify for full
8753         template arguments.
8754         (classtype_mangled_name): Don't mangle the names of
8755         specializations.
8756         (lookup_template_class): Add entering_scope parameter.  Use it to
8757         avoid finding a template type when an instantiation is required.
8758         Simplify.  Use full template arguments.
8759         (tsubst_friend_function): Use unregister_specialization.  Use new
8760         macros.  Use full template arguments.
8761         (tsubst_friend_class): Substitute, using tsubst_template_parms,
8762         into the template parameters before passing them to
8763         redeclare_class_template.
8764         (instantiate_class_template): Simplify.  Use full template
8765         arguments.  Adjust calls to get_class_bindings.  Use
8766         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
8767         (innermost_args): Use new macros.
8768         (tsubst_aggr_type): New function, split out from tsubst.
8769         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
8770         conventions for lookup_template_class.  Refine handling of partial
8771         instantiations.   Remove calls to complete_template_args.
8772         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
8773         and set_mangled_name_for_template_decl.
8774         (tsubst_copy): Use tsubst_aggr_type.
8775         (instantiate_template): Use full template arguments.
8776         (more_specialized): Improve formatting.
8777         (more_specialized_class): Adjust calls to get_class_bindings.
8778         (get_bindings_real): Don't call complete_template_args.
8779         (most_specialized): Don't overwrite input; create a new list.
8780         (most_specialized_class): Use most_general_template.
8781         (regenerate_decl_from_template): Use unregister_specialization.
8782         Use full template arguments.
8783         (instantiate_decl): Use full template arguments.
8784         (set_mangled_name_for_template_decl): New function.
8785         * semantics.c (begin_class_definition): Use
8786         maybe_process_partial_specialization.
8787         (finish_member_class_template): New function.
8788         (finish_template_decl): Likewise.
8789         (finish_template_type): Likewise.
8790         (typeck.c): Don't crash after issuing a compiler_error.
8791         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
8793 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
8795         * typeck2.c (build_functional_cast): Handle default-initialization.
8797         * call.c (build_over_call): Pass 1 to popclass.
8799         * parse.y (direct_notype_declarator): Add precedence declaration
8800         to notype_unqualified_id case.
8801         * Makefile.in (EXPECT): Adjust.
8803         * tree.c (ovl_member): Fix for single function in OVL.
8805 1998-07-27  Dave Brolley  <brolley@cygnus.com>
8807         * c-lex.c (yylex): Fix boundary conditions in character literal and
8808         string literal loops.
8810 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
8812         * decl.c (lookup_name_real): OK, do return the from_obj value
8813         unless got_object depends on template parms.
8815         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
8817         * pt.c (coerce_template_parms): Also complain about local enums.
8819         * cp-tree.h: Add prototype for set_identifier_local_value.
8820         * decl.c (set_identifier_local_value_with_scope): Make static,
8821         prototype.
8822         * search.c (covariant_return_p): Likewise.
8823         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
8825         * call.c (build_method_call): Only pull out the type of a destructor
8826         if it's a template type parm.
8827         * decl.c (lookup_name_real): Never return the from_obj value.
8829 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
8831         * except.c (process_start_catch_block_old): Call start_decl_1 for
8832         catch parm.
8833         * decl.c (start_decl_1): Avoid duplicate error.
8835         * init.c (expand_default_init): Only perform the initialization if
8836         it will do something.
8838 1998-07-23  H.J. Lu  (hjl@gnu.org)
8840         * parse.y (base_class): Check for invalid base class.
8842 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
8844         * decl2.c (import_export_template): Fold in...
8845         (import_export_class): ...to here.  Handle dllimport/export.
8847         * class.c (build_vtable): Pass at_eof to import_export_vtable.
8848         (prepare_fresh_vtable): Likewise.
8849         * decl2.c (import_export_class): Split out...
8850         (finish_prevtable_vardecl): From here.
8851         * class.c (finish_struct_1): Call import_export_class if at_eof.
8853         * decl.c (start_function): #if 0 mysterious code I wrote and have
8854         forgotten why.
8855         * rtti.c (get_tinfo_fn): If this is for a class type, set
8856         DECL_CONTEXT.
8858 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
8860         * inc/exception: Change terminate and unexpected to ().
8862         * parse.y (named_class_head_sans_basetype_defn): A
8863         named_class_head_sans_basetype followed by '{' or ':' is a defn.
8865 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
8867         * tree.c (canonical_type_variant): New fn to handle arrays.
8868         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
8869         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
8870         * method.c (process_overload_item): Use build_overload_value for
8871         arrays.
8873 1998-07-20  Dave Brolley  <brolley@cygnus.com>
8875         * lex.c (mbchar.h): #include it.
8876         (GET_ENVIRONMENT): New macro.
8877         (init_parse): Set character set based on LANG environment variable.
8878         (real_yylex): Handle multibyte characters in character literals.
8879         (real_yylex): Handle multibyte characters in string literals.
8881 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
8883         * lex.c (do_identifier): Look for class value even if we don't
8884         have a global value.  Do implicit declaration if parsing is 2.
8885         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
8886         lookup.
8888 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
8890         * decl.c (pushtag): Revert previous change.
8891         * pt.c (lookup_template_class): Don't put out debugging
8892         information for types that use template parameters.
8894         * decl.c (pushtag): Don't put out debugging information for
8895         compiler-generated typedefs.
8897         * error.c (dump_type_real): Don't crash when presented with
8898         intQI_type_node or the like.
8900         * semantics.c (finish_translation_unit): Fix spelling error in
8901         comment.
8903 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
8905         * decl.c (lookup_name_real): Pull out single function here.
8906         (select_decl): Not here.
8907         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
8909         * decl.c (qualify_lookup): Tweak again.
8911         * pt.c (lookup_template_class): Don't mess with the context of the
8912         instantiation.
8913         * decl2.c (current_decl_namespace): Remove special handling for
8914         templates.
8916         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
8917         a member template specialization.
8919         * tree.c (ovl_member): Use decls_match to compare functions.
8920         * decl.c (decls_match): Check the context of a function.
8922         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
8923         in Koenig lookup support rules.
8924         * semantics.c (finish_call_expr): Handle the new cases.
8926         * typeck.c (build_x_function_call): Handle overloaded methods.
8928         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
8930 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
8932         * semantics.c (finish_object_call_expr): Revert previous change.
8933         * call.c (build_new_method_call): Likewise.  Instead, convert
8934         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
8936 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
8938         * decl.c (qualify_lookup): Handle templates.
8940         * decl2.c (do_using_directive): Don't pass ancestor.
8941         * decl.c (push_using_directive): Calculate ancestor.
8943         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
8944         * decl.c (pushdecl): Move type shadowing handling from here...
8945         (duplicate_decls): ...to here.
8946         * decl.c (set_identifier_local_value_with_scope): New fn.
8947         (pushdecl): Use it.
8948         (set_identifier_local_value, lookup_type_current_level): New fns.
8949         * decl2.c (do_local_using_decl): Handle types and binding level
8950         stuff properly.
8952         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
8953         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
8954         (lookup_namespace_name): Likewise.
8955         * typeck.c (build_unary_op): Not here anymore.
8957         * decl2.c (do_class_using_decl): Make sure we get an identifier.
8958         * class.c (handle_using_decl): Ignore TYPE_DECLs.
8960         * decl.c (qualify_lookup): New fn.
8961         (lookup_name_real): Use it.
8963 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
8965         * decl2.c (add_using_namespace): When directly using a namespace
8966         that was indirect before, promote it.
8968         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
8969         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
8970         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
8971         * decl.c (select_decl): Replace two flag parameters by one.
8972         (unqualified_namespace_lookup): Likewise, pass flag.
8973         (lookup_flags): New function.
8974         (lookup_name_real): Compute flags, pass them.
8975         (lookup_namespace_name): Call with zero-flag.
8976         * decl2.c (ambiguous_decl): Add flag parameter, complain only
8977         according to flags.
8978         (lookup_using_namespace, qualified_lookup_using_namespace):
8979         Add flag parameter, pass them through.
8980         * lex.c (do_scoped_id): Call with zero-flag.
8982 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
8984         * typeck.c (convert_for_assignment): Use comptypes.
8986 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
8988         * semantics.c (finish_object_call_expr): Move test for the
8989         function called being a TYPE_DECL to ...
8990         * call.c (build_new_method_call): Here.
8992 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
8994         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
8995         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
8997         * lex.c (looking_for_typename): Don't initialize.
8999         * decl2.c (ambiguous_decl): Clarify error message.
9001         * decl.c (push_using_directive): Iterate over namespaces used
9002         indirectly.
9004 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9006         * decl2.c (add_using_namespace): Iterate over namespaces used
9007         indirectly.
9009         * decl.c (lookup_name_real): Accept namespace aliases as locals.
9010         (cat_namespace_levels): Ignore aliases.
9011         (duplicate_decls): Ignore duplicate aliases.
9012         * decl2.c (do_namespace_alias): Process block level namespace
9013         aliases.  Store alias with pushdecl.  Remove odr errors.
9014         * parse.y (namespace_alias): New non-terminal.
9015         (extdef): Use it.
9017 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
9019         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
9020         Handle TEMPLATE_TYPE_PARM.
9021         (arg_assoc): Rewrite.
9023         * pt.c (complete_template_args): Don't look at the context unless
9024         we have to.
9026         * method.c (build_decl_overload_real): Fix namespace handling.
9028         * typeck.c (build_unary_op): Extract a lone function from an
9029         OVERLOAD.
9031         * call.c (build_scoped_method_call): Handle getting a namespace
9032         for basetype in a destructor call.
9033         (check_dtor_name): Handle enums.
9035         * parse.y (using_directive): New nonterminal.
9036         (extdef, simple_stmt): Use it.
9038 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9040         * decl2.c (add_function): Move error message ...
9041         (arg_assoc_namespace): ... from here.
9043 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
9045         * parse.y (namespace_qualifier): Fix multiple level handling.
9046         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
9047         (arg_assoc): Don't skip the first argument of a function.
9049 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
9051         * search.c (my_tree_cons): Clean up.
9053 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
9055         * call.c (joust): Don't warn about "confusing" conversions to the
9056         same type.
9058 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9060         * class.c (push_nested_class): Complain about namespaces.
9061         * decl.c (start_decl): Enter the object's namespace.
9062         (cp_finish_decl): Leave it.
9063         (grokdeclarator): Likewise.
9064         * decl2.c (check_decl_namespace): New function.
9065         (finish_file): Call it.
9066         * parse.y (complex_direct_notype_declarator): Set complexity
9067         of namespace-qualified ids to -1, enter the namespace.
9069         * method.c (build_template_decl_overload): Expect _DECL as first
9070         parameter.  Put context temporarily into current_namespace.
9071         * pt.c (check_explicit_specialization): Change caller.
9072         (tsubst): Likewise.
9074         * init.c (build_offset_ref): Call mark_used and
9075         convert_from_reference for namespace members.
9077 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9079         * search.c (my_tree_cons): The bitfield is at index 2.
9081 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
9083         * lang-options.h: Format changed to work with new --help support
9084         in gcc/toplev.c
9086 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9088         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
9089         Do Koenig lookup in CALL_EXPR.
9090         (arg_assoc): Handle error_mark.
9091         * lex.c (is_global): New function.
9092         (do_identifier): Expect arguments for Koenig lookup.
9093         * parse.y (primary): Add rules for calls of unqualified function calls.
9094         (do_id): Change call of do_identifier.
9095         * pt.c (finish_stmt_expr): Likewise.
9096         * semantics.c (finish_id_expr): Likewise.
9097         (finish_call_expr): Add integer parameter to indicate
9098         argument-dependent lookup.
9100         * decl.c (struct binding_level): New field using_directives.
9101         (push_using_decl): Not sorry anymore.
9102         (push_using_directive): New function.
9103         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
9104         (unqualified_namespace_lookup): New function, code from ...
9105         (lookup_name_real): ... here.
9106         * decl2.c (lookup_using_namespace): Pass using list instead of
9107         initial scope.
9108         (validate_nonmember_using_decl): New function.
9109         (do_nonmember_using_decl): New function.
9110         (do_toplevel_using_decl): Use them.
9111         (do_local_using_decl): New function.
9112         (do_using_directive): Support block-level directives.
9113         * parse.y (simple_stmt): Support using declarations and
9114         directives.
9115         (namespace_qualifier, namespace_using_decl): New non-terminals.
9117         * xref.c (classname): New function.
9118         (GNU_xref_hier): Change class and base parameters to tree.
9119         * decl.c (xref_baseypes): Change caller.
9120         * friend.c (make_friend_class): Likewise.
9122 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
9124         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
9125         comparison.
9127         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
9128         template template parameter, record its use.
9129         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
9130         its template arguments if exists.
9132         * pt.c (coerce_template_template_parms): New function equivalent
9133         to coerce_template_parms when IS_TMPL_PARM is true.
9134         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
9135         all callers changed.
9137         (coerce_template_parms): Access ARGLIST properly when creating a
9138         new vector.  Only accept implicit TYPE_DECL as valid argument for
9139         a template template parameter when it is a base class of
9140         current_class_type.  Don't display error message when COMPLAIN is
9141         false.
9143 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
9145         * repo.c (get_base_filename): Use file_name_nondirectory.
9146         (open_repo_file): Likewise.
9147         * cp-tree.h (file_name_nondirectory): Add prototype.
9149 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
9151         * friend.c (do_friend): Pull the identifier out of declarator.
9152         Use cp_error and friends.
9153         * decl2.c (qualified_lookup_using_namespace): Fix call to
9154         purpose_member.
9155         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
9156         (grokvardecl): Use DECL_CLASS_SCOPE_P.
9157         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
9158         * class.c (warn_hidden): Fix for OVERLOAD.
9159         From grahams@rcp.co.uk:
9160         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
9161         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
9163 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
9165         * g++.1 (-traditional): Remove duplicated documentation.
9167 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
9169         * method.c (flush_repeats): Add nrepeats parameter.
9170         (issue_nrepeats): Likewise.
9171         (is_back_referenceable_type): New function.  Don't back-reference
9172         TEMPLATE_TYPE_PARMs as well as simple types like integers.
9173         (build_mangled_name_for_type): Likewise.
9174         (build_mangled_name_for_type_with_Gcode): Likewise.
9175         (lasttype): Remove.
9176         (nrepeats): Likewise.
9177         (Nrepeats): Likewise.
9178         (start_squangling): Don't clear the variables removed above.
9179         (end_squangling): Likewise.
9180         (flush_repeats): Tidy.  Use nrepeats parameter rather than
9181         Nrepeats global.
9182         (issue_nrepeats): Likewise, but with nrepeats global.  Use
9183         is_backreferenceable_type.
9184         (build_overload_nested_name): Tidy.  Add comment.  Use
9185         build_mangled_name_for_type.
9186         (build_underscore_int): Comment.
9187         (build_overload_scope_ref): Use build_mangled_name_for_type.
9188         (build_overload_int): Likewise.
9189         (build_template_template_parm_names): Tidy.
9190         (build_template_parm_names): Use build_mangled_name_for_type.
9191         (build_overload_identifier): Add comments.
9192         (build_mangled_name_for_type_with_Gcode): Split out from
9193         build_mangled_name.
9194         (build_mangled_name_for_type): Use it.
9195         (build_mangled_name): Rework to use build_mangled_name_for_type
9196         and to not use global nrepeats/Nrepeats.  Tidy.
9197         (process_modifiers): Tidy.
9198         (check_btype): Use is_backreferenceable_type.  Add comment.
9199         Rename `node' to `type'.
9200         (process_overload_item): Set numeric_output_need_bar here.
9201         Use build_mangled_name_for_type.  Tidy.
9202         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
9203         build_mangled_name_for_type.
9205         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
9206         for TYPE_DECLs.
9208 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
9210         * cp-tree.h (warn_long_long): Define.
9211         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
9212         warning "ANSI C++ does not support `long long'".
9213         * decl2.c (warn_long_long): Define.
9214         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
9216 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
9218         * decl.c (xref_tag): Handle attributes between 'class' and name.
9219         * parse.y (aggr): Likewise.
9220         * semantics.c (finish_class_definition): Likewise.
9221         * Makefile.in (EXPECTED): Adjust.
9223         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
9224         * decl2.c: Define them.
9225         (lang_decode_option): Handle them.
9226         * lang-options.h: Add -foptional-diags.
9227         * class.c (finish_struct): Don't complain about multiple meanings of
9228         name if -fno-optional-diags.
9229         * decl.c (pushdecl_class_level): Likewise.
9230         * lex.c (real_yylex): Check warn_multichar.
9232 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
9234         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
9236         * tree.c (make_binfo): Fix length.
9238 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
9240         * decl2.c (lang_decode_option): Remove warn_template_debugging.
9241         * lang-options.h: Likewise.
9243 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9245         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
9246         (process_start_catch_block): Likewise for variables
9247         `false_label_rtx', `call_rtx' and `return_value_rtx'.
9249 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
9251         * tree.c (build_srcloc): Make sure we allocate this node on the
9252         permanent obstack.
9254 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
9256         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
9257         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
9258         (lang_specific_driver): Only add -lm automatically if need_math is
9259         nonzero.
9261 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
9263         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
9265 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9267         * Makefile.in (EXPR_H): New dependency variable.
9268         (decl2.o): Depend on $(EXPR_H).
9269         (typeck.o): Likewise.
9270         (init.o): Likewise.
9271         (expr.o): Likewise.
9273 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
9275         * decl.c (start_enum): Put local enums on permanent_obstack.
9277 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
9279         * cp-tree.h (c_get_alias_set): Declare.
9280         * decl.c (init_decl_processing): Set lang_get_alias_set.
9282 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
9284         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
9285         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
9286         flag for all function decls which are in the exception table.
9287         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
9288         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
9289         code is emitted for any referenced rtti function.
9291 1998-06-25  Dave Brolley  <brolley@cygnus.com>
9293         * lang-specs.h: Use new | syntax to eliminate
9294         string concatenation.
9296 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
9298         * cp-tree.h (CP_DECL_CONTEXT): New macro.
9299         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
9300         * method.c (build_overload_nested_name): Likewise.
9301         * sig.c (build_signature_pointer_or_reference_type): Don't set
9302         DECL_CONTEXT.
9304 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9306         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
9307         * cp-tree.h (FROB_CONTEXT): New macro.
9308         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
9309         * decl.c (namespace_binding): Replace NULL_TREE with
9310         global_namespace.
9311         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
9312         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
9313         Likewise.
9314         * decl.c (pushtag): Use FROB_CONTEXT.
9315         (pushdecl, make_typename_type, define_function, grokdeclarator):
9316         Likewise.
9317         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
9318         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
9319         Likewise.
9320         * decl2.c (decl_namespace): Return global_namespace if no context.
9321         * method.c (build_overload_nested_name): Expect null as context.
9322         * pt.c (mangle_class_name_for_template): Do nothing for null
9323         contexts.
9324         (lookup_template_class): Allow for null id_context.
9326 1998-06-25  Richard Henderson  <rth@cygnus.com>
9328         * method.c (emit_thunk): Set current_function_is_thunk for the
9329         ASM_OUTPUT_MI_THUNK case as well.
9331 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
9333         * exception.cc (__cplus_type_matcher): Get a match_info pointer
9334         instead of an exception table entry as a parameter.
9336 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
9338         * parse.y (function_try_block): Don't call start_catch_handler.
9339         * except.c (call_eh_info): Remove coerced field from declaration.
9340         (build_eh_type_type_ref): New function to create an address of a
9341         rtti function for the new style exception tables.
9342         (expand_start_catch_block): Split function, this contains the
9343         common part.
9344         (process_start_catch_block_old): New function to perform the rest
9345         of expand_start_catch_block under old style exceptions.
9346         (process_start_catch_block_old): New function to perform the rest
9347         of expand_start_catch_block under new style exceptions.
9348         (expand_end_catch_block): Only pop the false label off the stack under
9349         the old style of exceptions.
9350         * semantics.c (finish_try_block): Don't call start_catch_handler.
9351         * exception.cc (struct cp_eh_info): Add original_value field.
9352         (__cplus_type_matcher): Perform type matching on the original exception
9353         value, and if we have a match, set the current value.
9354         (__cp_push_exception): Set the original exception value.
9356 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
9358         * call.c (joust): Fix confusing conversion warning.
9360         * call.c (build_op_delete_call): Add placement parm.  Check
9361         LOOKUP_SPECULATIVELY.
9362         * cp-tree.h, decl2.c, init.c: Adjust.
9363         * decl.c (finish_function): Use it.
9365         * pt.c (tsubst): Diagnose creating void fields or variables.
9367 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9369         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
9371         * cp-tree.h (check_dtor_name): Add prototype.
9373         * init.c (expand_member_init): Remove unused variables
9374         `ptr_type_node', `parm' and `rval'.
9376         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
9377         in call to fprintf.
9378         (lang_print_xnode): Likewise.
9380         * typeck2.c (enum_name_string): Cast argument to sprintf to long
9381         and use %ld specifier.
9383         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
9384         specifier in call to fprintf.
9385         (GNU_xref_member): Cast argument to sprintf to int.
9387 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
9389         * typeck2.c (pop_init_level): Warn about implicit zero initialization
9390         of struct members.
9392 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9394         * cp-tree.h: Prototype function `check_java_method'.
9396 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
9398         * class.c (finish_struct): Make conflicting use of id a pedwarn.
9399         * decl.c (pushdecl_class_level): Likewise.
9401 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
9403         * pt.c (convert_nontype_argument): Issue an error when presented
9404         with an integer (real) constant that cannot be simplified to an
9405         INT_CST (REAL_CST).
9407         * cp-tree.h (c_get_alias_set): Remove declaration added in
9408         1998-06-13 change that should never have been checked in.
9410 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
9412         * typeck.c (build_binary_op_nodefault): Change % in format strings
9413         to %%.
9415         * decl.c (grokvardecl): Don't build_static_name for decls that
9416         aren't at namespace scope.
9418         * init.c (perform_member_init): Catch default-initialization of
9419         references.
9421 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
9423         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
9425 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
9427         * method.c (hack_identifier): Complain about getting a namespace
9428         or class template.
9429         * typeck.c (decay_conversion): Remove check for namespaces.
9430         * typeck2.c (incomplete_type_error): Likewise.
9431         * parse.y (template_arg): Add PTYPENAME expansion.
9433 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
9435         * decl.c (grokvardecl): Don't build external assembler names for
9436         TYPENAMEs in other namespaces as there is no declarator.
9437         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
9438         info from DECL_CONTEXT if it is NULL.
9440 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
9442         * call.c (check_dtor_name): Split out.
9443         (build_scoped_method_call): Use it.
9444         (build_method_call): Use it.
9445         * init.c (build_offset_ref): Use it.
9447         * typeck.c (build_static_cast): Fix handling of pointers to members.
9449         * decl.c (finish_function): Just return nothing from a constructor.
9450         * typeck.c (c_expand_return): Complain about returning a void
9451         expression from a destructor.
9453 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
9455         * class.c (alter_access): Accept a BINFO explaining how to get
9456         from the entity whose accessed is being altered to the type doing
9457         the altering.
9458         (handle_using_decl): New function containing code split out from ...
9459         (finish_struct_1): Here.
9461         * cp-tree.h (complete_type_or_else): Declare.
9462         * init.c (build_new_1, build_delete): Use it.
9463         * typeck.c (require_complete_type): Use complete_type, rather than
9464         expanding it inline.
9465         (complete_type_or_else): New function.
9466         (build_component_ref): Use it.
9467         (pointer_int_sum): Make sure the type pointed to is complete.
9468         (pointer_diff): Likewise.
9470         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
9471         types.
9473         * search.c (get_matching_virtual): Note that member templates
9474         cannot override virtual functions.
9476 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
9478         * pt.c (check_explicit_specialization): If DECLARATOR turned into
9479         an error_mark_node from lookup_template_function, return the same.
9480         (determine_specialization): Also make sure TEMPLATE_ID isn't an
9481         error_mark_node, before we try to read its operands.
9482         * decl.c (grokdeclarator): If we got an error_mark_node from
9483         check_explicit_specialization, just return it right back.
9485 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
9487         * class.c (instantiate_type): Don't treat template-ids that don't
9488         specify any template arguments as equivalent to ordinary
9489         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
9490         pointer-to-members for member templates.  Tidy slightly.
9491         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
9492         * init.c (build_offset_ref): Handle template-ids like ordinary
9493         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
9494         offset part of the OFFSET_REF.
9495         * typeck.c (build_unary_op): Change check for unknown types to
9496         look for OFFSET_REFs, not SCOPE_REFs.
9498 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
9500         * pt.c (is_member_template_class): New function.
9501         (push_template_decl_real): Use it.
9503 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
9505         * friend.c (do_friend): Add support for nested classes using
9506         member functions of the enclosing class as friends.
9508 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
9510         * call.c (convert_default_arg): Make global, not static.
9511         (convert_arg_for_ellipsis): Split out from ...
9512         (build_over_call): Here.
9513         * cp-tree.h (convert_default_arg); Declare.
9514         (convert_arg_to_ellipsis): Likewise.
9515         (do_member_init): Remove.
9516         * init.c (do_member_init): Remove; this code is dead.
9517         (expand_member_init): Remove much of this code; it is dead.
9518         * typeck.c (convert_arguments): Use convert_default_arg and
9519         convert_arg_for_ellipsis, rather than duplicating here.
9521         * call.c (convert_like): Don't fail silently if
9522         build_user_type_conversion fails.  Always return error_mark_node
9523         for failure.
9525 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
9527         * search.c (covariant_return_p): Complain about ambiguous base.
9529         * typeck.c (build_component_ref): Diagnose ref to nested type.
9531 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
9533         * decl.c (grokparms): Check that INIT isn't an error_mark_node
9534         before giving error about invalid type for default arg.
9536 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
9538         * call.c (build_method_call): Fix thinko.
9540 1998-06-10  Dave Brolley  <brolley@cygnus.com>
9542         * decl2.c (lang_decode_option): New argc/argv interface.
9543         * cp-tree.h (lang_decode_option): New argc/argv interface.
9544         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
9545         specified for cpplib-enabled compilers.
9546         * lex.c (lang_init): Don't check_newline for cpplib.
9547         (init_parse): Don't initialize cpplib here.
9549 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
9551         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
9552         piece before checking DECL_MUTABLE_P.
9554 1998-06-10  John Carr  <jfc@mit.edu>
9556         * tree.c (debug_binfo): Make printf format match arguments.
9558         * error.c (OB_PUTI): Make printf format match arguments.
9560 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
9562         * init.c (perform_member_init): Handle default-initialization.
9564         * except.c (build_throw): Handle throwing NULL.
9566         * typeck.c (build_x_function_call): Use resolve_offset_ref.
9568         * search.c (compute_access): Only strip an anonymous union
9569         for a FIELD_DECL.
9571         * call.c (add_builtin_candidates): Tweak.
9573         * cvt.c (build_expr_type_conversion): Restore code for conversion
9574         from class types.
9575         * decl2.c (delete_sanity): Use it.  Clean up.
9577         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
9579 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
9581         * typeck.c (c_expand_return): Don't warn about void expressions on
9582         return statements in functions returning void.
9584 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
9586         * pt.c (fn_type_unification): Revise documentation.  Tidy.
9587         (type_unification): Likewise.
9589 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
9591         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
9592         expand_end_catch.
9593         * parse.y (function_try_block): Rename expand_start_catch, and delete
9594         expand_end_catch.
9595         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
9596         expand_end_catch.
9598 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
9600         * search.c (lookup_member): New fn.
9601         * class.c (finish_struct_1): Use it.
9602         * decl.c (lookup_name_real): Use it.
9604 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9606         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
9608         * cp-tree.h: Add prototype for `maybe_print_template_context' and
9609         `maybe_make_one_only'.
9611         * decl.c (auto_function): Remove unused variable `decl'.
9613         * decl2.c: Include dwarf2out.h and dwarfout.h.
9615         * lex.c: Remove redundant declarations of `set_float_handler' and
9616         `asm_out_file'.
9618 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
9620         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
9621         time flag.  Call __cp_eh_info instead of __cp_exception_info.
9622         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
9623         (__cp_exception_info): Return offset into cp_eh_info structure to
9624         match what use to be the start of this structure.
9625         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
9626         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
9627         compile time flag.
9628         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
9629         __cp_eh_info instead of __cp_exception_info.
9631 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
9633         * decl.c (cp_finish_decl): Disable inlining of extern inlines
9634         with static variables.
9636 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
9638         * init.c (build_offset_ref): Correct previous change to use build,
9639         not build_min.
9641 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
9643         * class.c (instantiate_type): Handle pointer-to-members where the
9644         member is a template.
9645         * init.c (build_offset_ref): Likewise.
9646         * typeck.c (build_unary_op): Likewise.
9648 1998-06-07  Richard Henderson  <rth@cygnus.com>
9650         * lex.c (lang_init_options): New function.
9651         (lang_init): Remove flag_exceptions == 2 hack.
9653 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
9655         * search.c (envelope_add_decl): Tweak for implicit typename.
9657         * call.c (joust): Also warn about confusing conversion op/constructor
9658         overload resolution.
9660         * spew.c (yylex): Also return the TYPE_DECL if got_object.
9661         Don't clear got_object after '~'.
9662         * call.c (build_scoped_method_call): Tweak destructor handling.
9663         (build_method_call): Likewise.
9664         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
9665         TYPE_MAIN_VARIANT for destructors.
9666         * semantics.c (finish_object_call_expr): Complain about calling a
9667         TYPE_DECL.
9669 1998-06-05  Per Bothner  <bothner@cygnus.com>
9671         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
9672         Define - update needed by gcc.c change.
9674 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
9676         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
9678 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9680         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
9681         * decl.c (lookup_name_real): Add namespaces_only parameter.
9682         If set, return only NAMESPACE_DECLs.
9683         (select_decl): Likewise.
9684         (identifier_type_value): Give additional parameter.
9685         (lookup_name_nonclass): Likewise.
9686         (lookup_name): Likewise.
9687         (find_binding): Skip namespace aliases.
9688         (binding_for_name): Likewise.
9689         (push_namespace): Check for namespace aliases.
9690         (lookup_name_namespace_only): New function.
9691         (begin_only_namespace_names, end_only_namespace_names): New functions.
9692         * decl2.c (set_decl_namespace): Skip namespace aliases.
9693         (do_using_directive): Likewise.
9694         (do_namespace_alias): Produce namespace aliases, fix alias
9695         redeclaration.
9696         * error.c (dump_decl): Support SCOPE_REF.
9697         * parse.y (extdef): Wrap lookup with namespace_only for namespace
9698         aliases and using declarations.
9700 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
9702         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
9704         * error.c (dump_expr): Clean up NEW_EXPR case.
9706 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9708         Suggested by Brendan Kehoe
9709         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
9710         treat it as using ::decl.
9712         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
9714         * tree.c (mapcar): Support NEW_EXPR.
9716         * error.c (dump_expr): Support NEW_EXPR.
9718 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
9720         * method.c (make_thunk): Use overload machinery to make name.
9721         * search.c (covariant_return_p): New fn.
9722         (get_matching_virtual): Use it.
9724         * init.c (build_new_1): Fix check for void.
9726 1998-06-01  Per Bothner  <bothner@cygnus.com>
9728         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
9729         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
9730         java_int_type_node, java_long_type_node, java_float_type_node,
9731         java_double_type_node, java_char_type_node, java_boolean_type_node):
9732         New "primitive" types, with predefined names __java_byte etc.
9733         (record_builtin_java_type):  New function.
9734         (init_decl_processing):  Make Java types with record_builtin_java_type.
9735         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
9736         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
9737         (grokfndecl):  Call check_java_method for Java classes.
9738         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
9739         (process_overload_item):  Match types against specific
9740         java_XX_type_node types, rather than using is_java_type.
9741         * class.c (finish_struct_1):  Don't add default copy constructor
9742         or operator= if TYPE_FOR_JAVA.
9743         (pop_lang_conext):  Restore strict_prototyp proper if Java.
9744         * decl2.c (acceptable_java_type, check_java_method):  New functions.
9745         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
9746         (tsubst):  Move common statement after if statement.
9747         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
9749 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
9751         * pt.c (for_each_template_parm): Use first_rtl_op.
9753         * tree.c (build_cplus_array_type_1): Also check index_type for
9754         template parms.
9756 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
9758         * pt.c (tsubst): Always copy BINFO_BASETYPES.
9760 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
9762         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
9763         TYPE_SIZE_UNIT too.
9765 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
9767         * decl.c (grokdeclarator): Don't complain about in-class
9768         initialization of static consts if we don't really know the type
9769         of the variable.
9771 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
9773         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
9774         * method.c (build_destructor_name): New fn.
9775         * decl2.c (maybe_retrofit_in_chrg): Split out...
9776         (grokclassfn): From here.  Reorganize.
9777         * decl.c (grok_ctor_properties): Make sure ctors for types with
9778         vbases have the in_chrg parm.
9779         * pt.c (instantiate_class_template): Update
9780         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
9781         grok_*_properties.
9782         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
9784 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
9786         * pt.c (instantiate_decl): Make test for whether or not static
9787         variables should be instantiated early match its comment.
9789 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
9791         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
9792         a member.
9793         (start_function): Call check_default_args.
9794         * decl2.c (grokfield): Don't call check_default_args.
9795         (check_default_args): Use cp_error_at.
9796         * lex.c (do_pending_defargs): Call check_default_args.
9798 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
9800         * call.c (build_method_call): Make sure get_type_value returns
9801         something before we try to use its TYPE_MAIN_VARIANT.
9802         (build_scoped_method_call): Likewise.
9804 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
9806         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
9807         initialize an array.
9809         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
9810         DECL_VIRTUAL_P.
9812         * friend.c (do_friend): Clarify template warning.
9814 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
9816         * decl.c (shadow_label): Don't treat decls as identifiers.
9817         (maybe_push_to_top_level): Clear shadowed_labels.
9819         * pt.c (instantiate_decl): Reset lineno and filename after calling
9820         regenerate_decl_from_template.
9822         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
9823         error_mark_node.
9825 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
9827         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
9829 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
9831         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
9832         (convert_nontype_argument): Handle cases when nontype template
9833         parameters become classes after substitution.
9835 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
9837         * friend.c (is_friend): Use comptypes, rather than == to compare
9838         types.  Modify for new representation of template friends.
9839         (make_friend_class): Likewise.
9840         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
9841         (instantiate_class_template): Deal with template friends.
9843         * decl.c (store_parm_decls): Remove redundant call to
9844         expand_main_function.
9846 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
9848         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
9849         DECL_USE_TEMPLATE.
9851 1998-05-26  Per Bothner  <bothner@cygnus.com>
9853         * language_as_string:  Handle lang_java.
9855 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
9857         * decl.c (pushdecl): Don't copy the type_decl.
9859 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9861         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
9862         current_class_type.
9863         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
9865         * parse.y (complex_direct_notype_declarator): Use $1 to access
9866         scope of notype_qualified_id.
9868 1998-05-26  Dave Brolley  <brolley@cygnus.com>
9870         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
9871         (init_parse): Initialize cpplib interface.
9873         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
9874         empty continuation.
9876 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
9878         * decl.c (pushtag): Avoid crashing on erroneous input.
9880 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9882         * decl.c (push_namespace): Only produce one unique name for
9883         anonymous namespaces.
9884         (get_unique_name): Remove.
9886 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
9888         * call.c (tourney): Don't do any extra comparisons.
9890         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
9892         * cp-tree.h (processing_template_parmlist): Declare.
9893         * decl.c (pushtag): Don't call push_template_decl when we
9894         shouldn't.
9895         * pt.c (processing_template_parmlist): New variable.
9896         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
9897         (complete_template_args): Use it.
9898         (add_to_template_args): Likewise.
9899         (innermost_args): Likewise.
9900         (tsubst): Likewise.
9901         (begin_template_parm_list): Use processing_template_parmlist.
9902         (end_template_parm_list): Likewise.
9904         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
9905         * decl.c (grokdeclarator): Use it.
9906         * decl2.c (grok_x_components): Likewise.
9907         * init.c (initializing_context): Likewise.
9908         * method.c (do_build_copy_constructor): Likewise.
9909         (do_build_assign_ref): Likewise.
9910         * search.c (compute_access): Likewise.
9911         * typeck.c (build_component_ref): Likewise.
9913         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
9914         unnamed type a typedef name "for linkage purposes".
9916         * pt.c (lookup_template_class): Don't look at
9917         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
9919         * method.c (build_overload_int): Handle error cases gracefully.
9921         * pt.c (instantiate_decl): Handle static member variables
9922         correctly.
9924         * pt.c (tsubst): Use the tsubst'd type when producing new
9925         TEMPLATE_PARM_INDEX nodes.
9927 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
9929         * tree.c (cp_tree_equal): Handle pointers to member functions.
9931         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
9932         sure the type of the REF_BIND is a reference type.
9933         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
9934         target_type for clarity.
9936         * parse.y (xcond): Move call to condition_conversion ...
9937         * semantics.c (finish_for_cond): Here.
9938         * parse.c: Regenerated.
9940 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
9942         * decl.c (push_namespace): Namespaces have type void.
9943         * typeck2.c (incomplete_type_error): Complain about namespace
9944         used as expression.
9945         * typeck.c (decay_conversion): Likewise.
9947 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9949         * error.c (dump_expr): Support namespaces.
9951 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
9953         * cp-tree.def: Add SRCLOC.
9954         * cp-tree.h: Add struct tree_srcloc and accessor macros.
9955         * tree.c (build_srcloc, build_srcloc_here): New fns.
9956         * pt.c (add_pending_template): Use build_srcloc_here.
9957         (push_tinst_level): Update last_template_error_tick before erroring.
9958         (instantiate_decl): Restore lineno and input_filename before
9959         calling add_pending_template.
9960         * decl2.c (finish_file): Set up lineno and input_filename for
9961         pending templates.
9963 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
9965         * decl.c (lang_print_error_function): New fn.
9966         (init_decl_processing): Set print_error_function to use it.
9967         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
9969         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
9970         ICS_BAD_FLAG.
9972         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
9973         copy-initialization.
9975         * class.c (build_vtable_entry): Use int_fits_type_p.
9976         (build_vtable): Pass a signed offset to build_vtable_entry.
9977         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
9978         set_rtti_entry): Likewise.
9980 1998-05-22  Per Bothner  <bothner@cygnus.com>
9982         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
9983         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
9985 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
9987         * pt.c (print_template_context): Use fprintf instead of cp_error.
9989         * pt.c (determine_specialization): Just return an error_mark_node.
9990         Also print the decl we want in error messages.  If we complain,
9991         return error_mark_node.
9992         (tsubst_friend_function): Set lineno and input_filename so
9993         error messages will be useful.
9994         (instantiate_template): Just return an error_mark_node.
9995         (check_explicit_specialization): Don't mess with a returned
9996         error_mark_node.
9998         * pt.c (print_template_context): Add new argument.
9999         (maybe_print_template_context): New fn.
10000         (push_tinst_level): Increment tinst_level_tick.
10001         (pop_tinst_level): Likewise.
10002         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
10003         xrealloc instead of xmalloc.
10005         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
10007 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
10009         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
10010         if the template we looked up is the same as the one we already
10011         have.
10013 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
10015         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
10016         (cpp_reader,parse_in): Add for cpplib.
10017         (check_newline): Call handle_sysv_pragma with new interface.
10018         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
10020         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
10021         (sub_getch): Call GETC for cpplib.
10023         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
10024         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
10026         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
10028 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
10030         * decl2.c (maybe_make_one_only): New fn.
10031         (import_export_vtable): Use it.
10032         (import_export_decl): Likewise.
10033         * pt.c (mark_decl_instantiated): Likewise.
10035 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
10037         * decl2.c (find_representative_member): Rename to ...
10038         (build_anon_union_vars): New function.
10039         (finish_anon_union): Fix stupidity of previous change.
10041 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
10043         * decl.c (grokfndecl): Handle definition of specialization in
10044         friend declaration.
10046         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
10048 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
10050         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
10051         to look for type declarations.
10052         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
10053         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
10054         (finish_member_class_template): Declare.
10055         * decl.c (pushtag): Put member class templates on the
10056         CLASSTYPE_TAGS list, just as for ordinary member classes.
10057         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
10058         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
10059         IDENTIFIER_NAMESPACE_VALUEs.
10060         * parse.y (component_decl): Move code to ...
10061         * semantics.c (finish_member_class_template): New function.
10062         Don't put member class templates on the list of components for a
10063         class.
10064         * parse.c: Regenerated.
10065         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
10066         In fact, don't use DECL_CONTEXT at all here.
10068 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10070         * decl.c (record_unknown_type): New function.
10071         (init_decl_processing): Call it for the unknown and global type
10072         nodes.
10074 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
10076         * decl2.c (find_representative_member): New function.
10077         (finish_anon_union): Use it.
10079         * cp-tree.h (MAIN_NAME_P): New macro.
10080         (DECL_MAIN_P): Likwise.
10081         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
10082         (grokfndecl): Use the new macros.
10083         (grokdeclarator): Likewise.
10084         (start_function): Likewise.
10085         (store_parm_decls): Likewise.
10086         (finsh_function): Likewise.
10087         * friend.c (do_friend): Likewise.
10088         * typeck.c (build_function_call_real): Likewise.
10089         (build_unary_op): Likewise.
10091 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
10093         * decl2.c (start_objects, finish_objects, do_dtors,
10094         do_ctors): Split out from...
10095         (finish_file): ...here.
10097 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
10099         * tree.c (is_overloaded_fn): Don't abort on placeholders from
10100         push_class_decls.
10102 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
10104         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
10106         * error.c (dump_expr): Handle an ARROW_EXPR.
10108 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
10110         * decl.c (saveable_obstack): Declare.
10111         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
10112         declare, if necessary.
10114 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
10116         * call.c (compare_qual): Remove.
10117         (is_subseq): Tweak.
10118         (is_properly_derived_from): New function.
10119         (maybe_handle_ref_bind): Likewise.
10120         (maybe_handle_implicit_object): Likewise.
10121         (compare_ics): Modify substantially to bring into conformance with
10122         the standard.
10123         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
10124         (comp_cv_qualification): Declare.
10125         (comp_cv_qual_signature): Likewise.
10126         * typeck.c (comp_cv_qualification): Likewise.
10127         (comp_cv_qual_signature): Likewise.
10129 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10131         * Makefile.in (parse.o): Depend on toplev.h.
10133         * class.c (typecode_p): Remove prototype and definition.
10135         * cp-tree.h (currently_open_class, is_empty_class, member_p):
10136         Add prototype.
10138         * decl.c (push_overloaded_decl_top_level): Remove prototype and
10139         definition.
10141         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
10142         in call to `cp_thing'.
10143         (cp_warning): Likewise for function pointer `warning'.
10145         * except.c (do_function_call): Remove prototype and definition.
10146         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
10148         * method.c (is_java_type): Add prototype and make it static.
10150         * parse.y: Include toplev.h.
10152         * pt.c (type_unification): Remove unused variable `arg'.
10153         (instantiate_decl): Likewise for `save_ti'.
10155         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
10157 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
10159         * init.c (build_member_call): Handle template_ids.
10160         * parse.y (primary): Add global_scope template_id.
10162 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
10164         * decl2.c (get_sentry): Use end_temporary_allocation.
10165         Don't declare permanent_obstack.
10167 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
10169         * parse.y (.finish_new_placement): New non-terminal.
10170         (unary_expr, new_type_id): Use it.
10171         * parse.c: Regenerated.
10173 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
10175         * pt.c (redeclare_class_template): Say where the original definition
10176         of the template-parameter's default argument appeared.
10178 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
10180         * call.c (build_over_call): Tweak empty class handling.
10182         * decl.c (make_typename_type): Use currently_open_class.
10184         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
10186 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
10188         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
10189         for a type unless it is one.
10191         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
10193 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
10195         * Makefile.in (program_transform_name, objdir): Define.
10197         * Makefile.in (BISON): Use bison from the build tree if it exists.
10198         (FLEX): Likewise.
10200 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
10202         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
10204         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
10206 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
10208         * call.c (build_scoped_method_call): Likewise.
10210 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
10212         * init.c (build_new_1): Call suspend_momentary around the creation
10213         of values that must be saved for exception handling.
10214         * parse.y (.build_new_placement): New non-terminal.
10215         (unary_expr, new_placement): Use it.
10216         * parse.c: Regenerated.
10218 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
10220         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
10221         old and new types.
10223         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
10224         canonical type.
10226         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
10228 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
10230         * decl.c (start_decl): Revert problem change.
10232         * Makefile.in (CONFLICTS): Fix.
10234 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10236         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
10238 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
10240         * class.c (finish_struct_1): Use BINFO_SIZE.
10242         * decl.c (start_decl): Use 'tem'.
10244 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
10246         * exception.cc: Include eh-common.h.
10247         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
10248         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
10249         (__cp_push_exception): Initialize eh_info struct as well.
10250         * except.c: Remove local structs and include eh-common.h.
10251         (init_exception_processing): Set language and version codes.
10252         (call_eh_info): Add presence of eh_info to runtime description of
10253         struct cp_eh_info.
10254         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
10255         * semantics.c (finish_try_block): Call start_catch_block() and
10256         end_catch_block().
10257         * parse.y (function_try_block): Call start_catch_block() and
10258         end_catch_block().
10260 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
10262         * typeck.c (original_type): New function.
10263         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
10264         to see if they're actually the same.
10265         * cp-tree.h (original_type): Declare.
10267 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10269         * Makefile.in (lex.o): Depend on output.h.
10271         * call.c (add_function_candidate): Remove unused variable `cand'.
10272         (add_conv_candidate): Likewise.
10273         (build_builtin_candidate): Likewise.
10275         * cp-tree.h: Add prototype for `types_overlap_p'.
10277         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
10279         * decl2.c (merge_functions): Remove unused variables `tmp' and
10280         `tempn'.
10282         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
10283         (code_as_string): Likewise.
10284         (language_as_string): Likewise.
10285         (parm_as_string): Likewise.
10286         (op_as_string): Likewise.
10287         (assop_as_string): Likewise.
10288         (cv_as_string): Likewise.
10290         * lex.c: Include output.h.
10292         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
10294         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
10295         ATTRIBUTE_UNUSED.
10297         * tinfo.cc (__class_type_info::dcast): Change the type of variable
10298         `i' from int to size_t.
10300         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
10301         ATTRIBUTE_UNUSED.
10303 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
10305         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
10306         DECL_NAMESPACE_SCOPE_P.
10307         (lang_decl_name): Likewise.
10308         * pt.c (tsubst_friend_function, tsubst): Likewise.
10309         * decl.c (pushdecl, redeclaration_error_message, start_decl,
10310         cp_finish_decl, start_function): Likewise.
10311         * class.c (finish_struct_1): Likewise.
10312         * call.c (build_over_call): Likewise.
10313         (compare_ics): Use DERIVED_FROM_P.
10315 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
10317         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
10318         * method.c (build_mangled_name): Use it.
10319         (build_decl_overload_real): Likewise.
10321         * error.c (dump_simple_decl): New function, broken out from ...
10322         (dump_decl): Use it.
10324 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
10326         * ptree.c (lang_print_xnode): Add missing `break'.
10328         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
10330         * call.c (add_template_candidate): Adjust for changes to
10331         fn_type_unification.
10332         (add_template_candidate_real): Likewise.
10333         (add_template_conv_candidate): Likewise.
10334         (build_user_type_conversion_1): Likewise.
10335         (build_new_function_call): Likewise.
10336         (build_object_call): Likewise.
10337         (build_new_op): Likewise.
10338         (build_new_method_call): Likewise.
10339         * class.c (instantiate_type): Likewise.
10340         * cp-tree.h (unification_kind_t): New type.
10341         (fn_type_unification): Adjust prototype.
10342         (type_unificaiton): Likewise.
10343         * pt.c (UNIFY_ALLOW_NONE): New macro.
10344         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
10345         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
10346         (UNIFY_ALLOW_DERIVED): Likewise.
10347         (unify): Change prototype.
10348         (maybe_adjust_types_for_deduction): New function.
10349         (check_cv_quals_for_unify): Likewise.
10350         (determine_specialization): Adjust.
10351         (fn_type_unification): Likewise.
10352         (type_unification): Likewise.
10353         (type_unification_real): Likewise.  Use
10354         maybe_adjust_types_for_deduction.  Fix mishandling of
10355         back-unification of template functions passed as arguments.  Pass
10356         appropriate combination of UNIFY_ALLOW_* to unify.
10357         (unify): Remove unused NTPARMS parameter.  Use
10358         check_cv_quals_for_unify.  Remove bogus code that allowed
10359         too-generous unification in order to adhere more closely to standard.
10360         (get_bindings_real): Adjust.
10361         (get_class_bindings): Likewise.
10363         * method.c (build_overload_identifier): Only use the innermost
10364         template arguments when mangling.
10365         * pt.c (tsubst_template_argument_vector): New function.
10366         (complete_template_args): Deal with the situation where the
10367         extra_args contain more than one level of arguments.
10368         (lookup_template_class): Deal with member template classes, which
10369         may have more than one level of arguments.
10370         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
10371         Improve handling of member template classes.  Use
10372         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
10373         tsubst_template_argument_vector where appropriate.
10374         (regenerate_decl_from_template): Break out from ...
10375         (instantiate_decl): Here.
10377         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
10378         * parse.h: Regenerated.
10379         * parse.c: Really regenerated.
10381         * cp-tree.h (finish_unary_op_expr): New function.
10382         (finish_id_expr): Likewise.
10383         (begin_new_placement): Likewise.
10384         (finish_new_placement): Likewise.
10385         (finish_declarator): Likewise.
10386         (finish_translation_unit): Likewise.
10387         (finish_parmlist): Likewise.
10388         (begin_class_definition): Likewise.
10389         (finish_class_definition): Likewise.
10390         (finish_default_args): Likewise.
10391         (finish_inline_definitions): Likewise.
10392         * parse.y (GCC_ASM_KEYWORD): Remove.
10393         (TYPENAME_ELLIPSIS): Likewise.
10394         * parse.c: Regenerated.
10395         Use new functions in semantics.c in the actions for many rules.
10396         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
10397         * hash.h: Regenerated.
10398         * semantics.c (finish_expr_stmt): Allow NULL expr.
10399         (finish_unary_op_expr): New function, containing
10400         code previously in parse.y.
10401         (finish_id_expr): Likewise.
10402         (begin_new_placement): Likewise.
10403         (finish_new_placement): Likewise.
10404         (finish_declarator): Likewise.
10405         (finish_translation_unit): Likewise.
10406         (finish_parmlist): Likewise.
10407         (begin_class_definition): Likewise.
10408         (finish_class_definition): Likewise.
10409         (finish_default_args): Likewise.
10410         (finish_inline_definitions): Likewise.
10412 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
10414         * typeck.c (build_c_cast): Don't decay arrays and functions to
10415         pointer type when converting to a class type.
10417 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
10419         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
10420         (DECL_CLASS_SCOPE_P): Likewise.
10422 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
10424         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
10425         * decl2.c (constructor_name_full): Likewise.
10427 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
10429         * tree.c (mapcar): Add OVERLOAD support.
10431         * init.c (resolve_offset_ref): We must use basetype_path before we
10432         destroy it with a call to convert_pointer_to.
10434 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
10436         * class.c (currently_open_class): New fn.
10437         * decl.c (lookup_name_real): Use it.
10438         * search.c (lookup_field): Likewise.
10440 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10442         * cp-tree.def (OVERLOAD): New node.
10443         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
10444         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
10445         (NAMESPACE_BINDING): Remove.
10446         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
10447         namespace_binding.
10448         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
10449         Define.
10450         (tree_overload): New struct.
10451         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
10452         (REAL_IDENTIFIER_TYPE_VALUE): Define.
10453         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
10454         (lang_decl_flags): Remove in_namespace.
10455         (lang_decl): Remove chain.
10456         (DECL_CHAIN, DECL_NAMESPACE): Remove.
10457         (flag_honor_std): Declare extern.
10458         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
10459         namespace_binding, set_namespace_binding,
10460         lookup_function_nonclass, cat_namespace_levels,
10461         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
10462         scratch_ovl_cons, ovl_member, build_overload): Declare.
10463         (decl_list_length, get_namespace_id, current_namespace_id,
10464         overloaded_globals_p): Remove.
10465         (lookup_using_namespace, qualified_lookup_using_namespace): Change
10466         return type.
10467         (push_scratch_obstack): New macro.
10468         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
10469         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
10470         convs, fns.
10471         (build_new_function_call): Iterate using OVL_CHAIN.
10472         Print DECL_NAME in when reporting ambiguities.
10473         (build_object_call): Iterate using OVL_NEXT for fns, convs.
10474         (build_new_op): Call lookup_function_nonclass.
10475         Iterate using OVL_NEXT.
10476         (build_op_delete_call): Change detection of members.
10477         Do not wrap TREE_LIST around fields and single global functions.
10478         (build_over_call): Don't push a class level if the context is a
10479         namespace.
10480         (build_new_method_call): Iterate using OVL_NEXT.
10481         * class.c (add_method): Chain overloaded members using
10482         build_overload.  Remove copying of method.
10483         (grow_method): When iterating through the obstack, expect OVERLOAD
10484         nodes.  Chain overload members.
10485         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
10486         nodes in call to get_baselinks.
10487         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
10488         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
10489         fdecls that are OVERLOAD nodes.
10490         (validate_lhs): New function.
10491         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
10492         code.  Use DECL_NAME in error messages.  Split code between global
10493         and member function processing.
10494         * decl.c (global_type_node): New static variable.
10495         (in_std): New global.
10496         (struct binding_level): New field usings.
10497         (resume_binding_level): Assert that we are not in a class.
10498         (toplevel_bindings_p): Just check for namespace_p or
10499         pseudo_global.
10500         (resume_level): Remove.
10501         (find_binding): New function.
10502         (binding_for_name): Call it.
10503         (namespace_binding, set_namespace_binding): New functions.
10504         (push_namespace): Associate binding level with new namespace,
10505         resume_binding_level for existing namespace.  Remove old code.
10506         Fake std by counting.
10507         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
10508         (maybe_push_to_top_level): Save current namespace.
10509         (pop_from_top_level): Restore saved namespace.
10510         (pop_namespace): Call suspend_binding_level.  Remove old code.
10511         (cat_namespace_levels): New function.
10512         (set_identifier_type_value_with_scope): For namespace bindings,
10513         set BINDING_TYPE, and use global_type_node.
10514         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
10515         (identifier_type_value): New function.
10516         (pushtag): If no context, use current_namespace.
10517         (duplicate_decls): Don't process DECL_CHAIN.
10518         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
10519         already set.  Never reset it to NULL_TREE.  Lookup global variables
10520         in their namespace.  Push overloaded templates if they are on
10521         namespace level.
10522         (pushdecl_namespace_level): New function.
10523         (pushdecl_top_level): Implement using pushdecl_namespace_level.
10524         (pushdecl_using_decl): New function.
10525         (overloaded_globals_p): Remove.
10526         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
10527         them.  Use namespace_binding and set_namespace_value.
10528         (redeclaration_error_message): Complain if the declarations come
10529         from different namespaces.
10530         (lookup_tag): On namespace level, look in the BINDING_TYPE.
10531         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
10532         old code.
10533         (select_decl): New function.
10534         (lookup_name_real): Call it for qualified and unqualified lookup.
10535         Pass tree_bindings from the stack.
10536         If prefer_type is 1, also accept namespaces.
10537         (lookup_function_nonclass): New function.
10538         (init_decl_processing): Set the binding level of the global
10539         namespace to global_binding_level.
10540         Build a proper type list for __builtin_apply.
10541         Initialize std_node to "fake std" if flag_honor_std is set.
10542         Initialize global_type_node.
10543         Allocated bad_alloc in namespace std if flag_honor_std.
10544         (define_function): Set the DECL_CONTEXT to the current_namespace.
10545         (start_decl): A namespace is not considered as a context here.  If
10546         the DECL_CONTEXT is a namespace, push the decl.
10547         (cp_finish_decl): Check for namespaces used as initializers.
10548         (grokfndecl): Add namespace parameter.  Remove processing of
10549         DECL_CHAIN.
10550         (grokvardecl): Add namespace parameter.
10551         (grokdeclarator): Process SCOPEs that are namespaces.  For
10552         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
10553         (start_function): Check for contexts that are namespaces.
10554         Set context for declarations that have not been pushed.
10555         (store_parm_decls): Check for ::main only.
10556         (finish_function): Likewise.
10557         (start_method): Check for contexts that are namespaces.
10558         (start_method): Remove DECL_CHAIN processing.
10559         * decl2.c (flag_honor_std): Declare.
10560         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
10561         (decl_namespace_list): New static global.
10562         (grok_x_components): Ignore namespaces as type contexts.
10563         (check_classfn): Expect OVERLOAD nodes.
10564         (grokfield): Remove DECL_CHAIN processing.
10565         (finish_file): Call cat_namespace_levels.
10566         (merge_functions): New function.
10567         (ambiguous_decl): Rewrite.
10568         (lookup_using_namespace): Produce tree_bindings.
10569         (qualified_lookup_using_namespace): Likewise.
10570         (set_decl_namespace, decl_namespace, current_decl_namespace,
10571         push_decl_namespace, pop_decl_namespace): New functions.
10572         (arg_lookup): New struct.
10573         (add_function, arg_assoc_namespace, arg_assoc_class,
10574         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
10575         New functions.
10576         (get_namespace_id, current_namespace_id): Remove.
10577         (do_toplevel_using_decl): Rewrite.
10578         (do_class_using_decl): Complain about namespace qualifiers.
10579         (do_using_directive): Sorry if not on namespace level.  Complain
10580         about unknown namespaces.
10581         * error.c (dump_aggr_type): Check for namespace contexts.
10582         * except.c (init_exception_processing): Push terminate into std.
10583         * friend.c (is_friend): A namespace is not a context, here.
10584         * init.c (expand_member_init): Remove DECL_CHAIN processing.
10585         (build_offset_ref): Process OVERLOAD nodes.
10586         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
10587         * lex.c (identifier_type): Loop using OVL_CHAIN.
10588         (see_typename): Set looking_for_typename to 2.
10589         (real_yylex): Likewise.
10590         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
10591         (do_scoped_id): Expect OVERLOAD nodes.
10592         Change calling convention for qualified_lookup_using_namespace.
10593         (build_lang_decl): Don't set in_namespace anymore.
10594         * method.c (typevec_size): New global.
10595         (build_overload_nested_name): Return if global_namespace.
10596         Otherwise, always expect a declaration context.
10597         (build_qualified_name): Likewise.
10598         Make sure we don't write beyond typevec_size.
10599         (build_decl_overload_real): Likewise.
10600         Allocate one extra slot for the namespace.
10601         (hack_identifier): Mark code dead.
10602         Process OVERLOAD and NAMESPACE_DECL nodes.
10603         * parse.y (program): Pop namespaces until in global namespace.
10604         (extdef): In a using-declaration, don't discard the identifier if
10605         there is no declaration.
10606         (left_curly): Ignore type contexts which are namespaces.
10607         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
10608         used as scope.
10609         * pt.c (template_class_depth): Expect types to be namespaces.
10610         (determine_specialization): Simplify by expecting OVERLOAD nodes.
10611         (push_template_decl): Push into namespace level.
10612         Reset ctx if it is a namespace.
10613         Set DECL_CONTEXT to current_namespace if not set already.
10614         Ignore real contexts that are namespaces.
10615         (mangle_class_name_for_template): Skip global_namespace.
10616         Mangle other namespaces as declarations.
10617         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
10618         (lookup_template_class): Push into namespace of context.
10619         If the context is a namespace, set it to global_namespace.
10620         Use id_context for mangling.
10621         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
10622         (tsubst_friend_function): Ignore namespace contexts.
10623         Push into namespace level.
10624         (tsubst): Handle NAMESPACE_DECL nodes.
10625         Remove DECL_CHAIN processing.
10626         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
10627         * ptree.c (print_lang_identifier): Print bindings.
10628         (lang_print_xnode): Print OVERLOAD nodes.
10629         * rtti.c (init_rtti_processing): Push type_info into std.
10630         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
10631         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
10632         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
10633         lookup_fnfields_here): Likewise.
10634         Process all nodes, instead of going through TREE_CHAIN.
10635         * sig.c (build_signature_pointer_or_reference_type): Set context
10636         to global_namespace.
10637         (build_signature_table_constructor): Expect OVERLOAD nodes.
10638         * spew.c (yylex): Save old setting of looking_for_typename.
10639         * tree.c (decl_list_length): Remove.
10640         (binding_init): New function.
10641         (count_functions): Rewrite.
10642         (is_overloaded_fn): Expect OVERLOAD nodes.
10643         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
10644         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
10645         ovl_member): New functions.
10646         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
10647         (type_unknown_p): Likewise.
10648         (require_instantiated_type): Likewise.
10649         (build_component_ref): Declare code dead.
10650         (build_x_function_call): Create and expect OVERLOAD nodes.
10651         (build_function_call_real): Check for ::main only.
10652         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
10653         (convert_for_assignment): Check for TREE_LIST before accessing
10654         TREE_VALUE.
10655         * decl.c (duplicate_decls): Check for namespace bindings instead
10656         of global bindings.
10657         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
10658         lookup_name_current_level, start_decl, xref_tag,
10659         finish_enum): Likewise.
10660         * init.c (build_offset_ref): Likewise.
10661         * search.c (lookup_field): Likewise.
10662         (lookup_fnfields): Likewise.
10663         (dfs_debug_mark): Likewise.
10664         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
10665         (poplevel_class, pop_from_top_level): Likewise.
10666         * decl2.c (finish_method): Likewise.
10667         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
10668         * decl.c (record_builtin_type): Likewise.
10669         (init_decl_processing, grokfndecl): Likewise.
10670         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
10671         (make_lang_type): Likewise.
10672         * parse.y (make_thunk): Likewise.
10673         * pt.c (tsubst): Likewise.
10674         * tree.c (debug_binfo): Likewise.
10675         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
10676         tinfo2.cc, inc/new.h: Add std qualifications.
10677         * inc/new: Wrap with namespace std if __HONOR_STD.
10678         * inc/typeinfo: Likewise.
10680 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
10682         * call.c (build_user_type_conversion_1): Handle second_conv
10683         properly for templates.
10685 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
10687         * method.c (build_decl_overload_real): Set TREE_USED flag to
10688         zero for build_type_variants nodes as well.
10690 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
10692         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
10694 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
10696         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
10697         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
10698         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
10699         xref.o): Add toplev.h dependencies.
10701 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
10703         * errfn.c (cp_error, cp_warning): Remove declarations for
10704         error and warning respectively.
10706 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10708         * error.c: Convert to using ctype macros defined in system.h.
10709         * method.c: Likewise.
10710         * xref.c: Likewise.
10711         * lex.c: Likewise.  Also remove redundant system header stuff.
10713 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
10715         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
10716         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
10717         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
10718         xref.c: Add include of toplev.h.
10720 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
10722         * tree.c (perm_manip): Also regenerate the RTL of an extern.
10723         (copy_to_permanent): Use end_temporary_allocation.
10725 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
10727         * init.c (expand_vec_init): The initialization of each array
10728         element is a full-expression.
10730 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
10732         * method.c (build_mangled_name): Add a call to build_type_variant
10733         to get the right type.
10735 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
10737         * Makefile.in: Add .SUFFIXES.
10739         * cp-tree.def: Remove NAMESPACE_DECL.
10741 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
10743         * call.c (build_over_call): Do evaluate arg even if it has empty
10744         class type.
10745         * decl.c (start_function): Don't push a member function.
10747 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
10749         * Makefile.in (g++FAQ.info): Put -o option before input file.
10751 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
10753         * gxxint.texi: Add info for squangling codes K and B.
10755 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
10757         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
10758         the expression in templates.
10759         (finish_stmt_expr): Likewise.
10761 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
10763         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
10765 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
10767         * decl.c (maybe_push_to_top_level): Always clear
10768         current_template_parms and processing_template_decl.
10769         (pushtag): Remove check of current_class_type and some comments,
10770         since maybe_push_to_top_level no longer creates confusion.
10772 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
10774         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
10775         (DECL_CLASS_TEMPLATE_P): Likewise.
10776         (DECL_PRIMARY_TEMPLATE): Likewise.
10777         (PRIMARY_TEMPLATE_P): Use it.
10778         (push_template_decl_real): New function.
10779         (redeclare_class_template): Take new template parameters as
10780         input.
10781         (is_specialization_of): New function.
10782         (comp_template_args): Declare.
10783         * decl.c (pushtag): Handle friend template classes.
10784         (xref_tag): Likewise.  Use new calling convention for
10785         redeclare_class_template.
10786         * decl2.c (grok_x_components): Handle friend templates.
10787         * friend.c (is_friend): Use is_specialization_of where
10788         appropriate.  Deal with friend class templates.
10789         (make_friend_class): Let a class template be friends with itself.
10790         * pt.c (comp_template_args): Remove declaration.
10791         (tsubst_friend_class): New function.
10792         (push_template_decl_real): New function.
10793         (push_template_decl): Use it.
10794         (redeclare_class_template): Adjust for new calling convention.
10795         (comp_template_args): Give it external linkage.
10796         (instantiate_class_type): Use tsubst_friend_class to deal
10797         with friend templates.
10798         * typeck.c (comptypes): Use comp_template_args, rather than
10799         expanding it inline.
10800         * parse.y (component_decl): Handle a nested template type
10801         like other component type declarations.
10803         * pt.c (check_explicit_specialization): Handle overloaded
10804         constructors correctly.
10806         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
10807         (lookup_template_class): Use it.
10809 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
10811         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
10812         * cp-tree.h: Add WRAPPER support.
10813         * call.c (add_candidate): Split out from add_*_candidate fns.
10814         (build_over_call): Take the candidate instead of function and args.
10815         Enforce access control here.  Emit overload warnings here.
10816         (add_warning): New fn.
10817         (joust): Add WARN parm.  If not set, call add_warning instead of
10818         printing a warning.  Re-enable some warnings.
10819         (tourney): Pass it.
10820         (convert_like): Adjust.
10821         (build_new_op): Adjust.
10822         (build_new_function_call): Adjust.
10823         (build_user_type_conversion_1): Adjust.
10824         (USER_CONV_FN): Adjust.
10825         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
10826         build_int_wrapper): New fns.
10828 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
10830         * pt.c (unify): Fix typo in previous change.
10832 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
10834         * error.c (dump_type_real): Declare canonical_name.
10836         * typeck.c (comp_target_types): Fix PMFs.
10838 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
10840         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
10841         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
10842         TEMPLATE_DECL.
10844         * pt.c (tsubst): Decrease the template-level of
10845         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
10846         TEMPLATE_PARM_INDEX.
10847         (template_decl_level): New function.
10848         (unify): Make sure to record unifications for template
10849         parameters, even when the parameters exactly match the arguments.
10850         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
10851         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
10852         aren't from the level we're currently working on.
10854 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
10856         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
10858         * decl2.c (check_member_template): Set DECL_IGNORED for member
10859         class templates, too.
10861         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
10863 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10865         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
10867 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
10869         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
10870         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
10871         (init_decl_processing): Handle TI types.
10872         * typeck.c (unsigned_type, signed_type): Handle TI types.
10874 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
10876         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
10877         New local added_libraries.  Increment count when add library to
10878         arglist.
10880 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
10882         * cp-tree.h (type_as_string_real): New function.
10883         * pt.c (mangle_class_name_for_template): Use it.
10884         * error.c (dump_aggr_type): Change prototype.
10885         (dump_type_prefix): Likewise.
10886         (dump_type_suffix): Likewise.
10887         (dump_type_real): Convert from dump_type.  If desired, the
10888         "canonica" name of a typedef, i.e., the name of the underlying
10889         type, can be printed.
10890         (dump_type): Call dump_type_real.
10892 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
10894         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
10896         * typeck.c (comp_target_types): Tweak pedantic case.
10897         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
10898         Return -1 or 1 instead of 1 or 2.
10899         (compparms): Remove STRICT handling.
10900         (convert_for_assignment): Fix handling of pmfs.
10902 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
10904         * typeck.c (comp_target_types): Handle references like pointers.
10905         (comp_target_parms): Note that return code from comp_target_types
10906         can be negative to indicate failure.
10908 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
10910         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
10911         which requires a working target compiler to build.
10913 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
10915         * tree.c (avoid_overlap): Add prototype.
10917         * spew.c (num_tokens): Add prototype.
10918         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
10920         * search.c (dfs_check_overlap): Add prototype.
10921         (dfs_no_overlap_yet): Likewise.
10923         * pt.c (original_template): Add prototype.
10924         (inline_needs_template_parms): Likewise.
10925         (push_inline_template_parms_recursive): Likewise.
10926         (retrieve_specialization, register_specialization): Likewise.
10927         (print_candidates, reduce_template_parm_level): Likewise.
10928         (build_template_decl, mark_template_parm): Likewise.
10929         (tsubst_friend_function, get_bindings_real): Likewise.
10931         * method.c (start_squangling): Add prototype.
10932         (end_squangling, check_ktype, issue_ktype): Likewise.
10933         (build_overloaded_scope_ref, check_btype): Likewise.
10934         (build_mangled_template_parm_index): Likewise.
10936         * lex.c (init_cpp_parse): Add prototype.
10937         (handle_cp_pragma, handle_sysv_pragma): Likewise.
10938         (reduce_cmp, token_cmp): Likewise.
10940         * except.c (call_eh_info): Add prototype.
10941         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
10942         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
10944         * decl2.c (is_namespace_ancestor): Add prototype.
10945         (namespace_ancestor, add_using_namespace): Likewise.
10946         (ambiguous_decl): Likewise.
10948         * decl.c (indent): Add prototype.
10950         * call.c (add_template_candidate_real): Add prototype.
10952 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
10954         * decl2.c (build_expr_from_tree): Just return a PMF.
10956 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
10958         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
10959         when doing initializations.
10961         * pt.c (unify): Use comptypes to compare type args.
10963 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
10965         * decl.c (duplicate_decls): Fix check for when it's safe to free
10966         the new decl.
10968         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
10969         to type_as_string.
10971 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
10973         * pt.c (build_template_parm_index): Add prototype.
10975         * search.c (my_tree_cons): Don't clear words outside the
10976         newly allocated node.
10978 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
10980         * lex.c (init_parse): Now returns char* containing the filename.
10982 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
10983                           Jeff Law   <law@cygnus.com>
10985         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
10986         than a pointer.
10988 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10990         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
10992 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10994         * decl.c (duplicate_decls): Don't warn for redundant decls if
10995         friend: let add_friend take care of it.
10997 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
10999         * sig.c (build_signature_pointer_constructor): Don't set
11000         TREE_HAS_CONSTRUCTOR for a signature pointer.
11001         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
11002         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
11003         here, too.
11004         * typeck.c (build_unary_op): Only allow taking the address of a
11005         real constructor.
11006         * typeck2.c (digest_init): Simplify.
11007         (store_init_value): Don't pedwarn about using { } for pmfs.
11009 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
11011         * cp-tree.h (start_decl):  Update prototype.
11012         * decl.c (start_decl):  Like the C version, new parameters
11013         for the attributes.  Call cplus_decl_attributes here,
11014         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
11015         (grokdeclarator):  Pass NULL for new start_decl arguments.
11016         * pt.c (tsubst_expr):  Likewise.
11017         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
11018         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
11019         * lex.c (build_lang_decl): Add lang_name_java.
11020         * class.c (push_lang_context): Add lang_name_java.
11021         * method.c (build_mangled_name): Check for is_java_type.
11023 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
11025         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
11026         * call.c (build_scoped_method_call): Check for TREE_CODE for
11027         VOID_TYPE instead of type ==  void_type_node.
11028         (build_method_call): Likewise.
11029         * decl.c (lookup_name_real): Likewise.
11030         (grokdeclarator): Likewise.
11031         (start_decl): Likewise.
11032         (grokparms): Likewise.
11033         (start_function): Likewise.
11034         (finish_function): Likewise.
11035         (start_method): Likewise.
11037 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
11039         * lex.c (finput): New variable.
11040         (init_cpp_parse):  Renamed from init_parse.
11041         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
11042         (finish_parse): New function.
11043         * cp-tree.h (init_lex, init_parse): Remove declarations.
11045 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
11047         * call.c (build_call): Still evaluate the actual argument.
11048         * class.c (is_empty_class): Update for -fnew-abi.
11050         * decl2.c: -fnew-abi implies -fsquangle.
11052         * method.c (do_build_assign_ref): Don't do anything to copy
11053         an empty class.
11054         (do_build_copy_constructor): Likewise.
11055         * call.c (build_over_call): Likewise.
11057 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
11059         * tree.c (avoid_overlap): Return a value.
11061 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
11063         * method.c (check_btype): Add missing argument to xrealloc.
11064         (check_ktype): Likewise.
11066 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
11068         Implement empty base optimization.
11069         * class.c (finish_struct_1): Add vbase fields earlier.  Set
11070         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
11071         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
11072         (types_overlap_p): New fn.
11073         * tree.c (avoid_overlap): New fn.
11074         (build_base_fields): Use it to avoid overlapping empty bases.
11075         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
11077         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
11079         Re-implement allocation of base class subobjects.
11080         * tree.c (unshare_base_binfos): New fn.
11081         (layout_basetypes): Use it.  Now handles offsets of both virtual and
11082         non-virtual bases, after layout_type.
11083         (layout_vbasetypes): Remove.
11084         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
11085         (build_vbase_pointer_fields): Split out from old layout_basetypes.
11086         * class.c (finish_base_struct): Lose offset handling code.
11087         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
11088         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
11089         * cp-tree.h: Adjust.
11091 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
11093         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
11094         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
11095         * class.c (duplicate_tag_error): Likewise.
11096         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
11097         * tree.c (layout_vbasetypes): Update from layout_record, remove
11098         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
11099         (layout_basetypes): Likewise.
11101 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
11103         * class.c, Make sure system.h is included just after config.h.
11104         Delete lingering stdio and errno references too.
11105         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
11107 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
11109         * friend.c (is_friend): Fix access control for local classes.
11111         * class.c (is_empty_class): New fn.
11112         * call.c (build_call): Don't pass empty class objects to a function.
11114 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
11116         * call.c (build_over_call): Do name resolution for default
11117         arguments of function templates in the scope of the templates.
11119 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
11121         * call.c: Include system.h.  Remove includes, declarations and
11122         defines provided by system.h.
11123         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
11124         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
11125         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
11126         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
11127         * typeck2.c, xref.c: Likewise.
11128         * Makefile.in: Dependencies updated as appropriate.
11129         * Make-lang.in: Likewise.
11131 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
11133         * pt.c (fn_type_unification): Allow incomplete unification without
11134         an immediate error message.
11136 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
11138         * tree.c (member_p): New fn.
11139         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
11140         initializing class members.
11142         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
11143         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
11145         * call.c (build_method_call): Handle non-scoped destructors, too.
11146         * pt.c (tsubst_copy): Likewise.
11148         * pt.c (print_template_context): Split out...
11149         (push_tinst_level): ...from here.
11151         * friend.c (is_friend): Don't pass a type to decl_function_context.
11153         * typeck.c (convert_for_initialization): Always hand off
11154         conversions to class type.
11156 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
11158         * friend.c (is_friend): Local classes have the same access as the
11159         enclosing function.
11161 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
11163         * typeck.c (expand_target_expr): Delete dead function.
11165         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
11167         * repo.c (save_string): Delete dead function.
11169         * method.c (thunk_printable_name): Delete dead function.
11171         * lex.c (yynextch): Delete dead function.
11173         * expr.c (tree_extract_aggr_init): #if 0 out.
11175         * except.c (do_unwind): Delete dead function.
11176         (easy_expand_asm): Likewise.
11178         * cvt.c (build_conversion_type_1): Delete dead function.
11180         * cp-tree.h (push_expression_obstack): Declare.
11182         * call.c (source_type): #if 0 out.
11184         * class.c (alter_access): Remove unused label.  Add braces
11185         around empty else clause.
11187         * lex.c (yyprint): Fix argument to printf.
11189 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
11191         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
11193         * pt.c (instantiate_class_template): Make sure template
11194         arguments are permanent.
11195         * init.c (resolve_offset_ref): Don't go looking around in
11196         template types.
11198         * semantics.c: Add routines to handle expressions, and some
11199         declaration processing.
11200         * parse.y: Use them.
11201         (current_class_depth): Move declaration to cp-tree.h.
11202         * parse.c: Regenerated.
11203         * cp-tree.h: Use them.
11204         (current_class_depth): Declare.
11205         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
11207 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
11209         * error.c (dump_decl): Be a bit more explicit with template
11210         type arguments, when verbose.
11212 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
11214         * inc/exception: Reorder closing braces.
11216 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
11218         * pt.c (redeclare_class_template): New function.
11219         * cp_tree.h (redeclare_class_template): Declare it.
11220         * decl.c (xref_tag): Use it.
11222 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
11224         * call.c (build_over_call): Check IS_AGGR_TYPE, not
11225         TYPE_LANG_SPECIFIC.
11226         * typeck.c (convert_arguments): Likewise.
11228         * decl.c (grokdeclarator): Remove const and volatile from type after
11229         setting constp and volatilep.
11231         * class.c (finish_struct_1): Don't warn about bool bitfield larger
11232         than one bit.
11234 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
11236         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
11238 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
11240         * call.c (build_object_call): Complain about ambiguous operator(),
11241         rather that crashing.
11242         (build_new_op): Likewise.
11243         (build_op_delete_call): Likewise.
11245 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
11247         * cvt.c (perform_qualification_conversions): Use comp_target_types
11248         instead of comp_ptr_ttypes.
11250 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
11252         * cp-tree.h (enforce_access): Declare.
11253         * call.c (enforce_access): Make it extern, not static.
11254         * class.c (alter_access): Use enforce_access; modify code for ISO
11255         compliance, rather than ARM rules.
11257 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11259         * cp-tree.h: Fix typo.
11261 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
11263         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
11264         if (aggregate_value_p (type)).
11266         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
11268 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
11270         * tree.c (mapcar): When dealing with a DECL, use it's constant
11271         value, if any.
11272         * pt.c (lookup_template_class): Don't mangle the names of template
11273         classes whose arguments are unknown.
11275         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
11277 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
11279         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
11281 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
11283         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
11284         boolean_type_node to 1.
11286 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
11288         * error.c (dump_expr): Remove unused variable `l'.
11290         * pt.c (for_each_template_parm): New function, created by
11291         converting uses_template_parms.
11292         (tree_fn_t): New typedef.
11293         (uses_template_parms): Use it.
11294         (mark_template_parm): New function.
11295         (push_template_decl): Check that the argument list of a partial
11296         specialization uses all the template parameters.
11298         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
11299         with it; we might want it for debugging.
11300         * cp-tree.h (type_unification): Change interface.
11301         * class.c (finish_struct_1): Skip nested template types, just like
11302         ordinary nested types.
11303         (instantiate_type): Use new interface to type_unification.
11304         * lex.c (init_lex): Add __sz as opname for sizeof.
11305         * method.c (build_overload_scope_ref): New function.
11306         (build_overload_int): Handle complex expressions.  Set
11307         numeric_output_need_bar if necessary.
11308         (build_overload_value): Handle non-PARM_DECL nodes; this
11309         routine is now used by build_overload_int.  Remove some
11310         assignments to numeric_output_need_bar.  Use
11311         build_overload_scope_ref.
11312         (build_qualified_name): Note that some template mangled names end
11313         with digits, and set numeric_output_need_bar appropriately.  Use
11314         build_underscore_int.
11315         * pt.c (unify): Change interface.
11316         (type_unification_real): Likewise.
11317         (determine_specialization): Use new interfaces.
11318         (tsubst): Deal gracefully with situations in which the argument
11319         vector is not fully filled.
11320         (fn_type_unification): Use new interfaces.
11321         (type_unification): Likewise.  Remove NOP_EXPR hack.
11322         (type_unification_real): Likewise.
11323         (unify): Likewise.  Deal with unification of complex expressions.
11325 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11327         * pt.c (complete_template_args): Initialize skip properly.
11329         * decl.c (make_typename_type): Revert.
11330         (make_implicit_typename): Remove.
11331         (lookup_name_real): Don't call it.  Call lookup_field if we see a
11332         TYPE_DECL from a template base.
11333         * search.c (lookup_field): Do implicit typename stuff.
11335 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
11336                           Geoff Noer    <noer@cygnus.com>
11338         * Makefile.in: Various fixes for building cygwin32 native toolchains.
11339         * Make-lang.in: Likewise.
11341 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11343         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
11345 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
11347         * decl.c (make_implicit_typename): Rewrite removed code.
11348         (make_typename_type): Call it if the type we look up comes from
11349         a base that uses template parms.
11351         * pt.c (complete_template_args): Rewrite.
11352         (tsubst, FUNCTION_DECL): Use it.
11354 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
11356         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
11357         c_expand_asm_operands () if output_operands, input_operands or
11358         clobbers is not NULL_TREE.
11360 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11362         * pt.c (complete_template_args): New function.
11363         (get_bindings): Deal with specializations of function templates
11364         with return type containing parameters from outer class
11365         templates.
11366         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
11367         substitute arguments and compose a new type.
11369 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
11371         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
11372         FUNCTION_DECLs.
11374 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
11376         * decl.c (make_implicit_typename): Lose useless code.
11378         * call.c (standard_conversion): Handle A* -> const A* properly.
11380         * pt.c (get_bindings_real): Rename from get_bindings.  Add
11381         check_rettype parm.
11382         (get_bindings): Pass 1.
11383         (get_bindings_overload): Pass 0.
11385 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
11387         * pt.c (check_explicit_specialization): When reverting a static
11388         member function, also remove the `this' parameter from
11389         last_function_parms.
11391 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
11393         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
11394         a function context.
11396         * decl.c (store_bindings): Use free_binding_vecs.
11397         (pop_from_top_level): Likewise.
11399 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
11401         * decl.c (make_implicit_typename): Only change the type of a
11402         TYPENAME_TYPE.
11404 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
11406         * semantics.c: New file, containing routines to perform the
11407         semantic phase of parsing.
11408         * parse.y: Use it.
11409         * pt.c (tsubst_expr): Likewise.
11410         * cp-tree.h: Declare the various functions in semantics.c.
11411         Provide macros to access _STMT tree nodes.
11412         * cp-tree.def: Add ASM_STMT tree node.
11413         * Makefile.in, Make-lang.in: Add dependencies on and for
11414         semantics.c.
11416 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
11418         * pt.c (push_template_decl): Only check primary templates.
11420         * pt.c (check_explicit_specialization): Complain about default args
11421         in explicit specialization.
11423         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
11424         constructor_declarator.
11426 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
11428         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
11429         has no overloaded operator ->.
11431         * call.c (build_field_call): Don't crash when presented with a
11432         field that is actually a nested type.
11434         * decl.c (pushtag): Deal with friend class injection in local
11435         classes.
11437         * call.c (build_object_call): Don't crash if OBJ is a
11438         pointer-to-member-function.
11440 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
11442         * pt.c (push_template_decl): Complain about template with C linkage,
11443         anonymous template class.
11445 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
11447         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
11448         * search.c: Likewise.
11450         * lex.c (do_pending_defargs): Only call
11451         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
11453         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
11455 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
11457         * parse.y: Deal with CONSTRUCTORS in new_initializers.
11459 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
11461         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
11462         closely mimics the behavior in parse.y.
11463         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
11464         into a compound statement.
11466 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
11468         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
11469         * pt.c (inline_needs_template_parms): New fn.
11470         (original_template): New fn.
11471         (push_inline_template_parms_recursive): New fn.
11472         (maybe_begin_member_template_processing): Use them.
11473         (maybe_end_member_template_processing): Likewise.
11474         (is_member_or_friend_template): Rename to is_member_template.
11475         Member functions of local classes are never member templates.
11477 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11479         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
11480         added in the class scope to catch redefinition error.
11482         * pt.c (reduce_template_parm_level): Also copy
11483         the DECL_TEMPLATE_PARMS field.
11485 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
11487         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
11488         reduced-level template type parameter.
11490 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11492         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
11493         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
11494         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
11495         * decl.c (duplicate_decls): Propagate it.
11496         * typeck2.c (abstract_virtuals_error): Use two loops to emit
11497         abstract virtual functions and virtual functions which need a
11498         final overrider separately.
11500 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11502         * lang-specs.h: Properly put brackets around array elements in
11503         initializer.
11505         * typeck.c (build_binary_op_nodefault): Correctly place parens around
11506         && and || in expression.
11508 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11510         * call.c (default_parm_conversions): Remove prototype definition.
11511         (build_method_call): Remove unused variable result.
11513         * cvt.c (ocp_convert): Remove unused variable conversion.
11515         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
11517         * except.c (do_unwind): #if 0 definition of unused variables fcall
11518         and next_pc.
11520         * expr.c (extract_scalar_init): #if 0 prototype and function
11521         definition.
11523         * init.c (expand_aggr_init_1): Remove unused variable init_type.
11524         (build_new_1): Remove unused variable t.
11526         * pt.c (instantiate_class_template): Remove unused variable newtag;
11527         cast called function return value to void.
11528         (do_decl_instantiation): Remove unused variables name and fn.
11530         * tree.c (get_type_decl): Add default return to shut up compiler from
11531         complaining control reaches end of non-void function.
11533         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
11535 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11537         * call.c (default_parm_conversions): Remove prototype definition.
11538         (build_method_call): Remove unused variable result.
11539         (build_over_call): Add default case in enumeration switch.
11541 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11543         * decl2.c (lang_decode_option): Change j's type to size_t.
11545         * tree.c (layout_vbasetypes): record_align and desired_align are of
11546         type unsigned int; const_size and nonvirtual_const_size likewise.
11548 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
11550         * parse.y (new_initializer): Make sure all initializers are
11551         lists.
11553 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
11555         * decl2.c (import_export_decl): Mark tinfo functions for
11556         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
11558 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
11560         * method.c: Fix typo.
11562 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11564         * method.c: Include "system.h" to get stdlib.h, stdio.h,
11565         ctype.h, string.h, etc.
11566         (issue_nrepeats): Add default case in enumeration switch.
11567         (check_btype): Likewise.
11568         (process_overload_item): Likewise.
11570         * Makefile.in (method.o): Depend on system.h.
11572 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
11574         * lex.c (do_scoped_id): Fix parenthesizing.
11576 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
11578         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
11579         FLAG_RTTI is unset, initialize type info machinery and continue
11580         with FLAG_RTTI enabled.
11581         (get_typeid): Likewise.
11583 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
11585         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
11586         from B.
11588 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
11590         * pt.c (finish_member_template_decl): Deal more gracefully with
11591         invalid declarations.
11593 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
11595         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
11596         cp-tree.h: Clean up more old overloading code, old RTTI code, and
11597         some formatting quirks.
11599         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
11600         method.c, pt.c, ptree.c, typeck.c: Remove support for
11601         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
11602         * class.h: Remove.
11603         * Makefile.in: Adjust.
11605         * pt.c (unify): Don't allow reduced cv-quals when strict.
11607         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
11608         *type_unification* and unify.
11610 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
11612         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
11613         (nested_name_specifier): And add it before this use.
11614         (typename_sub0): And this use.  Also add use without the keyword.
11615         (typename_sub1): Likewise.
11616         * pt.c (instantiate_class_template): Don't actually instantiate
11617         anything if our type uses template parms.
11619 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
11621         * decl.c (start_function): Don't call temporary_allocation for a
11622         nested function.
11624 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11626         * pt.c (instantiate_class_template): Don't mess with friends if
11627         our type uses template parms.
11629 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
11631         * parse.y (nested_name_specifier): Use explicit_template_type.
11632         (typename_sub): Allow a template_type, an explicit_template_type,
11633         or an implicit template type at the end.
11634         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
11635         * decl.c (make_typename_type): Handle template-id where the name
11636         is a TEMPLATE_DECL.
11637         * call.c (build_scoped_method_call): Handle member template
11638         destructor call.
11639         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
11640         destructor is represented by the type.
11642         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
11643         * parse.y (nested_name_specifier): Add 'template' case.
11644         (explicit_template_type): New rule.
11645         (typename_sub): Use it.
11646         * decl.c (make_typename_type): Handle getting a template-id for NAME.
11647         * pt.c (tsubst): Likewise.
11649 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
11651         * pt.c (add_to_template_args): Fix thinko.
11652         (instantiate_class_template): Call it later.
11654         * pt.c (get_class_bindings): Add outer_args parm.
11655         (most_specialized_class): Likewise.
11656         (instantiate_class_template): Pass it.
11657         (more_specialized_class): Likewise.
11658         (lookup_template_class): Get context from template if none
11659         was specified.
11660         (finish_member_template_decl): Don't do anything with a
11661         partial specialization.
11662         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
11663         AGGREGATE_TYPE_P.
11664         * class.c (finish_struct): Member class templates have already been
11665         checked for name clashes.
11666         * decl.c (pushdecl_with_scope): Handle pushing at class level.
11668 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
11670         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
11671         (tsubst, *_PARM): Support multiple levels of template classes.
11672         (instantiate_class_template): Look up the pattern from the
11673         original template.
11674         (lookup_template_class): Handle getting a template for d1.
11675         (push_template_decl): Correct setting of 'primary'.
11676         (reduce_template_parm_level): Add 'levels' parm.
11677         (finish_member_template_decl): Support member class templates.
11678         (template_class_depth): Handle multiple levels.
11679         * parse.y (component_decl_1, fn.def2): Remove member template case.
11680         (component_decl): Add member template cases.
11681         * decl2.c (check_member_template): We now handle member template
11682         classes.
11683         * decl.c (pushtag): Handle member templates.
11684         * method.c (do_inline_function_hair): Don't touch
11685         IDENTIFIER_GLOBAL_VALUE.
11686         * init.c (build_offset_ref): If name isn't an identifier, just
11687         return it.
11688         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
11690         * typeck.c (get_delta_difference): Do adjust for conversions to
11691         and from virtual base.
11693 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
11695         * typeck.c (get_delta_difference): Give hard error for conversion
11696         from virtual base.
11698         * cp-tree.h: Tweak formatting.
11700 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
11702         * decl.c (push_namespace): Handle redeclaration error.
11704         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
11705         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
11706         (NAMESPACE_BINDING): New macro.
11707         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
11708         * *.c: Use them.
11710         * pt.c (push_template_decl): Use innermost_args.
11712         * decl.c (get_unique_name): Tweak from earlier in the name.
11714 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11716         * cp-tree.def: Add CPLUS_BINDING node.
11717         * cp-tree.h (tree_binding): New struct.
11718         (BINDING_SCOPE, BINDING_VALUE): New macros.
11719         (current_namespace, global_namespace): Declare extern.
11720         (struct lang_decl_flags): New field in_namespace.
11721         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
11722         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
11723         (TREE_INDIRECT_USING): New macro.
11724         * decl2.c (current_namespace, global_namespace): Declare.  The
11725         value is a NAMESPACE_DECL now, not a TREE_LIST.
11726         (is_namespace_ancestor, namespace_ancestor): New static functions.
11727         (add_using_namespace, ambiguous_decl): Likewise.
11728         (lookup_using_namespace): New support function for lookup_name.
11729         (qualified_lookup_using_namespace): New support function for
11730         do_scoped_id and lookup_namespace_name.
11731         (get_namespace_id): Mark as obsolete.
11732         (current_namespace_id): Likewise.
11733         (do_namespace_alias): Implement.
11734         (do_using_directive): Implement as call to add_using_namespace.
11735         * decl.c (binding_for_name): New function.
11736         (push_namespace, pop_namespace): Implement.
11737         (push_decl): Don't install a FUNCTION_DECL in the global branch.
11738         (lookup_namespace_name): Implement using qualified lookup.
11739         (lookup_name_real): For global scoping, lookup in
11740         global_namespace.  For namespace scoping, lookup in given
11741         namespace.  For unscoped lookup, iterate over namespace,
11742         considering using directives.
11743         (init_decl_processing): Initialize global_namespace.
11744         (grokvardecl): Build assembler name as static name for globals.
11745         (grokdeclarator): Remove old namespace mangling.
11746         (xref_tag): When installing a global binding for the
11747         tag, make sure we have an identifier.
11748         * method.c (build_overload_nested_name): Mangle namespaces.
11749         (build_qualified_name): Likewise.
11750         (build_decl_overload_real): Likewise.
11751         * lex.c (build_lang_decl): Set namespace for new declaration to
11752         current_namespace.
11753         (do_scoped_id): Find global names in global or current
11754         namespace, or using qualified namespace lookup, depending on
11755         context.
11756         * init.c (build_member_call): When scope is namespace, use
11757         build_x_function_call instead.
11758         (build_offset_ref): When scope is namespace, collapse processing
11759         to lookup_namespace_name instead.
11760         * error.c (dump_decl): Support NAMESPACE_DECL.
11761         * decl.c (pushdecl): Bind globals to current namespace.
11762         (push_overloaded_decl): Likewise.
11763         (lookup_tag): Likewise.
11764         (lookup_name_current_level): Likewise.
11765         (xref_tag): Likewise.
11766         (start_function): Likewise.
11767         * lex.c (do_identifier): Likewise.
11768         (identifier_typedecl_value): Likewise.
11769         (real_yylex): Likewise.
11770         * method.c (do_inline_function_hair): Likewise.
11771         * parse.y (unscoped): Likewise.
11772         * pt.c (check_explicit_specialization): Likewise.
11773         (lookup_template_class): Likewise.
11774         * rtti.c (call_void_fn): Likewise.
11775         * sig.c (build_sigtable): Likewise.
11776         * ptree.c (lang_print_xnode): New function.
11778 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
11780         * pt.c (instantiate_class_template): Don't instantiate if pedantic
11781         and the args use template parms.
11783         * pt.c (push_tinst_level): If the instantiation uses template parms,
11784         fail silently.
11785         * decl.c (xref_basetypes): Do call complete_type for basetypes
11786         that involve template parameters.
11788 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
11790         * typeck2.c (process_init_constructor): Fix labeled init check.
11792 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
11794         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
11795         argument to tsubst and friends.
11797         * pt.c (tsubst, FUNCTION_DECL): Tidy.
11799         * typeck.c (build_x_function_call): Handle static member function
11800         templates like non-templates.  Handle friend templates like normal
11801         function templates.
11802         * pt.c (tsubst, *_PARM): Don't use orig_level.
11803         (get_bindings): Don't call add_to_template_args.
11804         (instantiate_template): Likewise.
11805         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
11806         * ptree.c (print_lang_type): Print index/level for template parms.
11808 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
11810         * Make-lang.in (cc1plus): Note that cc1plus depends on
11811         cp/cp-tree.h and cp/cp-tree.def.
11813         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
11814         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
11815         position in a template parameter list.
11816         * cp-tree.h (template_parm_index): New structure, used as the tree
11817         structure for a TEMPLATE_PARM_INDEX.
11818         (TEMPLATE_PARM_IDX): New macro.
11819         (TEMPLATE_PARM_LEVEL): Likewise.
11820         (TEMPLATE_PARM_DESCENDANTS): Likewise.
11821         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
11822         (TEMPLATE_PARM_DECL): Likewise.
11823         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
11824         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
11825         (TEMPLATE_TYPE_DECL): Likewise.
11826         (TEMPLATE_CONST_IDX): Remove.
11827         (TEMPLATE_CONST_LEVEL): Likewise.
11828         (TEMPLATE_CONST_SET_INFO): Likewise.
11829         (TEMPLATE_TYPE_SET_INFO): Likewise.
11830         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
11831         node.
11832         (TEMPLATE_TYPE_LEVEL): Likewise.
11833         * decl.c (decls_match): Call comp_template_parms, rather than
11834         expanding it inline.
11835         (duplicate_decls): If two template declarations are being merged,
11836         then their TEMPLATE_INFOs should be merged as well.
11837         (grokfndecl): Save template-id information when declaring a friend
11838         with explicit template arguments.  Pass arguments to
11839         check_explicit_specialization via correct convention; at some
11840         point check_explicit_specialization changed, but these call-sites
11841         did not.
11842         (grokdeclarator): Tidy up slightly.
11843         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
11844         two template functions with the same DECL_ASSEMBLER_NAME the same,
11845         since the names are not yet mangled.
11846         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
11847         TEMPLATE_CONST_PARM.
11848         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
11849         decl for a non-type parameter, rather than printing `<tparm ...>'.
11850         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
11851         (do_friend): Deal with template friends.
11852         * lex.c (do_pending_inlines): Call
11853         maybe_begin_member_template_processing, rather than
11854         conditionally calling begin_member_template_processing.
11855         (process_next_inline): Likewise.  Call
11856         maybe_end_member_template_processing, rather than
11857         conditionally calling end_member_template_processing.
11858         (do_pending_defargs): Likewise.
11859         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
11860         TEMPLATE_CONST_PARM.
11861         * method.c (build_mangled_template_parm_index): New function.
11862         (build_overload_value): Use it.
11863         (build_overload_name): Likewise.
11864         * pt.c (finish_member_template_decl): Allow friend declarations.
11865         (template_class_depth): New function.
11866         (is_member_template): Rename, and modify, to become...
11867         (is_member_or_friend_template): New function.
11868         (end_member_template_processing): Rename, and modify, to become...
11869         (maybe_end_member_template_processing).
11870         (build_template_parm_index): New function.
11871         (reduce_template_parm_level): New function.
11872         (process_template_parm): Modify to use build_template_parm_index.
11873         (push_template_decl): Deal with friend templates.
11874         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
11875         TEMPLATE_CONST_PARM.
11876         (tsubst_friend_function): New function.
11877         (instantiate_class_template): Generate the DECL_FRIENDLIST
11878         for a new instantiation by using tsubst_friend_function rather
11879         than just tsubst.
11880         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
11881         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
11882         appropriate new macros.  Use reduce_template_parm_level to
11883         generate lower-level template parameters.  Handle tsubst'ing into
11884         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
11885         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
11886         templates.  Similarly for the template parameters for a new
11887         template.
11888         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
11889         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
11890         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
11891         (get_bindings): Call add_to_template_args if necessary.
11892         (instantiate_decl): Handle instantiations of friend templates.
11893         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
11894         TEMPLATE_TYPE_PARM as a list of fields; it's not!
11895         * spew.c (yylex): Do a little manual constant propagation to
11896         clarify the code.
11898 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
11900         * error.c: Include sys/types.h.
11902 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
11904         * method.c (build_mangled_name): Start CPP directives in column zero.
11906 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
11908         * typeck2.c (process_init_constructor): Sorry about non-trivial
11909         labeled initializers.
11910         * parse.y (initlist): Re-enable labeled initializers.
11912 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11914         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
11915         all callers changed.  Rely on the new parameter instead of arg
11916         being a TREE_LIST when determine whether we are working inside
11917         template template parameter.  Clean up is_type test.
11919 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
11921         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
11922         * typeck2.c (initializer_constant_valid_p): Allow conversions
11923         between pointers and references.
11925 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
11927         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
11928         if pedantic || warn_pointer_arith.
11930 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11932         * pt.c (unify): Handle TEMPLATE_DECL.
11934 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
11936         * cp-tree.h (strip_attrs): Remove decl.
11938 1998-02-18  Doug Evans  <devans@cygnus.com>
11940         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
11941         Update olddecl's attributes too.
11942         (strip_attrs): Remove function.
11943         * typeck.c (common_type): Call merge_machine_type_attributes.
11945 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
11947         * parse.y (initdcl0_innards): New grammar symbol.
11948         (nomods_initdecls, nomods_initdcl0): Change type from itype to
11949         none, since the resulting value is never used.
11950         (parse_decl): New function.
11951         (datadef): Remove redundant actions.
11952         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
11953         * parse.c: Regenerated.
11955 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
11957         * parse.y (simple_stmt): Use getdecls() to check for decl.
11959 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11961         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
11962         macros.
11963         (c++.install-common): Install c++filt properly as native or as cross
11964         variant.
11965         (c++.uninstall): Add c++filt.
11967 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11969         * call.c (standard_conversion): Fix multi-level ptr conversions.
11971 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
11973         * init.c (build_new): Propagate error_mark_node up.
11975 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
11977         * parse.y (simple_stmt): If the condition isn't a declaration,
11978         start the controlled block after the test.
11980 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
11982         * call.c (build_over_call): Convert builtin abs, labs and fabs to
11983         tree-codes.
11984         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
11985         builtins.
11987 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
11989         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
11991 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
11993         * cp-tree.h: Add access_protected_virtual_node.
11994         * class.c (init_class_processing): Initialize it.
11995         * decl.c (xref_basetypes): Use it.
11996         * parse.y (base_class_access_list): Likewise.
11998         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
11999         (c++.install-common): Install c++filt.
12001 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12003         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
12005 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
12007         * call.c (reference_binding): Use comptypes when comparing
12008         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
12010 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
12012         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
12013         (really_overloaded_fn): Move check here from is_overloaded_fn.
12014         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
12016 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
12018         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
12019         conversions.
12021 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
12023         * cp-tree.h (push_template_decl): Return the decl passed in, or an
12024         equivalent duplicate.
12025         * decl.c (pushtag): Use the return value from push_template_decl.
12026         (duplicate_decls): When duplicating a template declaration, merge
12027         the DECL_TEMPLATE_RESULTs as well.
12028         (make_implicit_typename): Don't try to dive into typename types to
12029         find a context for making a new implicit typename.
12030         (start_decl): Use the return value from push_template_decl.
12031         (grokdeclarator): Complain about declarations list `const operator
12032         int'.  Since we don't correctly handle in-class initializations of
12033         non-static data members, complain about this (now illegal)
12034         practice.  Issue an error for initializations of non-const statics
12035         since that is illegal as well, and since we don't handle that case
12036         correctly either.
12037         (start_function): Use the return value from push_template_decl.
12038         (start_method): Likewise.
12039         * decl2.c (grokfield): Likewise.  Since the change to
12040         grokdeclarator ensures that all initialized fields are in fact
12041         static, remove a redundant test for TREE_PUBLIC.
12042         * parse.y (initlist): Disable labeled initializers since they do
12043         not work as per the documentation, and since they do not use the
12044         same syntax as the C front end.
12045         * pt.c (push_template_decl): Return the decl passed in, or an
12046         equivalent duplicate.
12047         (lookup_template_class): When searching in a nested context,
12048         use the right arguments.
12049         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
12050         * typeck.c (build_component_ref): Assign the correct type to the
12051         result of build_vfn_ref.
12053 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
12055         * pt.c (convert_nontype_argument): Fix typo.
12056         (check_explicit_specialization): Allow old-style specialization
12057         of class template members.
12059 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
12060                           Manfred Hollstein  <manfred@s-direktnet.de>
12062         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
12063         when deciding to override DECL_ASSEMBLER_NAME.
12065 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
12067         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
12068         * cp-tree.h (flag_do_squangling): Add declaration.
12069         * lang-options.h: Add -fsquangle and -fno-squangle.
12070         * method.c: Add macros and static variables for squangling.
12071         (build_overload_name): Rename to build_mangled_name, add logic for B
12072         compression, and split into process_modifiers and
12073         process_overload_item.
12074         (process_modifiers): New function, to handle constant, reference,
12075         and pointer types.
12076         (process_overload_item): New function, handles issue of type codes.
12077         (build_overload_name): New function, start squangling and call
12078         build_mangled_name.
12079         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
12080         (start_squangling): New function to initialize squangling structs.
12081         (end_squangling): New function to destroy squangling structs.
12082         (nrepeats): Rename variable to Nrepeats.
12083         (issue_nrepeats): New function for issuing 'n' type repeats.
12084         (check_ktype): New function to check for type K name compression.
12085         (build_overload_nested_name): Add a check for K name compression.
12086         (build_qualified_name): Add a check for K name compression and don't
12087         use DECL_ASSEMBLER_NAME when squangling is on.
12088         (check_btype): New function, checks for B type compression.
12089         (build_static_name, build_decl_overload_real): Initiate squangling.
12090         (build_typename_overload, build_overload_with_type): Initiate
12091         squangling
12093 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
12095         * method.c (make_thunk): Avoid name buffer overflow.
12097 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
12099         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
12100         don't define them yet.
12102         * parse.y (nomods_initdcl0): Add constructor_declarator case.
12104 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12106         * config-lang.in (diff_excludes): Use basename only.
12108 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
12110         * tinfo2.cc: Add tinfo for signed char.
12112 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
12114         * search.c (compute_access): Handle protected constructors in derived
12115         classes as accessible.
12117 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
12119         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
12120         Call convert_from_reference sooner.
12122 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
12124         * cvt.c (ocp_convert): Obtain the constant values from constant
12125         decls even if the destination type is the same as the type of the
12126         decl.
12128         * decl2.c (finish_file): Make sure that static inlines with
12129         definitions are not marked DECL_EXTERNAL before returning.
12131 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
12133         * decl.c: Lose arg_looking_for_template.
12134         (lookup_name_real): Likewise.
12135         * parse.y: Lose processing_template_arg, template_arg1.
12136         (primary): Likewise.
12137         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
12139 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12141         * error.c (dump_decl): Fix type of default arguments for template
12142         template parameters and nontype template parameters.
12143         * parse.y (template_parm): Handle invalid default template
12144         template arguments here.
12146         * parse.y (template_parm): Use template_arg instead of PTYPENAME
12147         for default template template argument.
12148         * pt.c (coerce_template_parms): Merge default template argument
12149         codes.  Can treat RECORD_TYPE as template name if it is implicitly
12150         created.  Fix argument index in error message.
12151         * typeck.c (comptypes): Merge template argument comparison codes in
12152         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
12154 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
12156         * lex.c (file_name_nondirectory): Also check for '/'.
12158 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
12160         * parse.y (primary): Deal with statement-expressions in
12161         templates.
12162         * pt.c (tsubst_copy): Handle BIND_EXPR.
12163         * tree.c (mapcar): Likewise.
12165         * call.c (add_template_candidate_real): Pass extra parameter to
12166         fn_type_unification.
12167         * cp-tree.h (fn_type_unification): Add parameter.
12168         * pt.c (fn_type_unification): Add additional parameter to deal with
12169         static member functions.
12170         (get_bindings): Deal with static member functions.
12172         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
12173         (revert_static_member_fn): Declare.
12174         * decl.c (revert_static_member_fn): Remove declaration.  Change
12175         linkage from internal to external.
12176         (cp_finish_decl): Deal with virtual functions in classes local to
12177         template functions.
12178         * decl2.c (finish_file): Don't forget to emit increment/decrement
12179         expressions in initializers for file-scope variables.
12180         * parse.y (typename_sub2): If the typename doesn't names a
12181         template, rather than a type, issue an error message.
12182         * pt.c (check_explicit_specialization): Handle specializations of
12183         static member functions.
12184         (coerce_template_parms): Handle offset references to lists of
12185         member functions.
12186         * search.c (note_debug_info_needed): Don't crash when handed a
12187         type which is being defined.
12188         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
12189         that can happen with some illegal code.
12191 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12193         * call.c (user_harshness): Initialize `code' to 0.
12194         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
12195         (null_ptr_cst_p): Add parentheses around && within ||.
12196         (standard_conversion): Likewise.
12197         (z_candidate): Likewise.
12198         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
12199         (build_object_call): Likewise for `mem_args'.
12200         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
12201         default case in enumeration switch.
12203         * class.c (build_vtable_entry): Add explicit braces to avoid
12204         ambiguous `else'.
12205         (build_class_init_list): Likewise.
12206         (finish_struct_1): Initialize `width' to 0.
12207         (instantiate_type): Initialize `name' to NULL_TREE.  Add
12208         explicit braces to avoid ambiguous `else'.
12210         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
12211         `else'.
12213         * decl.c (grok_reference_init): Eliminate unused parameter, all
12214         callers changed.
12215         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
12216         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
12217         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
12218         (grokdeclarator): Add parentheses around && within ||.  Add
12219         explicit braces to avoid ambiguous `else'.
12220         (grokparms): Initialize `type' to NULL_TREE.
12221         (xref_tag): Remove unused label `just_return'.
12222         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
12223         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
12224         (hack_incomplete_structures): Add parentheses around assignment
12225         used as truth value.
12227         * decl2.c (coerce_delete_type): Hide definition of `e3'.
12229         * error.c: Include <stdlib.h>.
12230         (dump_expr): Change the type of `i' to size_t.  Remove unused
12231         label `error'.
12233         * except.c (init_exception_processing): Remove unused variable `d'.
12234         (expand_throw): Likewise for `label'.
12236         * friend.c (add_friends): Add explicit braces to avoid ambiguous
12237         `else'.
12239         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
12240         (sort_base_init): Likewise for `binfo'.
12241         (expand_member_init): Likewise for `rval'.
12242         (build_member_call): Add parentheses around assignment used as
12243         truth value.
12244         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
12245         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
12246         `old_immediate_size_expand' to 0.
12247         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
12248         (build_vec_delete_1): Remove unused variable `block'.
12249         (expand_vec_init): Initialize `itype' to NULL_TREE.
12251         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
12252         declaration of `index' and `rindex' with autoconf macros.
12253         (reinit_parse_for_expr): Remove unused variables
12254         `look_for_semicolon' and `look_for_lbrac'.
12255         (cons_up_default_function): Initialize `args' to NULL_TREE.
12256         (readescape): Initialize `firstdig' to 0.
12257         (real_yylex): Add parentheses around assignment used as truth value.
12259         * method.c: Include <strings.h> if we don't have <string.h>.
12260         Protect declaration of `index' with autoconf macro.
12262         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
12263         Initialize `type' to NULL_TREE.
12264         (structsp): Remove unused variable `id'.
12266         * pt.c (coerce_template_parms): Add explicit braces to avoid
12267         ambiguous `else'.
12268         (lookup_template_class): Initialize `template' to NULL_TREE.
12269         (instantiate_class_template): Remove unused variable `name' and `e'.
12270         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
12271         (do_poplevel): Initialize `saved_warn_unused' to 0.
12272         (type_unification): Remove unused varable `parm'.
12273         (unify): Likewise for `j'.
12275         * repo.c (init_repo): Add parentheses around assignment used as
12276         truth value.
12277         (finish_repo): Remove unused varable `p'.
12279         * search.c (get_binfo): Initialize `type' to NULL_TREE.
12280         (get_base_distance): Likewise.
12281         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
12282         and `new_v' to NULL_TREE.
12283         (lookup_fnfields): Likewise for `rval_binfo_h'.
12284         (breadth_first_search): Add parentheses around assignment used as
12285         truth value.
12286         (get_template_base): Initialize `type' to NULL_TREE.
12288         * sig.c (append_signature_fields): Initialize `last_mfptr' to
12289         NULL_TREE.
12290         (build_signature_table_constructor): Likewise for
12291         `last_rhs_field', `pfn' and `vt_off'.
12292         (build_sigtable): Likewise for `init'.
12294         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
12295         (propagate_binfo_offsets): Likewise for `delta'.
12296         (hash_tree_cons): Initialize hashcode to 0.
12297         (can_free): Likewise for `size'.
12298         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
12300         * typeck.c (convert_sequence): Hide prototype.
12301         (common_type): Add explicit braces to avoid ambiguous `else'.
12302         (comp_target_types): Likewise.
12303         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
12304         (build_function_call_real): Add explicit braces to avoid ambiguous
12305         `else'.
12306         (convert_arguments): Initialize `called_thing' to 0.
12307         (convert_for_initialization): Initialize `savew' and `savee' to 0.
12309         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
12310         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
12311         (build_x_arrow): Likewise for `last_rval'.
12313         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
12315 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
12317         * decl.c (init_decl_processing): Use set_sizetype.
12318         * decl2.c (sizetype): Don't declare.
12319         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
12320         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
12321         (build_component_addr, unary_complex_lvalue): Likewise.
12322         * rtti.c (expand_class_desc): Likewise.
12323         * class.c (get_vfield_offset): Likewise.
12325 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
12327         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
12328         early to avoid bogus error.  Handle overloaded function
12329         names provided as template arguments correctly.
12330         (coerce_template_parms): Don't mishandle overloaded functions when
12331         dealing with template template parameters.
12332         (lookup_template_class): Issue an error message, rather than
12333         crashing, when the TYPE_DECL provided is not a template type.
12335 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
12337         * class.c (instantiate_type): Don't just return a known type if
12338         it's wrong.
12340 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
12342         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
12343         since that code could never be reached.
12345         * error.c (dump_decl): Avoid aborting in the midst of printing an
12346         error message about an illegal template declaration.
12348         * parse.y (structsp): Print an error message, rather than crashing,
12349         when a class-head does not name a class.
12351         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
12352         template arguments as a g++ extension.
12354         * cp-tree.def (ALIGNOF_EXPR): New tree code.
12355         * decl2.c (grok_alignof): If processing_template_decl, just store
12356         the expression.
12357         * typeck.c (c_alignof): Likewise.
12358         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
12359         * error.c (dump_expr): Likewise.
12360         * pt.c (tsubst_copy): Likewise.
12361         * tree.c (cp_tree_equal): Likewise.
12362         * pt.c (uses_template_parms): Correctly determine whether or not a
12363         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
12364         folding can be done.
12366         * cp-tree.h (grok_enum_decls): Remove type parameter.
12367         * decl.c (grok_enum_decls): Likewise.
12368         * decl2.c (grok_x_components): Call grok_enum_decls
12369         unconditionally, since it will do nothing if there is no
12370         current_local_enum.  Use the new calling sequence.
12371         * pt.c (tsubst_enum): Use the new calling sequence for
12372         grok_enum_decls.
12374         * decl.c (start_function): Make member functions of local classes
12375         in extern inline functions have comdat linkage here...
12376         (grokdeclarator): Rather than here.
12378 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
12380         * pt.c (convert_nontype_argument): Use decl_constant_value.
12382 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
12384         * call.c (add_template_candidate_real): New function.
12385         (add_template_candidate): Use it.
12386         (add_template_conv_candidate): Likewise.
12387         (joust): Pass extra argument to more_specialized.
12388         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
12389         (is_local_class): Remove.
12390         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
12391         * cp-tree.h (is_local_class): Remove.
12392         (perform_array_to_pointer_conversion): Likewise.
12393         (finish_member_template_decl): Add.
12394         (check_explicit_specialization): Return a tree, not an int.
12395         (more_specialized): Take additional argument.
12396         (get_bindings): Likewise.
12397         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
12398         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
12399         (perform_array_to_pointer_conversion): Remove.
12400         * decl.c (saved_scope): Add processing_specialization,
12401         processing_explicit_instantiation fields.
12402         (maybe_push_to_top_level): Save them.
12403         (pop_from_top_level): Restore them.
12404         (grokfndecl): Use new return value from
12405         check_explicit_specialization.
12406         (start_decl): Don't check flag_guiding_decls before pushing
12407         decls.
12408         (cp_finish_decl): Remove previous (bogus) change.
12409         (grok_declarator): Use decl_function_context rather than
12410         is_local_class.
12411         * decl2.c (finish_file): Pass extra argument to get_bindings.
12412         (build_expr_from_tree): Let build_x_component_ref check
12413         validity of arguments rather than doing it here.
12414         * lex.c (cons_up_default_function): Remove code fooling with
12415         processing_specialization, processing_explicit_instantiation
12416         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
12417         * method.c (build_overload_identifier): Mangle local classes in
12418         template functions correctly.
12419         * parse.y (finish_member_template_decl): Move to pt.c.
12420         * pt.c (finish_member_template_decl): Moved here from parse.y.
12421         (print_candidates): New function.
12422         (determine_specialization): Change interface.  Properly look for
12423         most specialized versions of template candidates.
12424         (check_explicit_specialization): Fully process explicit
12425         instantiations.
12426         (push_template_decl): Avoid looking at CLASSTYPE fields in
12427         FUNCTION_DECLS.
12428         (determine_overloaded_function): Remove.
12429         (convert_nontype_argument): Change name from
12430         convert_nontype_parameter.  Use determine_overloaded_function
12431         instead of instantiate_type.
12432         (mangle_class_name_for_template): Handle type contexts as well as
12433         function contexts.
12434         (classtype_mangled_name): Likewise.
12435         (lookup_template_class): Likewise.
12436         (tsubst): Likewise.
12437         (more_specialized): Take explict template arguments as a
12438         parameter.
12439         (most_specialized): Likewise.
12440         (get_bindings): Likewise.  Check that return types match before
12441         proclaiming a function a match.
12442         (do_decl_instantiation): Remove code searching for function to
12443         instantiate; that is now done in check_explicit_specialization.
12444         (add_maybe_template): Pass extra argument to get_bindings.
12445         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
12446         implementation.
12447         * typeck.c (build_component_ref): Check for invalid arguments.
12449 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
12451         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
12452         return_target and call_target are equivalent.
12454         * pt.c (type_unification_real): Just accept function parms that
12455         don't use any template parms.
12457 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
12459         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
12460         unset DECL_NOT_REALLY_EXTERN.
12462         * parse.y (typename_sub*): Fix std::.
12464 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
12466         * error.c (dump_decl): Fix type default template args.
12467         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
12469 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
12471         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
12472         (file_name_nondirectory): Use.
12474 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12476         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
12477         that are not really present.  Substitute default arguments in
12478         template template arguments.  Correctly convert TEMPLATE_DECL to
12479         TEMPLATE_TEMPLATE_PARM.
12480         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
12481         are no longer treated specially here.
12482         * parse.y (template_template_parm): Fix copy error.
12483         * decl.c (grokdeclarator): Warn about missing `typename' for nested
12484         type created from template template parameters.
12485         * parse.y (bad_parm): Likewise
12487         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
12488         (push_nested_class): Likewise.
12489         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
12490         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
12491         (copy_template_template_parm): Declare.
12492         * decl.c (arg_looking_for_template): New variable.
12493         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
12494         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
12495         node if arg_looking_for_template is nonzero.
12496         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
12497         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
12498         (grokdeclarator): Handle TEMPLATE_DECL.
12499         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
12500         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
12501         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
12502         (dump_decl): Handle unnamed template type parameters.
12503         Handle template template parameters.
12504         (dump_function_name): Handle template template parameters.
12505         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
12506         Handle TEMPLATE_TEMPLATE_PARM.
12507         * method.c (build_template_template_parm_names): New function.
12508         (build_template_parm_names): Handle TEMPLATE_DECL.
12509         (build_overload_nested_name, build_overload_name):
12510         Handle TEMPLATE_TEMPLATE_PARM.
12511         * parse.y (maybe_identifier): New nonterminal.
12512         (template_type_parm): Use it.
12513         (template_template_parm, template_arg1): New nonterminal.
12514         (template_parm): Add template_template_parm rules.
12515         (template_arg): Set processing_template_arg.
12516         (template_arg1): Rules moved from template_arg.
12517         (primary, nonnested_type): Set arg_looking_for_template if we are
12518         processing template arguments.
12519         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
12520         (process_template_parm): Handle template template parameters.
12521         (coerce_template_parms, comp_template_args): Likewise.
12522         (mangle_class_name_for_template, lookup_template_class): Likewise.
12523         (uses_template_parms): Handle TEMPLATE_DECL and
12524         TEMPLATE_TEMPLATE_PARM.
12525         (current_template_args): Handle TEMPLATE_DECL.
12526         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
12527         * search.c (dfs_walk, dfs_record_inheritance):
12528         Handle TEMPLATE_TEMPLATE_PARM.
12529         * tree.c (copy_template_template_parm): New function.
12530         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
12531         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
12533 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
12535         * decl.c (start_decl): Don't allow duplicate definitions of static
12536         data members.
12538         * call.c (build_user_type_conversion_1): Handle user-defined
12539         template conversion operators correctly.
12541         * decl2.c (build_expr_from_tree): Issue an error message if the
12542         object in a COMPONENT_REF is a TEMPLATE_DECL.
12544         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
12546         * class.c (is_local_class): New function.
12547         * cp-tree.h (is_local_class): Declare it.
12548         (last_tree): Likewise.
12549         (begin_tree): Likewise.
12550         (end_tree): Likewise.
12551         (lookup_template_class): Change prototype.
12552         * decl.c (cp_finish_decl): Check for NULL where necessary.
12553         Consider FUNCTION_DECLS to declare objects with top-level binding,
12554         when calling make_decl_rtl.
12555         (grokdeclarator): Give members of local classes internal linkage.
12556         (start_function): Remove declaration of last_tree.
12557         (finish_function): Set flag_keep_inline_functions around call to
12558         rest_of_compilation if we are processing a member function in a
12559         local class.
12560         (start_method): Call push_template_decl for member functions of
12561         local classes in template functions.
12562         * decl2.c (import_export_decl): Don't give external linkage to
12563         instantiations of templates with internal linkage.
12564         * parse.y (last_tree): Remove declaration.
12565         (template_type): Pass extra parameter to lookup_template_class.
12566         (self_template_type): Likewise.
12567         (structsp): Move call to reset_specialization into left_curly.
12568         (left_curly): Call reset_specialization, and begin_tree.
12569         * pt.c (saved_trees): New variable.
12570         (mangle_class_name_for_template): Change prototype.  Use
12571         additional function context to name local classes in templates
12572         correctly.
12573         (classtype_mangled_name): Pass the context.
12574         (push_template_decl): Handle local classes and templates, and
12575         member functions for such classes.
12576         (convert_nontype_parameter): Fix handling of pointer-to-member
12577         constants.
12578         (lookup_template_class): Handle local classes in templates.
12579         (tsubst): Likewise.  Don't assume that template instantiations
12580         have external linkage; pay attention to the template declaration.
12581         (mark_decl_instantiated): Likewise.
12582         (begin_tree): New function.
12583         (end_tree): Likewise.
12585         * decl.c (xref_basetypes): Don't call complete_type for basetypes
12586         that involve template parameters; that can lead to infinite
12587         recursion unnecessarily.
12589         * pt.c (register_specialization): Do not register specializations
12590         that aren't ready to be registered yet.
12591         (check_explicit_specialization): Handle explicit specialization of
12592         constructors and destructors.
12593         (build_template_decl): New function.
12594         (push_template_delc): Handle out-of-class specializations of
12595         member templates.
12597         * pt.c (check_explicit_specialization): Set up the template
12598         information before registering the specialization.
12599         (coerce_template_parms): Fix thinko.
12600         (tsubst): Handle specializations of member templates correctly.
12602         * class.c (finish_struct_methods): Remove calls to
12603         check_explicit_specialization from here.
12604         (finish_struct): And insert them here.
12605         * cp-tree.h (perform_qualification_conversions): New function.
12606         (perform_array_to_pointer_conversion): Likewise.
12607         (begin_explicit_instantiation): Likewise.
12608         (end_explicit_instantiation): Likewise.
12609         (determine_specialization): Renamed from
12610         determine_explicit_specialization.
12611         (comp_template_parms): New function.
12612         (processing_explicit_instantiation): New variable.
12613         * cvt.c (perform_qualification_conversions): New function.
12614         (perform_array_to_pointer_conversion): Likewise.
12615         * decl.c (duplicate_decls): Don't consider template functions
12616         alike unless they have the same parameters.  Refine handling of
12617         instantiation/specialization mismatches.
12618         (start_decl): Don't call pushdecl for template specializations,
12619         since they don't affect overloading.
12620         (start_function): Likewise.
12621         (grokfndecl): Call check_explicit_specialization a little later.
12622         Don't call duplicate_decls for memberm template specializations.
12623         (grokdeclarator): Don't update template_count for classes that are
12624         themselves specializations.  Remove use of `2' as parameter to
12625         grokfndecl since that value isn't used.
12626         * lex.c (cons_up_default_function): Save and restore
12627         processing_explicit_instantiation around calls to grokfield.
12628         * parse.y (finish_member_template_decl): New function.
12629         (component_decl_1): Use it.
12630         (fn.def2): Likewise.
12631         (template_arg_list_opt): New nonterminal.
12632         (template_type): Use it.
12633         (self_template_type): Likewise.
12634         (template_id): Likewise.
12635         (object_template_id): Likewise.
12636         (notype_template_declarator): Likwise.
12637         (begin_explicit_instantiation): Likewise.
12638         (end_explicit_instantiation): Likewise.
12639         (explicit_instantiation): Use them.
12640         * pt.c (coerce_template_parms): Add parameters.
12641         (processing_explicit_instantiation): New variable.
12642         (convert_nontype_parameter): New function.
12643         (determine_overloaded_function): Likewise.
12644         (begin_explicit_instantiation): Likewise.
12645         (end_explicit_instantiation): Likewise.
12646         (retrieve_specialization): Likewise.
12647         (register_specialization): Likewise.
12648         (processing_explicit_specialization): Removed.
12649         (determine_specialization): Handle specializations of member
12650         functions of template class instantiations.
12651         (check_explicit_specialization): Refine to conform to standard.
12652         (comp_template_parms): New function.
12653         (coerce_template_parms): Call convert_nontype_parameter.
12654         (tsubst): Refine handling of member templates.  Use
12655         register_specialization.
12656         (instantiate_template): Use retrieve_specialization.
12657         (do_decl_instantiation): Likewise.
12658         (instantiate_decl): Likewise.
12659         (type_unification): Improve handling of explict template
12660         arguments.
12661         * tree.c (mapcar): Return error_mark_node, rather than aborting,
12662         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
12663         * typeck.c (build_unary_op): Call determine_specialization, rather
12664         than determine_explicit_specialization.
12666 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
12668         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
12670 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12672         * error.c (dump_decl): For enum tags, output the tag, not its value.
12674 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
12676         * decl.c (init_decl_processing): Only call init_rtti_processing
12677         FLAG_RTTI is set.
12679 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
12681         * init.c (build_new_1): Split out from build_new.
12682         (build_new): Just return a NEW_EXPR.
12683         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
12685         * decl2.c (get_temp_regvar): Tweak.
12687         * cp-tree.h (TREE_CALLS_NEW): Comment out.
12688         * class.c (resolves_to_fixed_type_p): Remove use.
12689         * method.c (build_opfncall): Likewise.
12690         * call.c (build_new_op): Likewise.
12692 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
12694         * exception.cc (__eh_alloc, __eh_free): New fns.
12695         (__cp_push_exception, __cp_pop_exception): Use them.
12696         (__uncatch_exception): Call terminate here if no exception.
12697         * except.c (build_terminate_handler): New fn.
12698         (expand_start_catch_block): Use it.
12699         (expand_exception_blocks): Likewise.
12700         (alloc_eh_object): New fn.
12701         (expand_throw): Use it.  Protect exception init with terminate.
12702         * typeck.c (build_modify_expr): Remove code that ignores trivial
12703         methods.
12705 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12707         * call.c (add_builtin_candidate): Add default case in enumeration
12708         switch.
12709         (build_new_op): Likewise.
12710         (convert_like): Likewise.
12711         * cvt.c (build_expr_type_conversion): Likewise.
12712         * tree.c (real_lvalue_p): Likewise.
12713         (lvalue_p): Likewise.
12714         (cp_tree_equal): Likewise.
12715         * typeck.c (comptypes): Likewise.
12716         (build_component_ref): Likewise.
12717         (build_function_call_real): Likewise.
12718         (build_binary_op_nodefault): Likewise.
12719         (build_unary_op): Likewise.
12720         (build_modify_expr): Likewise.
12721         * typeck2.c (initializer_constant_valid_p): Likewise.
12723 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
12725         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
12727 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
12729         * pt.c (coerce_template_parms): Make sure to digest_init if
12730         possible.
12732         * decl.c (duplicate_decls): Make the newdecl virtual if the
12733         olddecl was, just as is done with other attributes of olddecl.
12735 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
12737         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
12738         address of an OFFSET_REF.
12740         * cp-tree.def: Add AGGR_INIT_EXPR.
12741         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
12742         AGGR_INIT_EXPR where appropriate.
12743         * expr.c (cplus_expand_expr): Likewise.  Simplify.
12745         * decl2.c (finish_file): Remove call to register_exception_table.
12747 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12749         * pt.c (instantiate_class_template): Don't do injection when
12750         processing_template_decl is true, as pollutes current_binding_level
12751         for base classes.
12753 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
12755         * pt.c (maybe_fold_nontype_arg): Add prototype.
12757 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
12759         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
12760         * error.c (dump_expr): Likewise.
12762 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
12764         * typeck.c (build_function_call_real): Remove "inline called before
12765         definition" pedwarn.
12767         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
12769 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
12771         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
12773         * pt.c (type_unification_real): Change __null to type void* with
12774         a warning.
12776 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
12778         * call.c (implicit_conversion): Don't call
12779         build_user_type_conversion_1 with a NULL expr, since it will
12780         crash.
12782         * pt.c (unify): Don't try to unify array bounds if either array is
12783         unbounded.
12785 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12787         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
12788         Replace extern decls with casts.
12790         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
12791         Update last_parm_cleanup_insn.
12792         (store_after_parms): Remove.
12793         * cp-tree.h: Adjust.
12795 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
12797         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
12798         (finish_file): Check DECL_COMDAT instead of weak|one_only.
12799         (import_export_vtable): Use make_decl_one_only instead of
12800         comdat_linkage for win32 tweak.
12801         (import_export_decl): Likewise.
12802         * pt.c (mark_decl_instantiated): Likewise.
12804         * decl2.c (finish_file): Lose handling of templates in pending_statics.
12806 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
12808         * decl2.c (finish_file): Lose call to expand_builtin_throw.
12809         * except.c (expand_builtin_throw): Remove.
12810         * cp-tree.h: Remove ptr_ptr_type_node.
12811         * decl.c: Likewise.
12813 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
12815         * decl.c (ptr_ptr_type_node): Define.
12816         (init_decl_processing): Initialize it.
12817         * cp-tree.h: Declare it.
12818         * exception.cc (__cp_exception_info): Use __get_eh_info.
12819         (__cp_push_exception): Likewise.
12820         (__cp_pop_exception): Likewise.
12822         From Scott Snyder <snyder@d0sgif.fnal.gov>:
12823         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
12824         saved_pc.
12825         (init_exception_processing): Removed saved_pc initialization.
12827 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
12829         * pt.c (instantiate_decl): Defer all templates but inline functions.
12831 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
12833         * init.c (expand_vec_init): Don't fold a list of parameters.
12835         * decl.c (copy_args_p): Handle copy elision for types with virtual
12836         bases.
12837         * call.c (build_over_call): Likewise.
12839 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
12841         * pt.c (lookup_template_function): Copy the template arguments,
12842         not just the list containing them, to the permanent obstack.
12844 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
12846         * except.c (expand_start_catch_block): suspend_momentary for the
12847         terminate handler.
12849         * error.c (dump_decl): Handle LOOKUP_EXPR.
12851 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
12853         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
12854         permanent obstack if we are processing a template decl.
12855         * typeck.c (build_static_cast): Likewise.
12856         (build_const_cast): Likewise.
12857         (build_reinterpret_cast): Likewise.
12859         * pt.c (coerce_template_parms): Coerce some expressions, even
12860         when processing_template_decl.
12862 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12864         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
12865         handling of pointer difference expressions.
12867         * typeck.c (comp_target_types): Comparison of function/method types
12868         is independent of nptrs.
12870 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
12872         * pt.c (tsubst): Avoid creating pointer to reference and
12873         reference to reference types.
12875 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
12877         * parse.y (do_id): New nonterminal.
12878         (template_id): Use it.
12880 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
12882         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
12883         * spew.c (yylex): Don't do_identifier here.
12884         * decl2.c (build_expr_from_tree): Revert last change.
12886         * decl2.c (build_expr_from_tree): Expand the name for a method call.
12887         * parse.y (object_template_id): Don't try to take the DECL_NAME.
12889 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
12891         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
12892         alloc_expr.
12893         * call.c (build_op_delete_call): Adjust.
12895         * except.c (expand_end_catch_block): Lose rethrow region.
12896         (expand_start_catch_block): Likewise.
12897         (expand_end_catch_block): Don't expand_leftover_cleanups.
12899 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12901         * pt.c (tsubst): Remove tree_cons call (places redundant info into
12902         DECL_TEMPLATE_INSTANTIATION).
12904 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
12906         * tree.c (is_overloaded_fn): Handle getting a fn template.
12907         (really_overloaded_fn): Likewise.
12908         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
12909         * pt.c (check_explicit_specialization): Tweak.
12910         (determine_explicit_specialization): Tweak.
12912         * tree.c, cp-tree.h (get_target_expr): New fn.
12914 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
12916         * pt.c (check_explicit_specialization): Fix misspelling in
12917         diagnostic: `preceeded'.
12918         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
12919         `conversiona'.
12921 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
12923         * pt.c (determine_explicit_specialization): Avoid an internal
12924         error for bad specializations.
12926         * method.c (build_overload_value): Handle SCOPE_REF.
12928 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
12930         * class.c (prepare_fresh_vtable): Enable even more complex MI
12931         vtable names.
12933 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
12935         * exception.cc (__check_eh_spec): Optimize a bit.
12937         * exception.cc (__cp_pop_exception): Lose handler arg.
12938         * except.c (do_pop_exception): Likewise.
12939         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
12940         (expand_end_catch_block): Likewise.
12942 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12944         * pt.c (check_explicit_specialization): Complain about using a
12945         template-id for a non-specialization.
12947 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
12949         * repo.c: Prototype rindex only if needed.
12950         * xref.c: Likewise.
12952 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12954         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
12956 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
12958         * typeck.c (build_const_cast): Handle references here instead of
12959         handing off to convert_to_reference.
12961         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
12962         TerminateFunctionCall.
12963         (init_exception_processing): Likewise.  Terminate et al are now
12964         the fns, not ADDR_EXPRs.
12965         (various): Lose redundant assemble_external calls.
12966         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
12968         * cp-tree.h (struct lang_decl_flags): Add comdat.
12969         (DECL_COMDAT): New macro.
12970         * decl.c (duplicate_decls): Propagate it.
12971         (cp_finish_decl): Handle it.
12972         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
12974         * class.c: Remove static pending_hard_virtuals.
12975         (add_virtual_function): Take pointers to pending_virtuals
12976         and pending_hard_virtuals.
12977         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
12979 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
12981         * decl2.c (import_export_vtable): If we support one_only but not
12982         weak symbols, mark instantiated template vtables one_only.
12983         (import_export_decl): Likewise for tinfo functions.
12984         (finish_vtable_vardecl): Also write out vtables from explicitly
12985         instantiated template classes.
12986         * pt.c (mark_class_instantiated): Revert last change.
12988         * except.c (expand_throw): Call mark_used on the destructor.
12990 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
12992         * lex.c (lang_init): Enable flag_exceptions by default if no
12993         command line switch was specified.
12995 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
12997         * pt.c (unify): Handle `void' template parameters in
12998         specializations.
13000 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
13002         * rtti.c (build_dynamic_cast): Handle template case here.
13003         (build_dynamic_cast_1): Not here.
13005         * typeck2.c (digest_init): Make copies where appropriate.
13007         * decl2.c (delete_sanity): resolve_offset_ref.
13009         * except.c: Call terminate without caching so many bits.
13011         * except.c (expand_start_catch_block): Fix catching a reference
13012         to pointer.
13014 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
13016         * init.c (build_new): Copy size to the saveable obstack.
13018         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
13019         TRY_CATCH_EXPR for now.
13021 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
13023         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
13024         has DECL_LANG_SPECIFIC.
13026         * exception.cc (struct cp_eh_info): Add handlers field.
13027         (__cp_push_exception): Initialize it.
13028         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
13029         (__throw_bad_exception): Remove.
13030         * except.c (call_eh_info): Add handlers field.
13031         (get_eh_handlers): New fn.
13032         (push_eh_cleanup): Increment handlers.
13034 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
13036         * except.c (expand_start_eh_spec): Use the try/catch code.
13037         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
13038         doing everything inline.
13039         (init_exception_processing): throw_type_match now takes
13040         const void pointers.
13041         * exception.cc (__check_eh_spec): New fn.
13042         * inc/exception: Neither terminate nor unexpected return.
13043         * decl.c: Make const_ptr_type_node public.
13044         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
13046         * except.c (expand_start_catch_block): We only need the rethrow
13047         region for non-sjlj exceptions.
13048         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
13050 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
13052         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
13053         (various.o): Likewise.
13054         * inc/new: Add placement deletes.  Add throw specs for default new.
13055         * new.cc (set_new_handler): Move here from libgcc2.
13056         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
13057         (new): Move from libgcc2.  Throw bad_alloc.
13058         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
13059         * decl.c (init_decl_processing): Update exception specs on new and
13060         delete.
13062         * method.c (build_decl_overload_real): Don't mess with global
13063         placement delete.
13065         * init.c (build_new): Check for null throw spec, not nothrow_t.
13067         * decl.c (duplicate_decls): Don't complain about different exceptions
13068         from an internal declaration.
13070         * call.c (build_op_delete_call): Fix check for member fns again.
13072         * decl2.c (import_export_decl): Interface hackery affects
13073         virtual synthesized methods.
13075 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
13077         * decl.c (start_decl): Don't just complain about a mismatched
13078         scope, fix it.
13080         * decl.c (make_implicit_typename): Handle case where t is not
13081         actually from context.
13082         * tree.c (get_type_decl): Lose identifier case.
13083         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
13084         * parse.y (nonnested_type): Just use lookup_name.
13085         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
13087 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
13089         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
13090         T was built in C language context (for example, by
13091         output_func_start_profiler).
13093 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
13095         * decl.c (make_implicit_typename): New fn.
13096         (lookup_name_real): Use it.  Use current_class_type as the context.
13098 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
13100         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
13102 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
13104         * friend.c (do_friend): Warn about non-template friends in templates.
13106         * call.c (build_op_delete_call): Fix handling of inherited delete.
13108         * search.c (dfs_record_inheritance): Ignore template type parms.
13110 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
13112         * call.c (build_new_op): Fix copy error.
13113         (build_op_new_call): New fn.
13114         (build_op_delete_call): New fn.
13115         * cp-tree.h: Declare them.
13116         * init.c (build_new): Use them.  Support placement delete.
13117         (build_x_delete): Use build_op_delete_call.
13118         (build_delete): Likewise.
13119         * decl2.c (delete_sanity): Likewise.
13120         (coerce_delete_type): Don't complain about placement delete.
13122 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13124         * call.c (build_new_function_call): Remove unused 'obj' parm.
13125         * cp-tree.h, typeck.c: Adjust.
13127         * init.c (build_new): Make the cleanup last longer.
13128         (expand_vec_init): Call do_pending_stack_adjust.
13130 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
13132         * pt.c (do_type_instantiation): Fix typo.
13133         (mark_class_instantiated): If we support one_only but not weak
13134         symbols, don't mark this as known.
13136         * init.c (build_new): Handle vec delete in EH cleanup.
13138 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13140         * call.c (build_method_call): Call complete_type before checking
13141         for destructor.
13143 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
13145         * decl.c (add_block_current_level): Delete.
13146         * init.c (build_vec_delete_1): Delete build_block and
13147         add_block_current_level calls.
13149 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
13151         * init.c (build_new): Handle freeing allocated memory when the
13152         constructor throws.
13154         * call.c (build_new_method_call): Fix flags arg.
13156         * pt.c (do_type_instantiation): Don't try to instantiate
13157         member templates.
13158         (mark_decl_instantiated): If we support one_only but not
13159         weak symbols, mark this one_only.
13160         * decl2.c (import_export_vtable): Don't defer handling of vtables
13161         if MULTIPLE_SYMBOL_SPACES.
13163 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
13165         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
13167 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
13169         * except.c (do_pop_exception): Return a value.
13171 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
13173         * call.c (build_new_method_call): Handle getting a
13174         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
13175         if we got template parms.
13176         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
13177         not just the args.
13178         * decl2.c (build_expr_from_tree): Tweak last change.
13179         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
13180         (maybe_fold_nontype_arg): Split out from tsubst_copy.
13181         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
13183 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
13185         * pt.c (tsubst_copy): Handle explicit template arguments in
13186         function calls.
13187         * typeck.c (build_x_function_call): Likewise.
13188         * decl2.c (build_expr_from_tree): Lookup function name if it
13189         hasn't been done.
13191         * pt.c (tsubst): Instantiate template functions properly when
13192         template parameter does not appear in function arguments and return
13193         type.
13194         (comp_template_args): Handle member templates required by tsubst.
13196 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13198         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
13199         previous change.
13201 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13203         * pt.c (coerce_template_parms): Tweak error message.
13205         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
13206         return type defaults to `int', even if there are storage-class
13207         specifiers.
13209 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
13211         Complete nested exception support.
13212         * except.c (do_pop_exception): Split out...
13213         (push_eh_cleanup): From here.  Handle the EH region by hand.
13214         (expand_start_catch_block): Add a new level for the catch parm.
13215         Move the rethrow region outside the two cleanup regions.
13216         Protect the initializer for the catch parm with terminate.
13217         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
13218         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
13219         popping off the middle of the stack.
13220         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
13221         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
13222         (build_cplus_new): Only wrap CALL_EXPRs.
13223         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
13224         the constructor call.
13226 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13228         * Make-lang.in (c++.distdir): Make inc subdirectory.
13230 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
13232         * decl2.c (finish_file): Put back some code.
13234 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
13236         * decl2.c (finish_file): Remove redundant code.
13237         * method.c (emit_thunk): Don't let the backend defer generic thunks.
13239 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
13241         * except.c (call_eh_info): Split out...
13242         (push_eh_info): From here.
13243         (expand_builtin_throw): Use it.
13244         (expand_start_catch_block): Move region start back.
13246 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
13248         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
13249         (real_yylex): Record wide strings using target endianness, not host.
13251 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
13253         * repo.c (rindex): Add decl unconditionally.
13254         (get_base_filename, open_repo_file): Don't cast rindex.
13255         * xref.c (rindex): Add decl unconditionally.
13256         (index): Remove unused decl.
13257         (open_xref_file): Don't cast rindex.
13259 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
13261         * class.c (build_vbase_path): Propagate the result type properly.
13263 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
13265         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
13266         remaining use of saved_throw_type with a call to get_eh_type.
13268 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
13270         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
13271         (file_name_nondirectory): New function, doing the same as the macro.
13272         (set_typedecl_interface_info): Use it instead of the macro.
13273         (check_newline): Likewise.
13274         (handle_cp_pragma): Likewise.
13276         * repo.c (get_base_filename): Cast result of rindex to char*.
13277         (open_repo_file): Likewise.
13278         * xref.c (open_xref_file): Likewise.
13279         * error.c (dump_char): Make its arg int, not char.
13281         * except.c (push_eh_info): Pass the number of fields - 1 down, not
13282         the exact number of fields.
13284 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
13286         Support for nested exceptions.
13287         * tinfo2.cc (__is_pointer): New fn.
13288         * exception.cc (struct cp_eh_info): Define.
13289         (__cp_exception_info, __uncatch_exception): New fns.
13290         (__cp_push_exception, __cp_pop_exception): New fns.
13291         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
13292         Lose empty_fndecl.
13293         (init_exception_processing): Likewise.  __eh_pc is now external.
13294         (push_eh_info): New fn.
13295         (get_eh_{info,value,type,caught}): New fns.
13296         (push_eh_cleanup): Just call __cp_pop_exception.
13297         (expand_start_catch_block): Use push_eh_info.  Start the eh region
13298         sooner.
13299         (expand_end_eh_spec): Use push_eh_info.
13300         (expand_throw): Call __cp_push_exception to set up the exception info.
13301         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
13302         when we rethrow.
13303         (expand_builtin_throw): Don't refer to empty_fndecl.
13305 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
13307         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
13309 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
13311         * method.c (build_template_parm_names, build_decl_overload_real):
13312         Add static to definitions.
13313         * pt.c (add_to_template_args, note_template_header,
13314         processing_explicit_specialization, type_unification_real): Likewise.
13315         ({determine,check}_explicit_specialization): Use a single string for
13316         error messages.
13318 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
13320         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
13321         (expand_end_catch_block): Likewise.
13322         (expand_end_eh_spec): Likewise.
13324 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
13326         * decl.c (duplicate_decls): Handle template specializations
13327         correctly.
13328         * error.c (dump_function_name): Fix printing of specializations of
13329         member functions that are not member templates.
13330         * cp-tree.h (processing_specialization): Make global.
13331         * pt.c (processing_specialization): Likewise.
13332         * lex.c (cons_up_default_function): Save and restore
13333         processing_specialization to avoid confusion.
13335 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
13337         * decl.c (init_decl_processing): Give null_node unknown* type.
13338         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
13339         (common_type): Likewise.
13340         * error.c (args_as_string): Recognize null_node.
13342 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13344         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
13345         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
13347         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
13349         * Make-lang.in (g++): Include prefix.o.
13351 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
13353         * pt.c (determine_explicit_specialization): Initialize "dummy"
13354         to keep Purify quiet.
13356 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
13358         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
13359         (build_overload_int): Not here.
13361 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
13363         * class.c (build_type_pathname): Remove.
13364         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
13366 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
13368         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
13369         &&label GNU extension.
13371 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
13373         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
13374         so as to avoid incorrect manglings.
13375         * method.c (build_decl_overload_real): Don't mangle return types
13376         for constructors.
13378 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
13380         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
13381         scratch_tree_cons): Define as macros for now.
13382         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
13383         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
13384         typeck2.c: Use them and the expression_obstack variants.
13386 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13388         * decl.c (store_return_init): Allow classes with explicit ctors to
13389         be used with the named return values extension.
13391 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
13393         * pt.c (instantiate_decl): Fix previous change.
13395 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
13397         * pt.c (tsubst): Fix thinko.
13398         (instantiate_decl): Really use the original template.
13400         * call.c (build_new_method_call): Use simple constructor_name for
13401         error messages.
13403 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
13405         * method.c (build_underscore_int): Don't use ANSI specific
13406         features.
13408 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
13410         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
13411         for our key method; it might have been inlined by -O3.
13413 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
13415         * decl.c (make_typename_type): Do not try to call lookup_field for
13416         non-aggregate types.
13418 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
13420         * typeck.c (build_reinterpret_cast): Tweak.
13422 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
13424         * typeck.c (build_reinterpret_cast): Converting a void pointer
13425         to function pointer with a reinterpret_cast produces a warning
13426         if -pedantic is issued.
13428 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13430         * typeck.c (c_expand_return): Don't warn about returning a
13431         reference-type variable as a reference.
13433 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
13435         * method.c (build_static_name): Fix typo.
13437 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
13439         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
13440         OLDDECL before we try to do DECL_USE_TEMPLATE.
13442 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13444         * decl.c (duplicate_decls): Don't warn about template instances.
13446         * typeck.c (mark_addressable): Lose ancient code that unsets
13447         DECL_EXTERNAL.
13449         * pt.c (do_decl_instantiation): Lose support for instantiating
13450         non-templates.
13452         * call.c (build_new_function_call): Fix handling of null explicit
13453         template args.
13454         (build_new_method_call): Likewise.
13456 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
13458         * method.c (build_underscore_int): Fix typo.
13460 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
13462         * tree.c (print_lang_statistics): #if 0 call to
13463         print_inline_obstack_statistics until its definition is checked in.
13465 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
13467         * decl2.c (finish_file): Move dump_tree_statistics to end.
13469         * pt.c (instantiate_decl): Look for the original template.
13470         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
13471         of member templates.
13473 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13475         * Makefile.in (g++FAQ.*): New rules.
13476         (CONFLICTS): Update.
13477         * g++FAQ.texi: Moved from libg++.
13479         * parse.y (PFUNCNAME): Only specify the type once.
13481 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
13483         * lex.c (real_yylex): Clean up the code to fully behave the way
13484         the c-lex.c parser does for complex and real numbers.
13486 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13488         * method.c (build_decl_overload_real): Reformat.
13490 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
13492         * method.c (synthesize_method): If at_eof, determine our linkage.
13494 1997-09-29  Paul Eggert  <eggert@twinsun.com>
13496         * lex.c (real_yylex): Treat `$' just like `_', except issue a
13497         diagnostic if !dollars_in_ident or if pedantic.
13499         * lang-specs.h (@c++): -ansi no longer implies -$.
13501         * decl2.c (lang_decode_option):
13502         -traditional and -ansi now do not mess with
13503         dollars_in_ident.
13505 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
13507         * Makefile.in (parse.o, decl.o): Also depend on
13508         $(srcdir)/../except.h $(srcdir)/../output.h.
13509         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
13510         $(srcdir)/../except.h $(srcdir)/../output.h.
13511         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
13512         ../insn-codes.h.
13514         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
13516         * expr.c (cplus_expand_expr): Make it static.
13518         * decl2.c, init.c, typeck.c: Include "expr.h".
13519         (expand_expr): Use proper values when calling the function.
13521 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
13523         * lang-options.h: New -Wold-style-cast flag.
13524         * cp-tree.h (warn_old_style_cast): New variable.
13525         * decl2.c (warn_old_style_cast): Likewise.
13526         (lang_decode_option): Support -Wold-style-cast.
13527         (reparse_absdcl_as_casts): Produce old-style-cast warning.
13529 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13531         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
13532         TREE_USED, reset value based on already_used.
13534         * init.c (expand_member_init): Revert change.
13536 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
13538         * cp-tree.h, decl.c, decl2.c, pt.c:
13539         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
13541         * decl2.c (lang_decode_option): Add missing ;.
13543 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
13545         * friend.c (do_friend): Disable injection for all template-derived
13546         decls.
13547         * decl2.c (lang_decode_option): Handle -fguiding-decls.
13548         * parse.y (notype_template_declarator): New nonterminal.
13549         (direct_notype_declarator): Use it.
13550         (complex_direct_notype_declarator): Likewise.
13551         (object_template_id): Accept any kind of identifier after TEMPLATE.
13552         (notype_qualified_id): Don't add template declarators here.
13554 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
13556         * call.c (add_template_candidate): Add explicit_targs parameter.
13557         (build_scoped_method_call): Use it.
13558         (build_overload_call_real): Likewise.
13559         (build_user_type_conversion_1): Likewise.
13560         (build_new_function_call): Likewise.
13561         (build_object_call): Likewise.
13562         (build_new_op): Likewise.
13563         (build_new_method_call): Likewise.
13564         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
13565         (build_new_method_call): Likewise.
13567         * class.c (finish_struct_methods): Add specialization pass to
13568         determine which methods were specializing which other methods.
13569         (instantiate_type): Handle TEMPLATE_ID_EXPR.
13571         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
13573         * cp-tree.h (name_mangling_version): New variable.
13574         (flag_guiding_decls): Likewise.
13575         (build_template_decl_overload): New function.
13576         (begin_specialization): Likewise.
13577         (reset_specialization): Likewise.
13578         (end_specialization): Likewise.
13579         (determine_explicit_specialization): Likewise.
13580         (check_explicit_specialization): Likewise.
13581         (lookup_template_function): Likewise.
13582         (fn_type_unification): Add explicit_targs parameter.
13583         (type_unification): Likewise.
13585         * decl.c (duplicate_decls): Add smarts for explicit
13586         specializations.
13587         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
13588         specializations.
13589         (grokfndecl): Call check_explicit_specialization.
13591         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
13592         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
13593         (check_classfn): Handle specializations.
13595         * error.c (dump_function_name): Print specialization arguments.
13597         * friend.c (do_friend): Don't call pushdecl for template
13598         instantiations.
13600         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
13602         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
13603         and -fno-guiding-decls.
13605         * lex.c (identifier_type): Return PFUNCNAME for template function
13606         names.
13608         * method.c (build_decl_overload_real): New function.
13609         (build_template_parm_names): New function.
13610         (build_overload_identifier): Use it.
13611         (build_underscore_int): New function.
13612         (build_overload_int): Use it.  Add levels for template
13613         parameters.
13614         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
13615         (build_overload_nested_names): Handle template type parameters.
13616         (build_template_decl_overload): New function.
13618         * parse.y (YYSTYPE): New ntype member.
13619         (nested_name_specifier): Use it.
13620         (nested_name_specifier_1): Likewise.
13621         (PFUNCNAME): New token.
13622         (template_id, object_template_id): New non-terminals.
13623         (template_parm_list): Note specializations.
13624         (template_def): Likewise.
13625         (structsp): Likewise.
13626         (fn.def2): Handle member template specializations.
13627         (component_decl_1): Likewise.
13628         (direct_notype_declarator): Handle template-ids.
13629         (component_decl_1): Likewise.
13630         (direct_notype_declarator): Handle template-ids.
13631         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
13633         * pt.c (processing_specializations): New variable.
13634         (template_header_count): Likewise.
13635         (type_unification_real): New function.
13636         (processing_explicit_specialization): Likewise.
13637         (note_template_header): Likewise.
13638         (is_member_template): Handle specializations.
13639         (end_template_decl): Call reset_specialization.
13640         (push_template_decl): Handle member template specializations.
13641         (tsubst): Likewise.
13642         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
13643         (instantiate_template): Handle specializations.
13644         (instantiate_decl): Likewise.
13645         (fn_type_unification): Handle explicit_targs.
13646         (type_unification): Likewise.  Allow incomplete unification
13647         without an error message, if allow_incomplete.
13648         (get_bindings): Use new calling sequence for fn_type_unification.
13650         * spew.c (yylex): Handle PFUNCNAME.
13652         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
13653         (really_overloaded_fn): Likewise.
13654         (get_first_fn): Handle function templates.
13656         * typeck.c (build_x_function_call): Use really_overloaded_fn.
13657         Handle TEMPLATE_ID_EXPR.
13658         (build_x_unary_op): Likewise.
13659         (build_unary_op): Likewise.
13660         (mark_addressable): Templates whose address is taken are marked
13661         as used.
13663 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13665         * decl.c (init_decl_processing): Declare __builtin_constant_p as
13666         accepting any kind of type, not only int.
13668 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
13670         * search.c (get_matching_virtual): Notice virtual bases when sorrying
13671         about covariant returns.
13673         * parse.y (member_init): Also imply typename here.  Remove ancient
13674         extension for initializing base members.
13676 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13678         Handle multi-level typenames and implicit typename in base list.
13679         * parse.y (typename_sub{,[0-2]}): New rules.
13680         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
13681         (nonnested_type): New rule.
13682         (complete_type_name): Use it.
13683         (base_class.1): Use typename_sub and nonnested_type.
13684         (nested_name_specifier): Don't elide std:: here.
13685         * decl.c (make_typename_type): Handle getting a type for NAME.
13686         (lookup_name_real): Turn std:: into :: here.
13688         Rvalue conversions were removed in London.
13689         * call.c (is_subseq): Don't consider lvalue transformations.
13690         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
13691         (joust): Re-enable ?: kludge.
13693 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
13695         * decl.c (start_function): Up warning of no return type to be a
13696         pedwarn.
13698 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13700         * init.c (expand_member_init): Don't set TREE_USED.
13701         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
13702         set,don't clear TREE_USED wholesale.
13704 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
13706         * call.c (build_over_call): Do require_complete_type before
13707         build_cplus_new.
13709 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
13711         * search.c (lookup_field): Call complete_type in all cases.
13713         * decl.c (finish_function): Just warn about flowing off the end.
13715 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13717         * decl.c (grokparms): Don't bash a permanent list node if we're
13718         in a function.
13720 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
13722         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
13724 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
13726         * call.c (build_new_op): Give better error for syntactically
13727         correct, but semantically invalid, use of undeclared template.
13729         * call.c (compare_qual): Handle pmfs.
13731         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
13732         after the exception spec.
13734 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13736         * call.c (null_ptr_cst_p): Integer type, not integral type.
13738         * call.c (joust): Disable warnings until they can be moved to the
13739         right place.
13741 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
13743         * Makefile.in, config-lang.in:  Convert to autoconf.
13745 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
13747         * decl.c (lookup_name_real): Add implicit 'typename' to types from
13748         base classes.
13750         * pt.c (most_specialized_class): Fix typo.
13751         (tsubst): Move constant folding to TREE_VEC case.
13753 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
13755         * pt.c (do_poplevel): Don't warn about unused local variables
13756         while processing_template_decl since we don't always know whether
13757         or not they will need constructing/destructing.
13759         * pt.c (uses_template_parms): Check the values of an enumeration
13760         type to make sure they don't depend on template parms.
13762         * decl.c (make_typename_type): Don't lookup the field if the
13763         context uses template parms, even if we're not
13764         processing_template_decl at the moment.
13766         * pt.c (coerce_template_parms): Avoid looking at the
13767         TYPE_LANG_DECL portion of a typename type, since there won't be
13768         one.
13769         (tsubst): Do constant folding as necessary to make sure that
13770         arguments passed to lookup_template_class really are constants.
13772 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
13774         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
13775         * decl2.c (finish_file): Only register exception tables if we
13776         need to.
13778         * decl.c (init_decl_processing): Add __builtin_[fs]p.
13780 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13782         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
13784 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
13786         * error.c (dump_decl): Avoid crashing when presented with a
13787         uninitialized constant, as can occur with a template parameter.
13788         (dump_expr): Make sure that there are enough levels of
13789         current_template_parms before we start diving through them.
13791 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
13793         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
13794         c-typeck.c.
13796 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13798         * except.c (expand_throw): Call build_delete for all
13799         exception types, not just objects with destructors.
13801 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
13803         * decl.c (current_local_enum): Remove static.
13804         * pt.c (tsubst_enum): Save and restore value of current_local_enum
13805         in case template is expanded in enum decl.
13806         (instantiate_class_template): Use new tsubst_enum signature.
13807         (tsubst_expr): Likewise.
13809 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
13811         * pt.c (begin_member_template_processing): Take a function as
13812         argument, not a set of template arguments.  Use the template
13813         parameters, rather than the arguments.  Handle non-type parameters
13814         correctly.  Push a binding level for the parameters so that multiple
13815         member templates using the same parameter names can be declared.
13816         (end_member_template_processing): Pop the binding level.
13817         (push_template_decl): Mark member templates as static when
13818         appropriate.
13820         * lex.c (do_pending_inlines): Pass the function, not its template
13821         arguments, to begin_member_template_processing.
13822         (process_next_inline): Likewise.
13823         (do_pending_defargs): Likewise.
13825         * error.c (dump_expr): Obtain the correct declaration for a
13826         TEMPLATE_CONST_PARM.
13828         * call.c (add_template_conv_candidate): New function.
13829         (build_object_call): Handle member templates, as done in the other
13830         build_ functions.
13832 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
13834         * decl.c (replace_defag): Undo previous change.
13835         * lex.c (do_pending_defargs): Deal with member templates.
13837         * pt.c (is_member_template): Avoid crashing when passed a
13838         non-function argument.
13840 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13842         * class.c (grow_method): Remove check for redeclaration.
13844 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
13846         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
13847         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
13848         (PRIMARY_TEMPLATE_P): Use it.
13849         * call.c (build_overload_call_real): Use it.
13850         * class.c (instantiate_type): Likewise.
13851         * decl.c (decls_match): Likewise.
13852         * method.c (build_overload_identifier): Likewise.
13853         * pt.c (push_template_decl): Likewise.
13854         (classtype_mangled_name): Likewise.
13855         (lookup_template_class): Likewise.
13857         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
13858         DECL_NTPARMS to conform to usage elsewhere.
13859         * call.c (add_template_candidate): Likewise.
13860         * class.c (instantiate_type): Likewise.
13861         * pt.c (instantiate_template): Likewise.
13862         (get_bindings): Likewise.
13864         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
13865         is_member_template.
13867         * pt.c (unify): Undo changes to allow multiple levels of template
13868         parameters.
13869         (type_unification): Likewise.
13870         (fn_type_unification): Likewise.
13871         (get_class_bindings): Likewise.
13872         * cp-tree.h (Likewise).
13874         * decl.c (replace_defarg): Check that the type of the default
13875         parameter does not invlove a template type before complaining
13876         about the initialization.
13878         * error.c (dump_expr): Deal with template constant parameters in
13879         member templates correctly.
13881         * pt.c (is_member_template): Deal with class specializations
13882         correctly.
13883         (tsubst): Handle "partial instantiation" of member templates
13884         correctly.
13886 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
13888         * pt.c (type_unification): Change calling sequence to allow for
13889         multiple levels of template parameters.
13890         (tsubst_expr): Likewise.
13891         (tsubst): Likewise.
13892         (tsubst_copy): Likewise.
13893         (instantiate_template): Likewise.
13894         (unify): Likewise.
13895         * call.c (build_overload_call_real): Use it.
13896         (add_builtin_candidate): Use it.
13897         (build_new_method_call): Use it.
13898         * class.c (instantiate_type): Use it.
13899         * decl.c (grokdeclarator): Use it.
13900         * decl2.c (finish_file): Use it.
13901         * method.c (build_overload_identifier): Use it.
13903         * call.c (add_template_candidate):  Add additional parameter for
13904         the function return type.  Call fn_type_unification istead of
13905         type_unification.
13906         (build_user_type_conversion_1): Handle member templates.
13907         (build_new_function_call): Likewise.
13908         (build_new_op): Likewise.
13909         (build_new_method_call): Likewise.
13911         * class.c (grow_method): Don't give an error message indicating
13912         that two member templates with the same name are ambiguous.
13913         (finish_struct): Treat member template functions just like member
13914         functions.
13916         * cp-tree.h (check_member_template): Add declaration.
13917         (begin_member_template_processing): Likewise.
13918         (end_member_template_processing): Likewise.
13919         (fn_type_unification): Likewise.
13920         (is_member_template): Likewise.
13921         (tsubst): Change prototype.
13922         (tsubst_expr): Likewise.
13923         (tsubst_copy): Likewise.
13924         (instantiate_template): Likewise.
13925         (get_bindings): Likewise.
13927         * decl.c (decls_match): Handle multiple levels of template
13928         parameters.
13929         (pushdecl): Handle template type params just like other type
13930         declarations.
13931         (push_class_level_binding): Return immediately if the
13932         class_binding_level is NULL.
13933         (grokfndecl): If check_classfn() returns a member_template, use
13934         the result of the template, not the template itself.
13936         * decl2.c (check_member_template): New function.  Check to see
13937         that the entity declared to be a member template can be one.
13938         (check_classfn): Allow redeclaration of member template functions
13939         with different types; the new functions can be specializations or
13940         explicit instantiations.
13942         * error.c (dump_decl): Handle multiple levels of template
13943         parameters.
13944         (dump_function_decl): Update to handle function templates.
13946         * lex.c (do_pending_inlines): Set up template parameter context
13947         for member templates.
13948         (process_next_inline): Likewise.
13950         * method.c (build_overload_identifier): Adjust for multiple levels
13951         of template parameters.
13953         * parse.y (fn.def2): Add member templates.
13954         (component_decl_1): Likewise.
13956         * pt.c (begin_member_template_processing): New function.
13957         (end_member_template_processing): Likewise.
13958         (is_member_template): Likewise.
13959         (fn_type_unification): Likewise.
13960         (current_template_parms): Return a vector of all the template
13961         parms, not just the innermost level of parms.
13962         (push_template_decl): Deal with the possibility of member
13963         templates.
13964         (lookup_template_class): Likewise.
13965         (uses_template_parms): Likewise.
13966         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
13967         TEMPLATE_CONST_PARM to deal with multiple levels of template
13968         arguments.   Add processing of TEMPLATE_DECL to produce new
13969         TEMPLATE_DECLs from old ones.
13970         (do_decl_instantiation): Handle member templates.
13972         * search.c (lookup_fnfields_1): Handle member template conversion
13973         operators.
13975         * tree.c (cp_tree_equal): Check the levels, as well as the
13976         indices, of TEMPLATE_CONST_PARMs.
13978         * typeck.c (comptypes): Check the levels, as well as the indices,
13979         fo TEMPLATE_TYPE_PARMs.
13980         (build_x_function_call): Treat member templates like member
13981         functions.
13983 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13985         * typeck.c (c_expand_return): Always convert_for_initialization
13986         before checking for returning a pointer to local.
13988         * pt.c (type_unification): If strict and the function parm doesn't
13989         use template parms, just compare types.
13991 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
13993         * method.c (build_overloaded_value): Replace direct call
13994         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
13996 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
13998         * typeck.c (convert_arguments): Don't arbitrarily choose the first
13999         of a set of overloaded functions.
14001 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
14003         * lex.c (real_yylex): Don't elide __FUNCTION__.
14005         * method.c (build_overload_value): Add in_template parm.
14006         (build_overload_int): Likewise.
14007         (build_overload_identifier): Pass it.
14009         * decl.c (duplicate_decls): Don't bash a previous template
14010         definition with a redeclaration.
14012         * pt.c (unify): float doesn't match double.
14014         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
14015         TYPE_DECL.  Handle getting non-template types.
14016         * parse.y (explicit_instantiation): Use typespec instead of
14017         aggr template_type.
14019 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
14021         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
14023 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
14025         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
14026         (compare_ics): Likewise.
14028 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
14030         * call.c (joust): Warn about choosing one conversion op over
14031         another because of 'this' argument when the other return type is
14032         better.
14033         (source_type): New fn.
14035         * call.c (build_new_op): Strip leading REF_BIND from first operand
14036         to builtin operator.
14038         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
14039         use its RTL.
14041 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
14043         * call.c (null_ptr_cst_p): Remove support for (void*)0.
14045 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
14047         * typeck.c (expand_target_expr): Make definition match declaration.
14049         * class.c (get_basefndecls): Make definition match declaration.
14051 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
14053         * input.c (sub_getch): Eventually give up and release the input file.
14055         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
14056         right place.
14058         * call.c (joust): Tweak message.
14060 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
14062         * error.c (type_as_string): Put const/volatile on template type
14063         parameters where appropriate.
14065 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
14067         * call.c (strictly_better): Make arguments unsigned ints.
14069 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
14071         * lex.c (real_yylex): Refer to __complex instead of complex.
14073 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
14075         * lex.c (real_yylex): Don't use getc directly.
14077 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
14079         * call.c (is_subseq): Don't try to be clever.
14081 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
14083         * parse.y, pt.c: Include "except.h".
14084         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
14085         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
14086         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
14087         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
14088         prototyping.
14090 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
14092         * decl2.c (mark_vtable_entries): Instead of replacing pure
14093         virtuals with a reference to __pure_virtual, copy the decl and
14094         change the RTL.
14096 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
14098         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
14100         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
14102         * pt.c (instantiate_class_template): Call repo_template_used
14103         before finish_prevtable_vardecl.
14105         * call.c (is_subseq): New fn.
14106         (compare_ics): Use it.
14108         * repo.c (finish_repo): Don't crash on no args.
14110         * parse.y (named_complex_class_head_sans_basetype): Handle
14111         explicit global scope.
14112         * decl2.c (handle_class_head): New fn.
14114         * pt.c (unify): Add CONST_DECL case.
14116 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14118         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
14120         * cp-tree.h (report_type_mismatch): Add prototype.
14121         * call.c (build_overload_call_real): Remove erroneous fourth
14122         argument to report_type_mismatch.
14123         (build_user_type_conversion_1): Remove erroneous second arg to
14124         tourney.
14125         (build_new_function_call): Likewise.
14126         (build_object_call): Likewise.
14127         (build_new_op): Likewise.
14128         (build_new_method_call): Likewise.
14130 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
14132         * error.c (dump_decl): Don't bother processing a function with no
14133         DECL_LANG_SPECIFIC.
14135         * method.c (emit_thunk): Call init_function_start in the macro case.
14137 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
14139         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
14140         defined and used to set flag_vtable_thunks.
14142 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
14144         * parse.y: Don't clear the inlines from their obstack until they've
14145         all been processed.
14147         * decl.c (duplicate_decls): Don't complain about exception
14148         specification mismatch if flag_exceptions is off.
14150 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
14152         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
14154 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
14156         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
14157         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
14158         Include <stdio.h> before include files that formerly used STDIO_PROTO.
14160         * decl.c, g++spec.c, lex.c, method.c, repo.c:
14161         Include "config.h" first, as per autoconf manual.
14163 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
14165         * decl.c (duplicate_decls): Tweak wording.
14166         * lex.c (do_pending_defargs): Don't die if we see a default arg
14167         that isn't a DEFAULT_ARG.
14168         * error.c (dump_expr): Handle DEFAULT_ARG.
14170         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
14171         * lang-options.h: Add -fhandle-exceptions.
14173         * class.c (build_vtable): Vtables are artificial.
14174         (prepare_fresh_vtable): Likewise.
14176 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
14178         * cvt.c (ocp_convert): After converting to the target type, set
14179         LOOKUP_NO_CONVERSION.
14181         * call.c (joust): Warn about potentially confusing promotion rules
14182         with -Wsign-promo.
14183         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
14185 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
14187         * exception.cc: Declare __terminate_func with noreturn attribute.
14189 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
14191         * parse.y: Break out eat_saved_input, handle errors.
14192         (function_try_block): Use compstmt instead of compstmt_or_error.
14194 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
14196         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
14198 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14200         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
14201         existence of cc1plus check whether $(LANGUAGES) contains C++.
14203 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14205         * method.c (do_build_copy_constructor): When copying an anonymous
14206         union member loop around to handle nested anonymous unions.  Use
14207         the offset of the member relative to the outer structure, not the
14208         union.
14210 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
14212         * call.c (resolve_args): New fn.
14213         (build_new_function_call): Use it.
14214         (build_object_call): Likewise.
14215         (build_new_method_call): Likewise.
14217 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
14219         * call.c (build_over_call): tsubst all default parms from templates.
14221 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
14223         * decl.c (struct cp_function): Add static_labelno.
14224         (push_cp_function_context): Save it.
14225         (pop_cp_function_context): Restore it.
14227 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
14229         * typeck.c (build_component_ref_1): Convert from reference.
14231 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14233         * parse.y (current_declspecs, prefix_attributes): Initialize to
14234         NULL_TREE.
14236         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
14237         before we try to force it to be a TREE_LIST.
14238         (decl): Make sure $1.t is non-nil.
14240 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
14242         * pt.c (uses_template_parms): Handle template first-parse codes.
14244         * decl.c (cp_finish_decl): Only warn about user-defined statics.
14246 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
14248         * pt.c (unify): Handle BOOLEAN_TYPE.
14250         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
14251         * pt.c (tsubst): Don't set it.
14252         * call.c (build_over_call): Use uses_template_parms.
14254 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
14256         * method.c (build_overload_nested_name): Use static_labelno
14257         instead of var_labelno.
14258         (build_qualified_name): New fn.
14259         (build_overload_name): Split out from here.
14260         (build_static_name): Use build_qualified_name.
14261         * decl.c (cp_finish_decl): Statics in extern inline functions
14262         have comdat linkage.
14263         (start_function): Initialize static_labelno.
14265 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14267         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
14268         before "all member functions in class [] are private".
14270 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
14272         * lex.c (do_scoped_id): convert_from_reference.
14273         * init.c (build_offset_ref): Likewise.
14275 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
14277         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
14279 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
14281         * typeck.c (get_member_function_from_ptrfunc): Promote index
14282         before saving it.
14284 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
14286         * tree.c (layout_basetypes): Move non-virtual destructor warning.
14287         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
14289 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14291         * decl.c (grokdeclarator): Call add_defarg_fn for the function
14292         type, too.
14293         * lex.c (add_defarg_fn): Adjust.
14294         (do_pending_defargs): Adjust.  Don't skip the first parm.
14296 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
14298         * decl.c (build_enumerator): Global enumerators are also readonly.
14300         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
14301         (build_dynamic_cast): Call it and convert_from_reference.
14303         * lex.c (add_defarg_fn): New fn.
14304         (snarf_defarg): Don't add to defarg_types.
14305         (do_pending_defargs): Lose defarg_types.  All fns we process now
14306         have defargs.
14307         * decl.c (grokfndecl): Call add_defarg_fn.
14309         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
14310         * cp-tree.def: Add DEFAULT_ARG.
14311         * spew.c (yylex): Call snarf_defarg as appropriate.
14312         * parse.y: New tokens DEFARG and DEFARG_MARKER.
14313         (defarg_again, pending_defargs, defarg, defarg1): New rules.
14314         (structsp): Use pending_defargs.
14315         (parms, full_parm): Use defarg.
14316         * lex.c (init_lex): Initialize inline_text_firstobj.
14317         (do_pending_inlines): Never pass the obstack to feed_input.
14318         (process_next_inline): Call end_input instead of restore_pending_input.
14319         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
14320         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
14321         * input.c (end_input): New fn.
14322         (sub_getch): At the end of some fed input, just keep returning EOF
14323         until someone calls end_input.
14324         Remove 'obstack' field from struct input_source.
14325         * decl.c (grokparms): Handle DEFAULT_ARG.
14326         (replace_defarg): New fn.
14327         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
14329 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14331         * call.c (implicit_conversion): If nothing else works, try binding
14332         an rvalue to a reference.
14334 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
14336         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
14337         ifndef for Cygwin32 to include SIGSEGV.
14339 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
14341         * class.c (finish_struct_1): Only complain about pointers without
14342         copy stuff if there are any constructors.
14344         * rtti.c (build_dynamic_cast): Call complete_type on the types.
14346         * decl.c (grokfndecl): If the function we chose doesn't actually
14347         match, die.
14349         * decl2.c (grokclassfn): Don't specify 'const int' for the
14350         artificial destructor parm.
14352         * pt.c (type_unification): If we are called recursively, nothing
14353         decays.
14355 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
14357         * decl.c (init_decl_processing): Stop trying to catch signals
14358         other than SIGABRT since the Cygwin32 library doesn't support
14359         them correctly yet.  This fixes a situation in which g++ causes
14360         a hang on SIGSEGVs and other such signals in our Win32-hosted
14361         tools.
14363 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
14365         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
14367 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
14369         * typeck2.c (store_init_value): Always return the value if our
14370         type needs constructing.
14372         * method.c (hack_identifier): Convert class statics from
14373         reference, too.
14375 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
14377         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
14379 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
14381         * typeck.c (c_expand_return): Make sure we clean up temporaries at
14382         the end of return x;
14384 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14386         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
14388 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
14390         * except.c (expand_builtin_throw): Add support
14391         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
14393 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
14395         * repo.c (extract_string): Null-terminate.
14397         * cp-tree.h (TI_SPEC_INFO): New macro.
14398         (CLASSTYPE_TI_SPEC_INFO): New macro.
14399         * pt.c (push_template_decl): Correctly determine # of template parms
14400         for partial specs.
14402         * call.c (compare_ics): Really fix 'this' conversions.
14404         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
14405         non-template fn.
14407         * pt.c (push_template_decl): Complain about mismatch in # of
14408         template parms between a class template and a member template.
14410 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
14412         * method.c (synthesize_method): You can't call
14413         function_cannot_inline_p after finish_function.
14414         * decl.c (finish_function): Turn on flag_inline_functions and turn
14415         off DECL_INLINE before handing a synthesized method to the
14416         backend.
14418 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14420         * method.c (synthesize_method): Remove July 30 change to never set
14421         DECL_INLINE if at_eof.
14423 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
14425         * xref.c (GNU_xref_member): Ensure that the node has a
14426         decl_lang_specific part before checking DECL_FRIEND_P.
14428 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
14430         * pt.c (instantiate_class_template): Diagnose non-class types used
14431         as bases.
14433 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
14435         * typeck.c (build_conditional_expr): Use convert_for_initialization
14436         instead of convert_and_check.
14438 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14440         * parse.y (typespec): Don't pedwarn for typeof.
14442 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
14444         * repo.c (finish_repo): Only check changes if we would write a
14445         repo file.
14447         * call.c (compare_ics): Fix handling of 'this' conversions.
14449         * pt.c (do_decl_instantiation): Support static data too.  Rename
14450         from do_function_instantiation.
14451         * cp-tree.h: Adjust.
14452         * parse.y: Adjust.
14454         * repo.c (extract_string): New fn.
14455         (get_base_filename): Use it.
14456         (init_repo): Compare old args with current args.
14458 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
14460         * Makefile.in, Make-lang.in: Protect C-ls with a comment
14461         character, idea from Paul Eggert <eggert@twinsun.com>.
14463 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
14465         * typeck.c (c_expand_return): Be more persistent in looking for
14466         returned temps.
14468         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
14469         pointer to reference.
14471         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
14473 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
14475         * init.c (build_member_call, build_offset_ref):
14476         Use do_scoped_id instead of do_identifier.
14478         * cvt.c (convert): Remove bogosity.
14480 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14482         * cvt.c (build_up_reference): Do checks of ARGTYPE and
14483         TARGET_TYPE before trying to use get_binfo.
14485 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
14487         * cvt.c (build_up_reference): Call get_binfo to get access control.
14489         * decl2.c (import_export_decl): If we don't support weaks, leave
14490         statics undefined.
14492 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
14494         * except.c (expand_builtin_throw): Add support for machines that
14495         cannot access globals after throw's epilogue when
14496         -fno-sjlj-exceptions is used.
14498 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
14500         * parse.y: 'std::' becomes '::'.
14501         * lex.c (real_yylex): Remove 'namespace' warning.
14502         * init.c (build_member_call): Ignore 'std::'.
14503         (build_offset_ref): Likewise.
14504         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
14505         (do_toplevel_using_decl): Ignore 'using std::whatever'.
14506         * decl.c (push_namespace): Just sorry.
14507         (pop_namespace): Nop.
14508         (init_decl_processing): Declare std namespace.
14510 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
14512         * search.c (push_class_decls): A name which ambiguously refers to
14513         several instantiations of the same template just refers to the
14514         template.
14516 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
14518         * decl.c (build_enumerator): Fix problem with unsigned long
14519         enumerated values being smashed to ints, causing overflow
14520         when computing next enumerated value (for enum values around
14521         MAX_VAL).
14523 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
14525         * typeck.c (build_component_ref): Only call mark_used on a decl.
14527 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14529         * typeck.c (build_c_cast): Make the check for a ptr to function
14530         more specific before possible default_conversion call.
14532 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
14534         * except.c (expand_exception_blocks): Simplify and fix and make
14535         sure we don't end a region in a sequence, as expand_end_bindings
14536         doesn't like it.
14538 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
14540         * except.c (init_exception_processing): Mark terminate as not
14541         returning so that the optimizer can optimize better.
14543 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
14545         * cvt.c (convert): Don't do any extra work, if we can avoid it
14546         easily.
14548 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
14550         * *.[chy]: Change cp_convert to ocp_convert, change convert to
14551         cp_convert.  convert is now reserved for the backend, and doesn't
14552         have the semantics a frontend person should ever want.
14554 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
14556         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
14557         Lose -traditional support.
14559 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14561         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
14563         * parse.y (self_reference): Do it for templates, too.
14564         * class.c (pushclass): Don't overload_template_name; the alias
14565         generated by build_self_reference serves the same purpose.
14567         * tree.c (list_hash): Make static, take more args.
14568         (list_hash_lookup): Likewise.
14569         (list_hash_add): Make static.
14570         (list_hash_canon): Lose.
14571         (hash_tree_cons): Only build a new node if one isn't already in the
14572         hashtable.
14573         (hash_tree_chain): Use hash_tree_cons.
14574         * cp-tree.h: Adjust.
14575         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
14576         of calling lookup_name.
14578 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
14580         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
14581         doesn't refer to the CONST_DECLs.
14583 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
14585         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
14586         is bigger.
14587         (expand_class_desc): Convert the last argument to a sizetype.
14589 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14591         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
14592         __real__): Add reswords.
14593         * hash.h: Regenerate.
14594         * lex.h (rid): Add RID_COMPLEX.
14595         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
14596         * lex.c (init_lex): Add building of RID_COMPLEX.
14597         (real_yylex): General cleanup in line with what c-lex.c also has,
14598         sans the cruft for traditional; add handling of SPEC_IMAG, complex
14599         types, and imaginary numeric constants.
14600         * parse.y (REALPART, IMAGPART): Add tokens.
14601         (unary_expr): Add REALPART and IMAGPART rules.
14602         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
14603         * decl.c (complex_{integer,float,double,long}_type_node): Define
14604         types.
14605         (init_decl_processing): Set up the types.
14606         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
14607         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
14608         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
14609         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
14610         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
14611         COMPLEX_TYPE case.
14612         * method.c (build_overload_name): Add handling of the different
14613         COMPLEX_TYPEs, prefixing them with `J'.
14614         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
14615         as a template parm.
14616         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
14617         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
14618         (mapcar): Handle COMPLEX_CST.
14619         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
14620         (common_type): Add code for complex types.
14621         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
14622         (convert_for_assignment): Likewise.
14623         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
14625 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
14627         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
14628         tsubst_expr, as it might try to do overload resolution.
14630 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
14632         * pt.c (instantiate_class_template): Oops.
14634 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
14636         * cp-tree.def: Add TAG_DEFN.
14637         * pt.c (tsubst_enum): New fn.
14638         (instantiate_class_template): Use it.
14639         (tsubst_expr): Support TAG_DEFN.
14640         (tsubst): Support local enums.
14641         (tsubst_copy): Likewise.
14642         * decl.c (finish_enum): Likewise.
14643         (start_enum): If this is a local enum, switch to permanent_obstack.
14645 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
14647         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
14648         (finish_function): Put the base init code for constructors just
14649         after the parm cleanup insns.
14650         (struct cp_function): Add last_parm_cleanup_insn.
14651         (pu