* method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
[official-gcc.git] / gcc / cp / ChangeLog
blob5a1d0e3293ab057f7b3790b227d07644287058e8
1 1999-10-19  Mark Mitchell  <mark@codesourcery.com>
3         * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
4         (mangling_flags): New type.
5         (build_overload_int): Change prototype.
6         (build_overload_value): Likewise.
7         (numeric_output_need_bar): Improve comment.
8         (mangle_expression): New function, broken out from ...
9         (build_overload_int): Here.
10         (build_overload_value): Adjust for use of mangling flags.  Don't
11         warn about real-valued template parameters here.  Do handle
12         complex expressions involving real-valued template parameters.
13         (build_template_parm_names): Encase non-type template parameters
14         in underscores, if necessary.
15         (process_overload_item): Remove conditional on
16         PARM_CAN_BE_ARRAY_TYPE.
18 1999-10-17  Mark Mitchell  <mark@codesourcery.com>
20         * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
22         * ir.texi: Clean up documentation of RETURN_INIT.
23         
24 1999-10-15  Greg McGary  <gkm@gnu.org>
26         * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
27         (lang_init): Set default for flag_bounds_check if still "unspecified".
29 1999-10-13  Andrew Haley  <aph@cygnus.com>
31         * class.c (finish_struct_1): Force alignment of non-bitfields to
32         BITS_PER_UNIT.
34 Wed Oct 13 22:01:35 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
36         * typeck2.c (process_init_constructor): Handle empty constructors.
38 1999-10-13  Jason Merrill  <jason@yorick.cygnus.com>
40         * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
42         * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
43         array error.
45 1999-10-13  Mark Mitchell  <mark@codesourcery.com>
47         * decl.c (make_rtl_for_local_static): Don't create register RTL
48         for addressable constants.
50 1999-10-13  Nathan Sidwell  <nathan@acm.org>
52         * cp-tree.h (build_x_va_arg): Prototype new function.
53         * call.c (build_x_va_arg): Define it.
54         * parse.y (unary_expr): Call build_x_va_arg.
55         
56         * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
57         * call.c (convert_type_from_ellipsis): Define it.
58         * decl.c (init_decl_processing): Set lang_type_promotes_to.
60         * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
62 1999-10-11  Jason Merrill  <jason@yorick.cygnus.com>
64         * class.c (fixed_type_or_null): Always set *nonnull.
66 1999-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
68         * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
69         __GNUC__ and __GNUC_MINOR__.
71 1999-10-09  Mark Mitchell  <mark@codesourcery.com>
73         * cp-tree.h (make_rtl_for_local_static): New function.  
74         * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
75         local statics ...
76         (make_rtl_for_local_static): Here.
77         * semantics.c (expand_stmt): Use make_rtl_for_local_static.
78         
79 1999-10-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
81         * method.c: Include tm_p.h.
83 1999-10-7   Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
85         * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
86         * lex.c (cp_make_lake_type): Likewise.
87         * tree.c (init_tree): Init make_lang_type_fn.
88         
89 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
91         * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
92         paramter.
93         
94         * semantics.c (expand_stmt): Don't pretend to have asmspecs for
95         local statics if we don't really have them.
97         * ir.texi: Improve documentation for STMT_EXPR.  Describe
98         CLEANUP_POINT_EXPR.
100 1999-10-07  Jason Merrill  <jason@yorick.cygnus.com>
102         * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
104 1999-10-07  Greg McGary  <gkm@gnu.org>
106         * class.c (finish_struct_1): Use simpler method of
107         removing elements of a singly-linked list which doesn't
108         lose for classes without data members.
110 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
112         * friend.c (make_friend_class): Robustify.
114         * semantics.c (finish_object_call_expr): Reject calls to template
115         types.
117 1999-10-06  Mark Mitchell  <mark@codesourcery.com>
119         * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
121         * cp-tree.h (CLASSTYPE_VFIELD): Remove.
122         * call.c (build_vfield_ref): Use TYPE_VFIELD, not
123         CLASSTYPE_VFIELD.
124         * class.c (get_vfield_offset): Likewise.
125         (finish_base_struct): Likewise.
126         (modify_one_vtable): Likewise.
127         (fixup_vtable_deltas): Likewise.
128         (finish_struct_1): Likewise.
129         * init.c (expand_virtual_init): Likewise.
130         * search.c (lookup_field_1): Likewise.
131         (expand_upcast_fixups): Likewise.
132         * typeck.c (build_component_ref): Likewise.
133         (build_binary_op_nodefault): Likewise.
134         
135         * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
136         * ir.texi: Document TYPE_VFIELD.
138 1999-10-06  Brendan Kehoe  <brendan@cygnus.com>
140         * decl.c (grokdeclarator): Only warn about non-zero arrays if
141         !in_system_header (linux socketbits.h can give this for
142         __cmsg_data, which is using a GNU extension).
144 1999-10-05  Mark Mitchell  <mark@codesourcery.com>
146         * decl2.c (start_static_storage_duration_function): Push the
147         function declaration so it ends up in namespace scope.
149         * dump.c (DUMP_CHILDREN): Remove.
150         (DUMP_BINFO): Adjust.
151         (struct dump_node_info): Remove dump_children_p.
152         (queue_and_dump_type): Remove dump_children_p parameter.
153         (queue): Don't set dump_children_p.
154         (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
155         queue_and_dump_index.
156         (dequeue_and_dump): Unconditionally print children.  Adjust calls
157         to functions mentioned above.
158         (dump_node):  Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
159         
160         * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
161         * dump.c (dequeue_and_dump): Dump them.
162         
163         * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
165         * decl.c (start_function): Set current_in_charge_parm for
166         constructors, too, where appropriate.
167         * search.c (fixup_all_virtual_upcast_offsets): New function.
168         (expand_indirect_vtbls_init): Use it.
169         
170 1999-10-04  Nathan Sidwell  <nathan@acm.org>
172         * decl2.c (grok_alignof): Don't decay lvalues.
173         
174         * init.c (build_new): Remove unused variable.
176 1999-10-04  Mark Mitchell  <mark@codesourcery.com>
178         * cp-tree.h (struct language_function): Remove static_labelno.
179         (static_labelno): Remove macro.
180         * method.c (build_overload_nested_name): Make static_labelno
181         static here.
182         
183         * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
184         to decide whether or not a function is defined.
186         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
187         situations where make_node will do it automatically.
188         * decl.c (grok_reference_init): Likewise.
189         (expand_static_init): Likewise.
190         (do_static_initialization): Likewise.
191         * init.c (perform_member_init): Likewise.
192         (expand_aggr_init_1): Likewise.
193         (build_new_1): Likewise.
194         * method.c (do_build_copy_constructor): Likewise.
195         (do_build_assign_ref): Likewise.
196         * search.c (expand_upcast_fixups): Likewise.
197         * semantics.c (finish_stmt_expr): Likewise.
198         * typeck.c (build_unary_op): Likewise.
199         (check_return_expr): Likewise.
201 1999-10-04  Jason Merrill  <jason@yorick.cygnus.com>
203         * init.c (build_vec_delete_1): Fold COND_EXPRs.
205 1999-10-03  Mark Mitchell  <mark@codesourcery.com>
207         * cp-tree.def (VEC_INIT_EXPR): Remove.
208         * cp-tree.h (struct stmt_tree): New type.
209         (struct saved_scope): Remove firstobj.  Add x_saved_tree,
210         x_stmt_tree.
211         (class_cache_firstobj): Remove.
212         (struct language_function): Remove stmts_are_full_exprs_p,
213         x_last_tree, and x_last_expr_type.  Add x_stmt_tree.
214         (current_stmt_tree): New macro.
215         (last_tree): Adjust.
216         (last_expr_type): Likewise.
217         (doing_semantic_analysis_p): Simplify.
218         (stmts_are_full_exprs_p): Adjust.
219         (begin_tree): Remove prototype.
220         (end_tree): Likewise.
221         (begin_stmt_tree): Change prototype.
222         (finish_stmt_tree): Likewise.
223         (building_stmt_tree): Simplify.
224         * decl.c (mark_stmt_tree): New function.
225         (mark_saved_scope): Use it.
226         (start_function): Rearrange slightly to call begin_stmt_tree 
227         earlier.
228         (save_function_data): Tweak.
229         (finish_function): Adjust call to finish_stmt_tree.
230         (mark_lang_function): Use mark_stmt_tree.
231         * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
232         * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
233         (build_vec_init): Remove creation of stand-in intializer.
234         * pt.c (begin_tree): Remove.
235         (end_tree): Likewise.
236         * semantics.c (SET_LAST_STMT): New macro.  Use it throughout.
237         (begin_compound_stmt): Handle a compound-statement outside of a
238         function.
239         (begin_stmt_expr): Handle a statement-expression outsidef of a
240         function.
241         (finish_stmt_expr): Likewise.
242         (begin_class_definition): Don't call begin_tree.
243         (finish_inline_definitions): Don't call end_tree.
244         (begin_stmt_tree): Take a pointer to tree, not a function as input.
245         (finish_stmt_tree): Likewise.
246         * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
247         (mapcar): Likewise.
248         
249         * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
250         * parse.c: Regenerated.
251         
252         * dump.c (dqueue_and_dump): Dump bitfieldness.
253         
254         * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
255         bitfields, rather than DECL_BIT_FIELD.
256         * ir.texi: Document how to tell whether or not a field is a
257         bitfield.
258         
259         * lex.c (make_lang_type): Fix typo in comment.
261 1999-10-01  Jason Merrill  <jason@yorick.cygnus.com>
263         * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
265 1999-10-01  Mark Mitchell  <mark@codesourcery.com>
267         * pt.c (tsubst_decl): If the type of a template instantiation is
268         bogus, so is the whole instantiation.
270 1999-09-30  Mark Mitchell  <mark@codesourcery.com>
272         * decl.c (initialize_local_var): Handle static variables here.
273         (cp_finish_decl): Tweak handling of function-scope static
274         variables.
275         * semantics.c (expand_stmt): Handle DECL_STMTs for static
276         variables.
278         * method.c (emit_thunk): Don't crash when -fsyntax-only.
280         * cp-tree.h (lang_decl_flags): Add global_ctor_p and
281         global_dtor_p.  Add init_priority.
282         (DECL_ACCESS): Adjust accordingly.
283         (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
284         (GLOBAL_INIT_PRIORITY): Likewise.
285         * decl.c (lang_mark_tree): Adjust accordingly.
286         (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 
287         and GLOBAL_INIT_PRIORITY.
288         * dump.c (dequeue_and_dump): Print them.
289         * ir.texi: Document them.
291         * decl2.c (struct priority_info_s): Remove initialization_sequence
292         and destruction_sequence.
293         (start_static_storage_duration_function): Return the body of the
294         function.  Convert for function-at-a-time mode.
295         (generate_inits_for_priority): Remove.
296         (finish_static_storage_duration_function): Change prototype.
297         Adjust for function-at-a-time mode.
298         (do_static_initialization): Likewise.
299         (do_static_destruction): Likewise.
300         (do_static_initialization_and_destruction): Remove.
301         (start_static_initialization_or_destruction): New function.
302         (finish_static_initialization_or_destruction): Likewise.
303         (get_priority_info): Don't manipulation initialization_sequence or
304         destruction_sequence.
305         (prune_vars_needing_no_initialization): New function.
306         (write_out_vars): Likewise.
307         (finish_file): Use the various new functions instead of the old.
308         
309 Thu Sep 30 00:13:27 1999  Dirk Zoller  <duz@rtsffm.com>
311         * cp-tree.h (warn_float_equal): Declare.
312         * decl2.c (warn_float_equal): Define.
313         (lang_decode_option): Recognize -W[no-]float-equal.
314         * typeck.c (build_binary_op_nodefault): Conditionally warn
315         about equality tests of floating point types.
317 1999-09-29  Jason Merrill  <jason@yorick.cygnus.com>
319         Support normal type_info-based EH mechanisms with -fno-rtti.
320         * except.c (build_eh_type_type): Remove special -fno-rtti handling.
321         (build_eh_type_type_ref): Likewise.
322         (build_eh_type): Remove.
323         (expand_throw): Call build_eh_type_type, not build_eh_type.
324         * decl2.c (import_export_decl): Don't associate the tinfo fn with
325         the vtable if -fno-rtti.
326         * decl.c (init_decl_processing): Always init_rtti_processing.
328         * rtti.c (get_typeid): Don't complain about -fno-rtti.
330         * class.c (class_cache_obstack, class_obstack): Remove.
331         (init_class_processing): Don't initialize class_obstack.
332         (push_cache_obstack): Remove.
333         (pushclass): Don't call it.
334         * cp-tree.h: Remove prototype for push_cache_obstack.
335         * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
336         (pushlevel_class): Don't push_decl_level.
337         (poplevel_class): Don't pop_stack_level.
338         (push_class_level_binding): Don't push_cache_obstack.
339         (init_decl_processing): Don't intialize decl_obstack.
340         * search.c (push_class_decls): Don't push_cache_obstack.
341         * tree.c (list_hash_add): Put hash node on permanent_obstack.
342         (hash_tree_cons): Don't mess with obstacks.
343         (print_lang_statistics): Don't print stats for class_obstack and
344         decl_obstack.
346 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
348         * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
349         * ir.texi: Document DECL_EXTERNAL.
351         * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
352         * ir.texi: Document THUNK_DECLs.
354         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
355         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
356         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
357         * error.c (dump_template_bindings): Remove unused parameter.
358         Handle multiple levels of template parameters.
359         (dump_template_decl): Use `parms', not `args', for template
360         parameters.  Fix thinko.
361         (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION.  Don't pass
362         flags to dump_template_bindings.
363         * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
364         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
365         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
366         (tsubst_copy): Clarify variable name.
367         (most_general_template): Robustify.
368         
369 1999-09-29  Nathan Sidwell  <nathan@acm.org>
371         * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
372         to change primary template rendering.
374 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
376         * cp-tree.h (UPT_TEMPLATE): Remove.
377         (UPT_PARMS): Likewise.
378         (DECL_NEEDED_P): New macro.
379         * decl2.c (finish_vtable_vardecl): Use it.
380         (finish_objects): Don't crash with -fsyntax-only.
381         (finish_file): Use DECL_NEEDED_P.  Don't prune vtables when
382         -fsyntax-only.
383         * pt.c (tsubst_friend_function): Remove FIXME that talks about
384         obstacks.
385         (tsubst_expr): Correct handling of function try-blocks.
386         * semantics.c: Include flags.h.
387         (expand_body): Don't do RTL generation if -fsyntax-only.
388         * Makefile.in (semantics.o): Depends on flags.h.
389         
390 1999-09-28  Gabriel Dos Reis  <gdr@codesourcery.com>
392         * pt.c (most_general_template): Adjust declaration.
394         * cp-tree.h: (most_general_template): Declare.
396         * error.c (dump_template_value): Rename to ...
397         (dump_template_argument): This.
398         (dump_template_argument_list): New function.
399         (dump_type): Use it.
400         (dump_template_parameter): New function.
401         (dump_template_decl): Use it.
402         (dump_template_bindings): New function.
403         (dump_function_decl): Use it. Pretty print function template
404         instantiations.
406 1999-09-28  Nathan Sidwell  <nathan@acm.org>
408         * decl.c (grokdeclarator): Distinguish parameter context for
409         diagnostics. Tidy up missing type diagnostic.
410         Diagnose `explicit' in one place. Diagnose `mutable' in one place.
412 1999-09-28  Mark Mitchell  <mark@codesourcery.com>
414         * ir.texi: Improve documentation for TARGET_EXPR.
416 1999-09-27  Nathan Sidwell  <nathan@acm.org>
418         Augment stringification of trees.
419         * cp-tree.h (tree_string_flags): New error stringifying enumeration.
420         (fndecl_as_string, type_as_string_real, args_as_string,
421         code_as_string, language_as_string, parm_as_string,
422         op_as_string, assop_as_string, cv_as_string): Remove.
423         (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
424         (context_as_string): Declare new function.
425         * error.c (cp_printers): Move definition.
426         (OB_UNPUT): Remove.
427         (OB_END_TEMPLATE_ID): Adjust.
428         (interesting_scope_p): Remove.
429         (dump_scope): New static function.
430         (dump_qualifiers): Adjust prototype, reimplement.
431         (dump_template_value): Use tree_string_flags.
432         (dump_type_real): Move back to dump_type.
433         (dump_type): Adjust prototype. Use tree_string_flags.
434         (dump_aggr_type): Likewise. Use dump_template_parms.
435         (dump_type_prefix): Adjust prototype. Use tree_string_flags.
436         Return pad flag.
437         (dump_type_suffix): Adjust prototype. Use tree_string_flags.
438         (dump_simple_decl): Likewise.
439         (dump_decl): Likewise. Use dump_template_decl.
440         (dump_template_decl): New static function broken out of dump_decl.
441         (dump_function_decl): Adjust prototype. Use tree_string_flags.
442         (dump_parameters): Likewise. Prefix space.
443         (dump_exception_spec): Adjust prototype. Use tree_string_flags.
444         (dump_function_name): Likewise. Use dump_template_parms.
445         (dump_template_parms): New static function broken out of
446         dump_function_name.
447         (dump_expr_list): Adjust prototype. Use tree_string_flags.
448         (dump_expr): Likewise.
449         (fndecl_as_string): Removed
450         (type_as_string_real): Removed
451         (dump_binary_op): Adjust prototype. Use tree_string_flags.
452         (dump_unary_op): Likewise.
453         (type_as_string): Likewise.
454         (expr_as_string): Likewise.
455         (decl_as_string): Likewise.
456         (context_as_string): New function.
457         (lang_decl_name): Adjust.
458         (decl_to_string): New static print callback.
459         (expr_to_string): Likewise.
460         (fndecl_to_string): Likewise.
461         (code_as_string): Renamed to ...
462         (code_to_string): ... here. Adjust.
463         (language_as_string): Renamed to ...
464         (language_to_string): ... here. Adjust.
465         (parm_as_string): Renamed to ...
466         (parm_to_string): ... here.
467         (op_as_string): Renamed to ...
468         (op_to_string): ... here.
469         (assop_as_string): Renamed to ...
470         (assop_to_string): ... here.
471         (type_to_string): New static print callback.
472         (args_as_string): Renamed to ...
473         (args_to_string): ... here. Adjust.
474         (cv_as_string): Renamed to ...
475         (cv_to_string): ... here. Adjust.
476         * pt.c (mangle_class_name_for_template): Use tree_string_flags.
477         (print_template_context): Likewise.
479 1999-09-26  Mark Mitchell  <mark@codesourcery.com>
481         * cp-tree.h (expand_throw): Remove prototype.
482         * except.c (expand_throw): Make it static.  Use tree-generation
483         functions, rather than RTL-generation functions.
484         (build_throw): Use it.
485         * expr.c: Include except.h.
486         (cplus_expand_expr): Don't call expand_throw here.
487         * Makefile.in (expr.o): Depend on except.h.
488         * ir.texi: Update documentation for THROW_EXPR.
489         
490         * decl.c (start_function): Set x_dont_save_pending_sizes rather
491         than calling get_pending_sizes.
492         * init.c (build_new): Don't save and restore
493         immediate_size_expand; instead, assert that it has the expected
494         value already.
496 1999-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
498         * lex.c (compiler_error): Add missing call to va_end().
500 1999-09-25  Mark Mitchell  <mark@codesourcery.com>
502         * dump.c (dequeue_and_dump): Handle RESULT_DECL.
503         * ir.texi: Document RESULT_DECL and DECL_RESULT.
505         * cp-tree.h (check_return_expr): New function.
506         * decl.c (finish_constructor_body): New function.
507         (pushdecl): Put global friend functions in namespace binding
508         level, not the class binding level.
509         (finish_destructor_body): Make sure the dtor_label is always
510         defined.  Fix typo in comment.
511         (finish_function): Move generation of constructor-termination code
512         to semantic-analysis time.  Move generation of implicit `main'
513         return value to semantic-analysis time.
514         * semantics.c (finish_return_stmt): Generate goto's to
515         ctor_label/dtor_label here.  Use check_return_expr to do semantic
516         analysis on the returned expression.
517         * typeck.c (maybe_warn_about_returning_address_of_local): New
518         function split out from c_expand_return.
519         (check_return_expr): Likewise.
520         (c_expand_return): Just generate the RTL for the return.
521         
522 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
524         * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
525         (cleanup_type): Likewise.
526         (search_tree): Change prototype.
527         * decl.c (local_variable_p): Adjust for new interface to
528         search_tree.
529         (check_default_argument): Likewise.
530         * error.c (dump_expr): Handle INIT_EXPR.
531         * except.c (expand_throw): Don't make cleanup_type a local static.
532         * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
533         * init.c (build_new): Call build_new_1 directly, rather than
534         building a NEW_EXPR.
535         (build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
536         processing file-scope initializers.
537         * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
538         * tree.c: Include splay-tree.h
539         (no_linkage_helper): Adjust for new interface to search_tree.
540         (search_tree): Pass around pointers to tree nodes, rather than the
541         nodes themselves.  Handle VEC_INIT_EXPR.
542         (no_linkage_check): Adjust for new interface to search_tree.
543         (mapcar): Handle VEC_INIT_EXPR.
544         (target_remap): New variable.
545         (bot_manip): Use it.
546         (bot_replace): New function.
547         (break_out_target_exprs): Use it to remap all variables used in a
548         default argument expression.
549         * typeck.c (build_modify_expr): Don't crash when outside a
550         function and presented with an INIT_EXPR assignment
551         * Makefile.in (tree.o): Depend on splay-tree.h.
553 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
555         * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
556         DECL_BUILT_IN.
557         (builtin_function): New arg CLASS.  Arg CODE now of type int.  All
558         callers changed.
559         Set the builtin's DECL_BUILT_IN_CLASS.
561 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
563         * decl.c (pushdecl): Don't make local declarations of extern
564         variables give the variable a DECL_CONTEXT for the function.
565         (make_rtl_for_nonlocal_decl): Don't fuss with obstacks.  Simplify.
566         Don't accidentally make RTL for local declarations.
567         (emit_local_var): Handle declarations with asm-specifiers here.
568         
569 1999-09-23  Mark Mitchell  <mark@codesourcery.com>
571         * ir.texi: Improve documentation for TARGET_EXPRs.  Discuss
572         STMT_IS_FULL_EXPR_P.
574         * cp-tree.h (language_function): Add cannot_inline.
575         * decl.c (start_function): Restore current_function_cannot_inline
576         from the saved value.
577         (save_function_data): Save current_function_cannot_inline.
578         * decl2.c (start_objects): Change prototype.  Build the function
579         in function-at-a-time mode.
580         (finish_objects): Likewise.
581         (generate_ctor_or_dtor_function): Adjust accordingly.
582         
583         * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
584         * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
585         Don't call expand_anon_union_decl here
586         * semantics.c (exapnd_stmt): Call it here, instead.
587         * typeck.c (mark_addressable): Addressed variables are implicitly
588         used.
589         
590 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
592         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
593         (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
594         (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
595         * cp-tree.h: Add tree checking macros to various tree access
596         macros. 
597         * ptree.c (print_lang_decl): Test for function or variable
598         before accessing template info.
600 1999-09-23  Jason Merrill  <jason@yorick.cygnus.com>
602         * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
603         * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
604         * decl2.c (lang_f_options): Add -fshort-wchar.
605         * cp-tree.h: Declare flag_short_wchar.
606         * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 
607         int' for wchar_t.
609 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
611         * ir.texi: Fix formatting errors and typos.
613 1999-09-22  Mark Mitchell  <mark@codesourcery.com>
615         * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
617         * decl.c (pushdecl): Do create a binding for extern "C" functions,
618         but not for their DECL_ASSEMBLER_NAMEs.
619         (lookup_name_current_level): Fix formatting.
620         (xref_tag): Likewise.
621         * decl2.c (start_objects): Mark static constructors and
622         destructors as used.
624 1999-09-22  Jason Merrill  <jason@yorick.cygnus.com>
626         * decl.c (define_case_label): Don't crash if we're not in a switch.
628         * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
629         * lang-options.h: Restore -fthis-is-variable.  Remove help strings
630         for unsupported flags.
632 1999-09-21  Jason Merrill  <jason@yorick.cygnus.com>
634         * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
635         Accept and warn about -fthis-is-variable.
637 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
639         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
640         CLEANUP_STMT, and SCOPE_STMT.
642         * decl2.c (lang_decode_option): Adjust, in the wake of recent
643         changes to option processing.
645 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
647         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
648         function pointer from pmfs with no object given.
649         (convert_for_assignment): Do not return error when converting
650         pmfs.
652 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
654         * lex.c (internal_filename): New variable.
655         (INTERNAL_FILENAME): New macro.
656         (init_parse): Allocate internal_filename and mark as root.  Use it
657         instead of a string constant.
659 1999-09-21  Nathan Sidwell  <nathan@acm.org>
661         Reimplement dynamic cast and catch matching.
662         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
663         * search.c (dynamic_cast_base_recurse): New function.
664         (get_dynamic_cast_base_type): New function for dynamic cast.
665         * rtti.c (build_dynamic_cast_1): Determine source and target
666         class relationship. Call __dynamic_cast_2.
667         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
668         (__user_type_info::dyncast): New dynamic cast dispatcher.
669         (__user_type_info::sub_kind): New nested enumeration.
670         (__user_type_info::contained_p): sub_kind predicate.
671         (__user_type_info::contained_public_p): Likewise.
672         (__user_type_info::contained_nonpublic_p): Likewise.
673         (__user_type_info::contained_nonvirtual_p: Likewise.
674         (__user_type_info::upcast_result): New nested struct.
675         (__user_type_info::dyncast_result): New nested struct.
676         (*::do_upcast): New catch function.
677         (*::do_dyncast): New dynamic cast function.
678         (__user_type_info::find_public_subobj): New dynamic cast
679         helper dispatcher.
680         (*::do_find_public_subobj): New dynamic cast helper function.
681         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
682         (__user_type_info::dyncast): Define dynamic cast dispatcher.
683         (*::do_upcast): Define catch function.
684         (*::do_dyncast): Define dynamic cast function.
685         (*::do_find_public_subobj): Define dynamic cast helper function.
686         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
687         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
688         (__dynamic_cast_2): New dynamic cast runtime.
690 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
692         * cp-tree.h (finish_stmt_expr): Change prototype.
693         * expr.c (cplus_expand_expr): Adjust call accordingly.
694         * init.c (finish_init_stmts): Likewise.
695         * parse.y (primary): Likewise.
696         * pt.c (tsubst_copy): Likewise.
697         * semantics.c (finish_stmt_expr): Don't take two parameters.
698         Don't remove generated BLOCKs from the block-tree.
700         Remove support for assigning to `this'.
701         * NEWS: Note that fact.
702         * class.c (build_vbase_path): Don't check flag_this_is_variable.
703         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
704         (language_function): Remove assigns_this, just_assigned_this, and
705         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
706         (base_init_expr): Remove.
707         (current_vcalls_possible_p): New macro.
708         (vtbls_set_up_p): Likewise.
709         (emit_base_init): Change prototype.
710         * decl.c (finish_destructor_body): New function, split out from
711         finish_function.
712         (current_function_assigns_this): Remove.
713         (current_function_just_assigned_this): Likewise.
714         (start_function): Don't set them.
715         (finish_function): Don't check them.  Don't emit
716         base-initialization code here.  Generate code for destructors when
717         doing semantic analysis.
718         (finish_stmt): Don't check current_function_just_assigned_this.
719         * decl2.c (lang_f_options): Remove this-is-variable.
720         (lang_decode_option): Likewise.
721         (grokclassfn): Don't check flag_this_is_variable.
722         * init.c (emit_base_init): Return the expression generated.
723         (construct_virtual_bases): Don't push/pop obstacks.  Fix
724         typo.
725         (build_new_1): Don't check flag_this_is_variable.
726         (get_temp_regvar): Don't set DECL_REGISTER.
727         (build_vec_init): Don't call use_variable.
728         * lang-options.h: Remove "-fthis-is-variable" and
729         "-fno-this-is-variable".
730         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
731         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
732         expand_expr_stmt.
733         * semantics.c (finish_expr_stmt_real): Rename to ...
734         (finish_expr_stmt): This.  Remove assigned_this parameter.
735         (begin_if_stmt): Call do_pushlevel before starting the statement.
736         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
737         blocks.
738         (setup_vtbl_ptr): Emit initialization code for bases and members
739         at semantic-analysis time.  Emit code to initialize vtables in
740         destructors here.
741         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
742         Don't handle CTOR_INITIALIZER any more.
743         * typeck.c (build_modify_expr): Don't check for assignments to
744         this.
745         (c_expand_return): Don't suggest assigning to `this'.
746         
747         * Makefile.in (decl.o): Depend on RTL_H.
748         (decl2.o): Likewise.
749         (class.o): Likewise.
750         (call.o): Likewise.
751         (method.o): Likewise.
752         (search.o): Likewise.
753         (tree.o): Likewise.
754         (pt.o): Likewise.
756         * decl.c (duplicate_decls): When a builtin function is redeclared
757         as static, make sure it is mangled correctly.
759         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
760         detail about the statement-tree.
761         
762 1999-09-20  Nathan Sidwell  <nathan@acm.org>
764         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
766 1999-09-20  Nick Clifton  <nickc@cygnus.com>
768         * decl2.c (lang_decode_option): Extend comment.
770 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
772         * typeck.c: Include "tm_p.h".
774 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
776         * ir.texi: New file.
778 1999-09-19  Paul Burchard <burchard@pobox.com>
780         * semantics.c (expand_stmt): Initialize return value.
782 1999-09-18  Paul Burchard <burchard@pobox.com>
784         * gxxint.texi: G++ now implements namespaces.
785         
786 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
788         * decl.c (pop_label): Don't warn about unused labels more than
789         once.
790         * semantics.c (finish_goto_stmt): Always marked used labels as
791         used.
793         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
794         even when the declaration is external.
795         (cp_finish_decl): Adjust call to layout_var_decl.
796         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
798 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
800         * typeck.c (get_member_function_from_ptrfunc): Always consider
801         virtuality inside member pointer.
803 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
805         Turn on function-at-a-time processing.  
806         * cp-tree.h (doing_semantic_analysis_p): New macro.
807         (SF_DEFAULT): Define to zero, not SF_EXPAND.
808         (start_handler_parms): Change prototype.
809         (expand_start_catch_block): Likewise.
810         (expand_end_catch_block): Likewise.
811         (expand_start_eh_spec): Likewise.
812         (expand_end_eh_spec): Declare.
813         (finish_handler_parms): Change prototype.
814         (begin_catch_block): Declare.
815         (finish_handler): Change prototype.
816         (do_pushlevel): Declare.
817         (do_poplevel): Likewise.  
818         * decl.c (pushlevel): Don't create
819         binding levels when not doing semantic analysis.
820         (poplevel): Don't pop them.
821         (pushdecl): Assert that we are never called when not doing
822         semantic analysis.
823         (pushdecl_top_level): Use push_to_top_level.
824         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
825         label when expanding.
826         (cp_finish_decl): Only inject for-scope variables when doing
827         semantic analysis.  Add comments.
828         (start_handler_parms): Return the handler parm.
829         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
830         already set.  Reinitialize from saved function data if available.
831         Don't pushlevel when not doing semantic analysis.
832         (store_parm_decls): Only generate RTL when expanding.  Only
833         pushdecl when doing semantic analysis.  Set
834         current_eh_spec_try_block if appropriate.
835         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
836         Combine common code.  Don't poplevel when not doing semantic
837         analysis.
838         (push_cp_function_context): Don't expand functions without an
839         explicit call to expand_body.
840         (mark_lang_function): Make eh_spec_try_block and
841         x_scope_stmt_stack.  
842         * except.c (expand_end_eh_spec): Don't
843         declare.
844         (process_start_catch_block): Likewise.
845         (push_eh_cleanup): Use finish_decl_cleanup.
846         (initialize_handler_parm): New function.
847         (expand_start_catch_block): Use it.
848         (expand_end_catch_block): Use tree-generation functions, not
849         RTL-generation functions.
850         (expand_start_eh_spec): Likewise.
851         (expand_end_eh_spec): Likewise.
852         (expand_exception_blocks): Simplify.
853         (start_anon_func): Use do_pushlevel.
854         (end_anon_func): Use do_poplvel.  Call expand_body for the
855         function.  
856         * expr.c (do_case): Don't call define_case_label.  
857         * init.c (create_temporary_var): Set DECL_CONTEXT for local
858         variables.  
859         * method.c (emit_thunk): Call expand_body for the
860         thunk.
861         (sythesize_method): Likewise.  
862         * parse.y (handler_args): Give it ttype.
863         (eat_saved_input): Call expand_body.
864         (base_init): Use do_pushlevel.
865         (pending_inline): Call expand_body.
866         (handler): Adjust calls to finish_handler_parms and
867         finish_handler.
868         (handler_args): Don't call expand_start_catch_block.  Return the
869         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
870         * parse.c: Regenerated.
871         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
872         * semantics.c (do_pushlevel): Give it external linkage.  Build
873         SCOPE_STMTs.
874         (do_poplevel): Likewise.
875         (finish_case_label): Call define_case_label when doing semantic
876         analysis.
877         (finish_goto_stmt): Create RTL for labels.
878         (finish_function_try_block): Set in_function_try_handler
879         unconditionally.
880         (finish_function_handler_sequence): Unset it.
881         (finish_handler_parms): Use expand_start_catch_block even when
882         building a statement-tree.
883         (begin_catch_block): New function.
884         (finish_handler): Move a little RTL-generation logic here.
885         (finish_decl_cleanup): Allow cleanups for empty declarations.
886         (finish_named_return_value): Don't pushdecl when not doing
887         semantic analysis.
888         (expand_stmt): Don't do semantic analysis for variable
889         declarations.  Handle START_CATCH_STMT.  Call expand_label
890         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
891         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
892         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
893         RETURN_INIT and function try blocks.
894         
895         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
896         x_scope_stmt_stack.  Add x_in_charge_parm.
897         (current_eh_spec_try_block): New macro.
898         (current_scope_stmt_stack): Likewise.
899         (current_in_charge_parm): Likewise.
900         * decl.c (start_function): Initialize current_in_charge_parm.
901         (finish_function): Use current_in_charge_parm rather than looking
902         up __in_chrg.
903         * search.c (expand_indirect_vtbls_init): Likewise.
905         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
906         (TRY_BLOCK): Likewise.
907         (HANDLER): Likewise.
908         (START_CATCH_STMT): New tree node.
909         (SCOPE_STMT): Likewise.
910         * cp-tree.h (SCOPE_BEGIN_P): New macro.
911         (SCOPE_NULLIFIED_P): Likewise.
912         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
913         (struct lang_decl): Add saved_language_function.
914         (DECL_PENDING_INLINE_INFO): Adjust documentation.
915         (DECL_PENDING_INLINE_P): New macro.
916         (TYPE_TI_ARGS): Fix typo in comment.
917         (DECL_SAVED_TREE): Add to documentation.
918         (DECL_SAVED_FUNCTION_DATA): New macro.
919         (START_CATCH_TYPE): Likewise.
920         (SCOPE_END_P): New macro.
921         (declare_parm_level): Don't declare.
922         * decl.c (mark_lang_function): New function, split out from
923         mark_cp_function_context.
924         (save_function_data): New function.
925         (declare_parm_level): Remove.
926         (finish_function): Use save_function_data to squirrel away
927         important stuff for later use.
928         (mark_cp_function_context): Use mark_function_data.
929         (lang_mark_tree): Likewise.
930         * lex.c (begin_definition_of_inclass_inline): Set
931         DECL_PENDING_INLINE_P.
932         (store_pending_inline): Clear it.
933         * pt.c (tsubst_decl): Likewise.
935 1999-09-17  Nathan Sidwell  <nathan@acm.org>
937         * call.c (perform_implicit_conversion): Deal with error_mark_node.
939 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
941         * decl.c (warn_extern_redeclared_static): Don't get confused by
942         static member functions.
943         (duplicate_decls): Merge DECL_THIS_STATIC.
945         * decl.c (expand_static_init): Make sure assignments to local
946         statics actually occur.
948 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
950         * cp-tree.h (poplevel_class): Declare.
951         * class.c (popclass): Use poplevel_class, not poplevel.
952         * decl.c (poplevel_class): Don't make it static.  Don't return a
953         value.
954         (poplevel): Don't call poplevel_class; abort in a class
955         binding level is seen.
956         * semantics.c (finish_translation_unit): Use pop_everything.
957         * parse.y (member_init): Allow errors.
958         (pending_inline): Call finish_function.
959         * parse.c: Regenerated.
960         * Makefile.in (CONFLICTS): Adjust.
962 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
963         
964         * error.c: Reduce code duplication.
965         (dump_template_value): New function.
966         (dump_type_real): Use it.
967         (dump_decl): Likewise.
968         (dump_function_name): Likewise.
969         (dump_function_decl): Don't be too talkative about function return
970         type variety.
972 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
974         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
976         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
978 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
980         * decl2.c (finish_file): Also call check_global_declarations for
981         the pending_statics list.
983 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
985         * lex.c (cp_pragma_implementation): Allow #pragma implementation
986         in header files.
988 1999-09-15  Richard Henderson  <rth@cygnus.com>
990         * lex.c (mark_impl_file_chain): Follow the next chain.
992 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
994         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
995         problems with extern "C" functions redeclared as static.
996         (duplicate_decls): When a builtin is redeclared static, make the
997         new function have internal linkage.
998         
999 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
1001         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
1002         * pt.c (tsubst_copy): Likewise.
1003         * tree.c (search_tree): Likewise.
1004         (mapcar): Likewise.
1006 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1008         * typeck2.c (ack): Don't declare progname.
1010 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
1012         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
1013         filenames with ggc_alloc_string.
1015 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
1017         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
1018         TARGET_EXPR.
1019         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
1020         the TARGET_EXPR.
1021         * cvt.c (build_up_reference): Likewise.
1022         * tree.c (build_cplus_new): Likewise.
1023         (get_target_expr): Likewise.
1024         
1025 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
1027         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
1029 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
1031         * cp-tree.h (build_target_expr): New function.
1032         * call.c (build_conditional_expr): Use build_target_expr.
1033         (convert_like): Likewise.
1034         (build_over_call): Likewise.
1035         * cvt.c (build_up_reference): Likewise.
1036         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
1037         (destroy_local_var): Here.
1038         (build_target_expr): New function.
1039         * tree.c (build_cplus_new): Use it.
1040         (get_target_expr): Likewise.
1042 1999-09-13  Nathan Sidwell  <nathan@acm.org>
1044         * typeck.c (expr_sizeof): Don't decay arrays and functions.
1045         Remove misleading comment.
1046         (build_compound_expr): Don't decay arrays.
1048 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
1050         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
1051         class rvalues again.
1053 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1055         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
1057         * g++spec.c: Include gcc.h.
1058         (lang_specific_driver): Constify a char*.  Call xcalloc, not
1059         xmalloc/bzero.  All calls to the function pointer parameter now
1060         explicitly call `fatal'.
1062 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
1064         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
1065         * cvt.c (ocp_convert): Complete the from and destination types.
1066         Adjust warning about functions always being `true' in conditionals.
1067         * decl.c (duplicate_decls): Don't play funny games with abort.
1068         * error.c (dump_expr): Handle OVERLOADs.
1069         * spew.c (probe_obstack): Remove.
1070         * typeck.c (condition_conversion): Use perform_implicit_conversion.
1071         
1072 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
1074         * cp-tree.h (auto_function, define_function): Adjust prototypes.
1075         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
1076         changed.
1077         (auto_function): Likewise, for CODE arg.
1078         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
1079         (builtin_function): ... here.
1081 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
1083         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
1084         (init_decl_processing): Don't set TREE_PERMANENT for the
1085         error_mark_node.
1086         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
1087         (grokdeclarator): Likewise.
1088         (grokparms): Don't check TREE_PERMANENT when building up lists.
1089         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
1090         (mark_inline_for_output): Likewise.
1091         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
1092         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
1093         * lex.c (check_newline): Don't check ggc_p; it is always one.
1094         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
1095         * spew.c (yylex): Don't copy_node or probe_obstacks for
1096         non-permanent CONSTANTs and STRINGs.
1097         * tree.c (build_cplus_array_type_1): Don't fuss with
1098         TREE_PERMANENT on ARRAY_TYPEs.
1099         
1100         * cp-tree.def (CLEANUP_STMT): New node.
1101         * cp-tree.h (language_function): Add name_declared.
1102         (current_function_name_declared): New macro.
1103         (CLEANUP_DECL): New macro.
1104         (CLEANUP_EXPR): Likewise.
1105         (emit_local_var): Likewise.
1106         (finish_decl_cleanup): New function.
1107         * cvt.c (build_up_reference): Simplify.
1108         (ocp_convert): Remove dead code.
1109         * decl.c (start_decl): Remove call to add_decl_stmt.
1110         (grok_reference_init): Adjust, to handle bindings temporaries to
1111         references.  Remove dead code.
1112         (initialize_local_var): Don't generate RTL for
1113         declarations here, or build cleanups here.  Don't fuss with
1114         obstacks.  Replace expand_start_target_temps calls with explicit
1115         setting of stms_are_full_exprs_p.
1116         (destroy_local_var): New function.
1117         (emit_local_var): Likewise.
1118         (cp_finish_decl): Use them, as appropriate.
1119         (start_function): Announce template functions.
1120         (store_parm_decls): Don't call declare_function_name here.
1121         (finish_stmt): Don't start emit base-initialization code when just
1122         building the statement-tree.
1123         * init.c (create_temporary_var): Move add_decl_stmt call ...
1124         (get_temp_regvar): Here.
1125         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
1126         cp_finish_decl would expect.  Don't call add_decl_stmt.
1127         * semantics.c (begin_compound_stmt): Call declare_function_name,
1128         if appropriate.
1129         (finish_decl_cleanup): New function.
1130         (expand_stmt): Use emit_local_var to output variables.          
1131         (expand_body): Set current_funtion_name_declared.
1132         
1133 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
1135         * cp-tree.h (finish_cleanup_try_block): New function.
1136         * semantics.c (finish_cleanup_try_block): Add comment.
1138 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
1140         * cp-tree.h: Delete declarations for all tree nodes now moved to
1141         global_trees.
1142         * decl.c: Delete their definitions.
1143         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
1144         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
1145         provide defaults.
1146         (init_decl_processing): Call build_common_tree_nodes and
1147         build_common_tree_nodes_2 instead of building their nodes here.
1148         Don't add gc roots for them.
1150 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
1152         * cp-tree.h (language_function): Rename expanding_p to
1153         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
1154         (expanding_p): Adjust accordingly.
1155         (TREE_VIA_PRIVATE): Fix typo in comment.
1156         (DECL_REFERENCE_SLOT): Remove.
1157         (SET_DECL_REFERENCE_SLOT): Likewise.
1158         * decl.c (named_label_uses): Adjust. Remove chicken comment.
1159         (push_overloaded_decl): Don't truncate the chain of bindings when
1160         adding an overloaded function.
1161         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
1162         (initialize_local_var): Fix typo in comment.
1163         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
1164         * decl2.c (start_objects): Make the fact that we are expanding
1165         the generated function right away explicit.
1166         (start_static_storage_duration_function): Likewise.
1167         (finish_file): Fix typo in comment.
1168         * init.c (build_vec_init): Correct bugs in handling cleanups.
1169         * semantics.c (maybe_convert_cond): New function.
1170         (FINISH_COND): Always store the condition, even if there's
1171         a declaration.
1172         (finish_if_stmt_cond): Use maybe_convert_cond.
1173         (finish_while_stmt_cond): Likewise.
1174         (finish_do_stmt): Likewise.
1175         (finish_for_cond): Likewise.
1176         (expand_cond): Adjust.
1177         
1178         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
1179         * init.c (perform_member_init): Remove obstack machinations.
1180         (expand_cleanup_for_base): Likewise.
1181         (finish_init_stmts): Mark the statement-expression as used.
1182         * method.c (emit_thunk): Use tree-generating functions, not
1183         RTL.
1184         (do_build_copy_constructor): Likewise.
1185         (do_build_assign_ref): Likewise.
1186         (synthesize_method): Likewise.  Keep track of line numbers.
1187         * pt.c (tsubst_expr): Handle various kinds of try blocks.
1188         * semantics.c (expand_stmts): Remove.
1189         (begin_function_try_block): Set FN_TRY_BLOCK_P.
1190         (finish_function_try_block): Be careful rechaining 
1191         function try blocks.
1192         (expand_stmt): Loop through all the statements at a given level.
1193         (exapnd_body): Be careful with line-numbers here too.  Prepare for
1194         being called directly from the parser.
1196         * cp-tree.h (finish_function): Adjust prototype.
1197         * decl.c (finish_function): Return the function compiled.
1198         * pt.c (instantiate_decl): Don't play games with obstacks.
1199         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
1200         (search_tree): Likewise.
1201         * typeck.c: Fix typo in comment.
1202         * typeck2.c (store_init_value): Add comment.
1204         * cp-tree.h (CPTI_ATEXIT): New macro.
1205         (atexit_node): Likewise.
1206         * decl.c (destroy_local_static): New function, broken out from ...
1207         (expand_static_init): Here.
1209         * rtti.c (get_tinfo_var): These should always be global
1210         (expand_si_desc): Use tree, not RTL, functions to generate code.
1211         (expand_class_desc): Likewise.
1212         (expand_ptr_desc): Likewise.
1213         (expand_attr_desc): Likewise.
1214         (expand_generic_desc): Likewise.
1215         (synthesize_tinfo_fn): Likewise.
1217 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
1219         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
1220         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
1221         RECHAIN_STMTS. 
1222         (RECHAIN_STMST_FROM_CHAIN): Likewise.
1224         * parse.y (simple_stmt): Fix typo in last change.
1226         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
1227         (STMT_IS_FULL_EXPR_P): Likewise.
1228         (STMT_LINENO_FOR_FN_P): Likewise.
1229         (prep_stmt): New function.
1230         (building_stmt_tree): Tweak for safety.
1231         * pt.c (tsubst_expr): Use prep_stmt throughout.
1232         (add_tree): Move it to semantics.c
1233         * semantics.c (add_tree): Move it here.
1234         (finish_expr_stmt_real): New function.
1235         (finish_expr_stmt): Use it.
1236         (finish_if_stmt_cond): Use FINISH_COND.
1237         (finish_while_stmt_cond): Likewise.
1238         (finish_for_cond): Likewise.
1239         (finish_stmt_tree): Tweak line-number handling.
1240         (prep_stmt): New function.
1241         (expand_stmt): Use it.
1242         
1243         * cp-tree.h (begin_switch_stmt): Adjust prototype.
1244         (finish_switch_cond): Likewise.
1245         * parse.y (simple_stmt): Adjust accordingly.
1246         * parse.c: Regenerated.
1247         * pt.c (tsubst_expr): Adjust accordingly.
1248         * semantics.c (expand_cond): New function.
1249         (FINISH_COND): New macro.
1250         (begin_switch_stmt): Build the SWITCH_STMT here.
1251         (finish_switch_stmt_cond): Not here.
1252         (expand_stmt): Adjust calls to begin_switch_stmt and
1253         finish_switch_cond.  Use expand_cond throughout.
1255         * dump.c (dequeue_and_dump): Dump types for constants.
1256         Describe DECL_ARG_TYPE more intuitively.
1257         Handle ARRAY_REF.
1259         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
1260         (lang_cleanup_tree): Remove.
1261         * lex.c (make_lang_type): Use ggc_alloc to allocate
1262         TYPE_LANG_SPECIFIC.
1264         Reorganize per-function data.
1265         * cp-tree.h (saved_scope): Add function_decl, bindings.
1266         (language_function): Rename binding_level to bindings.
1267         (cp_function_chain): Use the current_function, not the
1268         outer_function_chain.
1269         (current_class_ptr): Make it work, even when there's no 
1270         current function.
1271         (current_class_ref): Likewise.
1272         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
1273         macros.
1274         (clear_temp_name): Remove.
1275         * decl.c (check_function_type): New function, broken out from
1276         start_function.
1277         (current_binding_level): Adjust definition.
1278         (pushlevel): Simplify.
1279         (poplevel): Don't use named_label_uses when we're outside
1280         a function scope.
1281         (mark_saved_scope): Mark function_decl and bindings.
1282         (maybe_push_to_top_level): Don't unconditionally push a new
1283         function context.  Save bindings and the current_function_decl.
1284         Don't clear named_labels.
1285         (pop_from_top_level): Pop function context if appropriate.
1286         (init_decl_processing): Set init_lang_status and free_lang_status,
1287         rather than save_lang_status and restore_lang_status.
1288         (start_function): Take SF_* flags.  Don't clear per-function data.
1289         Reorder and simplify to use new per-function data code.  Add
1290         asserts.
1291         (store_parm_decls): Don't call init_function_start here.
1292         (finish_function): Adjust for new handling of per-function data.
1293         (push_cp_function_context): Simplify.
1294         (mark_cp_function_context): Change binding_level to bindings.
1295         * decl2.c (clear_temp_name): Remove.
1296         (start_objects): Use SF flags to start_function.
1297         (start_static_storage_duration_function): Likewise.
1298         * except.c (start_anon_func): Remove redundant calls to 
1299         push_function_context_to.  Use SF flags to start function.
1300         (end_anon_func): Remove redundant call to pop_function_context
1301         from.
1302         * lex.c (reinit_parse_for_function): Don't initialize per-function 
1303         data.
1304         * method.c (emit_thunk): Clear current_function after calling
1305         assemble_end_function.  Use SF flags for start_function.
1306         (synthesize_method): Use SF flags for start_function.
1307         * parse.c: Regenerated.
1308         * parse.y (fn.defpen): Likewise.
1309         (pending_inline): Clear current_function, even if something goes
1310         wrong.
1311         * pt.c (instantiate_decl): Use SF flags to start_function.
1312         Don't save and restore expanding_p.
1313         (add_tree): Handle the case where we are outside any function.
1314         (end_tree): Likewise.
1315         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
1316         * semantics.c (begin_function_definition): Likewise.
1317         (expand_body): Likewise.
1318         
1319 1999-09-09  Nathan Sidwell  <nathan@acm.org>
1321         * cp-tree.h (convert_to_void): Prototype new function.
1322         (require_complete_type_in_void): Remove prototype.
1323         * cvt.c (convert_to_void): New function.
1324         (ocp_convert): Use convert_to_void.
1325         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
1326         expressions.
1327         * typeck.c (require_complete_type_in_void): Remove function.
1328         (build_compound_expr): Use convert_to_void.
1329         (build_static_cast): Likewise.
1330         (build_c_cast): Likewise.
1331         * semantics.c (finish_expr_stmt): Do not decay full expressions.
1332         
1333         * typeck.c (build_x_compound_expr): Add FIXME.
1335 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
1337         * cp-tree.h (scratch_tree_cons): Remove.
1338         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
1339         and perm_tree_cons with plain tree_cons.
1340         * class.c: Likewise.
1341         * decl.c: Likewise.
1342         * decl2.c: Likewise.
1343         * except.c: Likewise.
1344         * expr.c: Likewise.
1345         * init.c: Likewise.
1346         * lex.c: Likewise.
1347         * method.c: Likewise.
1348         * parse.y: Likewise.
1349         * pt.c: Likewise.
1350         * repo.c: Likewise.
1351         * rtti.c: Likewise.
1352         * search.c: Likewise.
1353         * typeck.c: Likewise.
1354         * parse.c: Regenerated.
1355         * tree.c (build_srcloc): Simplify.
1356         
1357 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
1359         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
1360         Remove next.
1361         (LANG_DECL_PERMANENT): Remove.
1362         * decl.c (duplicate_decls): Don't mess about with obstacks trying
1363         to free memory.
1364         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
1365         * lex.c (free_lang_decl_chain): Remove.
1366         (build_lang_decl): Don't use obstacks.
1367         (retrofit_lang_decl): Likewise.
1368         (copy_lang_decl): Likewise.
1370         * cp-tree.h (saved_scope): Remove old_binding_level and 
1371         function_decl.  Tidy up.
1372         * decl.c (mark_saved_scope): Don't set them.
1373         (maybe_push_to_top_level): Clear memory.
1375         * decl.c (layout_var_decl): Change prototype.  Don't complete
1376         types for external objects.
1377         (check_initializer): Likewise.  Tidy.
1378         (initialize_local_var): Complete types here.
1379         (cp_finish_decl): Not here.  Reorganize a little.
1380         (grokvardecl): Don't complete types here.
1382         * decl.c (start_function): Clear last_dtor_insn and
1383         last_parm_cleanup_insn. 
1384         (push_cp_function_context): Just copy over a little of
1385         the old context, not all of it.
1387         * cp-tree.h (copy_to_permanent): Remove.
1388         (permanent_p): Likewise.
1389         * decl.c (building_typename_type): Don't use copy_to_permanent.
1390         (start_decl): Likewise.
1391         (grok_reference_init): Likewise.
1392         (cp_finish_decl): Likewise.
1393         * init.c (build_new_1): Don't use mapcar.
1394         (build_vec_delete_1): Don't use copy_to_permanent.
1395         (build_vec_init): Likewise.
1396         * parse.y (primary): Likewise.
1397         * parse.c: Regenerated.
1398         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
1399         (lookup_template_class): Likewise.
1400         (tsubst_friend_function): Likewise.
1401         (instantiate_class_template): Likewise.
1402         (tsubst_decl): Likewise.
1403         (tsubst): Likewise.
1404         (instantiate_template): Likewise.
1405         (unify): Likewise.
1406         * rtti.c (get_tinfo_fn): Likewise.
1407         (build_dynamic_cast): Likewise.
1408         * semantics.c (finish_if_stmt_cond): Likewise.
1409         (finish_while_stmt_cond): Likewise.
1410         (finish_do_stmt): Likewise.
1411         (finish_for_cond): Likewise.
1412         (finish_for_expr): Likewise.
1413         (finish_cleanup): Likewise.
1414         (add_decl_stmt): Likewise.
1415         (finish_named_return_value): Likewise.
1416         (finish_qualified_call_expr): Likewise.
1417         * tree.c (perm_manip): Remove.
1418         (build_exception_variant): Don't use copy_to_permanent.
1419         (permanent_p): Remove.
1420         (copy_to_permament): Remove.
1421         (build_min_nt): Don't use copy_to_permanent.
1422         (build_min): Likewise.
1423         (min_tree_cons): Likewise.
1424         * typeckc.c (build_static_cast): Likewise.
1425         (build_reinterpret_cast): Likewise.
1426         (build_const_cast): Likewise.
1427         
1428 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
1430         * decl.c (ggc_p): Set it to 1.
1431         (mark_saved_scope): Add prototype.
1433 1999-09-07  Richard Henderson  <rth@cygnus.com>
1435         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
1436         * typeck.c (self_promoting_args_p): Delete.
1438 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
1440         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
1441         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
1443 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
1445         * Makefile.in (tree.o): Depend on ggc.h.
1446         * class.c (make_method_vec): Remove.
1447         (free_method_vec): Likewise.
1448         (free_method_vecs): Remove.
1449         (add_method): Don't use them.
1450         * cp-tree.def (PTRMEM_CST): Make it longer.
1451         (TEMPLATE_PARM_INDEX): Make it shorter.
1452         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
1453         (template_parm_index): Remove RTL field.
1454         (ptrmem_cst): Add RTL field.
1455         (finish_function): Removed parameter.
1456         (process_next_inline): Change prototype.
1457         (init_cplus_unsave): Rename to init_tree.
1458         (binding_init): Remove.
1459         * decl.c (free_binding_nodes): Remove.
1460         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
1461         (pop_binding): Don't use free_binding_nodes.
1462         (free_binding_vecs): Remove.
1463         (store_bindings): Don't use them.
1464         (pop_from_top_level): Likewise.
1465         (lookup_namespace_name): Simplify.
1466         (build_typename_type): Don't use obstack_free.
1467         (unqualified_namespace_lookup): Simplify.
1468         (lookup_name_real): Simplify.
1469         (start_function): Remove comment about leaks.
1470         (finish_function): Removed nested parameter.  Call
1471         expand_end_bindings even when building_stmt_tree.
1472         Call ggc_push_context and ggc_pop_context around
1473         rest_of_compilation, if necessary.
1474         (mark_cp_function_context): Handle a NULL language-context.
1475         (lang_mark_false_label_stack): Fix typo.
1476         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
1477         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
1478         pointer to method types.
1479         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
1480         * decl2.c (finish_objects): Adjust call to finish_function.
1481         (finish_static_store_duration_function): Likewise.
1482         (do_nonmember_using_decl): Remove call to binding_init.
1483         * except.c (end_anon_func): Adjust call to finish_function.
1484         * lex.c (mark_impl_file_chain): New function.
1485         (init_parse): Call init_tree, not init_cplus_unsave.
1486         Add GC roots.
1487         (cp_pramga_interface): Use xmalloc, not permalloc.
1488         (cp_pragma_implementation): Likewise.
1489         (begin_definition_of_inclass_inline): Simplify.
1490         (process_next_inline): Adjust prototype.
1491         (do_scoped_id): Don't call binding_init.
1492         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
1493         * method.c (emit_thunk): Adjust call to finish_function.
1494         (synthesize_method): Likewise.
1495         * parse.y (%union): Add a new `pi' variant.
1496         (PRE_PARSED_FUNCTION_DECL): Use it.
1497         (fn.defpen): Likewise.
1498         (fndef): Adjust call to finish_function.
1499         * pt.c (instantiate_decl): Likewise.
1500         * rtti.c (syntheisze_tinfo_fn): Likewise.
1501         * semantics.c (expand_body): Likewise.
1502         * tree.c: Include ggc.h.
1503         (mark_list_hash): New function.
1504         (binding_init): Remove.
1505         (init_cplus_unsave): Rename to ...
1506         (init_tree): This.  Add GC roots.
1507         
1508 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
1510         Get ready for garbage collection.
1511         * Makefile.in (CXX_TREE_H): Add varray.h
1512         (lex.o): Depend on ggc.h.
1513         (decl.o): Likewise.
1514         (decl2.o): Likewise.
1515         (method.o): Likewise.
1516         (search.o): Likewise.
1517         (pt.o): Likewise.
1518         (repo.o): Likewise.
1519         * class.c: Include ggc.h.
1520         (current_class_name): Remove.
1521         (current_class_type): Likewise.
1522         (current_access_specifier): Likewise.
1523         (previous_class_type): Likewise.
1524         (previous_class_values): Likewise.
1525         (class_cache_firstobj): Likewise.
1526         (current_lang_base): Likewise.
1527         (current_lang_stack): Likewise.
1528         (current_lang_stacksize): Likewise.
1529         (lang_name_c): Likewise.
1530         (lang_name_cplusplus): Likewise.
1531         (lang_name_java): Likewise.
1532         (current_lang_name): Likewise.
1533         (base_layout_decl): Likewise.
1534         (access_default_node): Likewise.
1535         (access_public_node): Likewise.
1536         (access_protected_node): Likewise.
1537         (access_private_node): Likewise.
1538         (access_default_virtual_node): Likewise.
1539         (access_public_virtual_node): Likewise.
1540         (access_protected_virtual_node): Likewise.
1541         (access_private_virtual_node): Likewise.
1542         (signed_zero_node): Likewise.
1543         (init_class_processing): Don't build base_layout_decl.
1544         (push_lang_context): Adjust now that current_lang_base is a varray.
1545         (pop_lang_context): Likewise.
1546         * cp-tree.h: Include varray.h.
1547         (cp_global_trees): Add access_default, access_public,
1548         access_protected, access_private, access_default_virtual,
1549         access_public_virtual, access_protected_virtual,
1550         access_private_virtual, ctor_identifier, delta2_identifier, 
1551         delta_identifier, dtor_identifier, in_charge_identifier,
1552         index_identifier, nelts_identifier, this_identifier,
1553         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
1554         lang_name_c, lang_name_cplusplus, lang_name_java,
1555         empty_except_spec, null, jclass, minus_one, terminate.
1556         (saved_scope): Move here from decl.c.  Define globals in terms of
1557         saved_scope: current_namespace, current_class_name,
1558         current_class_type, current_access_specifier, current_lang_stack,
1559         current_lang_base, current_lang_name, current_function_parms,
1560         current_template_parms, processing_template_decl,
1561         processing_specialization, processing_explicit_instantiation,
1562         previous_class_type, previous_class_values, class_cache_firstobj.
1563         (scope_chain): New variable.
1564         (init_pt): New function.
1565         * decl.c (current_namespace): Remove.
1566         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
1567         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
1568         (delta_identifier, delta2_identifier): Likewise.
1569         (pfn_or_delta2_identifier, tag_identifier): Likewise
1570         (vt_off_identifier, empty_except_spec, null_node): Likewise.
1571         (current_function_parms, current_lang_base): Remove.
1572         (current_lang_stack, previous_class_values): Remove.
1573         (class_binding_level): Macroize.
1574         (saved_scope): Remove.
1575         (current_saved_scope): Rename to scope_chain.
1576         (mark_saved_scope): Adjust for new scope structure.
1577         (maybe_push_to_top_level): Likewise.
1578         (pop_from_top_level): Likewise.
1579         (duplicate_decls): Adjust now that current_lang_base is a varray.
1580         (build_typename_type): Call ggc_add_tree_hash_table_root.
1581         (init_decl_processing): Call init_pt.  Call push_to_top_level to
1582         set up globals.  Add GC roots.
1583         (xref_basetypes): Adjust now that current_lang_base is a varray.
1584         * decl.h (this_identifier): Remove.
1585         (in_charge_identifier): Likewise.
1586         * decl2.c: Don't include varray.h.
1587         (current_namespace): Remove.
1588         (init_decl2): Add GC roots.
1589         * except.c (Terminate): Remove. 
1590         (init_exception_processing): Use terminate_node instead.
1591         (build_terminate_handler): Likewise.
1592         * init.c (nc_nelts_field_id): Remove.
1593         (minus_one): Likewise.
1594         (init_init_processing): Use minus_one_node and nelts_identifier
1595         instead.  Add GC roots.
1596         (jclass_node): Remove.
1597         (build_new_1): Use nelts_identifier.
1598         (build_vec_init): Likewise.
1599         (build_vec_delete): Likewise.
1600         * lex.c: Include ggc.h.
1601         (defarg_fn): Move declaration early.
1602         (defarg_parms): Likewise.
1603         (init_parse): Add GC roots.
1604         (handle_cp_pragma): Remove redundant declaration of
1605         pending_vtables.
1606         * method.c: Include ggc.h.
1607         (btypelist): Make it a varray.  All uses changed.
1608         (ktypelist): Likewise.
1609         (init_method): Add GC roots.
1610         * pt.c: Don't include varray.h.  Include ggc.h.
1611         (current_template_parms): Remove.
1612         (processing_template_decl): Likewise.
1613         (processing_specialization): Likewise.
1614         (processing_explicit_instantiation): Likewise.
1615         (init_pt): New function.
1616         * repo.c: Include ggc.h.
1617         (init_repo): Add GC roots.
1618         * search.c: Don't include varray.h.
1619         (_vptr_name): Remove.
1620         (lookup_field_1): Use vtpr_identifier instead.
1621         (expand_indirect_vtbls_init): Remove redundant declaration of
1622         in_charge_identifier.
1623         (init_search_processing): Use vptr_identifier.
1624         
1625 1999-09-05  Richard Henderson  <rth@cygnus.com>
1626             Bernd Schmidt <bernds@cygnus.co.uk>
1627             Mark Mitchell  <mark@codesourcery.com>
1629         * Makefile.in (parse.o): Depend on ggc.h.
1630         (decl2.o): Depend on ggc.h.
1631         (init.o): Depend on ggc.h.
1632         * cp-tree.h (init_decl2): Declare.
1633         (cp_parse_init): Likewise.
1634         * decl.c (ggc_p): Define to zero.
1635         (mark_saved_scope): New function.
1636         (init_decl_processing): Call cp_parse_init, and cp_decl2.
1637         Register GC roots.
1638         (expand_static_init): Add GC roots.
1639         * decl2.c: Include ggc.h.
1640         (init_decl2): New function.
1641         * init.c: Include ggc.h.
1642         (init_init_processing): Add GC roots.
1643         * parse.y: Include ggc.h.
1644         (cp_parse_init): New function.
1645         
1646 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
1648         * decl.c (init_decl_processing): Set mark_lang_status.
1649         (lang_mark_false_label_stack): Adjust prototype.
1650         * decl2.c (grok_function_init): Remove extraneous declaration of
1651         abort_fndecl.
1653         * Make-lang.in (cc1plus): Remove dependency on GGC.
1654         * Makefile.in (OBJS): Don't mention ggc-simple.o.
1655         (OBJDEPS): Don't mention ggc-simple.o.
1657         * Make-lang.in (cc1plus): Depend on $(GGC).
1658         * Makefile.in (OBJS): Add ggc-simple.o.
1659         (OBJDEPS): Likewise.
1660         * cp-tree.h (language_function): Rename members to `x_' versions;
1661         we now have x_named_labels, x_ctor_label, x_dtor_label,
1662         x_base_init_list, x_member_init_list, x_base_init_expr,
1663         x_current_class_ptr, x_current_class_ref, x_last_tree,
1664         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
1665         x_result_rtx. 
1666         (dtor_label, ctor_label, current_base_init_list,
1667         current_member_init_list, base_init_expr, current_class_ptr,
1668         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
1669         * decl.c: Include ggc.h.
1670         (last_dtor_insn): Adjust to use x_ names.
1671         (last_parm_cleanup_insn): Likewise.
1672         (original_result_rtx): Likewise.
1673         (named_labels): Likewise.
1674         (mark_binding_level): New function.
1675         (mark_cp_function_context): Likewise.
1676         (mark_false_label_stack): Likewise.
1677         (lang_mark_tree): Likewise.
1678         (lang_cleanup_tree): Likewise.
1679         
1680 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
1682         * Makefile.in (CXX_TREE_H): Include function.h.
1683         (decl.o): Don't depend on function.h.
1684         (decl2.o): Likewise.
1685         (typeck.o): Likewise.
1686         (init.o): Likewise.
1687         (method.o): Likewise.
1688         * cp-tree.h: Include function.h.
1689         (cp_function): Rename to language_function.  Remove next.
1690         (cp_function_chain): Make it a macro, not a variable.
1691         (push_cp_function_context): Don't declare.
1692         (pop_cp_function_context): Likewise.
1693         * decl.c: Don't include function.h.
1694         (push_cp_function_context): Make it static.  Make it suitable for
1695         a save_lang_status callback.
1696         (pop_cp_function_context): Likewise.
1697         (maybe_push_to_top_level): Call push_function_context_to, not
1698         push_cp_function_context.
1699         (pop_from_top_level): Call pop_function_context_from, not
1700         pop_cp_function_context.
1701         (init_decl_processing):  Set save_lang_status and
1702         restore_lang_status.  Call push_function_context_to, not
1703         push_cp_function_context.
1704         (cp_function_chain): Remove.
1705         * decl2.c: Don't include function.h.
1706         * except.c: Don't include function.h.
1707         (start_anon_func): Call push_function_context_to, not
1708         push_cp_function_context.
1709         (end_anon_func):  Call pop_function_context_from, not
1710         pop_cp_function_context.
1711         * init.c: Don't include function.h.
1712         * lex.c (begin_definition_of_inclass_inline): Call
1713         push_function_context_to, not push_cp_function_context. 
1714         (process_next_inline):  Call pop_function_context_from, not
1715         pop_cp_function_context.
1716         * method.c: Don't include function.h.
1717         (synthesize_method): Call push_function_context_to, not
1718         push_cp_function_context.  Call pop_function_context_from, not
1719         pop_cp_function_context.
1720         * typeck.c: Don't include function.h.
1721         
1722         * decl.c (expand_static_init): Tweak handling of static
1723         initializations for objects without constructors.
1725 1999-09-03  Nathan Sidwell  <nathan@acm.org>
1727         * typeck.c (build_indirect_ref): Reject dereference of pointer to
1728         void.
1730 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
1732         * cp-tree.h (cp_function): Move here, from decl.c.
1733         (cp_function_chain): Declare.
1734         (dtor_label): New macro, instead of variable.
1735         (ctor_label): Likewise.
1736         (current_base_init_list): Likewise.
1737         (current_member_init_list): Likewise.
1738         (base_init_expr): Likewise.
1739         (current_class_ptr): Likewise.
1740         (current_class_ref): Likewise.
1741         (last_tree): Likewise.
1742         (last_expr_type): Likewise.
1743         (current_function_returns_value): Likewise.
1744         (current_function_returns_null): Likewise.
1745         (current_function_just_assigned_this): Likewise.
1746         (current_function_parms_stored): Likewise.
1747         (temp_name_counter): Likewise.
1748         (static_labelno): Likewise.
1749         (expanding_p): Likewise.
1750         (stmts_are_full_exprs_p): Likewise.
1751         (in_function_try_handler): Likewise.
1752         (lang_type): Remove nested type_flags.  All uses changed.
1753         * call.c (ctor_label): Remove.
1754         (dtor_label): Likewise.
1755         * class.c (current_class_ptr): Remove.
1756         (current_class_ref): Likewise.
1757         * decl.c (static_labelno): Remove.
1758         (dtor_label): Likewise.
1759         (last_dtor_insn): New macro, instead of variable.
1760         (last_parm_cleanup_insn): Likewise.
1761         (original_result_rtx): Likewise.
1762         (in_function_try_handler): Remove.
1763         (named_label_uses): New macro, instead of variable.
1764         (named_labels): Likewise.
1765         (current_function_returns_value): Remove.
1766         (current_function_returns_null): Likewise.
1767         (current_function_assigns_this): New macro, instead of variable.
1768         (current_function_just_assigned_this): Likewise.
1769         (current_binding_level): Likewise.
1770         (init_decl_processing): Call push_cp_function_context.
1771         (cp_function): Move to cp-tree.h
1772         (cp_function_chain): Make it global.
1773         (temp_name_counter): Remove.
1774         (push_cp_function_context): Simplify.
1775         (pop_cp_function_context): Likewise.
1776         * decl2.c (temp_name_counter): Remove.
1777         * init_c (current_base_init_list): Likewise.
1778         (current_member_init_list): Likewise.
1779         (base_init_expr): Likewise.
1780         * method.c (static_labelno): Likewise.
1781         * pt.c (last_tree): Likewise.
1782         * semantics.c (expanding_p): Likewise.
1783         (stmts_are_full_exprs_p): Likewise.
1784         (last_expr_type): Likewise.
1785         * typeck.c (dtor_label): Likewise.
1786         (ctor_label): Likewise.
1787         
1788 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
1790         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
1791         (arg_assoc_class): Use arg_assoc_template_arg for template
1792         arguments. 
1793         (arg_assoc): Likewise.
1794         * pt.c (mangle_class_name_for_template): Allow member template
1795         template arguments.
1797 1999-09-02  Nathan Sidwell  <nathan@acm.org>
1799         * call.c (build_conditional_expr): Warn on enum mismatches.
1800         (convert_arg_to_ellipsis): Move non-pod check to after
1801         conversion.
1803 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1805         * gxx.gperf (hash, is_reserved_word): Add prototypes.
1807         * init.c (build_vec_init): Initialize variable `try_block'.
1809         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
1810         Likewise for bzero/memset.
1811         (token_getch, token_put_back): Add static prototypes.  Remove
1812         `inline' from the definitions.
1813         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
1815 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
1817         * cp-tree.h (lang_type): Move align into type_flags.
1818         (CLASSTYPE_ALIGN): Adjust accordingly.
1819         * call.c (direct_reference_binding): Remove misleading comment.
1821 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1823         * parse.y (language_string): Constify.
1825 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1827         * repo.c (getpwd): Don't prototype.
1828         * xref.c (getpwd): Likewise
1830 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1832         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
1833         Remove hacks for stuff which now comes from libiberty.
1835 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
1837         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
1839 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
1841         * cp-tree.h (begin_init_stmts): Declare.
1842         (finish_init_stmts): Likewise.
1843         * cvt.c (build_up_reference): Wrap the declaration of a temporary
1844         in a statement-expression so that we will see it when expanding
1845         tree structure later.
1846         * init.c (begin_init_stmts): Don't make it static.
1847         (finish_init_stmts): Likewise.
1849         * cp-tree.h (start_handler_parms): New function.
1850         (expand_start_catch_block): Take only one parameter.
1851         (start_handler_parms): New function.
1852         * decl.c (start_handler_parms): Define it.
1853         * except.c (process_start_catch_block): Take only one parameter.
1854         Don't call grokdeclarator here.
1855         (expand_start_catch_block): Don't call grokdeclarator here,
1856         either.
1857         * parse.y (handler_args): Adjust call to
1858         expand_start_catch_block.  Use start_handler_parms.
1859         * pt.c (push_template_decl_real): Make permanent lists have
1860         permanent elements.
1861         (tsubst_expr): Adjust calls to expand_start_catch_block
1862         appropriately.
1863         * semantics.c (expand_stmt): Likewise.
1864         
1865 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
1867         * pt.c (push_template_decl_real): Use template declaration from
1868         class type if it exists.
1870 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
1872         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
1873         (maybe_inject_for_scope_var): Declare it.
1874         (initialize_local_var): Likewise.
1875         * decl.c (maybe_inject_for_scope_var): Make it global.
1876         (initialize_local_var): Likewise.  Move cleanup handling here,
1877         from cp_finish_decl.
1878         (make_rtl_for_nonlocal_decl): Use
1879         push_obstacks_nochange/pop_obstacks, rather than
1880         end_temporary_allocation/resume_temporary_allocation.
1881         (cp_finish_decl): Try to complete the type of a variable when it
1882         is declared.  Move cleanup-handling to initialize_local_var.
1883         (expand_static_init): Use tree-building code, rather than
1884         RTL-building code.
1885         * decl2.c (get_temp_name): Assert non-initializedness of
1886         temporaries.
1887         * init.c (create_temporary_var): Move RTL-assigning code to ...
1888         (get_temp_regvar): Here.
1889         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
1890         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
1891         call initialize_local_var to generate initialization code.
1892         
1893 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1895         * cp-tree.h (fndecl_as_string, type_as_string,
1896         type_as_string_real, args_as_string, decl_as_string,
1897         expr_as_string, code_as_string, language_as_string,
1898         parm_as_string, op_as_string, assop_as_string, cv_as_string,
1899         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
1901         * errfn.c (cp_printer): Likewise.
1903         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
1904         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
1905         cp_file_of, code_as_string, language_as_string, parm_as_string,
1906         op_as_string, assop_as_string, args_as_string, cv_as_string):
1907         Likewise.
1909         * tree.c (lang_printable_name): Likewise.
1911 1999-08-28  Richard Henderson  <rth@cygnus.com>
1913         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
1915 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
1917         * cp-tree.h (strip_array_types): New function.
1918         * decl.c (maybe_deduce_size_from_array_init): New function, split
1919         out from cp_finish_decl.
1920         (layout_var_decl): Likewise.
1921         (maybe_commonize_var): Likewise.
1922         (maybe_inject_for_scope_var): Likewise.
1923         (initialize_local_var): Likewise.
1924         (build_cleanup_on_safe_obstack): Likewise.
1925         (check_initializer): Likewise.
1926         (make_rtl_for_nonlocal_decl): Likewise.
1927         (cp_finish_decl): Use them.
1928         * typeck.c (strip_array_types): New function.
1929         
1930         * cp-tree.def (LABEL_STMT): New tree node.
1931         * cp-tree.h (LABEL_STMT_LABEL): New macro.
1932         (shadow_label): Remove.
1933         (declare_local_label): New function.
1934         (finish_label_decl): Likewise.
1935         * decl.c (make_label_decl): New function, split out from
1936         lookup_label.
1937         (shadowed_labels): Remove.
1938         (binding_level): Add shadowed_labels.
1939         (clear_binding_level): Remove.
1940         (push_binding_level): Just bzero the new binding level.
1941         (pushlevel): Fix indentation.
1942         (pop_label): New function.
1943         (pop_labels): Likewise, split out from poplevel.
1944         (poplevel): Pop local labels.  Use pop_labels.
1945         (maybe_push_to_top_level): Don't clear shadowed_labels.
1946         (lookup_label): Use make_label_decl.
1947         (shadow_label): Remove.
1948         (declare_local_label): New function.
1949         (define_label): Simplify.
1950         (start_function): Don't clear shadowed_labels.
1951         (cp_function): Remove shadowed_labels.
1952         (push_cp_function_context): Don't save shadowed_labels.
1953         (pop_cp_function_context): Don't restore it.
1954         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
1955         * parse.y (label_decl): Use finish_label_decl.
1956         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
1957         declarations.
1958         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
1959         building_stmt_tree.
1960         (finish_label_decl): New function.
1961         (expand_stmt): Handle LABEL_STMTs and local label declarations.
1962         
1963 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
1965         * decl.c (lookup_label): Build labels on the permanent obstack
1966         when building statement trees.  Don't build RTL for labels when
1967         building statement trees.
1968         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
1969         building statement trees.
1970         (finish_label_stmt): Likewise.
1971         (expand_stmt): Adjust accordingly.
1972         * pt.c (tsubst_expr); Likewise.
1973         (do_decl_instantiation): Robustify.
1974         
1975         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
1976         * tree.c (build_cplus_new): Set it.
1977         * expr.c (cplus_expand_expr): Use it.
1978         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
1979         
1980         * decl.c (store_parm_decls): Reset immediate_size_expand.
1981         (finish_function): Likewise.
1982         
1983         * tree.c (cplus_unsave_expr_now): Don't return a value.
1985         * semantics.c (do_poplevel): Always initialize the return value.
1987 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
1989         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
1990         * tree.h (cplus_unsave_expr_now) : Same.
1992 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
1994         * decl.c (grokdeclarator): Amend comment.
1995         * except.c (expand_start_catch_block): Call push_template_decl for
1996         catch-block parameters.
1997         * method.c (synthesize_method): Build an empty compound statement
1998         for the body of a constructor.
2000 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
2002         * tree.c (cp_build_qualified_type_real): If we're asking for the
2003         same quals we already have, just return.
2005 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
2007         * cp-tree.def (SUBOBJECT): New tree node.
2008         * cp-tree.h (CLEANUP_P): New macro.
2009         (SUBOBJECT_CLEANUP): Likewise.
2010         (keep_next_level): Add parameter.
2011         (get_temp_regvar): Don't declare.
2012         (emit_base_init): Remove parameter.
2013         (expand_aggr_init): Rename to build_aggr_init.
2014         (expand_vec_init): Rename to build_vec_init.
2015         (do_pushlevel): Remove.
2016         (do_poplevel): Likewise.
2017         (finish_cleanup): New function.
2018         (finish_subobject): Likewise.
2019         (stmts_are_full_exprs_p): New variable.
2020         * decl.c (keep_next_level): Add parameter.
2021         (cp_finish_decl): Use build_aggr_init, not
2022         expand_aggr_init.  Use finish_expr_stmt to expand the code.
2023         (expand_static_init): Use tree-generating, not RTL-generating,
2024         functions to handle the initialization.
2025         (start_function): Remove dead code.  Always have a momentary
2026         obstack inside the function, even before hitting the first curly
2027         brace.
2028         (cplus_expand_expr_stmt): Move calls to
2029         expand_{start,end}_target_temps into semantics.c.
2030         (cp_function): Add stmts_are_full_exprs_p.
2031         (push_cp_function_context): Save it.
2032         (pop_cp_function_context): Restore it.
2033         * decl2.c (get_temp_regvar): Move to init.c.
2034         (do_static_initialization): Use build_{aggr,vec}_init.
2035         (do_static_destruction): Fix typo in comment.
2036         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
2037         * except.c (expand_throw): Use create_temporary_var.
2038         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
2039         * init.c (expand_vec_init_try_block): Remove.
2040         (expand_vec_init_catch_clause): Likewise.
2041         (get_temp_regvar): New function.
2042         (begin_init_stmts): Likewise.
2043         (finish_init_stmts): Likewise.
2044         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
2045         structure here.
2046         (emit_base_init): Likewise.  Remove unused parameter.
2047         (expand_virtual_init): Likewise.
2048         (expand_cleanup_for_base): Use finish_subobject.
2049         (expand_aggr_vbase_init_1): Simplify.
2050         (construct_virtual_bases): Use tree-generating functions to build
2051         up initialization.
2052         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
2053         (expand_default_init): Likewise.
2054         (expand_aggr_init_1): Likewise.
2055         (expand_vec_init): Rename to build_vec_init.
2056         * method.c (do_build_copy_constructor): Use tree-generating
2057         functions.  Don't call clear_last_expr.
2058         (do_build_assign_ref): Likewise.
2059         (synthesize_method): Call clear_last_expr here.
2060         * parse.y (base_init): Don't call clear_last_expr here.
2061         (nodecls): Likewise.
2062         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
2063         * semantics.c (do_pushlevel): Move to here.
2064         (do_poplevel): Likewise.
2065         (stmts_are_full_exprs_p): New variable.
2066         (finish_expr_stmt): Handle logic for temoprary cleanup here.
2067         (finish_for_stmt): Use finish_expr_stmt.
2068         (finish_cleanup): New function.
2069         (finish_function_try_block): Fix indentation.
2070         (finish_subobject): New function.
2071         (setup_vtbl_ptr): Call keep_next_level here.
2072         (finish_stmt_expr): Handle a block with no scope inside the
2073         statement-expression.
2074         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
2075         SUBOBJECT.
2076         * tree.c (search_tree): Handle INIT_EXPR.
2077         (mapcar): Likewise.
2078         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
2079         * typeck2.c (store_init_value): Change expand_aggr_init to
2080         build_aggr_init in comment.
2081         
2082 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
2084         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
2086 1999-08-25  Nathan Sidwell  <nathan@acm.org>
2088         * decl2.c (handle_class_head): Be graceful about additional
2089         scope qualifiers. Adjust comments to reflect reality.
2091 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
2093         * call.c (build_conditional_expr): Fix typo.
2094         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
2095         lvalue before trying to mess with the sides.
2097         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
2099 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
2101         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
2103 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
2105         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
2106         Return arbitrary pointer or NULL.
2107         (check_eh_spec): Call __throw_type_match_rtti_2.
2108         * tinfo.h (*::dcast): Return int.  Add valp parm.
2109         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
2110         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
2111         (__throw_type_match_rtti): Now just a wrapper.
2113         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
2114         (init_exception_processing): Don't initialize them.
2116 1999-08-23  Paul Burchard <burchard@pobox.com>
2118         * decl.c (check_default_argument): Fix typo.
2120 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
2122         * cp-tree.def (STMT_EXPR): Fix typo in node name.
2124         * dump.c (dump_next_stmt): New function.
2125         (dequeue_and_dump): Use it.
2126         
2127         * pt.c (tsubst_copy): Make sure to initialize return value for a
2128         STMT_EXPR, even when processing_template_decl.
2129         * semantics.c (finish_stmt_expr): A statement-expression whose
2130         last statement is not an expression-statement has type `void'.  
2131         
2132 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
2134         * semantics.c (finish_stmt_expr): Fix typo in comment.
2135         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
2136         (mapcar): Likewise.
2137         * init.c (build_vec_delete_1): Make the children of a permanent
2138         BIND_EXPR permanent.
2139         * pt.c (register_specialization): Don't register a specialization
2140         more than once.
2141         
2142 1999-08-18  Andrew Haley  <aph@cygnus.com>
2144         * method.c (process_overload_item): Call build_mangled_C9x_name ()
2145         for all integer parameter types larger than long long.
2147 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
2149         * pt.c (redeclare_class_template): Merge default template
2150         arguments in both directions.
2152         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
2153         compiler_error message.
2155 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
2157         * cp-tree.h: Declare flag_use_repository.
2158         * pt.c (do_decl_instantiation): Don't complain about duplicate
2159         instantiation with -frepo.
2160         (do_type_instantiation): Likewise.
2162         * pt.c (push_template_decl_real): Complain about everything
2163         that isn't a valid template.
2165         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
2166         affect inlines.
2168 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
2170         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
2171         * decl2.c (build_expr_from_tree): Handle it.
2172         * error.c (dump_expr): Likewise.
2173         * pt.c (for_each_template_parm): Likewise.
2174         (tsubst_copy): Likewise.
2175         * tree.c (search_tree): Likewise.
2176         * semantics.c (finish_pseudo_destructor_call): Create it.
2177         
2178 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
2180         * search.c (setup_class_bindings): Robustify.
2181         * typeck.c (common_type): Use same_type_p, not pointer equality,
2182         to compare types.
2184         * cp-tree.h (build_lang_field_decl): Remove.
2185         * class.c (build_vtable): Replace calls to build_lang_field_decl
2186         with build_lang_decl.
2187         (prepare_fresh_vtable): Likewise.
2188         (finish_struct_1): Likewise.
2189         (init_class_processing): Likewise.
2190         * decl.c (push_using_decl): Likewise.
2191         (init_decl_processsing): Likewise.
2192         (grokvardecl): Likewise.
2193         (build_ptrmemfunc_type): Likewise.
2194         (grokdeclarator): Likewise.
2195         (build_enumerator): Likewise.
2196         * decl2.c (grok_x_components): Likewise.
2197         (do_class_using_decl): Likewise.
2198         * except.c (call_eh_info): Likewise.
2199         * init.c (init_init_processing): Likewise.
2200         * rtti.c (expand_class_decl): Likewise.
2201         * tree.c (build_base_fields): Likewise.
2202         (build_vbase_pointer_fields): Likewise.
2203         * lex.c (build_lang_decl): Build declarations on the permanent
2204         obstack if we're building statmeent trees.
2205         (retrofit_lang_decl): Handle both the full lang_decl and also the
2206         smaller lang_decl_flags here.
2207         (build_lang_field_decl): Remove.
2208         * pt.c (push_template_decl_real): Issue errors for variable
2209         declarations that are not static members.
2211 1999-08-18  Richard Henderson  <rth@cygnus.com>
2213         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
2214         (mapcar): Likewise.
2216 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
2218         * cp-tree.h (back_end_hook): New variable.
2219         * decl2.c (back_end_hook): Define it.
2220         (finish_file): If it's non-NULL, call it.
2222         * decl.c (add_decl_to_level): New function.
2223         (push_local_binding): Use it.
2224         (find_binding): Fix typo in comment.
2225         (pushdecl): Use add_decl_to_level.  Put templates on the
2226         corresponding namespace-scope binding levels.
2227         * dump.c (dequeue_and_dump): Print the specializations of a
2228         template.
2229         * pt.c (push_template_decl_real): Don't push a template multiple
2230         times.
2232 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
2234         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
2235         (CALL_DECLARATOR_QUALS): Likewise.
2236         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
2237         * decl.c (grokdeclarator): Adjust to use them.
2238         * decl2.c (grokfield): Likewise.
2239         (reparse_absdcl_as_casts): Likewise.
2240         * lex.c (make_call_declarator): Likewise.
2241         (set_quals_and_spec): Likewise.
2242         * pt.c (tsubst): Likewise.
2243         * tree.c (mapcar): Remove special hack to handle third operand of
2244         a CALL_EXPR.
2246 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
2248         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
2249         * class.c (build_vtable): Use build_lang_field_decl to build the
2250         VAR_DECLs for vtables.
2251         (prepare_fresh_vtable): Likewise.
2252         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
2253         CAN_HAVE_FULL_LANG_DECL_P.
2254         (push_using_decl): Use build_lang_decl to build USING_DECLs.
2255         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
2256         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
2257         (build_lang_field_decl): Likewise.
2258         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
2259         to copy.
2260         
2261         * cp-tree.def (STMT_EXPR): New tree node.
2262         * cp-tree.h (STMT_EXPR_STMT): New macro.
2263         (store_return_init): Change prototype.
2264         (finish_named_return_value): New function.
2265         (expand_stmt): Likewise.
2266         (expand_body): Likewise.
2267         (begin_stmt_tree): Likewise.
2268         (finish_stmt_tree): Likewise.
2269         (expanding_p): New variable.
2270         (last_expr_type): Likewise.
2271         (building_stmt_tree): New macro.
2272         * decl.c (start_function): Use building_stmt_tree, not
2273         processing_template_decl, where appropriate.
2274         (store_parm_decls): Likewise.
2275         (store_return_init): Move most of the body to semantics.c.
2276         (finish_function): Use building_stmt_tree.
2277         (finish_stmt): Clear last_expr_type here.
2278         (cp_function): Add expanding_p, last_tree, last_expr_type.
2279         (push_cp_function_context): Save them.
2280         (pop_cp_function_context): Restore them.
2281         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
2282         * error.c (dump_expr): Handle STMT_EXPR.
2283         * except.c (expand_start_catch_block): Use building_stmt_tree.
2284         Use add_decl_stmt.
2285         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
2286         (do_case): Move add_tree call to semantics.c.
2287         * parse.y (return_init): Use finish_named_return_value.
2288         (for.init.statement): Use finish_expr_stmt.
2289         * parse.c: Regenerated.
2290         * pt.c (do_pushlevel): Move to semantics.c.
2291         (do_poplevel): Likewise.
2292         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
2293         (tsubst_expr): Don't expand all the way to RTL here.  Handle
2294         RETURN_INIT and CTOR_INITIALIZER.
2295         (instantiate_decl): Call expand_body after tsubst'ing into
2296         DECL_SAVED_TREE.
2297         * semantics.c (expand_stmts): New function.
2298         (expanding_p): New variable.
2299         (last_expr_type): Likewise.
2300         (finish_expr_stmt): Use building_stmt_tree.
2301         (begin_if_stmt): Likewise.
2302         (finish_if_stmt_cond): Likewise.
2303         (finish_then_clause): Likewise.
2304         (begin_else_clause): Likewise.
2305         (finish_else_clause): Likewise.
2306         (begin_while_stmt): Likewise.
2307         (finish_while_stmt_cond): Likewise.
2308         (finish_while_stmt): Likewise.
2309         (finish_do_body): Likewise.
2310         (finish_do_stmt): Likewise.
2311         (finish_return_stmt): Likewise.
2312         (begin_for_stmt): Likewise.
2313         (fnish_for_init_stmt): Likewise.
2314         (finish_for_cond): Likewise.
2315         (finish_for_expr): Likewise.
2316         (finish_for_stmt): Likewise.
2317         (finish_break_stmt): Likewise.
2318         (finish_continue_stmt): Likewise.
2319         (finish_switch_cond): Likewise.
2320         (finish_switch_stmt): Likewise.
2321         (finish_case_label): Call add_tree here if necessary.
2322         (finish_goto_statement): Use building_stmt_tree.
2323         (begin_try_block): Likewise.
2324         (begin_function_try_block): Likewise.
2325         (finish_try_block): Likewise.
2326         (finish_function_try_block): Likewise.
2327         (finish_handler_sequence): Likewise.
2328         (finish_function_handler_sequence): Likewise.
2329         (begin_handler): Likewise.
2330         (finish_handler_parms): Likewise.
2331         (finish_handler): Likewise.
2332         (begin_compound_stmt): Likewise.
2333         (finish_compound_stmt): Likewise.
2334         (finish_asm_stmt): Likewise.
2335         (finish_label_stmt): Likewise.
2336         (finish_named_return_value): New function.
2337         (setup_vtbl_ptr): Moved here from decl2.c.
2338         (do_pushlevel): Moved here from pt.c.
2339         (do_poplevel): Likewise.
2340         (begin_stmt_expr): Use building_stmt_tree.
2341         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
2342         when building_stmt_tree.
2343         (begin_stmt_tree): New function.
2344         (finish_stmt_tree): Likewise.
2345         (expand_stmt): Likewise.
2346         (expand_body): Likewise.
2347         * tree.c (build_cplus_method_type): Make sure the argument types
2348         end up on the same obstack as the METHOD_TYPE.
2349         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
2350         THROW_EXPR, STMT_EXPR.
2351         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
2352         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
2353         sorry, if an unsupported node is encountered.
2354         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
2355         (c_expand_return): Don't call add_tree here.
2356         
2357 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
2359         * pt.c (check_default_tmpl_args): Don't check in local scopes.
2360         (tsubst_decl): Make sure the declaration is on a saveable
2361         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
2362         variable.
2363         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
2364         
2365 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
2367         Speed up Koenig lookup.
2368         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
2369         to return namespaces we've looked at.
2370         * decl2.c (lookup_using_namespace): Likewise.
2371         (add_function): Don't call ovl_member.
2372         (lookup_arg_dependent): Initialize k.namespaces to the list of 
2373         namespaces seen in unqualified lookup.
2374         * call.c (equal_functions): Move here from tree.c.
2375         (joust): Use it to handle duplicate candidates.
2376         * tree.c (ovl_member): Use ==.
2378 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
2380         * cp-tree.def (DECL_STMT): Make it smaller.
2381         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
2382         (lang_decl): ... here.  Add next.
2383         (DECL_SAVED_TREE): Adjust accordingly.
2384         (DECL_IMPLICIT_TYPEDEF_P): New macro.
2385         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
2386         (DECL_STMT_DECL): Likewise.
2387         (create_implicit_typedef): New function.
2388         (maybe_push_decl): Likewise.
2389         (tsubst_default_argument): New function.
2390         (at_function_scope_p): Likewise.
2391         (add_decl_stmt): Likewise.
2392         (push_permanent_obstack): Likewise.
2393         * call.c (convert_default_arg): Use tsubst_default_argument.
2394         * class.c (add_method): Use push_permanent_obstack.
2395         (build_self_reference): Create a TEMPLATE_DECL for the
2396         self-reference, if necessary.
2397         * decl.c (pseudo_global_level_p): Only look at the current binding
2398         level.
2399         (push_binding): Use push_permanent_obstack.
2400         (create_implicit_typedef): New function.
2401         (pushtag): Use it.
2402         (duplicate_decls): Use push_permanent_obstack.
2403         (maybe_push_decl): New function.
2404         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
2405         (start_decl_1): Remove dead code.
2406         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
2407         pseudo_global_level_p.
2408         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
2409         template.
2410         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
2411         pseudo_global_level_p.
2412         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
2413         a template.
2414         (get_sentry): Use push_permanent_obstack.
2415         * dump.c (dequeue_and_dump): Enable DECL_STMT.
2416         * except.c (call_eh_info): Use push_permanent_obstack.
2417         (build_eh_type_ref): Likewise.
2418         (do_pop_exception): Likewise.
2419         (expand_eh_spec): Likewise.
2420         (alloc_eh_object): Likewise.
2421         (expand_throw): Likewise.
2422         * init.c (build_java_class_ref): Likewise.
2423         * lex.c (get_time_identifier): Likewise.
2424         (free_lang_decl_chain): Correct type.
2425         (retrofit_lang_decl): Adjust accordingly.
2426         (build_lang_field_decl): Likewise.
2427         * lex.h (free_lang_decl_chain): Likewise.
2428         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
2429         * parse.c: Regenerated.
2430         * pt.c (tsubst_default_arguments): New function.
2431         (retrieve_local_specialization): Likewise.
2432         (register_local_specialization): Likewise.
2433         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
2434         pseudo_global_level_p to determine whether or not a template is
2435         primary.
2436         (lookup_template_class): Likewise.  Use create_implicit_typedef.
2437         (instantiate_class_template): Call tsubst_default_arguments for
2438         member functions, if appropriate.
2439         (tsubst_default_argument): New function.
2440         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
2441         * search.c (at_function_scope_p): New function.
2442         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
2443         (finish_label_stmt): Likewise.
2444         (add_decl_stmt): New function.
2445         (begin_class_definition): Likewise.
2446         (finish_typeof): Likewise.
2447         * tree.c (copy_template_template_parm): Likewise.
2448         (copy_to_permanent): Likewise.
2449         (push_permanent_obstack): Define.
2450         (mark_addressable): Use it.
2451         * typeck.c (mark_addressable): Likewise.
2452         
2453 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
2455         * cp-tree.h (init_cplus_unsave): New.
2456         (cplus_unsave_expr_now): New.
2457         * lex.c (init_parse): Call init_cplus_unsave.
2458         * tree.c (init_cplus_unsave): New.
2459         (cplus_unsave_expr_now): New.
2461 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
2463         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
2464         decl_constant_value to simplify array bounds.
2466 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
2468         * lang-options.h: Add -fms-extensions.
2469         * cp-tree.h: Declare flag_ms_extensions.
2470         * decl2.c: Define it.
2471         * class.c (instantiate_type): Don't complain about taking the address
2472         of a bound member function if -fms-extensions.
2473         * typeck.c (build_unary_op): Likewise.
2474         * decl.c (grokdeclarator): Or about implicit int.
2475         * init.c (resolve_offset_ref): Or about implicit '&'.
2477 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
2479         * cp-tree.h (minimal_parse_mode): Remove.
2480         (finish_label_stmt): New function.
2481         * decl.c (saved_scope): Remove minimal parse mode.
2482         (maybe_push_to_top_level): Don't save it.
2483         (pop_from_top_level): Don't restore it.
2484         (define_label): Split out template-handling code to semantics.c.
2485         (start_decl): Don't use minimal_parse_mode.
2486         (cp_finish_decl): Likewise.
2487         (start_function): Don't increment it.
2488         (store_return_init): Don't use it.
2489         (finish_function): Don't decrement it.
2490         * parse.y (label_colon): Use finish_label_stmt throughout.
2491         * parse.c: Regenerated.
2492         * pt.c (minimal_parse_mode): Don't define it.
2493         (tsubst_expr): Use finish_label_stmt.
2494         * semantics.c (finish_label_stmt): New function.
2496         * dump.c (queue): Be careful when computing bitmasks.
2497         (dequeue_and_dump): Describe binfos as binfos, not as
2498         vectors.
2499         
2500         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
2501         throughout.     
2502         * parse.c: Regenerated.
2503         
2504         * Make-lang.in (CXX_SRCS): Remove sig.c.
2505         * Makefile.in (CXX_OBJS): Remove sig.o.
2506         (sig.o): Remove.
2507         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
2508         (CPTI_SIGNATURE_TYPE): Likewise.
2509         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
2510         (opaque_type_node): Likewise.
2511         (signature_type_node): Likewise.
2512         (sigtable_entry_type): Likewise.
2513         (flag_handle_signatures): Likewise.
2514         (lang_type): Remove is_signature, is_signature_pointer,
2515         is_signature_reference, has_opaque_typedecls,
2516         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
2517         signature_pointer_to, signature_reference_to.
2518         (IS_SIGNATURE): Remove.
2519         (SET_SIGNATURE): Remove.
2520         (CLEAR_SIGNATURE): Remove.
2521         (IS_SIGNATURE_POINTER): Remove.
2522         (IS_SIGNATURE_REFERENCE): Remove.
2523         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
2524         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
2525         (CLASSTYPE_SIGNATURE): Remove.
2526         (SIGNATURE_TYPE): Remove.
2527         (SIGNATURE_METHOD_VEC): Remove.
2528         (SIGNATURE_POINTER_TO): Remove.
2529         (SIGNATURE_REFERENCE_TO): Remove.
2530         (lang_decl_flags): Remove is_default_implementation.  Rename
2531         memfunc_pointer_to to saved_tree.
2532         (IS_DEFAULT_IMPLEMENTATION): Remove.
2533         (DECL_MEMFUNC_POINTER_TO): Remove.
2534         (DECL_MEMFUNC_POINTING_TO): Remove.
2535         (DECL_SAVED_TREE): Adjust definition.
2536         (tag_types): Remove signature_type_node.
2537         (SIGNATURE_FIELD_NAME): Remove.
2538         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
2539         (SIGNATURE_OPTR_NAME): Likewise.
2540         (SIGNATURE_SPTR_NAME): Likewise.
2541         (SIGNATURE_POINTER_NAME): Likewise.
2542         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
2543         (SIGNATURE_REFERENCE_NAME): Likewise.
2544         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
2545         (SIGTABLE_PTR_TYPE): Likewise.
2546         (SIGTABLE_NAME_FORMAT): Likewise.
2547         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
2548         (SIGTABLE_TAG_NAME): Likewise.
2549         (SIGTABLE_VB_OFF_NAME): Likewise.
2550         (SIGTABLE_VT_OFF_NAME): Likewise.
2551         (finish_base_specifiers): Change prototype.
2552         (build_signature_pointer_type): Remove.
2553         (build_signature_reference_type): Remove.
2554         (build_signature_pointer_constructor): Remove.
2555         (build_signature_method_call): Remove.
2556         (build_optr_ref): Likewise.
2557         (append_signature_fields): Likewise.
2558         (signature_error): Likewise.
2559         * call.c (build_this): Remove signature support.
2560         (build_over_call): Likewise.
2561         (build_new_method_call): Likewise.
2562         * class.c (add_implicitly_declared_members): Likewise.
2563         (finish_struct_1): Likewise.
2564         (finish_struct): Likewise.
2565         * cvt.c (cp_convert_to_pointer): Likewise.
2566         (convert_to_pointer_force): Likewise.
2567         (ocp_convert): Likewise.
2568         * decl.c (sigtable_decl_p): Remove.
2569         (init_decl_processing): Remove support for signatures.
2570         (cp_finish_decl): Likewise.
2571         (grokdeclarator): Likewise.
2572         (grokparms): Likewise.
2573         (xref_tag): Likewise.
2574         (start_function): Likewise.
2575         (start_method): Likewise.
2576         * decl2.c (finish_sigtable_vardecl): Remove.
2577         (flag_handle_signatures): Remove.
2578         (lang_f_options): Remove handle-signatures.
2579         (grokfield): Remove support for signatures.
2580         (grokbitfield): Likewise.
2581         (finish_file): Likewise.
2582         (reparse_absdcl_as_casts): Likewise.
2583         * error.c (dump_type_real): Likewise.
2584         (dump_function_decl): Likewise.
2585         * friend.c (make_friend_class): Likewise.
2586         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
2587         * hash.h: Regenerated.
2588         * init.c (build_new_1): Remove support for signatures.
2589         * lang-options.h: Remove -fhandle-signatures,
2590         -fno-handle-signatures. 
2591         * lex.c (init_parse): Remove support for signatures.
2592         (yyprint): Likewise.
2593         * lex.h (rid): Remove RID_SIGNATURE.
2594         * method.c (build_decl_overload_real): Remove support for
2595         signatures. 
2596         (hack_identifier): Likewise.
2597         * parse.y (base_class): Likewise.
2598         (base_class.1): Likewise.
2599         (access_specifier): Likewise.
2600         * search.c (lookup_member): Likewise.
2601         * semantics.c (finish_qualified_object_call_expr): Likewise.
2602         (finish_template_type_parm): Likewise.
2603         (begin_class_definition): Likewise.
2604         (finish_base_specifier): Likewise.
2605         * sig.c: Remove.
2606         * tree.c (build_cplus_method_type): Remove support for signatures.
2607         * typeck.c (require_complete_type): Likewise.
2608         (c_sizeof): Likewise.
2609         (c_alignof): Likewise.
2610         (build_object_ref): Likewise.
2611         (build_component_ref): Likewise.
2612         (build_indirect_ref): Likewise.
2613         (build_c_cast): Likewise.
2614         (build_modify_expr): Likewise.
2615         (convert_for_initialization): Likewise.
2616         * typeck2.c (signature_error): Remove.
2617         (store_init_value): Remove support for signatures.
2618         (digest_init): Likewise.
2619         (build_x_arrow): Likewise.
2620         (build_functional_cast): Likewise.
2621         * xref.c (GNU_xref_decl): Likewise.
2622         
2623 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
2625         * lex.c (do_identifier): Remove unnecessary lookup of class field.
2627 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
2629         * decl2.c (set_decl_namespace): Do not complain about non-matching
2630         decls if processing a template.
2632 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
2634         * decl.c (build_ptrmemfunc_type): Handle qualified
2635         pointer-to-member types here.
2636         * tree.c (cp_build_qualified_type_real): Simplify handling here.
2638 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2640         * lex.c (lang_identify): Likewise.
2642 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
2644         * Makefile.in: Update dependencies.
2645         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
2646         NULL_RTX.
2647         * decl.c: Include "function.h"
2648         (cleanup_label, return_label): Delete declarations.
2649         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
2650         (finish_function): Rename last_parm_insn variable to
2651         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
2652         * decl2.c: Include "function.h".
2653         (rtl_expr_chain): Delete declaration.
2654         * method.c: Include "function.h"
2655         * tree.c (build_vbase_pointer_fields): Don't initialize
2656         DECL_SAVED_INSNS with NULL_RTX.
2657         * typeck.c: Include "function.h"
2659 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
2661         * semantics.c (begin_function_try_block, finish_function_try_block,
2662         finish_function_handler_sequence): New fns.
2663         * parse.y (function_try_block): Use them.
2664         * pt.c (instantiate_decl): Likewise.
2666         * cp-tree.h: Declare in_function_try_handler.
2667         * decl.c: Define it.
2668         (start_function): Clear it.
2669         (struct cp_function, push_cp_function_context): Save it.
2670         (pop_cp_function_context): Restore it.
2671         * parse.y (function_try_block): Set and clear it.
2672         * except.c (expand_end_catch_block): Rethrow if we reach the end
2673         of a function-try-block handler in a ctor or dtor.
2674         * typeck.c (c_expand_return): Complain about returning from a
2675         function-try-block handler of a ctor.
2677         * parse.y (function_try_block): Call end_protect_partials
2678         before expand_start_all_catch.
2680 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
2682         * decl.c (struct binding_level): Add eh_region field.
2683         (push_binding_level): Set it.
2684         (define_label): Complain about jumping into an EH block.
2686         * ptree.c (print_lang_type): Print the real type of a PMF.
2687         Print what exceptions a fn type throws.
2689 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2691         * class.c (count_fields, add_fields_to_vec): Add static prototype.
2693         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
2694         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
2695         char*.
2697         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
2698         Constify a char*.
2700         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
2701         char*.
2703         * dump.c (queue_and_dump_index, dump_int, dump_string,
2704         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
2705         a char*.
2706         (dump_stmt): Add static prototype.
2708         * errfn.c (cp_thing): Constify a char*.
2710         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
2711         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
2712         dump_expr): Constify a char*.
2714         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
2715         read_line_number): Add static prototype.
2716         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
2717         (real_yylex): Move label `letter' into the scope where it is used.
2719         * method.c (build_mangled_template_parm_index, build_overload_int,
2720         build_decl_overload_real, get_id_2): Constify a char*.
2722         * search.c (check_final_overrider): Make static.
2724         * typeck.c (composite_pointer_type): Constify a char*.
2726 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
2728         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
2729         we're looking at a class.
2731         * decl.c (lookup_name_real): Set the complain flag if we're
2732         looking for a namespace member.
2734         * lex.c (real_yylex): We can have a number with no digits.
2736         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
2738         * search.c (binfo_from_vbase): New fn.
2739         * cp-tree.h: Declare it.
2740         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
2741         from pointer to member of virtual base.  
2742         * typeck.c (get_delta_difference): Likewise.
2744 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
2746         * pt.c (tsubst): Use build_index_type to build in-template array
2747         index type.  Fixes g++.oliva/dwarf1.C.
2748         * decl.c (grokdeclarator): Likewise, just for consistency, as it
2749         doesn't seem to trigger the bug without it.
2751 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
2753         * typeck2.c (add_exception_specifier): Use complete_type.
2755 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
2757         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
2758         (dump_binary_op): Bulletproof.
2759         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
2760         * tree.c (search_tree): Don't enumerate all the nodes of classes
2761         `1', `2', and `<'; handle them generically.  Don't be sorry about
2762         "unrecognized tree codes"; just abort.
2763         (no_linkage_check): Don't do linkage checks for templates.
2764         
2765         * tree.c (cp_build_qualified_type_real): Handle
2766         pointer-to-member-function types correctly.
2768 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
2770         * decl.c (pushdecl): Only give an error for shadowing a parm 
2771         from *this* function.
2773 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
2775         * typeck2.c: Update URLs and mail addresses.
2777 1999-08-04  Nathan Sidwell  <nathan@acm.org>
2779         * cp-tree.h (empty_except_spec): New global var.
2780         (compexcepttypes): Remove prototype.
2781         (comp_except_specs): Prototype new global function.
2782         (add_exception_specifier): Prototype new global function.
2783         * decl.c (empty_except_spec): Define new global var.
2784         (duplicate_decls): Use comp_except_specs, reword error message.
2785         (init_decl_processing): Initialize empty_except_spec.
2786         Adjust build_exception_variant calls.
2787         * parse.y (exception_specification_opt): Use empty_except_spec.
2788         (ansi_raise_identifier): Call check_for_new_type.
2789         (ansi_raise_identifiers): Use add_exception_specifier.
2790         * pt.c (tsubst): Use add_exception_specifier to build exception
2791         specifier.
2792         * search.c (check_final_overrider): New static function, broken
2793         out of get_matching_virtual. Check throw specifiers, reword
2794         diagnostics.
2795         (get_matching_virtual): Use check_final_overrider.
2796         * tree.c (build_exception_variant): Use comp_except_specs.
2797         * typeck.c (compexcepttypes): Remove.
2798         (comp_except_types): New static function, helper for
2799         comp_except_specs. Compare two types as exception specifiers.
2800         (comp_except_specs): New global function, compare two exception
2801         specifiers.
2802         (comptypes): Adjust for comp_except_specs.
2803         * typeck2.c (add_exception_specifier): New global function.
2804         
2805         * class.c (check_for_override): Reword error message.
2807 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2809         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
2810         * cp-tree.h (struct lang_type): Added non_pod_class flag.
2811         (CLASSTYPE_NON_POD_P): New macro to access it.
2812         * class.c (finish_struct_1): Determine non-PODness.
2813         Check for arrays of pointers (-Weffc++).
2814         Remove array inspection duplicated code.
2815         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
2816         Use CLASSTYPE_NON_POD_P.
2818 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2820         * class.c (duplicate_tag_error): Preserve template information.
2822 1999-08-03  Nathan Sidwell  <nathan@acm.org>
2824         * decl.c (start_enum): Show location of previous definition.
2825         * parse.y (enumlist_opt): New reduction.
2826         (structsp): Simplify enum rules to use enumlist_opt.
2828 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
2830         * lex.c (yyprint): Handle PFUNCNAME.
2832         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
2833         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
2835 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
2837         * decl.c (start_decl): Set attributes before duplicate_decls call.
2839 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
2841         * Make-lang.in (CXX_SRCS): Add dump.c.
2842         * Makefile.in (CXX_OBJS): Add dump.o.
2843         (dump.o): New target.
2844         * cp-tree.h (DECL_CONV_FN_P): Document.
2845         (DECL_OVERLOADED_OPERATOR_P): New function.
2846         (TYPE_PTRMEM_CLASS_TYPE): New macro.
2847         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2848         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
2849         (ASM_VOLATILE_P): New macro.
2850         (STMT_LINENO): Likewise.
2851         (cp_namespace_decls): New function.
2852         (dump_node_to_file): New function.
2853         * decl.c (cp_namespace_decls): New function.
2854         (walk_namespaces_r): Use it.
2855         (wrapup_globals_for_namespace): Likewise.
2856         * decl2.c (flag_dump_translation_unit): New variable.
2857         (lang_decode_option): Handle -fdump-translation-unit.
2858         (finish_file): If flag_dump_translation_unit is set, dump the
2859         translation unit.
2860         * dump.c: New file.
2861         * lang-options.h: Add -fdump-translation-unit.
2862         * pt.c (tsubst_template_parms): Robustify.
2863         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
2864         (tsubst_expr): Use STMT_LINENO.
2865         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
2866         for invalid cv-qualifiers even while building templates.
2867         
2868 1999-08-02  Richard Henderson  <rth@cygnus.com>
2870         * call.c: Include defaults.h instead of expr.h.
2871         * decl.c: Likewise.
2872         * pt.c: Likewise.
2873         * typeck.c: Include defaults.h.
2875 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
2877         * lex.c (errorcount, sorrycount): Don't declare.
2878         * repo.c (errorcount, sorrycount): Likewise.
2879         * typeck2.c (errorcount, sorrycount): Likewise.
2881 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
2883         * call.c (convert_default_arg, build_over_call): Change all uses of
2884         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
2885         Ensure expr.h is included.
2886         * decl.c (grokparams): Ditto.
2887         * pt.c (tsubst_decl): Ditto.
2888         * typeck.c (convert_arguments): Ditto.
2890 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
2892         * class.c (mark_overriders): Fix order of args to overrides.
2893         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
2894         functions with the same name.
2896 1999-08-02  Richard Henderson  <rth@cygnus.com>
2898         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
2900 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
2902         * call.c (build_conditional_expr): Fix typo in comment.
2904 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
2906         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
2907         case_stack; use in_control_zone_p.
2908         * typeck.c (c_expand_return): Likewise.
2910 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
2912         * except.c (catch_clauses): Delete declaration.
2914 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
2916         * call.c (build_conditional_expr): Call convert_from_reference to
2917         avoid reference/non-reference type confusion.  Fix typo.
2919 1999-07-30  Richard Henderson  <rth@cygnus.com>
2921         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
2922         * cp-tree.h (initializer_constant_valid_p): Remove.
2924 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
2926         * call.c (conditional_conversion): Don't build BASE_CONVs for
2927         conversions between things that have the same type.
2928         (build_conditional_expr): Tweak.
2929         (convert_like): Some BASE_CONVs really do require the generation
2930         of code.
2931         
2932         * init.c (perform_member_init): Don't go through build_modify_expr
2933         for simple initializations.
2935 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
2937         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
2938         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
2939         virtual functions and MI.  Simplify.
2941         * method.c: Remove prototype for largest_union_member.
2942         * pt.c (determine_specialization): Fix uninitialized warning.
2943         * lex.c (real_yylex): Likewise.
2945 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
2947         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
2948         here too.
2950         * cp-tree.h (BINFO_VIRTUALS): Document new format.
2951         * class.c (modify_one_vtable): Change prototype accordingly.
2952         (modify_all_vtables): Likewise.
2953         (modify_all_direct_vtables): Likewise.
2954         (modify_all_indirect_vtables): Likewise.
2955         (build_vtable_entry_for_fn): New function.
2956         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
2957         (modify_vtable_entry): Likewise.
2958         (add_virtual_function): Likewise.
2959         (build_vtbl_initializer): New function.
2960         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
2961         (fixup_vtable_deltas1): Likewise.
2962         (fixup_vtable_deltas): Likewise.
2963         (override_one_vtable): Likewise.
2964         (finish_struct_1): Likewise.
2966         * error.c (dump_expr): Likewise.
2967         * search.c (get_abstract_virtuals_1): Likewise.
2968         (get_abstract_virtuals): Likewise.
2969         (expand_upcast_fixups): Likewise.
2970         * tree.c (debug_binfo): Likewise.
2971         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
2972         __pure_virtual here.
2973         
2974 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
2976         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
2977         as per 1999-07-26 change.
2979         * typeck.c (c_sizeof): Don't allow non-static data members.
2980         (expr_sizeof): Likewise.
2982 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
2984         * input.c (feed_input): Only touch lineno and input_filename
2985         if !USE_CPPLIB.  Save the old values before setting the new ones.
2987         * input.c (feed_input): Add file, line parms.
2988         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
2989         (real_yylex): Check linemode before input_redirected().
2991         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
2992         from op new to warning.
2994 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
2996         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
2997         * call.c: All uses changed.
2998         * typeck.c: Likewise.
3000 1999-07-26  Nathan Sidwell  <nathan@acm.org>
3002         * exception.cc (__cplus_type_matcher): Match __eh_matcher
3003         prototype.
3005 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
3007         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
3008         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
3009         (strip_top_quals): Declare.
3010         (ncp_convert): Likewise.
3011         (type_after_usual_arithmetic_converions): Likewise.
3012         (composite_pointer_type): Likewise.
3013         * call.c (strip_top_quals): Don't make it static.
3014         (promoted_arithmetic_type_p): New function.
3015         (conditional_conversion): Likewise.
3016         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
3017         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
3018         for converting a type to itself.
3019         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
3020         (implicit_conversion): Make sure the from and to types are
3021         complete.
3022         (add_builtin_candidate): Correct handling of ?: operator.
3023         (add_builtin_candidates): Improve documentation.
3024         (build_conditional_expr): New function.
3025         (can_convert): Implement in terms of can_convert_arg.
3026         (ncp_convert): New function.
3027         * typeck.c (type_after_usual_arithmetic_conversions): New
3028         function, split out from common_type.
3029         (composite_pointer_type): New function, split out from
3030         build_conditional_expr.
3031         (common_type): Use type_after_usual_arithmetic_conversions.
3032         Remove redundant attribute merging.
3033         (comptypes): Tidy.  Handle COMPLEX_TYPE.
3034         (build_binary_op_nodefault): Use null_ptr_cst_p.
3035         (build_conditional_expr): Remove.
3036         (convert_for_assignment): Use new conversion functions.
3037         
3038         * cp-tree.h (abstract_virtuals_error): Change declaration.
3039         * typeck2.c (abstract_virtuals_error): Check to see if an error
3040         ocurred, and return a boolean value accordingly.
3041         (build_functional_cast): Adjust accordingly.
3042         * class.c (finish_struct_1): Likewise.
3043         * cvt.c (ocp_convert): Likewise.
3044         * decl.c (cp_finish_decl): Likewise.
3045         (grokparams): Likewise.
3046         (grok_op_properties): Likewise.
3047         (start_function): Likewise.
3048         * init.c (build_new_1): Likewise.
3050         * pt.c (unify): Don't get confused by pointers-to-member functions.
3052         * search.c (build_cplus_new): Robustify.
3053         
3054 1999-07-24  Richard Henderson  <rth@cygnus.com>
3056         * gxx.gperf (__builtin_va_arg): New.
3057         * parse.y (VA_ARG): New token.
3058         (unary_expr): Recognize it.
3060 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
3062         * g++FAQ.texi: Deleted per Joe Buck's request.
3063         * Makefile.in: Corresponding changes.
3065 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
3067         * lex.c: Sync with C frontend.
3068         (whitespace_cr): New fn.
3069         (skip_white_space): Use it.
3070         (init_parse): Reorder.
3071         (yyprint): Support CONSTANT.
3072         (pragma_getc, pragma_ungetc): Bring back.
3073         (read_line_number): Change in_system_header directly.
3074         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
3075         (parse_float): Update to C version.
3076         (yylex): Handle '$' under the letter case.
3077         Remove looking_for_typename handling.
3078         Support hex floating point constants.
3079         Follow C's lead for choosing type of integer constants.
3080         Rearrange stuff to match C frontend.
3081         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
3082         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
3084 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
3086         * call.c (reference_binding): Tweak.
3087         (mayble_handle_implicit_object): Use direct_reference_binding to
3088         create the right implicit conversion sequence.
3090 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
3092         * pt.c (convert_nontype_argument): Don't call decl_constant_value
3093         if we're converting to a reference type.
3095         * call.c (NEED_TEMPORARY_P): New macro.
3096         (standard_conversion): Set it, for derived-to-base conversions.
3097         (reference_related_p): New function.
3098         (reference_compatible_p): Likewise.
3099         (convert_class_to_reference): Likewise.
3100         (direct_reference_binding): Likewise.
3101         (reference_binding): Rework for standards-compliance.
3102         (convert_like): Adjust accordingly.
3103         (maybe_handle_ref_bind): Simplify; the right conversion sequences
3104         are now built up in reference_binding.
3105         (initialize_reference): New function.
3106         * cp-tree.h (ICS_USER_FLAG): Document.
3107         (ICS_THIS_FLAG): Likewise.
3108         (ICS_BAD_FLAG): Likewise.
3109         (NEED_TEMPORARY_P): Likewise.
3110         (cp_lvalue_kind): New type.
3111         (real_lvalue_p): Return it.
3112         * error.c (dump_expr): Provide more accurate representation for
3113         AGGR_INIT_EXPRs.
3114         * init.c (expand_default_init): Do not try to perform implicit
3115         conversions for a brace-enclosed initializer.
3116         * search.c (lookup_conversions): Document.
3117         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
3118         appropriately.
3119         (real_lvalue_p): Adjust accordingly.
3120         (lvalue_p): Likewise.
3121         (build_cplus_new): Don't allow the creation of an abstract class.
3122         * typeck.c (convert_for_initialization): Use initialize_reference.
3123         
3124 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
3126         * lex.c (real_yylex) : Correct the test for overflow when lexing
3127         integer literals.
3129 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
3131         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
3132         not DECL_BUILT_IN, to determine if a function is internally declared.
3133         (duplicate_decls): Likewise.  Improve handling of builtins.
3134         (push_overloaded_decl): Remove special handling of builtins.
3136         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
3138         * decl.c (grokdeclarator): Pull out decl_constant_value in
3139         templates, too.
3141         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
3142         * cp-tree.h, pt.c, semantics.c: Adjust.
3143         * method.c (largest_union_member): Remove.
3145         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
3147         * lex.c (token_getch, token_put_back): New fns.
3148         (real_yylex): Use them.
3150         * lex.c (lang_init): Generalize.
3151         (lang_init_options): Tell cpplib this is C++.
3152         (nextchar): Remove.  Replace uses with put_back.
3153         (skip_white_space): Handle linemode here.  Optimize for cpplib.
3154         (extend_token_buffer_to): New fn.
3155         (extend_token_buffer): Use it.
3156         (read_line_number, check_newline): Just deal with tokens.
3157         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
3158         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
3159         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
3160         * parse.y (PAREN_STAR_PAREN): Remove.
3161         * input.c: Don't use the putback machinery with cpplib.
3162         (sub_getch): Fold back into getch.
3163         (getch): Don't handle linemode here.
3164         (feed_input): Unget any text in the token buffer.
3166         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
3167         nextyychar, nextyylval): Remove.
3169 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
3170             Jason Merrill  <jason@yorick.cygnus.com>
3172         * lex.c (indent_level): New variable.
3173         (init_parse): Set cpp_token to CPP_DIRECTIVE.
3174         (consume_string): Make this smart about USE_CPPLIB.
3175         (yyungetc): Use put_back function.
3176         (pragma_getc, pragma_ungetc): Functions deleted.
3177         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
3178         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
3179         pragma_ungetc.
3180         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
3181         Also, clean up cases where we redundantly set token_buffer[0].
3182         (read_line_number): New fn.
3183         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
3184         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
3185         (sub_getch): Conditionalize out code that's not appropriate if
3186         USE_CPPLIB.
3187         (put_back): Rewrite in case USE_CPPLIB is defined.
3188         (input_redirected): Ditto.
3190 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
3192         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
3193         c_global_trees and accessor macros defined in c-common.h.
3194         (cp_tree_index): New enumeration.
3195         (cp_global_trees): Declare new array.  Add accessor macros for it, and
3196         delete declarations of tree nodes replaced by it.
3197         (builtin_function): Delete macro, add declaration for new function.
3198         Include c-common.h.
3199         * decl.c: Delete definitions for tree nodes that were replaced by
3200         cp_global_trees and c_global_trees.
3201         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
3202         to generate the common builtins here.
3203         (builtin_function): New function.
3204         * decl2.c (abort_fndecl): Delete declaration.
3205         * except.c (expand_builtin_return_address): Delete declaration.
3206         (builtin_return_address_fndecl): Delete variable.
3207         (const_ptr_type_node): Delete declaration.
3208         * lex.c (cons_up_default_function): Delete declaration of
3209         void_list_node.
3210         * parse.y (void_list_node): Delete declaration.
3211         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
3212         Delete variables.
3213         (const_string_type_node): Delete declaration.
3214         * search.c (abort_fndecl): Delete declaration.
3215         * Makefile.in: Update dependencies.
3217 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
3219         * pt.c (check_default_tmpl_args): Move test for missing default
3220         arguments here, from ...
3221         (end_template_parm_list): Here.
3223 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
3225         * decl.c (lookup_nested_type): Remove.
3226         (pushtag): Don't call it.
3228 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
3230         * Makefile.in (INTERFACE): Bump to 2.
3232 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
3233         
3234         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
3235         instructions to gcc.gnu.org.  Removed e-mail address.
3237 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
3239         * pt.c (determine_specialization): Tighten error-checking.
3240         (end_template_parm_list): Likewise.
3242 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
3244         * pt.c (check_default_tmpl_args): Handle friends defined in the
3245         class just like member functions defined in the class.
3247 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
3248             Jason Merrill  <jason@yorick.cygnus.com>
3250         * cp-tree.h (struct lang_decl): Added field for storing sorted
3251         FIELD_DECLs (used in TYPE_DECLs).
3252         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
3253         (DECL_SORTED_FIELDS): New macro.
3254         * class.c (method_name_cmp): New function.
3255         (finish_struct_methods): Modified to support sorting and searching
3256         methods.
3257         (finish_struct_anon): Changed code in inner loop to use ELT rather 
3258         than UELT (which required an extra indirection for every reference).
3259         (field_decl_cmp): New function to support sorting FIELD_DECLs.
3260         (finish_struct_1): Sort fields.
3261         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
3262         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
3263         Also, switch to using array indexing rather than a changing pointer.
3264         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
3265         DECL_SORTED_FIELDS.
3267 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
3269         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
3270         casts in system headers or extern "C" blocks.
3272         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
3273         errors to pedwarn.
3275 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
3277         * decl2.c (write_virtuals): Deleted declaration.
3278         * cp-tree.h (write_virtuals): Deleted extern declaration.
3279         * class.c (finish_struct_1): Removed #if 0'd code that mentions
3280         write_virtuals.
3281         * semantics.c (begin_class_definition): Rewrite code to not depend
3282         on write_virtuals.
3284         * lex.c (cp_pragma_interface): New function.
3285         (cp_pragma_implementation): Likewise.
3286         (handle_cp_pragma): Call them.
3288         * typeck.c (comptypes): Simplify C code in look_hard.
3290         * xref.c (PALLOC): Use xcalloc, not calloc.
3291         (SALLOC): Use xmalloc, not malloc.
3293         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
3295         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
3296         is NO_DEBUG.
3298         * decl.c (duplicate_decls): If a redeclaration doesn't match the
3299         initial declaration, then don't save the inline info and by all
3300         means don't mark the function as a builtin function.
3302         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
3303         CURRENT_CLASS_TYPE is 0.
3305         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
3306         NULL_TREE.
3308         * ptree.c (print_lang_type): Added vtable-needs-writing.
3310 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
3312         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
3314 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
3316         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
3317         Merged into c-common.
3319 1999-07-05  Dave Brolley  <brolley@cygnus.com>
3321         * lex.c (errorcount): Declare it.
3322         (finish_parse): Update errorcount for when using CPPLIB.
3324 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
3326         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
3327         parameters.
3328         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
3329         * decl.c (push_class_binding): Use it.
3330         (lookup_name_real): Likewise.
3332 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
3334         * cp-tree.h (widest_integer_literal_type_node,
3335         widest_unsigned_literal_type) : New.
3336         * decl.c (widest_integer_literal_type_node,
3337         widest_unsigned_literal_type) : New.
3338         (init_decl_processing): Handle/use the two new types.
3339         * lex.c (real_yylex): Same.
3340         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
3341         Same. 
3343 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
3345         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
3346         to anonymous cv-qualified types.
3348 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
3350         * lex.c (real_yylex) : Change integer literal overflow handling to
3351         be like c-lex.c.
3353         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
3355 1999-06-28  Richard Henderson  <rth@cygnus.com>
3357         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
3359 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
3361         * error.c (dump_type_real): Handle TREE_LIST again.
3363         * typeck.c (comp_target_parms): Don't complain about 
3364         converting from () to (...) if !flag_strict_prototype.
3366         * decl.c (grokdeclarator): Update the names of all variants when
3367         de-anonymizing.
3369 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
3371         * init.c (expand_aggr_vbase_init): Rename to
3372         construct_virtual_bases.  Conditionalize construction here, 
3373         rather than ...
3374         (emit_base_init): Here.
3376 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
3378         * semantics.c (finish_asm_statement): Apply decay conversions to
3379         input operands.
3381         * decl.c (expand_static_init): When building an anonymous function
3382         for use with atexit, compute its body before and after entering
3383         the function.
3385         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
3386         EXIT_EXPR.
3387         
3388 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
3390         * init.c (expand_aggr_vbase_init): Add flag parameter.
3391         (build_partial_cleanup_for): Remove, inlining into ..
3392         (expand_cleanup_for_base): ... here.  Take flag parameter.
3393         (emit_base_init): Pass the in_chrg parameter to
3394         emit_aggr_vbase_init. 
3395         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
3396         
3397 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
3399         * decl2.c (import_export_decl): Use same_type_p, rather than
3400         relying on pointer-equality for types.
3402         * method.c (do_build_copy_constructor): Simplify.
3404         * call.c (build_method_call): Remove bogus code for two-argument
3405         delete.
3406         * init.c (build_new_1): Expand on comment, and remove dead code.
3408         * init.c (expand_cleanup_for_base): New function, split out
3409         from ...
3410         (emit_base_init): Here.
3411         (expand_aggr_vbase_init): Use it.
3413 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
3415         * cp-tree.h (class_cache_firstobj): Declare.
3416         (maybe_push_cache_obstack): Rename to push_cache_obstack.
3417         * class.c (permanent_obstack): Remove declaration.
3418         (class_cache_firstobj): Make it global.
3419         (add_method): Don't use permanent_obstack directly.
3420         (pushclass): Only free the class_cache_obstack if we know how far
3421         back to free it.
3422         (maybe_push_cache_obstack): Rename to push_cache_obstack.
3423         * decl.c: Remove dead comment.
3424         (saved_scope): Add class_cache_firstobj.
3425         (push_to_top_level): Save it.
3426         (pop_from_top_level): Restore it.
3427         (push_class_level_binding): Use push_cache_obstack, not
3428         maybe_push_cache_obstack.
3429         * search.c (push_class_decls): Likewise.
3430         
3431 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3433         * pt.c (tsubst_friend_function): Push into namespace of friend
3434         function before pushdecl'ing it.
3436 1999-06-14  Nathan Sidwell  <nathan@acm.org>
3438         * call.c (build_new_op): Remove REF_BIND from all operands.
3440 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
3442         * init.c (build_new_1): Look up operator delete even if there was
3443         no explicit new placement.
3445 1999-06-08  Nathan Sidwell  <nathan@acm.org>
3447         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
3448         of ...
3449         (build_throw): ... here. Call it.
3450         (process_start_catch_block): Call it.
3452 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
3454         * search.c (convert_pointer_to_single_level): Reimplement without
3455         using get_binfo.
3457 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
3459         * method.c (is_back_referenceable_type): Back-reference bools when
3460         not squangling.
3462 1999-06-07  Dave Brolley  <brolley@cygnus.com>
3464         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
3465         * input.c (putback_buffer): New structure type.
3466         (putback): Replaces putback_char member.
3467         (putback): Replaces putback_char static variable.
3468         (feed_input): Use putback.
3469         (end_input): Use putback.
3470         (sub_getch): Use putback.
3471         (put_back): Use putback.
3473 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
3475         * decl.c (grokdeclarator): Fix typo in last change.
3477 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
3479         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
3480         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
3482 1999-06-04  Nathan Sidwell  <nathan@acm.org>
3484         * except.c (build_throw): Check throw expression validity.
3486 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
3488         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
3489         just because flag_signed_bitfields is false.
3491 1999-06-03  Nathan Sidwell  <nathan@acm.org>
3493         * semantics.c (begin_class_definition): Update the struct's
3494         location here ...
3495         * class.c (finish_struct): ... rather than here.
3497         * decl.c (make_typename_type): Don't rely on uninitialized
3498         variable.
3500 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3502         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
3504 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
3506         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
3507         and friends rather than messing with current_obstack directly.
3508         (cp_build_qualified_type_real): Rework ARRAY_TYPE
3509         allocation to match practice throughout the rest of the 
3510         compiler.
3512 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
3514         * lex.c (make_lang_type): Create TYPE_BINFO for
3515         TEMPLATE_TYPE_PARMs just like for non-template types.
3517         * decl.c (start_decl): Move checks on initialization to ...
3518         (cp_finish_decl): Here.  Tidy formatting slightly.
3520 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
3522         * decl.c (add_binding): Don't complain about a redeclaration of a
3523         semantically identical typedef in a local scope.
3525 1999-05-28  Nathan Sidwell  <nathan@acm.org>
3527         * decl.c (complete_array_type): Allocate off same obstack. Fix
3528         DO_DEFAULT comment to match reality.
3530         * friend.c (make_friend_class): Fix diagnostic typo.
3532 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
3534         * decl.c (lookup_namespace_name): Handle getting a
3535         TEMPLATE_ID_EXPR.
3536         (expand_static_init): Don't call pushdecl for implicitly declared
3537         `atexit' used to register destructors.
3539 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
3541         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
3542         intialize a vtable.
3544         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
3545         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
3546         by combining TEMPLATE_INFO and LEVEL into a single union.
3547         (DECL_TEMPLATE_INFO): Reformat.
3548         (DECL_SAVED_TREE): Document.
3549         (DECL_TEMPLATE_INJECT): Remove.
3550         * class.c (finish_struct): Remove code to deal with
3551         DECL_TEMPLATE_INJECT. 
3553         * decl.c (maybe_process_template_type_declaration): Handle all new
3554         types in templates uniformly.
3555         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
3556         DECL_CONTEXT.
3557         * pt.c (lookup_template_class): Inject template instantiations of
3558         forward-declarations.
3559         (instantiate_class_template): Remove code processing
3560         DECL_TEMPLATE_INJECT.
3561         
3562         * pt.c (lookup_template_class): Tweak lookup to find member
3563         templates.
3565         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
3566         ASM_CV_QUAL.
3567         * semantics.c (finish_asm_stmt): Make strings permanent if they're
3568         used in a template.
3569         
3570 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
3572         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
3573         parts of pointer to data member types.
3575 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
3577         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
3578         and then make it look like `abort'.  Just use `abort' instead.
3579         
3580         * typeck.c (build_static_cast): Don't allow static_casts that cast
3581         away constness.
3582         (casts_away_constness_r): New function.
3583         (casts_away_constness): Likewise.
3585         * decl.c (lookup_tag): Remove code no longer needed after
3586         name-lookup improvements.
3587         * decl2.c (handle_class_head): Make error-recovery more robust.
3588         * friend.c (make_friend_class): Reject templated typename types.
3589         * lex.c (is_global): A template parameter isn't global.
3590         * parse.y (class_head): Robustify.
3591         * parse.c: Regenerated.
3592         
3593 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
3595         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
3596         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
3597         
3598         * cp-tree.h (push_nested_namespace): Declare.
3599         (pop_nested_namespace): Likewise.
3600         * decl.c (push_nested_namespace): New function.
3601         (pop_nested_namespace): Likewise.
3602         * pt.c (instantiate_class_template): Use them.
3604         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
3606         * cp-tree.h (cplus_expand_constant): Declare.
3607         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
3608         converted from one pointer-to-object type to another.
3609         * expr.c (cplus_expand_constant): Don't make it static.
3610         * typeck.c (build_component_ref): Don't crash when presented with
3611         a component which is a TEMPLATE_DECL.
3612         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
3613         cast from a pointer-to-member constant to its own type does not
3614         result in a valid non-type template argument.
3616 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
3617             Nathan Sidwell  <nathan@acm.org>
3618         
3619         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
3620         * cp-tree.h: Fix typo in documentation on pointers-to-members.
3621         (cp_build_qualified_type): Make it a macro.
3622         (cp_build_qualified_type_real): Declare.
3623         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
3624         problem with template parameters and restrict-qualification.
3625         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
3626         * hash.h: Regenerated.
3627         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
3628         the enumeration.
3629         (NORID): Remove definition.
3630         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
3631         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
3632         (fn_type_unification): Check that the function type resulting from
3633         the deduction is legal.
3634         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
3635         (unify): Use cp_build_qualified_type_real.
3636         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
3637         (cp_build_qualified_type): Rename to ...
3638         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
3639         and modify appropriately.
3640         
3641         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
3642         reveal optimization opportunities.
3644         * pt.c (tsubst): Don't issue error messages when we're not
3645         complaining, even if we see a qualified function type.
3646         (check_cv_quals_for_unify): Don't allow a qualified function
3647         type.
3649 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
3651         * class.c (instantiate_type): Downgrade errors for object-dependent
3652         memfn refs to pedwarn.
3654 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
3656         * decl.c (grokdeclarator): Don't treat [] as indicating a
3657         zero-sized array in a typedef.
3659         * call.c (build_object_call): Don't look at DECL_NAME for a type.
3660         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
3661         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
3663         * pt.c (for_each_template_parm): Rework to match documentation.
3664         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
3666 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
3668         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
3670         * class.c (finish_base_struct): Allow non-COM bases for COM classes
3671         except at the leftmost position.
3672         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
3673         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
3674         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
3676         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
3677         (build_cplus_new): Make sure that what we return is of the right type.
3679 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
3681         * cp-tree.h (make_ptrmem_cst): New function.
3682         * expr.c (cplus_expand_constant): Split out from ...
3683         (cplus_expand_expr): Here.  Use cplus_expand_constant.
3684         (init_cplus_expand): Set lang_expand_constant.
3685         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
3687         * tree.c (make_ptrmem_cst): Define.
3688         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
3689         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
3691 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
3693         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
3695         * decl2.c (start_static_storage_duration_function): Fix comment.
3696         (finish_file): Create static storage duration functions lazily.
3698 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
3700         Implement anonymous structs.
3701         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
3702         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
3703         * class.c (finish_struct_1): Remove redundant check for anon struct.
3704         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
3705         (check_tag_decl): Check for anonymous struct here.
3706         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
3707         * init.c (sort_member_init, emit_base_init): Handle getting fields
3708         as well as names in current_member_init_list.
3709         (perform_member_init): Handle getting an anon aggr.
3710         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
3711         (do_build_copy_constructor): Likewise.
3713 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
3715         * tree.c (cp_build_qualified_type): Don't allow qualified function
3716         types.
3718 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
3720         * gxxint.texi: Fix typo.
3722 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
3724         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
3725         * class.c (finish_struct_1): Use CLASS_TYPE_P.
3726         * ptree.c (print_lang_type): Likewise.
3727         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
3728         IS_AGGR_TYPE_CODE.
3729         * typeck2.c (digest_init): Likewise.
3731 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
3733         * call.c (joust): Compare the types of the conv ops, not the
3734         target types of the conversions.
3736 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
3738         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
3739         was not given.
3741 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
3743         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
3744         * decl.c (grokfndecl): Don't allow inline declarations of friend
3745         template specializations, or friend template specializations with
3746         default arguments.
3747         * pt.c (tsubst): Handle substitution into array types that does
3748         not yield a fixed upper bound, even when not processing a
3749         template.
3750         (tsubst_copy): Deal with the fact that the second operand to a
3751         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
3752         * search.c (marked_pushdecls_p): Don't descend into
3753         TEMPLATE_TYPE_PARMs and the like.
3754         (unmarked_pushdecls_p): Likewise.
3755         
3756         * call.c (build_over_call): Don't throw away
3757         initializations/copies of empty classes; use MODIFY_EXPR and
3758         INIT_EXPR as for non-empty classes.
3759         * class.c (finish_struct_1): Put the padding byte for an empty
3760         class on the TYPE_NONCOPIED_PARTS list for the class.
3762 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
3764         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
3765         indicate a reference to a field that is a qualified name.
3767 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
3769         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
3770         ASM_OUTPUT_CONSTRUCTOR.
3772         * friend.c (do_friend): Add attrlist arg.  Remove support for
3773         getting a non-decl as 'decl'.
3774         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
3775         rtl.
3776         (grokdeclarator): Adjust.
3777         * cp-tree.h: Adjust.
3779 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
3781         * cp-tree.h (permanent_p): New function.
3782         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
3783         possibly complex tree node.
3784         * tree.c (mapcar): Adjust comments, and follow coding standards in
3785         conditional.
3786         (permanent_p): New function.
3788 1999-05-13  Per Bothner  <bothner@cygnus.com>
3790         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
3791         primitive Java types, if we actually see `extern "Java"'.
3793 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
3795         * lang-specs.h: Pass -$ to the preprocessor.
3797 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
3799         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
3800         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
3801         (resolve_offset_ref): Don't handle a raw baselink.
3802         * cvt.c (build_expr_type_conversion): Likewise.
3803         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
3804         convert_for_initialization): Likewise.
3805         * class.c (instantiate_type): Handle seeing a baselink under an
3806         OFFSET_REF.
3807         * error.c (dump_expr): Likewise.        
3808         * pt.c (for_each_template_parm): Likewise.
3809         (resolve_overloaded_unification): Likewise.
3810         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
3811         * typeck.c (expr_sizeof): Also complain about other permutations
3812         of overloaded functions.
3814 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
3816         * init.c (resolve_offset_ref): Don't return a raw method.
3817         Use BASELINK_P.
3818         * typeck.c (decay_conversion): Don't handle a raw method.
3819         Resolve all OFFSET_REFs.
3820         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
3821         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
3822         same_type_p for pmf bits.  Don't use build_binary_op to compare
3823         raw pointers to methods.
3824         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
3825         to decide when to call resolve_offset_ref.
3826         (build_c_cast, convert_for_initialization): Likewise.
3827         * cvt.c (build_expr_type_conversion): Likewise.
3829 1999-05-06  Nathan Sidwell  <nathan@acm.org>
3831         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
3833 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
3835         * decl2.c (start_objects): Don't let static constructors and
3836         destructors get inlined.
3838         * parse.y (nested_name_specifier): Make sure ordinary types are
3839         complete, just like template types.
3840         * parse.c: Regenerated.
3842         * pt.c (check_explicit_specialization): Improve error messages.
3844 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3846         * typeck.c (string_conv_p): Use same_type_p to check whether we
3847         try to convert between char and wchar_t.
3849 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
3851         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
3852         lookup to error_mark_node here.
3853         (lookup_member): Revise documentation.  Add comments.  Don't set
3854         the TREE_TYPE to error_mark_node here, and don't build up an extra
3855         TREE_LIST for ambiguous lookups.
3856         (setup_class_bindings): Adjust accordingly.
3857         (push_class_decls): Revise out-of-date comments.
3858         
3859         * typeck.c (build_const_cast): Tighten checks for legality.
3861 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3863         * init.c (build_member_call): Lookup names coming from
3864         namespace-scoped LOOKUP_EXPR.
3866 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
3868         * gxxint.texi: Add documentation for 'I'.
3870 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3872         * tinfo.cc (operator==): Qualify type_info with std::.
3874 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
3876         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
3877         (DECL_COMDAT): Remove definition.
3879 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
3881         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
3882         change.
3884 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
3886         * class.c (build_vtable): Use build_lang_decl when building
3887         vtables, not just build_decl.
3888         (prepare_fresh_vtable): Likewise.
3889         * decl.c (wrapup_globals_for_namespace): Mark vtables as
3890         DECL_EXTERNAL when calling wrapup_global_declarations.
3891         * decl2.c (priority_info_s): Add initializations_p and
3892         destructions_p members.
3893         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
3894         when deciding what vtables to write out.
3895         (ssdf_decls): New variable.
3896         (ssdf_decls_used): Likewise.
3897         (start_static_storage_duration_function): Deal with being called
3898         multiple times.  Avoid inlining this function.
3899         (generate_inits_for_priority): Deal with reuse of priority map.
3900         (get_priority_info): Clear initializations_p and destructions_p.
3901         (do_static_initialization): Tweak comment.
3902         (do_static_destruction): Likewise.  Fix condition on sentries for
3903         destruction.
3904         (generate_ctor_or_dtor_function): Call all of the static storage
3905         duration functions.
3906         (generate_ctor_or_dtor_function_for_priority): Check
3907         initializations_p and destructions_p to see what priorities need
3908         initialization functions.
3909         (finish_file): Rework to generate multiple static storage duration
3910         functions, rather than just one.
3912         * typeck.c (build_const_cast): Tweak last change to handle
3913         templates correctly.
3915         * typeck.c (build_const_cast): Disallow use of const_cast to
3916         anything but a pointer or reference type.
3918 1999-04-30  Nathan Sidwell  <nathan@acm.org>
3920         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
3921         signature type.
3923 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
3925         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
3926         (finish_file): Indent comments properly.
3928 1999-04-29  Richard Henderson  <rth@cygnus.com>
3930         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
3931         (do_static_destruction): Likewise.
3933 1999-04-29  Nathan Sidwell  <nathan@acm.org>
3935         * cp-tree.h (TYPE_NOTHROW_P): New macro.
3936         * decl2.c (delete_sanity): Warn on deleting void *.
3937         * init.c (build_new_1): Use TYPE_NOTHROW_P.
3938         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
3939         throwing operator new.
3941 1999-04-28  Nathan Sidwell  <nathan@acm.org>
3943         * cp-tree.h (build_component_addr): Remove prototype.
3944         * typeck.c (build_component_addr): Make static. Remove MSG
3945         argument.
3946         (build_component_addr): Remove MSG parameter, clean up
3947         comment.
3948         (build_x_function_call): Use cp_error.
3949         (build_unary_op): Adjust call of build_component_addr.
3951 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
3953         * pt.c (tsubst_friend_class): Check for NULL.
3955 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
3957         * search.c (binfo_for_vtable): Initialize bfvi.var.
3959 1999-04-27  Nathan Sidwell  <nathan@acm.org>
3961         * rtti.c (build_x_typeid): Check rtti is enabled.
3963 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
3965         * search.c (is_subobject_of_p): Make sure we're looking at the
3966         right baseclasses.
3968 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
3970         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
3972 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
3974         * decl2.c (finish_file): Tweak handling of extern inlines so that
3975         they are not unnecessarily put out.
3977         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
3978         such as base classes.
3980 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
3982         * tree.c (build_exception_variant): Fix typo: use the chain of U,
3983         not trying V, while cycling through U.
3985 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
3987         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
3988         preserves_first_arg.  Enlarge dummy accordingly.
3989         (DECL_TINFO_FN_P): New macro.
3990         (SET_DECL_TINFO_FN_P): Likeiwse.
3991         (DECL_RETURNS_FIRST_ARG): Remove.
3992         (DECL_PRESERVES_THIS): Likewise.
3993         (DECL_INIT_PRIORITY): New macro.
3994         (finish_struct_1): Change prototype.
3995         (cat_namespace_levels): Remove prototype.
3996         (vtable_decl_p): New prototype.
3997         (vtype_decl_p): Likewise.
3998         (sigtable_decl_p): Likewise.
3999         (walk_globals_pred): New typedef.
4000         (walk_globals_fn): Likewise.
4001         (walk_globals): New prototype.
4002         (walk_namespaces_fn): New typedef.
4003         (walk_namespaces): New prototype.
4004         (wrapup_globals_for_namespace): Likewise.
4005         (walk_vtables): Remove prototype.
4006         (walk_sigtables): Likewise.
4007         (instantiate_pending_templates): New prototype.
4008         * class.c (finish_struct_1): Don't return a value.
4009         * decl.h (pending_statics): Remove declaration.
4010         * decl.c (walk_namespaces_r): New function.
4011         (walk_globals_r): Likewise.
4012         (vtable_decl_p): Likewise.
4013         (vtype_decl_p): Likewise.
4014         (sigtable_decl_p): Likewise.
4015         (walk_namespaces): Likewise.
4016         (walk_globals_data): New type.
4017         (walk_globals): New function.
4018         (wrapup_globals_for_namespace): Likewise.
4019         (expand_static_init): Remove assertion.  Remove redundancy in
4020         conditional.  Don't put static data members in static_aggregates
4021         Tidy.
4022         (finish_function): Remove redundancy in conditional.  Don't set
4023         DECL_RETURNS_FIRST_ARG.
4024         (cat_namespace_levels): Remove.
4025         * decl2.c: Include splay-tree.h and varray.h.
4026         (priority_info_s): New structure.
4027         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
4028         conventions.
4029         (prune_vtable_vardecl): Likewise.
4030         (finish_sigtable_vardecl): Likewise.
4031         (setup_initp): Remove.
4032         (do_dtors): Remove.
4033         (do_ctors): Remove.
4034         (start_static_storage_duration_function): New function.
4035         (generate_inits_for_priority): Likewise.
4036         (finish_static_storage_duration_function): Likewise.
4037         (get_priority_info): Likewise.
4038         (do_static_initialization): Likewise.
4039         (do_static_destruction): Likewise.
4040         (do_static_initialization_and_destruction): Likewise.
4041         (generate_ctor_or_dtor_function): Likewise.
4042         (generate_ctor_and_dtor_functions_for_priority): Likewise.
4043         (pending_statics): Make it a varray.
4044         (pending_statics_used): New variable.
4045         (saved_inlines): Make it a varray.
4046         (saved_inlines_used): New variable.
4047         (finish_static_data_member): Change method of updating
4048         pending_statics.
4049         (mark_inline_for_output): Remove #if 0'd code.  Change method of
4050         updating saved_inlines.
4051         (walk_vtables): Remove.
4052         (walk_sigtables): Likewise.
4053         (import_export_decl): Use DECL_TINFO_FN_P.
4054         (pending_templates): Remove declaration.
4055         (maybe_templates): Likewise.
4056         (static_aggregates_initp): Likewise.
4057         (setup_initp): Likewise.
4058         (finish_objects): Simplify.
4059         (INITIALIZE_P_IDENTIFIER): New macro.
4060         (PRIORITY_IDENTIFIER): New macro.
4061         (SSDF_IDENTIFIER): New macro.
4062         (initialize_p_decl): New variable.
4063         (priority_decl): Likewise.
4064         (ssdf_decl): Likewise.
4065         (priority_info_map): Likewise.
4066         (finish_file): Recode output of static intializers and other
4067         file-scope finalization tasks.
4068         * error.c (OB_END_TEMPLATE_ID): New macro.
4069         (dump_type_real): Use it.
4070         (dump_decl): Likewise.
4071         (dump_function_name): Likewise.
4072         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
4073         interface.
4074         (check_newline): Use walk_globals, not walk_vtables.
4075         * pt.c (pending_tempalte_expansions): Remove.
4076         (set_vardecl_interface_info): Likewise.
4077         (pending_templates): Make static.
4078         (maybe_templates): Likewise.
4079         (instantiate_class_template): Adjust call to finish_struct_1.
4080         (instantiate_pending_templates): New function.
4081         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
4082         * tree.c (static_aggregates_initp): Remove.
4083         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
4084         instead.
4085         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
4087         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
4088         with the RTL code RETURN.
4089         * hash.h: Regenerated.
4090         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
4091         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
4092         * parse.c: Regenerated.
4093         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
4094         it.
4095         (inline_parm_levels): New variable.
4096         (inline_parm_levels_used): Likewise.
4097         (maybe_begin_member_template_processing): Update them.
4098         (maybe_end_member_template_processing): Use them, rather than
4099         guessing how many levels to pop.
4101         * decl.c (make_typename_type): Tighten error-checking.
4103 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
4105         * cp-tree.h (build_binary_op): Remove unneeded parameter.
4106         * class.c (build_vrable_entry_ref): Adjust call to
4107         build_binary_op.
4108         * decl.c (expand_static_init): Likewise.
4109         (grokdeclarator): Likewise.
4110         (finish_function): Likewise.
4111         * decl2.c (delete_sanity): Likewise.
4112         (do_dtors): Likewise.
4113         (do_ctors): Likewise.
4114         * error.c (dump_type_suffix): Likewise.
4115         * expr.c (cplus_expand_expr): Likewise.
4116         * init.c (resolve_offset_ref): Likewise.
4117         (build_new): Likewise.
4118         (build_new_1): Likewise.
4119         (build_vec_delete_1): Likewise.
4120         (expand_vec_init_catch_clause): Likewise.
4121         (build_delete): Likewise.
4122         * pt.c (tsubst): Likewise.
4123         * rtti.c (synthesize_tinfo_fn): Likewise.
4124         * search.c (expand_upcast_fixups): Likewise.
4125         (expand_direct_vtbls_init): Likewise.
4126         * typeck.c (get_member_function_from_ptrfunc): Likewise.
4127         (build_binary_op_nodefault): Likewise.
4128         (point_int_sum): Likewise.
4129         (pointer_diff): Likewise.
4130         (build_unary_op): Likewise.
4131         (build_modify_expr): Likewise.
4132         (get_delta_difference): Likewise.
4133         (build_ptrmemfunc): Likewise.
4134         (expand_ptrmemfunc_cst): Likewise.
4136 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
4138         * decl.c (grokfndecl): Always call cplus_decl_attributes.
4139         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
4141 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
4143         * cp-tree.h (finish_static_data_member_decl): New function.
4144         * decl2.c (finish_static_data_member_decl): Split out from ...
4145         (grokfield): Here.
4146         * pt.c (instantiate_class_template): Use it here instead of
4147         trying to fake it.
4148         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
4149         finish_static_data_member_decl will do that.  Explicit set
4150         DECL_EXTERNAL to match non-template processing.
4152 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
4154         * cp-tree.h (finish_class_definition): Add parameter.
4155         * parse.y (structsp): Use it.  Don't call pop_scope here.
4156         * parse.c: Regenerated.
4157         * semantics.c (finish_class_definition): Pop it here.
4159 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
4161         * decl.c (xref_tag): Revise handling of nested template
4162         declarations.
4163         * pt.c (check_explicit_specialization): Tweak handling of friend
4164         templates in template classes.
4165         (tsubst_friend_class): Handle friend declarations for nested
4166         member template classes.
4168 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
4170         * class.c (finish_struct): Remove unused variable.
4171         (pushclass): Likewise.
4172         (invalidate_class_lookup_cache): Likewise.
4173         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
4174         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
4175         doesn't get obliterated.
4176         (make_typename_type): Handle template classes correctly.
4178         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
4179         (storetags): Declare.
4180         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
4181         (pushclass): Likewise.  Use storetags to install tag declarations,
4182         not pushtag.
4183         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
4184         * decl.c (storetags): Make it global.
4185         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
4186         implicit typename declaration.
4187         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
4188         * method.c (hack_identifier): Likewise.
4189         * search.c (lookup_member): Likewise.
4191         * decl.c (warn_about_implicit_typename_lookup): New function.
4192         (lookup_name_real): Use it.  Rework handling of implicit typename
4193         extension.
4195 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
4197         * cp-tree.h (lookup_nested_field): Remove.
4198         * class.c (push_nested_class): Handle UNION_TYPEs.
4199         (pop_nested_class): Likewise.
4200         * decl.c (lookup_name_real): Don't call lookup_nested_field.
4201         (start_decl): Use push_nested_class, not just pushclass.
4202         (cp_finish_decl): Use pop_nested_class, not just popclass.
4203         * search.c (lookup_nested_field): Remove.
4205         * cp-tree.h (lang_type): Add documentation.
4206         * decl2.c (handle_class_head): Create template declarations here,
4207         as appropriate.
4208         * parse.y (class_head): Return whether or not we entered a new
4209         scope, as well as the type named.
4210         (named_class_head): Likewise.
4211         (named_complex_class_head_sans_basetype): Likewise.
4212         (structsp): Adjust accordingly.  Pop scope when required.
4213         * parse.c: Regenerated.
4214         * pt.c (check_default_tmpl_args): Robustify.
4215         (redeclare_class_template): Likewise.
4216         (instantiate_class_template): An instantiation of an
4217         anonymous union is itself an anonymous union.
4218         * semantics.c (begin_class_definition): Don't create template
4219         declarations here.
4221 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
4223         * parse.y (after_type_declarator_intern): New nonterminal.
4224         (after_type_declarator): Use it.
4225         (direct_after_type_declarator): Likewise.  Move above
4226         nonnested_type to fix reduce/reduce conflict resolution.
4227         (declmods): Reducing from just 'attributes' has EMPTY precedence.
4228         * Makefile.in (CONFLICTS): Update.
4230         * decl.c (define_label): Downgrade error for jumping over a
4231         non-POD decl to pedwarn.
4233 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
4235         * cp-tree.h (popclass): Change declaration.
4236         (pop_nested_class): Likewise.
4237         (poplevel_class): Remove declaration.
4238         * call.c (convert_default_argument): Pass no arguments to
4239         popclass.
4240         * class.c (finish_struct_1): Likewise.
4241         (finish_struct): Likewise.
4242         (popclass): Remove argument.  Simplify code accordingly.
4243         (pop_nested_class): Likewise.
4244         * decl.c (poplevel_class): Declare it here, and make it static.
4245         (poplevel): Handle class scopes.
4246         (poplevel_class): Don't take an rgument.  Simplify.
4247         (pop_everything): Pass no arguments to pop_nested_class.
4248         (cp_finish_decl): Pass no arguments to popclass.
4249         (grokdeclarator): Pass no arguments to pop_nested_class.
4250         (finish_function): Likewise.
4251         * decl2.c (grokfield): Likewise.
4252         (pop_scope): Pass no arguments to popclass.
4253         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
4254         * pt.c (instantiate_class_template): Move call to pushclass, and
4255         document.  Pass no arguments to popclass.
4256         (regenerate_decl_from_template): Likewise.
4258 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
4260         * typeck.c (build_unary_op): Handle taking the address of a unique
4261         bound non-static member function.
4263 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4265         * lang-options.h (-Wdeprecated): New flag.
4266         * decl2.c (warn_deprecated): New flag.
4267         (lang_decode_option): Deprecated this-is-variable,
4268         external-templates, alt-external-templates.
4269         Support -Wdeprecated.
4270         * errfn.c (cp_deprecated): New function.
4272 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
4274         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
4275         of the decls themselves.
4277         * pt.c (tsubst_function_type): Copy attributes over.
4279         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
4280         and com_interface.
4281         * cp-tree.h: Add prototype.
4282         * decl.c (init_decl_processing): Set valid_lang_attribute.
4284 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
4286         * class.c (finish_struct_1): Look at the const-ness of the field's
4287         type, not the TREE_READONLY-ness of the declaration.
4288         * method.c (synthesize_method): Likewise.
4289         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
4290         creating new declarations.
4292 1999-04-13  Mike Stump  <mrs@wrs.com>
4294         * decl2.c (import_export_decl): Because vtables always reference
4295         virtual functions, even if they are inlined, don't allow
4296         -fno-implement-inlines to not emit them, instead, emit them with
4297         the vtable.
4298         * decl.c (start_function): Likewise.
4300 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
4302         * cp-tree.h (struct lang_type): Add com_interface.
4303         (CLASSTYPE_COM_INTERFACE): New macro.
4304         * class.c (set_rtti_entry): COM interface classes have no RTTI
4305         entries in their vtables; adjust.
4306         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
4307         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
4308         finish_struct_1): Likewise.
4309         * decl2.c (mark_vtable_entries): Likewise.
4310         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
4311         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
4312         expand_upcast_fixups): Likewise.
4313         * tree.c (debug_binfo): Likewise.
4315         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
4316         * typeck.c (comptypes): If we get it, ignore attributes.
4317         * class.c (instantiate_type): Use BASELINK_P.  Change complain
4318         parameter to flags; 2 means ignore attributes.
4319         * call.c (build_op_delete_call): Pass it.
4321         * decl.c (xref_tag): Only complain once about using a typedef-name
4322         with 'struct'.  Downgrade to pedwarn.
4324         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
4326         * parse.y (absdcl_intern): New nonterminal.
4327         (absdcl, direct_abstract_declarator): Use it.
4329         * pt.c (lookup_template_class): Look through implict typename.
4331 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
4333         * friend.c (add_friend): Deal gracefully with error_mark_node.
4334         * method.c (build_overload_value): Handle pointers-to-members as
4335         template parameters.
4337         * decl.c (push_binding): Fix typo in comment.
4339 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
4341         * error.c (dump_type_real): If a typename is a template-id, put
4342         out the template arguments.
4343         (dump_expr): Handle TEMPLATE_ID_EXPR.
4344         * pt.c (lookup_template_class): Now that full arguments are
4345         available everywhere, remove code that tried to guess them.
4347 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
4349         * decl.c (make_typename_type): Complain if we don't find a type
4350         when trying to make a typename type for a non-template type.
4352 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
4354         * decl.c (start_decl): Pass attributes to grokdeclarator.
4355         (grokdeclarator): Handle attributes on constructor-syntax
4356         initializers.
4358 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
4360         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
4361         don't have types.
4363         * search.c (template_self_reference_p): Tweak.
4365 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
4367         * init.c (build_offset_ref): Don't build yet another weird data
4368         structure to describe overloaded functions.
4370 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
4372         * cp-tree.h (BASELINK_P): New macro.
4373         (SET_BASELINK_P): Likewise.
4374         * init.c (build_member_call): Remove needless assignment in if
4375         statement.
4376         * search.c (lookup_field_r): Fix handling when we are looking
4377         specifically for a type; these are not hidden by functions and
4378         variables.
4379         (lookup_member): Use SET_BASELINK_P.
4380         * tree.c (is_overloaded_fn): Use BASELINK_P.
4381         (really_overloaed_fn): Likewise.
4382         (get_first_fn): Likewise.
4384 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
4386         * decl.c (lookup_name_current_level): Tweak, and improve
4387         documentation.
4389         * class.c (maybe_fixup_vptrs): Remove declaration.
4390         (build_class_init_list): Likewise.
4391         * decl.c (pushdecl_class_level): Call check_template_shadow here
4392         ...
4393         (push_class_level_binding): ... not here.
4394         * search.c (dfs_push_type_decls): Only avoid
4395         template-self-reference TYPE_DECLs if they are from base classes.
4397 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
4399         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
4400         nodes.  Tidy.
4402 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
4404         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
4405         (finish_struct_1): Don't call build_class_init_list.
4407 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
4409         * tinfo.h (__class_type_info): Fix illegal declaration.
4411         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
4412         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
4413         (IDENTIFIER_CLASS_VALUE): Improve documentation.
4414         (is_properly_derived_from): Declare.
4415         (invalidate_class_lookup_cache): Likewise.
4416         (maybe_maybe_note_name_used_in_class): Likewise.
4417         (note_name_declared_in_class): Likewise.
4418         (push_using_decl): Remove duplicate declaration.
4419         (id_in_current_class): Remove declaration.
4420         (push_class_binding): Change prototype.
4421         (clear_identitifer_class_values): Declare.
4422         * call.c (is_properly_derived_from): Make it global.
4423         (build_new_function_call): Be careful about updating candidates.
4424         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
4425         asked to make illegal calls.
4426         * class.c: Include splay-tree.h.
4427         (class_stack_node): Add names_used slot.
4428         (check_member_decl_is_same_in_complete_scope): Remove.
4429         (add_method): Fix comment.  Push the declaration into class
4430         scope.
4431         (finish_struct_1): When popping the class, pop the bindings too.
4432         Remove check for data member/function member conflict.
4433         (finish_struct): Remove calls to
4434         check_member_decl_is_same_in_complete_scope.  Change calls to
4435         popclass.
4436         (pushclass): Clear names_used in the class stack entry.
4437         Use invalidate_class_lookup_cache to remove cached entries, rather
4438         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
4439         before entering a new class.  Remove dead code.  Don't mess with
4440         current_function_decl when pushing declarations.
4441         (invalidate_class_lookup_cache): New function, split out from ...
4442         (popclass): Here.  Clean up names_used on our way out.
4443         (instantiate_type): Adjust.
4444         (build_self_reference): Don't push the declaration here.
4445         (maybe_note_name_used_in_class): New function.
4446         (note_name_declared_in_class): Likewise.
4447         * decl.c (add_binding): Change prototype.
4448         (find_class_binding_level): New function.
4449         (innermost_nonclass_level): Likewise.
4450         (current_binding_level): Update documentation.
4451         (inner_binding_level): Remove.  Replace with current_binding_level
4452         throughout.
4453         (push_binding_level): Remove special handling of
4454         class_binding_level.
4455         (pop_binding_level): Likewise.  Use find_class_binding_level.
4456         (suspend_binding_level): Likewise.
4457         (global_bindings_p): Use innermost_nonclass_level.
4458         (toplevel_bindings_p): Likewise.
4459         (namespace_bindings_p): Likewise.
4460         (pseudo_global_level_p): Likewise.
4461         (push_binding): Clear INHERITED_VALUE_BINDING_P.
4462         (add_binding): Check for illegal multiple declarations.  Return a
4463         value indicating whether or not the new binding was legal.
4464         (push_local_binding): Skip over class binding levels.  Check
4465         return value from add_binding.
4466         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
4467         note_name_declared_in_class.
4468         (pushlevel_class): Remove "fake out the rest of the compiler"
4469         code.
4470         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
4471         (clear_identifier_class_values): New function.
4472         (pop_from_top_level): Use it.
4473         (pop_everything): Tweak.
4474         (maybe_process_template_type_declaration): Don't push the
4475         declaration for the template here.
4476         (pushtag): Don't push tag declarations into class scope here.
4477         (pushdecl): Apply DeMorgan's law for readability.
4478         (pushdecl_class_level): Remove special-case code for
4479         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
4480         (push_class_level_bindng): Deal with inherited bindings.
4481         (lookup_name_real): Remove special-case code for
4482         TYPE_BEING_DEFINED, and some implicit typename magic.
4483         (grokdeclarator): Handle COMPONENT_REF for a template function.
4484         (build_enumerator): Don't call pushdecl_class_level here.
4485         (id_in_current_class): Remove.
4486         * decl2.c (grokfield): Don't call pushdecl_class_level or
4487         check_template_shadow.
4488         * errfn.c (cp_file_of): Don't declare.
4489         (cp_line_of): Likewise.
4490         * error.c (dump_decl): Handle an OVERLOAD.
4491         (cp_file_of): Likewise.
4492         (cp_line_of): Likewise.
4493         * init.c (build_member_call): Handle a COMPONENT_REF.
4494         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
4495         pushdecl_class_level.
4496         * method.c (hack_identifier): Build COMPONENT_REFs for references
4497         to member templates as well as member functions.  Remove dead
4498         code.
4499         * parse.y (left_curly): Remove.
4500         (nonnested_type): Call maybe_note_name_used_in_class, not
4501         pushdecl_class_level.
4502         * parse.c: Regenerated.
4503         (nested_name_specifier_1): Likewise.
4504         * pt.c (check_explicit_specialization): Adjust, for robustness.
4505         (check_template_shadow): Handle OVERLOADs.
4506         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
4507         TEMPLATE_DECL, if appropriate.
4508         * search.c (envelope_add_decl): Remove.
4509         (dfs_pushdecls): Likewise.
4510         (dfs_compress_decls): Likewise.
4511         (dfs_push_decls): New function.
4512         (dfs_push_type_decls): Likewise.
4513         (setup_class_bindings): Likewise.
4514         (template_self_reference_p): Likewise.
4515         (lookup_field_r): Use it.
4516         (looup_member): Remove old comment.  Deal with ambiguity.
4517         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
4518         and remove envelope processing.
4519         * semantics.c (begin_class_definition): Let pushclass push
4520         declarations for base classes.
4521         (finish_member_declaration): Push declarations into class scope.
4522         * typeck.c (build_component_ref): Just put an OVERLOAD into the
4523         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
4524         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
4525         * Makefile.in (class.o): Depend on splay-tree.h.
4527 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
4529         * cvt.c (convert_pointer_to_real): Use same_type_p.
4530         * typeck.c (comp_target_types): Use same_type_p.
4532 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
4534         * semantics.c (begin_inline_definitions,
4535         finish_inline_definitions): Rename from finish_default_args and
4536         begin_inline_definitions, respectively, to something that isn't a
4537         total lie.  :)
4538         * parse.y (structsp): Adjust.
4540         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
4541         (list_hash_lookup): Likewise.
4542         (hash_tree_chain): Adjust.
4543         * pt.c (tsubst): Adjust.
4544         (tsubst_arg_types): Use plain hash_tree_cons.
4545         * cp-tree.h (hash_tree_cons_simple): Lose.
4546         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
4548 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4550         * Makefile.in (hash.h): Generate using gperf language 'C', not
4551         'KR-C', so gperf uses the `const' keyword on strings.
4553         * gxx.gperf (resword): Const-ify a char*.
4555 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
4557         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
4558         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
4559         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
4560         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
4561         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
4562         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
4563         tree.c: Adjust.
4565 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
4567         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
4569 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
4571         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
4573 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
4575         * cp-tree.h (add_friend): Declare.
4576         (add_friends): Likewise.
4577         * friend.c (add_friend): Make it global.  Don't add to
4578         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
4579         (add_friends): Make it global.
4580         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
4581         befriending class is a template.
4582         * parse.y (component_decl_1): Fix typo in comment.
4583         * parse.c: Regenerated.
4584         * pt.c (instantiate_class_template): Use add_friend and
4585         add_friends rather that duplicating some of their functionality
4586         here.
4588 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
4590         * call.c (build_field_call): Unify 'this' and non-'this' cases.
4592         * typeck.c (build_indirect_ref): Check for 'this' sooner.
4594 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4596         * call.c (op_error): Const-ify a char*.
4597         (add_candidate, source_type, add_warning): Add static prototype.
4598         (print_z_candidates): Const-ify a char*.
4600         * class.c (resolve_address_of_overloaded_function,
4601         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
4602         (get_vtable_name, finish_struct_1): Const-ify a char*.
4604         * cvt.c (convert_to_reference): Likewise.
4606         * decl.c (redeclaration_error_message, record_builtin_type,
4607         record_unknown_type, member_function_or_else, bad_specifiers):
4608         Likewise.
4609         (find_binding, select_decl, unqualified_namespace_lookup,
4610         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
4611         Add static prototype.
4612         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
4613         implicitly_declare, record_builtin_java_type, define_function,
4614         grok_op_properties, tag_name): Const-ify a char*.
4616         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
4617         (define_function, finish_builtin_type): Const-ify a char*.
4618         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
4619         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
4620         (file_name_nondirectory): Const-ify a char*.
4621         (init_filename_times): Don't prototype.
4622         (compiler_error): Prototype.
4623         (yyerror, init_repo): Const-ify a char*.
4624         (build_srcloc): Don't prototype.
4625         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
4626         Const-ify a char*.
4627         (warn_for_assignment): Don't prototype.
4628         (convert_for_initialization, readonly_error, check_for_new_type,
4629         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
4630         Const-ify a char*.
4632         * decl2.c (acceptable_java_type, output_vtable_inherit,
4633         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
4634         merge_functions, decl_namespace, validate_nonmember_using_decl,
4635         do_nonmember_using_decl): Add static prototype.
4636         (lang_f_options): Const-ify a char*.
4637         (finish_builtin_type): Likewise.
4638         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
4639         prototype.
4641         * errfn.c: Include cp-tree.h.
4642         (cp_thing): Add static prototype.
4643         (compiler_error): Don't protoptype.
4644         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
4645         passing it to `cp_thing'.
4647         * error.c (interesting_scope_p): Add static prototype.
4649         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
4650         a char*.
4652         * init.c (compiler_error): Don't prototype.
4653         (member_init_ok_or_else): Const-ify a char*.
4654         (build_java_class_ref): Add static prototype.
4656         * lex.c (compiler_error): Don't prototype.
4657         (get_time_identifier, interface_strcmp, extend_token_buffer,
4658         handle_cp_pragma): Const-ify a char*.
4659         (is_global, init_filename_times): Add static prototype.
4660         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
4661         (compiler_error): Change from fixed args to variable args.
4662         (yyerror): Const-ify a char*.
4664         * parse.y (cond_stmt_keyword): Const-ify a char*.
4665         (parse_decl): Add static prototype.
4667         * pt.c (template_args_equal, print_template_context): Likewise.
4668         (print_candidates, check_default_tmpl_args): Const-ify a char*.
4669         (instantiate_class_template): Likewise.
4671         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
4673         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
4674         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
4676         * search.c (lookup_field_info, lookup_member): Likewise.
4677         (lookup_member): Cast the first argument of `bzero' to a PTR.
4679         * sig.c (compiler_error): Don't prototype.
4680         (build_signature_pointer_or_reference_nam): Const-ify a char*.
4681         (get_sigtable_name, build_member_function_pointer): Likewise.
4683         * tree.c (compiler_error): Don't prototype.
4684         (no_linkage_helper, build_srcloc): Add static prototype.
4685         (build_vbase_pointer_fields): Const-ify a char*.
4686         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
4688         * typeck.c (compiler_error): Don't prototype.
4689         (convert_for_assignment): Const-ify a char*.
4690         (comp_cv_target_types): Add static prototype.
4691         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
4692         build_component_addr, build_unary_op, convert_for_initialization):
4693         Const-ify a char*.
4695         * typeck2.c (ack): Add static prototype and change from fixed args
4696         to variable args.
4697         (readonly_error, check_for_new_type): Const-ify a char*.
4699         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
4700         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
4701         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
4702         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
4703         gen_assign, GNU_xref_member): Const-ify a char*.
4705 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4707         * gxxint.texi: Remove old discussion on copying virtual bases.
4709 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
4711         * Make-lang.in: Remove all references to g++.o/g++.c.
4712         Link g++ from gcc.o.
4714 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
4716         * decl2.c (comdat_linkage): Treat vtables like functions.
4718 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
4720         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
4722 1999-03-25  Nathan Sidwell  <nathan@acm.org>
4724         * decl.c (init_decl_processing): Add `signed' type as a synonym
4725         for `int'.
4727 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
4729         * typeck.c (common_type): Handle cv-qual unification for pointers
4730         to members.
4732         * decl.c (unqualified_namespace_lookup): Return error_mark_node
4733         on error.
4734         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
4735         * lex.c (do_identifier): If we got error_mark_node, call
4736         lookup_name again.
4738 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4740         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
4741         classes.
4743 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
4745         * decl.c (lookup_name_real): Do nested field lookup regardless of
4746         TYPE_BEING_DEFINED.
4748 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
4750         * cp-tree.h (lang_type): Remove has_assignment and
4751         has_real_assignment.  Add befriending_classes.
4752         (TYPE_HAS_ASSIGNMENT): Remove.
4753         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
4754         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
4755         (lang_decl): Document.
4756         (DECL_BEFRIENDING_CLASSES): New macro.
4757         (FRIEND_NAME): Move declaration to more obvious location.
4758         (FRIEND_DECLS): Likewise.
4759         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
4760         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
4761         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
4762         (grok_op_properties): Likewise.
4763         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
4764         (add_friend): Likewise.  Don't do weird things with assignment
4765         operators.  Update DECL_BEFRIENDING_CLASSES.
4766         (add_friends): Don't do weird things with assignment operators.
4767         (make_friend_class): Likewise.  Update
4768         CLASSTYPE_BEFRIENDING_CLASSES.
4769         * pt.c (instantiate_class_template): Don't set
4770         TYPE_HAS_ASSIGNMENT.
4771         (tsubst_copy): Substitute the TREE_TYPE for more unary
4772         expressions.
4773         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
4774         * search.c (protected_accessible_p): New function.
4775         (friend_accessible_p): Likewise.
4776         (accessible_p): Use them.
4778 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
4780         * pt.c (convert_nontype_argument): Don't create things that aren't
4781         PTRMEM_CSTs when applying a qualification conversion to a
4782         PTRMEM_CST.
4784 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
4786         * Makefile.in (OBJS): Don't mention hash.o.
4787         (OBJDEPS): Likewise.
4789 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
4791         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
4792         * decl.c (expand_static_init): Make sure we don't add any after
4793         then.
4795         * decl.c (cp_finish_decl): Move intelligence about handling
4796         DECL_COMDAT for variables from here...
4797         * decl2.c (comdat_linkage): ...to here.
4798         (maybe_make_one_only): Tweak.
4799         (import_export_decl): Call comdat_linkage for variables, too.
4800         (finish_file): Handle template statics properly.
4802 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
4804         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
4805         Document internals of pointer-to-member-functions.
4806         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
4807         (PFN_FROM_PTRMEMFUNC): Likewise.
4808         (build_type_conversion): Remove unused parameter.
4809         (build_ptrmemfunc1): Declare.
4810         (expand_ptrmemfunc_cst): New function.
4811         (delta2_from_ptrmemfunc): Likewise.
4812         (pfn_from_ptrmemfunc): Likewise.
4813         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
4814         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
4815         (convert_to_reference): Remove unused parameter to
4816         build_type_conversion.
4817         (ocp_convert): Likewise.
4818         (build_user_type_conversion): Likewise.
4819         * error.c (dump_expr): Handle NULL pointer-to-member functions.
4820         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
4821         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
4822         open when handling pointer-to-member functions.
4823         * pt.c (convert_nontype_argument): Clean up error messages.  Be
4824         more stringent with pointers-to-members.
4825         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
4826         (build_unary_op): Tidy ever-so-slightly.
4827         (build_conditional_expr): Remove extra parameter to
4828         build_type_conversion.
4829         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
4830         we're using.
4831         (expand_ptrmemfunc_cst): Define.
4832         (delta2_from_ptrmemfunc): Likewise.
4833         (pfn_from_ptrmemfunc): Likewise.
4835 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
4837         * init.c (build_member_call): Handle template-id expressions
4838         correctly.
4839         * typeck.c (build_x_function_call): Likewise.
4841 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
4843         * friend.c (make_friend_class): Avoid core dump when
4844         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
4846 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
4848         * decl.c (start_function): Suppress normal linkage heuristics
4849         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
4851 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
4853         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
4854         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
4856 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4858         * parse.y (named_complex_class_head_sans_basetype):
4859         Do not push a scope for error_mark_node.
4860         (maybe_base_class_list): Likewise.
4862         * decl.c (start_decl): Check for error_mark_node as a type.
4863         Detected by g++.brendan/array-refs.C.
4864         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
4865         (maybe_build_cleanup_1): Likewise.  Detected by
4866         g++.jason/incomplete1.C.
4868         * tree.c (build_dummy_object): Use void_zero_node instead of the
4869         error_mark_node.
4870         (is_dummy_object): Check for such a node.
4871         Detected by g++.bob/inherit1.C
4873 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
4875         * method.c (old_backref_index): Split out...
4876         (flush_repeats): From here.  Rename back from try_old_backref.
4877         (build_mangled_name): Put back some old-style repeat handling.
4879 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4881         * lex.c: Don't include setjmp.h.
4882         (parse_float): New static function.
4883         (pf_args): New struct.
4884         (real_yylex): Use them in call to `do_float_handler'.
4886 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
4888         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
4889         * tree.c (layout_basetypes): Not here.
4890         * search.c (dfs_search): Remove; no longer used.
4892 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
4894         * decl2.c (validate_nonmember_using_decl): Issue sensible
4895         error-messages on bogus qualifiers.
4897 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
4899         * call.c (add_function_candidate): Fix uninitialized variable.
4901         * Makefile.in (search.o): Add dependency on varray.h.
4903 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
4905         * decl.c (duplicate_decls): Use same_type_p.
4906         * method.c (try_old_backref): Renamed from flush_repeats.  Use
4907         same_type_p.  Don't try to handle repeats.  Return success.
4908         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
4909         calls from old-style code, too.
4910         (check_ktype): Use same_type_p.
4911         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
4912         (build_qualified_name): Simplify logic.
4913         (process_overload_item): Strip typedefs and quals at the top.
4914         (build_mangled_name_for_type_with_Gcode): Remove call to
4915         type_canonical_variant.
4916         (build_mangled_name): Likewise.  Remove support for old-style
4917         repeats, which have been disabled since 2.7.2.  Don't mess with
4918         TREE_USED.
4919         (build_decl_overload_real): Don't mess with TREE_USED.
4921 1999-03-13  Nathan Sidwell  <nathan@acm.org>
4923         * error.c (cp_printers): Add 'F' escape character.
4924         (dump_type_real): Remove TREE_LIST (fnargs) printing.
4925         Functionality moved to dump_parameters.
4926         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
4927         (dump_function_decl): Extend meaning of V parameter.  Use
4928         dump_parameters and dump_exception_spec.
4929         (dump_parameters): New static function.
4930         (dump_exception_spec): New static function.
4931         (fndecl_as_string): Change argument semantics.  Use
4932         dump_function_decl directly.
4934         * sig.c (build_signature_table_constructor): Use cp_error.
4936 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4938         * semantics.c (finish_switch_cond): Handle error cases gracefully.
4939         Detected by g++.law/enum5.C.
4941         * typeck.c (build_modify_expr): Check for errors after resolving
4942         offsets.  Detected by g++.brendan/static1.C.
4944         * decl.c (complete_array_type): Ignore initial_value if it is an
4945         error.  Detected by g++.benjamin/17930.C.
4947         * typeck2.c (process_init_constructor): Return error if one argument
4948         is in error.  Detected by g++.benjamin/13478.C.
4950 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4952         * decl.c (select_decl): Allow class templates when we need types.
4953         * decl2.c (ambiguous_decl): Likewise.
4955 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
4957         * lex.c (do_identifier): Correct call to enforce_access.
4958         * search.c (accessible_p): Tweak comment.
4960 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
4962         * semantics.c (begin_class_definition): Call build_self_reference.
4963         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
4965         * search.c (assert_canonical_unmarked): Fix typo in prototype.
4967         * search.c (dfs_canonical_queue): New function.
4968         (dfs_assert_unmarked_p): Likewise.
4969         (assert_canonical_unmarked): Likewise.
4970         (access_in_type): Use it.
4971         (accessible_p): Likewise.  Walk the whole tree when umarking.
4973         * sig.c (build_signature_table_constructor): Use accessible_p
4974         instead of compute_access.
4976 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
4978         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
4980 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
4982         * cp-tree.h (flag_access_control): Declare.
4983         (TREE_VIA_PPUBLIC): Document.
4984         (DECL_NONSTATIC_MEMBER_P): New macro.
4985         (enforce_access): Return an indication of whether or not access
4986         was permitted.
4987         (build_self_reference): Change prototype.
4988         (compute_access): Replace with ...
4989         (accessible_p): New function.
4990         (dfs_walk): Change prototype.
4991         (dfs_unmark): Likewise.
4992         (markedp): Likewise.
4993         * call.c (enforce_access): Use accessible_p.
4994         * class.c (build_self_reference): Insert the declaration into the
4995         list of members for this type, and make it public.
4996         * decl.c (xref_basetypes): Avoid ill-timed recursion.
4997         * init.c (build_offset_ref): Use lookup_member, not three separate
4998         name-lookups.  Call enforce_access rather than checking for
4999         illegal accesses here.
5000         (resolve_offset_ref): Likewise.
5001         * lex.c (do_identifier): Likewise.
5002         * method.c (hack_identifier): Likewise.
5003         * parse.y (self_reference): Remove.
5004         (opt_component_decl_list): Don't use it.
5005         * parse.c: Regenerated.
5006         * pt.c (print_candidates): Generalize to handle lists of
5007         overloaded functions.
5008         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
5009         not set.
5010         (get_template_base): Use new calling convention for dfs_walk.
5011         * search.c: Include varray.h.  Add prototypes.
5012         (dfs_walk): Accept a data pointer to pass to the work functions.
5013         All callers changed.  All work functions changed.
5014         (breadth_first_search): Rename to bfs_walk, and make consistent
5015         with dfs_walk.
5016         (dfs_walk_real): New function.
5017         (canonical_binfo): New function.
5018         (context_for_name_lookup): Likewise.
5019         (shared_marked_p): Likewise.
5020         (shared_unmarked_p): Likewise.
5021         (lokup_field_queue_p): Likewise.
5022         (lookup_field_r): Generalize to handle both functions and fields.
5023         (lookup_field): Just call lookup_member.
5024         (lookup_fnfields): Likewise.
5025         (lookup_member): Move body of lookup_field here and generalize.
5026         (dfs_accessible_queue_p): Likewise.
5027         (dfs_accessible_p): Likewise.
5028         (dfs_access_in_type): Likewise.
5029         (access_in_type): Likewise.
5030         (compute_access): Remove, and replace with ...
5031         (accessible_p): New function.
5032         (vbase_types): Remove.
5033         (vbase_decl_ptr_intermediate): Likewise.
5034         (vbase_decl_ptr): Likewise.
5035         (vbase_init_result): Likewise.
5036         (closed_envelopes): Likewise.
5037         (bvtable): Likewise.
5039 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
5041         * call.c (add_function_candidate): Check for proper number of args
5042         before checking the validity of those args.
5044 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
5046         * cp-tree.h (struct lang_type): Add anon_union field.
5047         (ANON_UNION_TYPE_P): Use it instead of examining type.
5048         (SET_ANON_UNION_TYPE_P): New macro.
5049         * decl.c (check_tag_decl): Use it.
5051         * search.c (compute_access): Handle non-type contexts earlier, and
5052         handle NULL_TREE.
5054         * tree.c (build_exception_variant): Use copy_to_permanent.
5056         * decl2.c (setup_initp): Give statics with no priority the default
5057         priority here.
5058         (do_dtors, do_ctors, finish_file): Remove special handling of
5059         non-prioritized statics.
5061 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
5063         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
5064         * decl.c (make_typename_type): Don't issue an error if an
5065         immediate lookup fails; it migt be resolved later.
5066         * friend.c (is_friend): Add comment.
5067         * search.c (breadth_first_search): Add POSTFN and DATA
5068         parameters.  Tidy.  All callers changed.
5069         (lookup_field_queue_p): New function.
5070         (lookup_field_r): Likewise.
5071         (lookup_field_post): Likewise.
5072         (lookup_field): Use them, via breadth_first_search, instead of
5073         duplicating logic.
5074         (compute_access): Robustify.
5075         (lookup_fnfield_info): New structure.
5077 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
5079         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
5081 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
5083         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
5084         cc happy.
5086         * decl2.c (import_export_class): Also return if
5087         CLASSTYPE_INTERFACE_ONLY is set.
5089 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5091         * decl.c (push_overloaded_decl): Only overwrite the old binding if
5092         there was one.
5093         * decl2.c (do_local_using_decl): Fix loop termination.
5095 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
5097         * cp-tree.h (determine_specialization): Don't declare.
5098         * pt.c (determine_specialization): Make it static.  Eliminate
5099         complain parameter.  Note that decl is always non-NULL now, and
5100         simplify accordingly.
5102         * decl.c (maybe_push_to_top_level): Always call
5103         push_cp_function_context.
5104         (pop_from_top_level): Always call pop_cp_function_context.
5106 1999-02-26  Nathan Sidwell  <nathan@acm.org>
5108         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
5109         diagnostics.
5110         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
5111         * init.c (build_new_1): Extra arg to complete_type_or_else.
5112         (build_delete): Likewise.
5113         * typeck.c (require_complete_type): Likewise.
5114         (pointer_int_sum): Likewise.
5115         (pointer_diff): Likewise.
5116         (build_component_ref): Likewise.
5118         * typeck2.c (incomplete_type_error): Always use cp_error.
5119         Show declaration of undefined type, if appropriate.
5120         Deal with UNKNOWN_TYPE nodes.
5122         * typeck.c (require_complete_type): Use TYPE_SIZE as
5123         size_zero_node to mean incomplete type.
5124         (require_complete_type_in_void): New function.
5125         (build_compound_expr): Call complete_type_in_void for LHS.
5126         (build_c_cast): Call complete_type_in_void for void cast.
5127         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
5128         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
5129         require_complete_type_in_void.  Call it.
5130         * cp-tree.h (require_complete_type_in_void): Prototype new function.
5132         * typeck.c (convert_arguments): Use alternative format for
5133         function decls.  Don't require_complete_type here.  Simplify
5134         diagnostic printing.
5135         (convert_for_initialization): Don't require_complete_type on RHS yet.
5136         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
5138         * call.c (build_over_call): Cope with qualified void return type.
5139         * semantics.c (finish_call_expr): Likewise.
5140         * typeck.c (build_function_call_real): Likewise.
5141         (c_expand_return): Likewise.
5142         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
5144         * call.c (print_z_candidates): Use alternate print format, to be
5145         consistent with (pt.c) print_candidates.
5146         * method.c (hack_identifier): List candidate members.
5147         * search.c (lookup_field): Build ambiguous list, and show it, if
5148         ambiguous.
5150 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
5152         * typeck.c (decay_conversion): Don't confuse constant array
5153         variables with their initializers.
5155         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
5156         merging decls.
5157         * pt.c (regenerate_decl_from_template): Tweak for clarity.
5158         (instantiate_decl): Mark a decl instantiated before regenerating
5159         it to avoid recursion.
5160         * tree.c (mapcar): Don't call decl_constant_value unless we know
5161         something is TREE_READONLY_DECL_P.
5163         * class.c (check_for_override): Don't stop checking when we find
5164         the first overridden function.  Delete #if 0'd code.
5165         * search.c (get_matching_virtual): Likewise.
5167 1999-02-25  Richard Henderson  <rth@cygnus.com>
5169         * lang-specs.h: Define __FAST_MATH__ when appropriate.
5171 1999-02-24  Mike Stump  <mrs@wrs.com>
5173         * typeck.c (convert_for_assignment): Allow boolean integral constant
5174         expressions to convert to null pointer.
5176 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
5178         * decl.c (lookup_namespace_name): Resolve namespace aliases.
5180         * class.c (push_nested_class): Allow namespaces.
5182         * decl2.c (set_decl_namespace): Add friendp parameter.
5183         * decl.c (grokfndecl): Pass it.
5184         (grokvardecl): Likewise.
5185         * cp-tree.h: Change declaration.
5187 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
5189         * pt.c (tsubst): Allow an array of explicit size zero.
5191 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
5193         * errfn.c: Change varargs code to look like toplev.c.
5195         * method.c (process_modifiers): Don't prepend 'U' for char or
5196         wchar_t.
5198 1999-02-20  Craig Burley  <craig@jcb-sc.com>
5200         * Make-lang.in (cplib2.ready): Don't consider updating
5201         cplib2 stuff if the current directory isn't writable, as
5202         it won't work (such as during a `make install').
5204 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
5206         * decl2.c (start_objects): Make file scope constructors and
5207         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
5208         ASM_OUTPUT_DESTRUCTOR are defined.
5210 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
5212         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
5213         (fn_type_unification): Adjust prototype.
5214         (lookup_fnfields_1): Declare.
5215         * call.c (add_template_candidate_real): Adjust call to
5216         fn_type_unification.
5217         * class.c (add_method): Don't allow duplicate declarations of
5218         constructors or destructors.
5219         (resolve_address_of_overloaded_function): Remove unused variable.
5220         Adjust call to fn_type_unification.
5221         * decl.c (grokfndecl): Be more robust in the face of illegal
5222         specializations.
5223         * decl2.c (check_classfn): Remove hokey handling of member
5224         templates.
5225         * pt.c (determine_specialization): Improve comments.  Adjust to
5226         handle template argument deduction as per the standard.
5227         (check_explicit_specialization): Fix comment spacing.  Handle
5228         type-conversion operators correctly.  Improve error-recovery.
5229         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
5230         (get_bindings_real): Simplify handling of static members.
5231         * search.c (lookup_fnfields_1): Make it have external linkage.
5232         * typeck.c (compparms): Fix comment.
5233         (build_unary_op): Don't try to figure out which template
5234         specialization is being referred to when when the address-of
5235         operator is used with a template function.
5237 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5239         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
5240         keyword to match an analogous change at the top level.
5242         * tree.c (lvalue_or_else): Likewise.
5244 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
5246         * decl.c (xref_basetypes): Comment.
5247         * pt.c (instantiate_class_template): Use xref_basetypes.
5249 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
5251         * cp-tree.h (tsubst): Change prototype.
5252         (tsubst_expr): Likewise.
5253         (tsubst_copy): Likewise.
5254         (type_unification): Remove prototype.
5255         * call.c (convert_default_arg): Adjust call to tsubst_expr.
5256         * class.c (resolve_address_of_overloaded_function): Just use
5257         fn_type_unification.
5258         * decl.c (grokdeclarator): Adjust call to tsubst.
5259         * method.c (build_template_parm_names): Likewise.
5260         * pt.c (GTB_VIA_VIRTUAL): New macro.
5261         (GTB_IGNORE_TYPE): Likewise.
5262         (resolve_overloaded_unification): Add `complain' parameter.
5263         (try_one_overload): Likewise.
5264         (tsubst_template_arg_vector): Likewise.
5265         (tsubst_template_parms): Likewise.
5266         (tsubst_aggr_type): Likewise.
5267         (tsubst_arg_types): Likewise.
5268         (tsubst_call_declarator_parms): Likewise.
5269         (unify): Remove explicit_mask.
5270         (type_unification_real): Likewise.
5271         (get_template_base_recursive): Likewise.
5272         (coerce_template_template_parms): Provide prototype.
5273         (tsubst_function_type): Likewise.
5274         (try_class_unification): New function.
5275         All callers changed to use new complain parameter.
5276         (get_template_base): Use try_class_unification.
5277         (unify): Adjust handling of classes derived from template types.
5278         (fn_type_unification): Substitute explicit arguments before
5279         unification.
5281 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5283         * decl.c (pushdecl): Remove dead code.
5285 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
5287         * decl2.c (finish_objects): Fix code I missed in previous change.
5289 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
5291         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
5292         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
5294         * pt.c (maybe_process_partial_specialization): Complain about
5295         'template <>' on non-specialization.
5297 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
5299         * decl.c (grokdeclarator): Catch wierd declarators.
5300         * decl2.c (finish_file): Don't abort because of namespace parsing
5301         failure.
5302         (check_decl_namespace): Remove.
5304 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
5306         * cp-tree.h (get_template_base): Don't declare.
5307         (dfs_walk): Declare.
5308         (dfs_unmark): Likewise.
5309         (markedp): Likewise.
5310         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
5311         targs to get_template_base.
5312         (get_template_base_recursive): Move here from search.c.  Check to
5313         see that the base found can be instantiated to form the desired
5314         type.
5315         (get_template_base): Likewise.
5316         (get_class_bindings): Simplify.
5317         * search.c (get_template_base_recursive): Move to pt.c.
5318         (get_template_base): Likewise.
5319         (markedp): Make it global.
5320         (dfs_walk): Likewise.
5321         (dfs_unmark): Likewise.
5323 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
5325         * pt.c (maybe_process_partial_specialization): Complain about
5326         specialization in wrong namespace.
5327         * tree.c (decl_namespace_context): New fn.
5329 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5331         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
5332         * pt.c (coerce_template_template_parms): Handle nested
5333         template template parameters.
5335 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
5337         * typeck2.c: Update email addresses.
5339 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5341         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
5342         turned off.
5344 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
5346         * lex.c (retrofit_lang_decl): Split out...
5347         (build_lang_decl): From here.
5348         * decl.c (pushdecl): Call it for functions generated by the middle
5349         end that don't have DECL_LANG_SPECIFIC.
5350         * cp-tree.h: Declare it.
5352         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
5353         (start_objects, finish_objects): Only use special
5354         init_priority code if the user specified a priority.
5355         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
5356         objects.
5358 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
5360         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
5361         mkstemp.o.  Get them from libiberty now.
5362         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
5364 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
5366         * decl2.c (lang_decode_option): Use read_integral_parameter.
5368 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
5370         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
5371         before calling complete_type_or_else.
5373 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5375         * input.c (inline): Don't define, its handled by system.h.
5377 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
5379         * decl2.c: Don't define flag_no_ident here.  Don't process
5380         -f(no-)ident here.
5381         * cp-tree.h: Don't declare flag_no_ident here.
5382         * lang-specs.h: Map -Qn to -fno-ident.
5384 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
5386         * cp-tree.h (struct tree_binding): Replace scope field with a union.
5387         (BINDING_SCOPE): Adjust.
5388         * decl.c (BINDING_LEVEL): Adjust.
5390 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
5392         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
5393         member constants.
5395         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
5396         a ctor initializer.
5398         * tree.c (equal_functions): Fix name in prototype.
5400         * decl.c (push_local_binding): Add FLAGS argument.
5401         (pushdecl, push_overloaded_decl): Pass it.
5402         * decl2.c (do_local_using_decl): Likewise.
5403         * cp-tree.h: Adjust prototype.
5404         * decl.c (poplevel): Fix logic.
5406         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
5407         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
5408         (cat_namespace_levels): Don't loop forever.
5410 1999-01-25  Richard Henderson  <rth@cygnus.com>
5412         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
5414 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
5416         * class.c (resolve_address_of_overloaded_function): Mark the
5417         chosen function used.
5419         * call.c (build_call): Make sure that a function coming in has
5420         been marked used already.
5421         * decl.c (expand_static_init): Call mark_used instead of
5422         assemble_external.
5423         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
5424         alloc_eh_object, expand_throw): Likewise.
5425         * init.c (build_builtin_delete_call): Likewise.
5426         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
5427         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
5428         expand_generic_desc): Likewise.
5430 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5432         * tree.c (equal_functions): New function.
5433         (ovl_member): Call it.
5435 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
5437         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
5439 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
5441         * decl.c (decls_match): Return 1 if old and new are identical.
5442         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
5444 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
5446         * decl.c (start_function): Make member functions one_only on windows.
5447         * decl2.c (import_export_decl): Likewise.
5449         * decl.c (grokdeclarator): Don't complain about implicit int in
5450         a system header.  Change same-name field check to not complain in
5451         a system header instead of within extern "C".
5453 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
5455         * cp-tree.h (PUSH_GLOBAL): New macro.
5456         (PUSH_LOCAL): Likewise.
5457         (PUSH_USING): Likewise.
5458         (namespace_bindings_p): Declare.
5459         (push_overloaded_decl): Likewise.
5460         * decl.c (push_overloaded_decl): Don't make it static.  Check for
5461         illegal declarations after using declarations here.
5462         (namespace_bindings_p): Likewise.
5463         (duplicate_decls): Don't consider declarations from different
5464         namespaces to be the same.
5465         (pushdecl): Use symbolic PUSH_ constants in calls to
5466         push_overloaded_decl.
5467         (push_overloaded_decl_1): Likewise.
5468         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
5469         (do_nonmember_using_decl): Check for illegal using declarations
5470         after ordinary declarations here.
5471         (do_local_using_decl): Call pushdecl to insert declarations.
5473 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
5475         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
5477 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
5479         * tree.c (build_cplus_array_type_1): Don't call build_array_type
5480         for types involving template parameters.
5482         * cp-tree.h (PARM_DECL_EXPR): Delete.
5483         (convert_default_arg): Change prototype.
5484         (check_default_argument): Declare.
5485         (search_tree): Likewise.
5486         * call.c (convert_default_arg): Take the function to which the
5487         default argument belongs as a parameter, and do any necessary
5488         instantiation here, instead of ...
5489         (build_over_call): Here.
5490         * decl.c (local_variable_p): New function.
5491         (check_default_argument): Likewise, split out and tidied from ...
5492         (grokparms): Here.
5493         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
5494         * pt.c (tsubst_call_declarator_parms): New function.
5495         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
5496         with CALL_EXPRs, rather than trying to be clever.
5497         (tsubst): Use tsubst_call_declarator_parms.
5498         * tree.c (search_tree): Don't make it static.
5499         * typeck.c (convert_arguments): Use new interface to
5500         convert_default_arg.
5502 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
5504         * error.c (dump_function_decl): Don't print the argument types for
5505         a function when the verbosity level is negative.
5507         * call.c (build_over_call): Check format attributes at call-time.
5509         * pt.c (tsubst_copy): Fix comment.
5510         (unify): Don't allow unification with variable-sized arrays.
5512         * semantics.c (finish_stmt_expr): When processing a template make
5513         the BIND_EXPR long-lived.
5515 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
5517         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
5518         (import_export_vtable): Not here.
5520 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
5522         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
5523         non-static member function.
5525 1999-01-18  Nathan Sidwell  <nathan@acm.org>
5527         * class.c (instantiate_type): Only diagnose illegal address of member
5528         function if complaining.
5530         * decl.c (lookup_name_real): Remove duplicate code.
5532 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
5534         * tree.c (copy_template_template_parm): Use permanent_obstack.
5536 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
5538         * pt.c (unify): Remove restrictions on deduction of argument
5539         of template template parameters.
5541 1999-01-18  Nathan Sidwell  <nathan@acm.org>
5543         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
5545         * class.c (resolve_address_of_overloaded_function): Show list of
5546         all candidates, when none of them match.
5548 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
5550         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
5551         definition of 'casting away const' in reinterpret_cast<>.
5553 1999-01-18  Graham  <grahams@rcp.co.uk>
5555         * cvt.c: Add include for decl.h, remove extern for
5556         static_aggregates which is now provided by decl.h.
5558         * Makefile.in (cvt.o): Add dependency for decl.h and missing
5559         dependencies for convert.h and flags.h.
5561 1999-01-18  Nathan Sidwell  <nathan@acm.org>
5563         * decl2.c (do_dtors): Set current location to that of the
5564         decl, for sensible diagnostics and debugging.
5565         (check_classfn): Issue `incomplete type' error, if
5566         class is not defined.
5568 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
5570         * cp-tree.h: Add prototype for bound_pmf_p.
5572 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
5573             Manfred Hollstein <manfred@s-direktnet.de>
5575         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
5576         -Wreturn-type.
5578 1999-01-16  Nathan Sidwell  <nathan@acm.org>
5580         * cp-tree.h (struct lang_type): Added has_mutable flag.
5581         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
5582         (TYPE_HAS_MUTABLE_P): New macro to read it.
5583         (cp_has_mutable_p): Prototype for new function.
5584         * class.c (finish_struct_1): Set has_mutable from members.
5585         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
5586         it contains a mutable.
5587         * typeck.c (cp_has_mutable_p): New function.
5589 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
5591         * pt.c (process_template_parm): Ignore top-level qualifiers on
5592         non-type parameters.
5594         * decl.c (start_function): Use current_function_parms in the call
5595         to require_complete_type_for_parms, not the probably empty
5596         DECL_ARGUMENTS.
5598 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
5600         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
5602         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
5603         that we don't suppress the other copies.
5604         * lex.c (handle_cp_pragma): Likewise.
5606 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
5608         * decl.c (grokdeclarator): Undo 1998-12-14 change.
5609         * tree.c (build_cplus_array_type_1): Likewise.
5610         * pt.c (instantiate_class_template): Remove misleading comment.
5611         (tsubst_aggr_type): Substitute if there are template parameters,
5612         regardless of whether or not they use template arguments.
5613         (unify): Likewise, but for unification.
5615 1999-01-12  Richard Henderson  <rth@cygnus.com>
5617         * cp-tree.h (flag_permissive): Declare extern.
5619 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
5621         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
5622         here.
5623         (lang_type): Add is_partial_instantiation.  Decrease width of
5624         dummy.
5625         (PARTIAL_INSTANTIATION_P): New macro.
5626         (OPERATOR_TYPENAME_P): Remove.
5627         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
5628         OPERATOR_TYPENAME_P.
5629         (grok_op_properties): Likewise.
5630         * friend.c (do_friend): Handle friends that are member functions
5631         correctly.
5632         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
5633         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
5634         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
5635         any more partial instantiation than is absolutely necessary for
5636         implicit typename.  Set PARTIAL_INSTANTIATION_P.
5637         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
5638         * semantics.c (begin_class_definition): Handle partial
5639         specializations of a type that was previously partially
5640         instantiated.
5642 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
5644         * g++spec.c (LIBSTDCXX): Provide default definition.
5645         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
5647 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5649         * Make-lang.in (g++.o): Depend on prefix.h.
5651 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
5653         * tree.c (bound_pmf_p): New fn.
5654         * typeck.c (build_c_cast): Use it.
5656         * decl.c (grok_op_properties): Use same_type_p.
5658 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5660         * Makefile.in (cvt.o): Depend on toplev.h.
5662         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
5664         * cvt.c: Include toplev.h.
5666         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
5667         definitions.
5669         * init.c (expand_vec_init): Initialize variable `itype'.
5671         * lex.c (yyerror): Cast the argument passed to a ctype function to
5672         an unsigned char.
5674         * method.c (build_mangled_C9x_name): Wrap prototype and definition
5675         in "HOST_BITS_PER_WIDE_INT >= 64".
5677         * typeck.c (build_binary_op): Mark parameter `convert_p' with
5678         ATTRIBUTE_UNUSED.
5680 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
5682         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
5683         * tree.c (build_exception_variant): Don't crash on empty throw
5684         specs.
5686 1998-12-18  DJ Delorie  <dj@cygnus.com>
5688         * cvt.c (convert_to_reference): Check for both error_mark_node
5689         and NULL_NODE after call to convert_for_initialization.
5691 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
5693         * error.c (interesting_scope_p): New fn.
5694         (dump_simple_decl): Use it.
5695         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
5696         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
5698 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
5700         * class.c (resolve_address_of_overloaded_function): Do conversion
5701         to correct type here, rather than ...
5702         (instantiate_type): Here.
5704         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
5705         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
5706         (decl_template_parm_p): Remove.
5707         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
5708         parameter.
5709         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
5710         * pt.c (push_inline_template_parms_recursive): Set it.
5711         (decl_template_parm_p): Remove.
5712         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
5713         (process_template_parm): Set it.
5715 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
5717         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
5718         if configured with cpplib.
5720 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
5722         * decl.c (poplevel): Make sure ns_binding is initialized.
5724         * decl.c (finish_function): Undo inadvertent change in previous
5725         patch.
5727 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
5729         * class.c (pushclass): Tweak handling of class-level bindings.
5730         (resolve_address_of_overloaded_function): Update pointer-to-member
5731         handling.
5732         (instantiate_type): Likewise.
5733         * cvt.c (cp_convert_to_pointer): Likewise.
5734         * decl.c (pop_binding): Take the DECL to pop, not just the name.
5735         Deal with `struct stat' hack.
5736         (binding_level): Add to documentation.
5737         (push_binding): Clear BINDING_TYPE.
5738         (add_binding): New function.
5739         (push_local_binding): Use it.
5740         (push_class_binding): Likewise.
5741         (poplevel): Adjust calls to pop_binding.
5742         (poplevel_class): Likewise.
5743         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
5744         declarations to current binding level.
5745         (push_class_level_binding): Likewise.
5746         (push_overloaded_decl): Adjust handling of OVERLOADs in local
5747         bindings.
5748         (lookup_namespace_name): Don't crash when confronted with a
5749         TEMPLATE_DECL.
5750         (lookup_name_real): Do `struct stat' hack in local binding
5751         contexts.
5752         (build_ptrmemfunc_type): Adjust documentation.
5753         (grokdeclarator): Don't avoid building real array types when
5754         processing templates unless really necessary.
5755         (finish_method): Adjust calls to pop_binding.
5756         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
5757         not reparse_decl_as_expr.
5758         (build_expr_from_tree): Deal with a template-id as the function to
5759         call in a METHOD_CALL_EXPR.
5760         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
5761         (maybe_adjust_types_For_deduction): Don't do peculiar things with
5762         METHOD_TYPEs here.
5763         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
5764         pointer-to-member types where necessary.
5765         * tree.c (build_cplus_array_type_1): Don't avoid building real
5766         array types when processing templates unless really necessary.
5767         (build_exception_variant): Compare the exception lists correctly.
5769 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
5771         * cp-tree.def (CPLUS_BINDING): Update documentation.
5772         * cp-tree.h (LOCAL_BINDING_P): New macro.
5773         (lang_identifier): Rename local_value to bindings.
5774         (tree_binding): Make `scope' of type `void*', not `tree'.
5775         (BINDING_SCOPE): Update documentation.
5776         (IDENTIFIER_LOCAL_VALUE): Remove.
5777         (IDENTIFIER_CLASS_VALUE): Document.
5778         (IDENTIFIER_BINDING): New macro.
5779         (IDENTIFIER_VALUE): Likewise.
5780         (TIME_IDENTIFIER_TIME): Likewise.
5781         (TIME_IDENTIFIER_FILEINFO): Likewise.
5782         (IMPLICIT_TYPENAME_P): Likewise.
5783         (set_identifier_local_value): Remove.
5784         (push_local_binding): New function.
5785         (push_class_binding): Likewise.
5786         * class.c (pushclass): Update comments; use push_class_binding.
5787         * decl.c (set_identifier_local_value_with_scope): Remove.
5788         (set_identifier_local_value): Likewise.
5789         (push_binding): New function.
5790         (pop_binding): Likewise.
5791         (binding_level): Update documentation.  Remove shadowed.
5792         (BINDING_LEVEL): New macro.
5793         (free_binding_nodes): New variable.
5794         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
5795         BLOCK_VARs when doing for-scope extension.  Remove effectively
5796         dead code.
5797         (pushlevel_class): Tweak formatting.
5798         (poplevel_class): Adjust for new name-lookup scheme.
5799         (print_binding_level): Likewise.
5800         (store_bindings): Likewise.
5801         (pushdecl): Likewise.
5802         (pushdecl_class_level): Likewise.
5803         (push_class_level_binding): Likewise.
5804         (push_overloaded_decl): Update comments.  Adjust for new
5805         name-lookup scheme.
5806         (lookup_name_real): Likewise.
5807         (lookup_name_current_level): Likewise.
5808         (cp_finish_decl): Likewise.
5809         (require_complete_types_for_parms): Likewise.  Remove misleading
5810         #if 0'd code.
5811         (grok_parms): Likewise.  Don't call
5812         require_complete_types_for_parms here.
5813         (grok_ctor_properties): Don't treat templates as copy
5814         constructors.
5815         (grop_op_properties): Or as assignment operators.
5816         (start_function): Document.  Adjust for new name-lookup scheme.
5817         (finish_function): Likewise.
5818         * decl2.c (do_local_using_decl): Use push_local_binding.
5819         * lex.c (begin_definition_of_inclass_inline): New function, split
5820         out from ...
5821         (do_pending_inlines): Here, and ...
5822         (process_next_inline): Here.
5823         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
5824         (init_filename_times): Likewise.
5825         (extract_interface_info): Likewise.
5826         (ste_typedecl_interface_info): Likewise.
5827         (check_newline): Likewise.
5828         (dump_time_statistics): Likewise.
5829         (handle_cp_pragma): Likewise.
5830         (do_identifier): Adjust for new name-lookup scheme.
5831         * parse.y (function_try_block): Return ctor_initializer_opt value.
5832         (fndef): Use it.
5833         (fn.defpen): Pass appropriate values to start_function.
5834         (pending_inline): Use functor_try_block value, and pass
5835         appropriate values to finish_function.
5836         * pt.c (is_member_template): Update documentation; remove handling
5837         of FUNCTION_DECLs.  As per name, this function should deal only in
5838         TEMPLATE_DECLs.
5839         (decl_template_parm_p): Change name of olddecl parameter to decl.
5840         (check_template_shadow): Adjust for new name-lookup scheme.
5841         (lookup_template_class): Likewise.
5842         (tsubst_decl): Tweak so as not to confuse member templates with
5843         copy constructors and assignment operators.
5844         (unify): Handle UNION_TYPEs.
5845         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
5846         (lang_print_xnode): Adjust for new name-lookup scheme.
5847         * typeck.c (mark_addressable): Likewise.
5848         (c_expand_return): Likewise.
5850 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
5852         * decl.c (grokdeclarator): Allow field with same name as class
5853         in extern "C".
5855         * decl.c (lookup_name_real): Don't limit field lookup to types.
5856         * class.c (check_member_decl_is_same_in_complete_scope): No error
5857         if icv and x are the same.
5858         * lex.c (do_identifier): Tweak error message.
5860 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
5862         * decl.c (start_enum): Use push_obstacks, not
5863         end_temporary_allocation.
5864         (finish_enum): Call pop_obstacks.
5866 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
5868         * class.c (instantiate_type): Return error_mark_node rather than
5869         junk.
5871 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
5873         * cp-tree.h (most_specialized_instantiation): New function.
5874         (print_candidates): Likewise.
5875         * class.c (validate_lhs): Remove.
5876         (resolve_address_of_overloaded_function): New function, split out
5877         and then substantially reworked, from ...
5878         (instantiate_type): Use it.  Simplify.
5879         * cvt.c (convert_to_reference): Complain when caller has indicated
5880         that's the right thing to do.  Don't crash if instantiate_type
5881         fails.
5882         * pt.c: Substitute `parameters' for `paramters' throughout.
5883         (print_candidates): Don't make it static.
5884         (most_specialized_instantiation): Split out from ...
5885         (most_specialized): Here.
5887 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
5889         * lex.c (lang_init_options): Initialize cpplib.
5890         * decl2.c (parse_options,cpp_initialized): Removed.
5891         (lang_decode_option): Move initialization of cpplib to
5892         lang_init_options.
5894 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
5896         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
5897         well as the TYPE_DECL, when a typedef name is assigned to a
5898         previously anonymous type.
5900 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
5902         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
5903         __cp_eh_info for getting the eh info pointer.  Add table_index to
5904         field list.
5905         (push_eh_cleanup): Don't increment 'handlers' data field.
5906         (process_start_catch_block): Don't set the 'caught' field.
5908         * cp/exception.cc (CP_EH_INFO): New macro for getting the
5909         exception info pointer within library routines.
5910         (__cp_eh_info): Use CP_EH_INFO.
5911         (__start_cp_handler): Get exception info pointer, set caught field,
5912         and increment the handlers field.  Avoids this being done by handlers.
5913         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
5914         (uncaught_exception): Use CP_EH_INFO macro.
5916 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
5918         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
5920 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
5922         * lex.c (check_newline): Add support for \ as `natural'
5923         characters in file names in #line to be consistent with #include
5924         handling.  We support escape processing in the # 1 "..." version of
5925         the command.  See also support in cp/lex.c.
5927 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5929         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
5930         structure.
5932 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
5934         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
5936         * error.c (dump_simple_decl): Also print namespace context.
5937         (dump_function_decl): Likewise.
5939         * decl2.c (ambiguous_decl): Don't print old value if it's
5940         error_mark_node.
5942         * decl.c (lookup_name_real): Fix handling of local types shadowed
5943         by a non-type decl.  Remove obsolete code.
5944         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
5946         * lang-options.h: Add -fpermissive.
5947         * decl2.c: Likewise.
5948         * cp-tree.h: Add flag_permissive.
5949         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
5950         were specified, set flag_pedantic_errors.
5951         * call.c (build_over_call): Turn dropped qualifier messages
5952         back into pedwarns.
5953         * cvt.c (convert_to_reference): Likewise.
5954         * typeck.c (convert_for_assignment): Likewise.
5956 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
5958         * decl2.c (coerce_new_type): Use same_type_p.
5959         (coerce_delete_type): Likewise.
5961         * call.c (check_dtor_name): Return 1, not error_mark_node.
5963 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
5965         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
5966         if MULTIPLE_SYMBOL_SPACES.
5968         * pt.c (check_template_shadow): New fn.
5969         * decl2.c (grokfield): Use it.
5970         * decl.c (pushdecl): Likewise.
5971         (pushdecl_class_level): Likewise.
5972         (start_method): Likewise.
5973         (xref_tag): Don't try to use 't' if we're defining.
5975         * call.c (check_dtor_name): Just return an error_mark_node.
5976         * pt.c (lookup_template_class): Complain about using non-template here.
5977         * parse.y (apparent_template_type): Not here.
5979         * pt.c (check_explicit_specialization): Complain about specialization
5980         with C linkage.
5982         * lang-options.h: Add -f{no-,}implicit-inline-templates.
5984         * pt.c (convert_nontype_argument): Don't assume that any integer
5985         argument is intended to be a constant-expression.
5987 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
5989         * class.c (handle_using_decl): Fix comment.  Don't lookup
5990         constructors in base classes.
5991         (validate_lhs): Fix typo in comment.
5992         * search.c (lookup_field_1): Don't return a USING_DECL.
5994         * cp-tree.h (DECL_ACCESS): Improve documentation.
5996         * decl.c (expand_static_init): Don't set the initialization-done
5997         flag until the initialization is done.
5999 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
6001         * decl2.c (validate_nonmember_using_decl): Complain about using
6002         declarations for class members.
6004 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
6006         * typeck2.c (process_init_constructor): Use same_type_p.
6008         * decl.c (check_tag_decl): Don't warn about null decl inside a
6009         class.
6011         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
6012         UNIFY_ALLOW_NONE.
6013         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
6014         (resolve_overloaded_unification): Strip baselinks.
6016 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6018         * g++spec.c: Don't prototype xmalloc.
6020 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
6022         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
6024         * decl.c (check_tag_decl): Do complain about null friend decl at
6025         file scope.
6027 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
6029         * lex.c (make_lang_type): Clear the whole struct lang_type, not
6030         only the first multiple of sizeof (int).
6032 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
6034         * decl.c (start_decl): An explicit specialization of a static data
6035         member is only a definition if it has an initializer.
6037         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
6038         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
6039         cp_finish_decl.
6040         * init.c (expand_default_init): Check for DIRECT_BIND instead of
6041         DECL_ARTIFICIAL.
6043         * call.c (build_over_call): Use build_decl.
6045         * except.c (expand_throw): Just use convert, not
6046         build_reinterpret_cast.
6048         * lex.c (handle_generic_pragma): Use token_buffer.
6050         * decl.c (check_tag_decl): Don't complain about null friend decl.
6052 1998-11-24  Dave Pitts  <dpitts@cozx.com>
6054         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
6055         first position.
6056         * lex.c (check_newline): Use ISALPHA.
6057         (readescape): Use ISGRAPH.
6058         (yyerror): Use ISGRAPH.
6060 1998-11-24  Nathan Sidwell  <nathan@acm.org>
6062         * search.c (get_abstract_virtuals): Do not use initial
6063         CLASSTYPE_ABSTRACT_VIRTUALS.
6064         * typeck2.c (abstract_virtuals_error): Show location of abstract
6065         declaration.
6066         * call.c (build_new_method_call): Use
6067         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
6068         * class.c (finish_struct_bits): Don't bother working out whether
6069         get_abstract_virtuals will do anything, just do it.
6071 1998-11-24  Graham  <grahams@rcp.co.uk>
6073         * typeck.c (build_component_ref): Remove unused statement.
6075 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
6077         * class.c (add_method): Catch invalid overloads.
6079         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
6080         * search.c (lookup_conversions): Handle getting real OVERLOADs.
6081         (add_conversions): Likewise.  Revert last change.
6082         * call.c (add_conv_candidate): Pass totype to add_candidate instead
6083         of fn.  Don't add a new candidate if the last one was for the same
6084         type.
6085         (print_z_candidates): Handle getting a type as a function.
6086         (joust): If we got two conversion candidates to the same type,
6087         just pick one.
6088         (build_object_call): Lose 'templates'.
6089         (build_user_type_conversion_1): Handle getting real OVERLOADs.
6091 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
6093         * typeck2.c (process_init_constructor): If there are elements
6094         that don't have initializers and they need to have constructors
6095         run, supply them with initializers.
6097         * class.c (finish_struct_1): A class with a 0-width bitfield is
6098         still empty.
6100 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
6102         * pt.c (instantiate_class_template): Don't try to figure out what
6103         specialization to use for a partial instantiation.  Correct
6104         typos in a couple of comments.  Avoid calling uses_template_parms
6105         multiple times.
6107 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
6109         * method.c (process_overload_item): Add call to
6110         build_mangled_C9x_name for intTI_type_nodes.
6111         (build_mangled_C9x_name): Add prototype, define.
6112         * decl.c (init_decl_processing): Add names for
6113         TImode_type_node.
6115 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
6117         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
6119         * class.c (finish_struct_1): Set things up for 0-width bitfields
6120         like we do for others.
6122         * decl.c (check_tag_decl): New fn.
6123         (shadow_tag): Split out from here.
6124         * decl2.c (grok_x_components): Call it.
6126 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
6128         * decl.c: Lose warn_about_return_type.
6129         (grokdeclarator): Always complain about implicit int, except for
6130         `main () { ... }'.
6132         * decl.c (tag_name): New fn.
6133         (xref_tag): Complain about using typedef-name after class-key.
6135         * init.c (expand_vec_init): Also keep going if from_array.
6137         * tree.c (is_overloaded_fn): Also handle the output of
6138         build_offset_ref.
6140         * decl.c (grokdeclarator): Use constructor_name when comparing
6141         field name against enclosing class.
6142         * class.c (finish_struct_anon): Likewise.
6144 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
6146         * decl.c (poplevel): Remove code to handle KEEP == 2.
6147         (finish_function): Don't confuse BLOCK-order when
6148         processing a destructor.
6150 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
6152         * decl.c (require_complete_types_for_parms): Call layout_decl
6153         after we've completed the type.
6155 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6157         * decl2.c (validate_nonmember_using_decl): Allow using templates
6158         from the global namespace.
6160 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
6162         Handle specifying template args to member function templates.
6163         * tree.c (build_overload): Always create an OVERLOAD for a template.
6164         * search.c (add_conversions): Handle finding an OVERLOAD.
6165         * decl2.c (check_classfn): Likewise.
6166         * lex.c (identifier_type): See through a baselink.
6167         * parse.y (do_id): Don't call do_identifier if we got a baselink.
6168         * class.c (instantiate_type, case TREE_LIST): Recurse.
6170         * decl.c (grokdeclarator): Allow a boolean constant for array
6171         bounds, odd as that sounds.
6173         * pt.c (unify): Be more strict about non-type parms, except for
6174         array bounds.
6175         (UNIFY_ALLOW_INTEGER): New macro.
6177 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
6179         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
6181 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
6183         * semantics.c (begin_class_definition): Call
6184         maybe_process_partial_specialization before push_template_decl.
6185         Don't call push_template_decl for a specialization.
6186         * search.c (lookup_field): Do return a member template class.
6187         * decl2.c (handle_class_head): Handle member template classes.
6189         * decl.c (grokdeclarator): A parm type need not be complete.
6191         * pt.c (convert_nontype_argument): Fix thinko.
6193 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
6195         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
6196         (global_delete_fndecl): New variable.
6197         * decl.c (global_delete_fndecl): Define it.
6198         (init_decl_processing): Set it.
6199         * init.c (build_builtin_delete_call): Use it.
6200         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
6201         nodes.
6203 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
6205         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
6206         type.
6208         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
6209         * call.c (build_object_call): Also support references to functions.
6210         * typeck.c (convert_for_initialization): Don't decay a function
6211         if the target is a reference to function.
6213         * search.c (add_conversions): Get all the overloads from a class.
6215         * decl.c (grok_ctor_properties): Complain about any constructor
6216         that will take a single arg of the class type by value.
6218         * typeck2.c (build_functional_cast): Can't create objects of
6219         abstract classes this way.
6220         * cvt.c (ocp_convert): Likewise.
6222         * decl.c (grokfndecl): Member functions of local classes are not
6223         public.
6225 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
6227         * Make-lang.in (cc1plus): Add dependency on hash.o.
6229 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
6231         * search.c (get_abstract_virtuals): Complain about virtuals with
6232         no final overrider.
6233         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
6234         with no final overrider.
6235         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
6236         on virtuals with no final overrider.
6238         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
6240         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
6241         after layout_type.
6243         * friend.c (do_friend): Don't set_mangled_name_for_decl.
6245         * class.c (finish_struct_anon): Complain about non-fields.
6246         * decl2.c (build_anon_union_vars): Likewise.
6248         * decl.c (grokdeclarator): Normal data members can't have the same
6249         name as the class, either.
6250         * class.c (finish_struct_anon): Neither can members of an
6251         anonymous union.
6253 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
6255         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
6256         (TYPE_BINFO): Likewise.
6257         (IS_AGGR_TYPE): Tweak.
6258         (SET_IS_AGGR_TYPE): New macro.
6259         (CLASS_TYPE_P): Tweak.
6260         (lang_type): Group mark bitfields together.  Remove linenum.
6261         (CLASSTYPE_SOURCE_LINE): Remove macro.
6262         (CLASSTYPE_MARKED_N): New macro.
6263         (SET_CLASSTYPE_MARKED_N): Likewise.
6264         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
6265         (CLASS_TYPE_MARKED_*): Use them.
6266         (SET_CLASSTYPE_MARKED_*): Likewise.
6267         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
6268         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
6269         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
6270         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
6271         * class.c (class_cache_obstack): New variable.
6272         (class_cache_firstobj): Likewise.
6273         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
6274         (pushclass): Free the cache, when appropriate.
6275         (popclass): Tidy.
6276         (maybe_push_cache_obstack): Use class_cache_obstack.
6277         * decl.c (include hash.h).
6278         (typename_hash): New function.
6279         (typename_compare): Likewise.
6280         (build_typename_type): Check the hash table to avoid creating
6281         duplicates.
6282         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
6283         (grokdeclarator): Use CLASS_TYPE_P.
6284         (xref_basetypes): Likewise.
6285         (start_function): Likewise.  Don't put current_class_ref on the
6286         permanent obstack.
6287         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
6288         and TYPE_TI_ARGS.
6289         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
6290         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
6291         fields for types other than class types.  Do clear TYPE_ALIAS_SET
6292         for types other than class types, though.
6293         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
6294         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6295         * pt.c (process_template_parm): Don't set
6296         CLASSTYPE_GOT_SEMICOLON.
6297         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6298         Coerce arguments on the momentary obstack.
6299         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6300         (instantiate_class_template): Calculate template arguments on the
6301         momentary obstack.  Tidy.
6302         (tsubst_template_arg_vector): Use make_temp_vec.
6303         (tsubst_aggr_type): Put template arguments on the momentary
6304         obstack.
6305         (tsubst_decl): Likewise.
6306         (tsubst): Copy the array bounds index to the permanent obstack
6307         before building index types.  Use new macros.
6308         (unify): Use new macros.
6309         (do_type_instantiation): Likewise.
6310         * search.c (lookup_fnfields_1): Use new macros.
6311         (dfs_pushdecls): Build envelopes on the cache obstack.
6312         (dfs_compress_decls): Use new macros.
6313         (push_class_decls): Build on the cache obstack.
6314         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
6315         * sign.c (build_signature_pointer_or_reference_type): Use
6316         SET_IS_AGGR_TYPE.
6317         * tree.c (make_binfo): Check CLASS_TYPE_P.
6318         (copy_template_template_parm): Adjust.
6319         (make_temp_vec): Use push_expression_obstack.
6320         * typeck.c (complete_type): Use new macros.
6321         (comptypes): Likewise.
6323 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
6325         * pt.c (tsubst): Add diagnostics for invalid array, reference
6326         and pointer to member types.
6328 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
6330         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
6332         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
6333         Simplify.
6335         * parse.y (structsp): Fix cut-and-paste error.
6337         * init.c (build_new): Complain about non-integral size.
6339         * parse.y (unary_expr): Complain about defining types in sizeof.
6341         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
6343         * rtti.c (build_x_typeid): Complain about typeid without
6344         including <typeinfo>.
6345         (get_typeid): Likewise.  Complain about typeid of incomplete type.
6346         (get_tinfo_fn_dynamic): Likewise.
6347         (get_typeid_1): Not static anymore.
6348         * except.c (build_eh_type_type): Use get_typeid_1.
6350         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
6351         ambiguous or private bases.  Fix warning for reference cast.
6353 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
6355         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
6356         * decl.c (duplicate_decls): Remove special-case code to deal with
6357         template friends, and just do the obvious thing.
6358         * pt.c (register_specialization): Tweak for clarity, and also to
6359         clear DECL_INITIAL for an instantiation before it is merged with a
6360         specialization.
6361         (check_explicit_specialization): Fix indentation.
6362         (tsubst_friend_function): Handle both definitions in friend
6363         declaration and outside friend declarations.
6364         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
6365         (regenerate_decl_from_template): Tweak accordingly.
6366         (instantiate_decl): Likewise.
6368 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
6370         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
6371         member function reference to error.
6372         * cvt.c (ocp_convert): Complain about converting an overloaded
6373         function to void.
6375         * init.c (build_offset_ref): Just return a lone static member
6376         function.
6378         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
6379         not internal ones.
6381         * typeck.c (build_binary_op_nodefault): Improve error handling.
6383         * decl.c (grokfndecl): Complain about making 'main' a template.
6385         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
6387         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
6388         TYPE_DECL in a template.
6390 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
6392         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
6394         * decl.c (struct cp_function): Add named_label_uses.
6395         (push_cp_function_context): Save it.
6396         (pop_cp_function_context): Restore it.
6397         (define_label): Also complain about jumping into the scope of
6398         non-POD objects that don't have constructors.
6399         * tree.c (pod_type_p): New fn.
6401         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
6402         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
6403         (get_tinfo_fn): Not here.
6404         * repo.c (repo_get_id): Abort if we get called for an incomplete
6405         type.
6407 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
6409         * except.c (expand_throw): Make sure first argument to
6410         __cp_push_exception is of type `void*' to avoid spurious error
6411         messages.
6413 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
6415         * pt.c (try_one_overload): Take orig_targs again.  Only check for
6416         mismatches against them; we don't care what a previous call found.
6417         (resolve_overloaded_unification): Adjust.
6419         * search.c (lookup_field): Don't return anything for a non-type
6420         field from a dependent type.
6421         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
6422         in an array declarator.
6423         (start_decl): Push into the class before looking for the field.
6425 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
6427         * method.c (build_overload_value): Handle REFERENCE_TYPE.
6429 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6431         * decl.c (grokdeclarator): Allow namespace-scoped members if they
6432         are friends.
6434 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
6436         * pt.c (tsubst_decl): Don't mess with the global value of an
6437         un-mangled DECL_ASSEMBLER_NAME.
6439 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
6441         * decl.c (init_decl_processing): Remove CYGWIN conditional
6442         since CYGWIN is now able to deal with trapping signals.
6444 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6446         * cp-tree.h: Don't include gansidecl.h.
6447         * exception.cc: Include gansidecl.h (since we don't include config.h)
6448         * g++spec.c: Don't include gansidecl.h.
6450 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
6452         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
6453         size of dummy.
6454         (DECL_DEFINED_IN_CLASS_P): New macro.
6455         (TEMPLATE_PARMS_FOR_INLINE): Document.
6456         (check_static_variable_definition): New function.
6457         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
6458         appropriate.
6459         (check_static_variable_definition): Split out from ...
6460         (grokdeclarator): Here.
6461         * pt.c (check_default_tmpl_args): New function, split out from ...
6462         (push_template_decl_real): Here.
6463         (instantiate_template): Fix comment.
6465 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
6467         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
6468         (CP_TYPE_VOLATILE_P): Likewise.
6469         (CP_TYPE_RESTRICT_P): Likewise.
6471 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
6473         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
6475 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
6477         * class.c (instantiate_type): Be more helpful.
6479         * decl2.c (import_export_decl): Call import_export_class.
6481         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
6482         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
6483         * pt.c (tsubst_copy): Likewise.
6485 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
6487         * init.c (expand_vec_init): Fix off-by-one error.
6489 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
6491         * parse.y (apparent_template_type): New type.
6492         (named_complex_class_head_sans_basetype): Use it.
6493         * Makefile.in (CONFLICTS): One new conflict.
6494         * parse.c: Regenerated.
6496 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
6498         * cp-tree.h (COMPARE_STRICT): New macro.
6499         (COMPARE_BASE): Likewise.
6500         (COMPARE_RELAXED): Likewise.
6501         (COMPARE_REDECLARATION): Likewise.
6502         (same_type_p): Likewise.
6503         (same_or_base_type_p): Likewise.
6504         * call.c (standard_conversion): Use them, in place of comptypes
6505         with numeric arguments.
6506         (reference_binding): Likewise.
6507         (convert_like): Likewise.
6508         (build_over_call): Likewise.
6509         (is_subseq): Likewise.
6510         (is_properly_derived_from): Likewise.
6511         (compare_ics): Likewise.
6512         (joust): Likewise.
6513         * class.c (delete_duplicate_fields_1): Likewise.
6514         (resolves_to_fixed_type_p): Likewise.
6515         (instantiate_type): Likewise.  Remove #if 0'd code.
6516         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
6517         (pushdecl): Likewise.
6518         (lookup_name_real): Likewise.
6519         (grokdeclarator): Likewise.  Check for illegal array declarations.
6520         (grokparms): Likewise.
6521         (grok_op_properties): Likewise.
6522         * decl2.c (check_classfn): Likewise.
6523         * friend.c (is_friend): Likewise.
6524         (make_friend_class): Likewise.
6525         * init.c (expand_aggr_init): Likewise.
6526         (expand_vec_init): Likewise.
6527         * pt.c (is_member_template_class): Remove declaration.
6528         (is_specialization_of): Use COMPARE_* and new macros.
6529         (comp_template_parms): Likewise.
6530         (convert_nontype_argument): Likewise.
6531         (coerce_template_template_parms): Likewise.
6532         (template_args_equal): Likewise.
6533         (lookup_template_class): Likewise.
6534         (type_unification_real): Likewise.
6535         (unify): Likewise.
6536         (get_bindings_real): Likewise.
6537         * search.c (covariant_return_p): Likewise.
6538         (get_matching_virtual): Likewise.
6539         * sig.c (match_method_types): Likewise.
6540         * tree.c (vec_binfo_member): Likewise.
6541         (cp_tree_equal): Likewise.
6542         * typeck.c (common_type): Likewise.
6543         (comp_array_types): Likewise.  Get issues involving unknown array
6544         bounds right.
6545         (comptypes): Update comments.  Use new flags.
6546         (comp_target_types): Use new macros.
6547         (compparms): Likewise.
6548         (comp_target_parms): Likewise.
6549         (string_conv_p): Likewise.
6550         (build_component_ref): Likewise.
6551         (build_indirect_ref): Likewise.
6552         (build_conditional_expr): Likewise.
6553         (build_static_cast): Likewise.
6554         (build_reinterpret_cast): Likewise.
6555         (build_const_cast): Likewise.
6556         (build_modify_expr): Likewise.
6557         (convert_for_assignment): Likewise.
6558         (comp_ptr_ttypes_real): Likewise.
6559         (ptr_reasonably_similar): Likewise.
6560         (comp_ptr_ttypes_const): Likewise.
6562 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
6564         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
6566 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
6568         * decl2.c (delete_sanity): Pass integer_zero_node, not
6569         integer_two_node, to build_vec_delete.
6570         * init.c (build_array_eh_cleanup): Remove.
6571         (expand_vec_init_try_block): New function.
6572         (expand_vec_init_catch_clause): Likewise.
6573         (build_vec_delete_1): Don't deal with case that auto_delete_vec
6574         might be integer_two_node anymore.
6575         (expand_vec_init): Rework for initialization-correctness and
6576         exception-correctness.
6577         * typeck2.c (process_init_constructor): Make mutual exclusivity
6578         of cases more obvious.
6580 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
6582         * decl.c (lookup_name_real): OK, only warn if not lexing.
6583         Simplify suggested fix.
6585         * cp-tree.h (IDENTIFIER_MARKED): New macro.
6586         * search.c (lookup_conversions): Use breadth_first_search.
6587         (add_conversions): Avoid adding two conversions to the same type.
6588         (breadth_first_search): Work with base binfos, rather
6589         than binfos and base indices.
6590         (get_virtual_destructor): Adjust.
6591         (tree_has_any_destructor_p): Adjust.
6592         (get_matching_virtual): Adjust.
6594         * pt.c (push_template_decl_real): Generalize check for incorrect
6595         number of template parms.
6596         (is_member_template_class): #if 0.
6598 1998-10-29  Richard Henderson  <rth@cygnus.com>
6600         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
6601         last.
6603 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6605         * lex.c: Call check_newline from lang_init always.  After
6606         calling cpp_start_read, set yy_cur and yy_lim to read from the
6607         cpplib token buffer.
6609 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
6611         * class.c (instantiate_type): Don't consider templates for a normal
6612         match.
6614         * class.c (finish_struct_1): Don't complain about non-copy
6615         assignment ops in union members.
6617         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
6618         (prepare_fresh_vtable): Likewise.
6619         (finish_struct_1): Don't call import_export_class.
6620         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
6621         (finish_prevtable_vardecl): Lose.
6622         (finish_file): Don't call it.
6623         * pt.c (instantiate_class_template): Likewise.
6624         * cp-tree.h: Remove it.
6626         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
6627         * decl.c (finish_function): Not here.
6628         (start_function): Do set DECL_INITIAL.
6630         * pt.c (push_template_decl_real): Complain about default template
6631         args for enclosing classes.
6633         * call.c (add_function_candidate): Treat conversion functions
6634         as coming from the argument's class.
6635         * cp-tree.h (DECL_CONV_FN_P): New fn.
6636         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
6637         * class.c (add_method): Use DECL_CONV_FN_P.
6638         * decl2.c (check_classfn): Likewise.
6639         * error.c (dump_function_name): Likewise.
6640         (dump_function_decl): Likewise.
6641         * pt.c (fn_type_unification): Likewise.
6642         * search.c (add_conversions): Likewise.
6644 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
6646         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
6647         * method.c (hack_identifier): Also check for using RESULT_DECL
6648         from outer context.
6650 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
6652         * decl.c (grokdeclarator): Use type_quals, rather than constp,
6653         consistently.
6655 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
6657         * call.c (standard_conversion): instantiate_type here.
6658         (reference_binding): And here.
6659         (implicit_conversion): Not here.
6660         (build_op_delete_call): No need to cons up an OVERLOAD.
6661         * cvt.c (cp_convert_to_pointer): instantiate_type here.
6662         (convert_to_reference): And here.
6663         * decl.c (grok_reference_init): Not here.
6664         (grokparms): Or here.
6665         * typeck2.c (digest_init): Or here.
6666         * typeck.c (decay_conversion): Take the address of overloaded
6667         functions, too.
6668         (require_instantiated_type): Lose.
6669         (convert_arguments): Don't handle unknown types here.
6670         (build_c_cast): Likewise.
6671         (build_binary_op): Gut.
6672         (build_conditional_expr): Don't require_instantiated_type.
6673         (build_modify_expr): Likewise.
6674         (build_static_cast): Don't instantiate_type.
6675         (build_reinterpret_cast): Likewise.
6676         (build_const_cast): Likewise.
6677         (convert_for_initialization): Likewise.
6678         (build_ptrmemfunc): Use type_unknown_p.
6679         (convert_for_assignment): Also do default_conversion on overloaded
6680         functions.  Hand them off to ocp_convert.
6682 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
6684         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
6685         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
6687         * class.c (finish_struct_1): Use build_cplus_array_type to build
6688         array types.
6689         * decl.c (init_decl_processing): Likewise.
6690         * except.c (expand_end_eh_spec): Likewise.
6691         * search.c (expand_upcast_fixups): Simplify very slightly.
6693 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6695         * decl.c (grokdeclarator): Complain about a variable using
6696         constructor syntax coming back null from start_decl.
6698         * friend.c (make_friend_class): Complain about trying to make
6699         a non-class type a friend.
6701         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
6702         (start_function): Not here.
6704 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
6706         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
6708 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6710         * typeck2.c (process_init_constructor): Only skip anonymous fields
6711         if they are bitfields.
6713         * cp-tree.def (TYPEOF_TYPE): New code.
6714         * error.c (dump_type_real): Handle it.
6715         * pt.c (tsubst): Likewise.
6716         * tree.c (search_tree): Likewise.
6717         * semantics.c (finish_typeof): New fn.
6718         * parse.y (typespec): Use it.
6719         * cp-tree.h: Declare it.
6721 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
6723         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
6725 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
6727         * typeck.c (convert_arguments): Don't handle pmf references
6728         specially.
6730         * init.c (build_member_call): Don't try to convert to the base type
6731         if it's ambiguous or pedantic.
6733         * typeck2.c (check_for_new_type): Only depend on pedantic for
6734         C-style casts.
6736 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
6738         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
6739         non-converting constructors.
6741 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6743         * gxxint.texi: Correct documentation for n, N, Q, and B.
6745 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6747         * parse.y (condition): Convert VAR_DECL from reference to indirect
6748         reference.
6750 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
6752         * exception.cc (__cp_pop_exception): Free the original exception
6753         value, not the potentially coerced one.
6755 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
6757         * Makefile.in (hash.h): Run gperf when necessary.
6759         * cp-tree.h (CP_TYPE_READONLY): Remove.
6760         (CP_TYPE_VOLATILE): Likewise.
6761         (CP_TYPE_QUALS): New macro.
6762         (CP_TYPE_CONST_P): Likewise.
6763         (CP_TYPE_VOLATILE_P): Likewise.
6764         (CP_TYPE_RESTRICT_P): Likewise.
6765         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
6766         (cp_build_type_variant): Rename to ...
6767         (cp_build_qualified_type): New function.
6768         (c_apply_type_quals_to_decl): Declare.
6769         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
6770         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
6771         (cp_type_qual_from_rid): New function.
6772         (compparms): Remove unused parameter.  All callers changed.
6773         (cp_type_quals): New function.
6774         (at_least_as_qualified_p): Likewise.
6775         (more_qualified_p): Likewise.
6777         * call.c (standard_conversion): Replace calls to
6778         cp_build_type_variant with cp_build_qualified_type.  Use
6779         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
6780         compare them.  Use CP_TYPE_* macros to check qualifiers.
6781         (reference_binding): Likewise.
6782         (implicit_conversion): Likewise.
6783         (add_builtin_candidates): Likewise.
6784         (build_over_call): Likewise.
6785         * class.c (overrides): Compare all qualifiers, not just `const',
6786         on method declarations.
6787         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
6788         (convert_pointer_to_real): Likewise.
6789         (type_promotes_to): Likewise.
6790         * decl.c (check_for_uninitialized_const_var): New function.
6791         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
6792         (cp_finish_decl): Use check_for_uninitialized_const_var.
6793         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
6794         handle `restrict'.
6795         (grok_ctor_properties): Likewise.
6796         (grok_op_properties): Likewise.
6797         (start_function): Likewise.
6798         (rever_static_member_fn): Likewise.
6799         * decl2.c (grok_method_quals): Likewise.
6800         (grokfield): Likewise.
6801         * error.c (dump_readonly_or_volatile): Rename to ...
6802         (dump_qualifiers): New function.  Handle `restrict'.
6803         (dump_type_real): Use it.
6804         (dump_aggr_type): Likewise.
6805         (dump_type_prefix): Likewise.
6806         (dump_type_suffix): Likewise.
6807         (dump_function_decl): Likewise.
6808         (cv_as_string): Likewise.
6809         * gxx.gperf: Add __restrict and __restrict__.
6810         * gxxint.texi: Document `u' as used for `__restrict', and a few
6811         other previously undocumented codes.
6812         * hash.h: Regenerated.
6813         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
6814         (build_member_call): Likewise.
6815         (build_new_1): Likewise.
6816         * lex.c (init_parse): Add entry for RID_RESTRICT.
6817         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
6818         (cp_type_qual_from_rid): Define.
6819         * lex.h (enum rid): Add RID_RESTRICT.
6820         * method.c (process_modifiers): Deal with `restrict'.
6821         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
6822         * parse.c: Regenerated.
6823         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
6824         (tsubst_aggr_type): Likewise.
6825         (tsubst): Likewise.
6826         (check_cv_quals_for_unify): Likewise.
6827         (unify): Likewise.
6828         * rtti.c (init_rtti_processing): Likewise.
6829         (build_headof): Likewise.
6830         (get_tinfo_var): Likewise.
6831         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
6832         (expand_class_desc): Likewise.
6833         (expand_attr_desc): Likewise.
6834         (synthesize_tinfo_fn): Likewise.
6835         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
6836         (get_matching_virtual): Likewise.
6837         (expand_upcast_fixups): Likewise.
6838         * sig.c (build_signature_pointer_or_reference_name): Take
6839         type_quals, not constp and volatilep.
6840         (build_signature_pointer_or_reference_type): Likewise.
6841         (match_method_types): More CP_TYPE_QUALS conversion, etc.
6842         (build_signature_pointer_constructor): Likewise.
6843         (build_signature_method_call): Likewise.
6844         * tree.c (build_cplus_array_type): Likewise.
6845         (cp_build_type_variant): Rename to ...
6846         (cp_build_qualified_type): New function.  Deal with `__restrict'.
6847         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
6848         (build_exception_variant): Likewise.
6849         (mapcar): Likewise.
6850         * typeck.c (qualif_type): Likewise.
6851         (common_type): Likewise.
6852         (comptypes): Likewise.
6853         (comp_cv_target_types): Likewise.
6854         (at_least_as_qualified_p): Define.
6855         (more_qualified_p): Likewise.
6856         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
6857         (compparms): Likewise.
6858         (inline_conversion): Likewise.
6859         (string_conv_p): Likewise.
6860         (build_component_ref): Likewise.
6861         (build_indirect_ref): Likewise.
6862         (build_array_ref): Likewise.
6863         (build_unary_op): Likewise.
6864         (build_conditional_expr): Likewise.
6865         (build_static_cast): Likewise.
6866         (build_c_cast): Likewise.
6867         (build_modify_expr): Likewise.
6868         (convert_For_assignment): Likewise.
6869         (comp_ptr_ttypes_real): Likewise.
6870         (cp_type_quals): New function.
6872 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
6874         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
6875         (CP_TYPE_VOLATILE): Likewise.
6876         * decl.c (grokdeclarator): Use them.
6877         * tree.c (canonical_type_variant): Likewise.
6879 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6881         * parse.y (named_class_head): Push into class while parsing the
6882         base class list.
6883         * decl2.c (push_scope, pop_scope): New functions.
6884         * cp-tree.h: Declare them.
6885         * init.c (build_new_1): Delay cleanup until end of full expression.
6887 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
6889         * typeck.c (build_component_ref): Use of a type here is an error.
6891 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
6893         Revamp references to member functions.
6894         * method.c (hack_identifier): Call build_component_ref for a
6895         reference to a member function.
6896         * typeck.c (build_component_ref): Only return a single function
6897         if it's static.  Otherwise, return a COMPONENT_REF.
6898         (build_x_function_call): Handle a COMPONENT_REF.
6899         (build_unary_op): Handle all unknown-type things.
6900         * decl2.c (arg_assoc): Handle COMPONENT_REF.
6901         * class.c (instantiate_type): Complain if the function we get is a
6902         nonstatic member function.  Remove code for finding "compatible"
6903         functions.
6904         * pt.c (tsubst_copy): Handle NOP_EXPR.
6905         * tree.c (build_dummy_object): New fn.
6906         (maybe_dummy_object): New fn.
6907         (is_dummy_object): New fn.
6908         * cp-tree.h: Declare them.
6909         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
6910         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
6911         * init.c (build_member_call): Use maybe_dummy_object and
6912         is_dummy_object.
6913         (build_offset_ref): Use maybe_dummy_object.
6914         (resolve_offset_ref): Use is_dummy_object.
6915         * typeck.c (build_x_function_call): Call build_dummy_object.
6916         (unary_complex_lvalue): Call is_dummy_object.
6918         * typeck.c (build_component_addr): Make sure field is a field.
6920         * call.c (build_new_op): Delete obsolete code.
6922         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
6924 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6926         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
6927         std if std is ignored.
6929 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
6931         * decl.c (grokvardecl): Fix thinko.
6933         * decl.c (grokdeclarator): Embedded attrs bind to the right,
6934         not the left.
6936         * parse.y (fn.def2): Fix 'attrs' format.
6938 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
6940         * Makefile.in (CONFLICTS): Update.
6941         * parse.y (expr_or_declarator_intern): New rule.
6942         (expr_or_declarator, direct_notype_declarator, primary,
6943         functional_cast): Use it.
6944         (notype_declarator_intern): New rule.
6945         (notype_declarator, complex_notype_declarator): Use it.
6947 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
6949         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
6950         (grokvardecl): Likewise.
6952 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6954         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
6955         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
6957         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
6959         * pt.c (process_partial_specialization): Cast 1st argument of
6960         `bzero' to (PTR).
6962         * tree.c (build_base_fields): Cast `base_align' to (int) when
6963         comparing against one.
6965 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
6967         * decl.c (lookup_name_real): Handle template parameters for member
6968         templates where said parameters have the same name as the
6969         surrounding class.
6971         * decl.c (expand_static_init): Build cleanups before entering the
6972         anonymous function used to do them to avoid access-checking
6973         confusion.
6975         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
6976         accidentally removed by previous change, and make DECL_RTL here.
6977         * class.c (add_method): Don't make DECL_RTL here.
6979         * pt.c (for_each_template_parm): Don't examine uninstantiated
6980         default arguments.
6982 1998-10-16  Dave Brolley  <brolley@cygnus.com>
6984         * lex.c (real_yylex): Fix unaligned access of wchar_t.
6986 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
6988         * class.c (add_method): Fix documentation to reflect previous
6989         changes.  Check for duplicate method declarations here.
6990         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
6991         correctly; such things never match.
6992         (grokfndecl): Don't look for duplicate methods here.
6993         * decl2.c (check_classfn): Don't assume names are mangled.
6994         Don't add bogus member function declarations to a class before the
6995         class type is complete.
6996         (grokfield): Reformat error message.
6997         * method.c (set_mangled_name_for_decl): Don't mangle names while
6998         processing_template_decl.
7000 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
7002         * typeck.c (build_indirect_ref): Complain about a pointer to data
7003         member, too.
7004         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
7005         data member.
7006         * init.c (resolve_offset_ref): Don't undo the above.
7008         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
7009         (struct lang_decl_flags): Add `bitfield'.
7010         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
7011         DECL_BIT_FIELD.
7012         * decl2.c (grokbitfield, grok_alignof): Likewise.
7013         * init.c (build_offset_ref): Likewise.
7014         * typeck.c (build_component_addr, expr_sizeof): Likewise.
7015         * cvt.c (build_up_reference): Don't crash if taking the address
7016         returns error_mark_node.
7018         * decl.c (grokfndecl): Also check ctype when checking for ::main().
7020 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
7022         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
7023         Do mangling here.
7024         (grokdeclarator): Instead of here.
7025         * friend.c (do_friend): Lose special handling of ::main and
7026         __builtin_*.
7027         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
7029         * spew.c (yylex): Clear looking_for_typename if we got
7030         'enum { ... };'.
7032 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
7034         * class.c (maybe_warn_about_overly_private_class): Improve error
7035         messages for class with only private constructors.
7037         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
7038         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
7039         (build_typename_type): New function.
7040         * decl.c (build_typename_type): Broken out from ...
7041         (make_typename_type): Use it.
7042         * search.c (lookup_field): Likewise.
7044 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
7046         * pt.c (convert_nontype_argument): Check against type_referred_to.
7047         * decl.c (grokvardecl): Check for declarator name before building
7048         DECL_ASSEMBLER_NAME.
7050 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
7052         * pt.c (lookup_template_class): Add comment.
7053         (instantiate_class_template): Don't mark the _TYPE node for
7054         member class templates as an instantiation.
7056 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
7058         * decl.c (grokfndecl): Fix my thinko.
7060 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
7062         * tinfo2.cc (fast_compare): Remove.
7063         (before): Just use strcmp.
7064         * tinfo.cc (operator==): Just use strcmp.
7066 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
7068         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
7069         declarations.
7071 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
7073         * cp-tree.h (specializations_of_same_template_p): Remove.
7074         * search.c (get_template_base): Don't use it.
7075         (get_template_base_recursive): Likewise.
7076         * pt.c (specializations_of_same_template_p): Remove.
7077         (unify): Don't use it.
7078         (lookup_template_class): Find the correct parent when setting
7079         CLASSTYPE_TI_TEMPLATE.
7081 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
7083         * tinfo.cc (operator==): Always compare names.
7085 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
7087         * decl.c (start_function): Fix cut-and-paste error.
7089 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
7091         * inc/typeinfo: Add #pragma interface.
7092         (operator!=): Just call operator==.
7093         * tinfo.cc: Add #pragma implementation.
7094         (operator==): Move from inc/typeinfo and tinfo2.cc.
7095         Check __COMMON_UNRELIABLE instead of _WIN32.
7097         * typeck2.c (my_friendly_abort): Add URL.
7099 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
7101         * decl.c (start_method): Added extra parameter for attributes.
7102         * cp-tree.h (start_method): Update prototype.
7103         * parse.y (fn.def2): Update start_method parameter list.
7105 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
7107         * cp-tree.h (specializations_of_same_template_p): Declare.
7108         * pt.c (specializations_of_same_template_p): New function.
7109         (unify): Use it.
7110         * search.c (get_template_base): Use it.
7111         (get_template_base_recursive): Likewise.
7113 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
7115         * decl2.c (start_objects): Add new variable `joiner' and
7116         initialize it properly.
7118 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
7120         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
7121         change to vtable types.
7123         * cvt.c (ocp_convert): Avoid infinite recursion caused by
7124         1998-10-03 change.
7126 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
7128         * pt.c (resolve_overloaded_unification): New fn.
7129         (try_one_overload): Likewise.
7130         (unify): Don't fail on unknown type.
7131         (type_unification_real): Likewise.  Use resolve_overloaded_unification
7132         to handle an overloaded argument.
7133         (template_args_equal): Split out...
7134         (comp_template_args): From here.
7135         (determine_specialization): Also allow a template with more
7136         parms than were explicitly specified.
7137         * cp-tree.h: Add template_args_equal.
7138         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
7140 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
7142         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
7143         change.
7145 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
7147         * typeck.c (unsigned_type): Only return TItype nodes when
7148         HOST_BITS_PER_WIDE_INT is >= 64 bits.
7149         (signed_type): Likewise.
7150         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
7151         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
7152         (init_decl_processing): Only create TItype nodes when
7153         HOST_BITS_PER_WIDE_INT is >= 64 bits.
7154         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
7155         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
7157 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7159         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
7160         (gxx.gperf): Update comments describing invocation flags.
7161         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
7163 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
7165         * class.c (finish_struct_1): Add commentary on previous change.
7167         * cp-tree.h (vtbl_ptr_type_node): New variable.
7168         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
7169         already of the right type.
7170         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
7171         Simplify code to grow vtable.
7172         * decl.c (vtbl_ptr_type_node): Define.
7173         (init_decl_processing): Initialize it.
7175 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
7177         * cp-tree.def (PTRMEM_CST): New tree node.
7178         * cp-tree.h (ptrmem_cst): New type.
7179         (lang_type): Remove local_typedecls.
7180         (dummy): Increase to 12 bits from 11.
7181         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
7182         (PTRMEM_CST_CLASS): New macro.
7183         (PTRMEM_CST_MEMBER): Likewise.
7184         (current_access_specifier): New variable.
7185         (current_class_type): Remove duplicate declaration.
7186         (finish_struct): Change prototype.
7187         (unreverse_member_declarations): New function.
7188         (pushdecl_class_level): Change prototype.
7189         (grok_enum_decls): Remove.
7190         (fixup_anonymous_union): New function.
7191         (grok_x_components): Change prototype.
7192         (tsubst_chain): Remove.
7193         (finish_member_template_decl): Likewise.
7194         (check_explicit_specialization): Fix indentation.
7195         (finish_class_definition): Change prototype.
7196         (finish_member_class_template): Likewise.
7197         (finish_member_declaration): New function.
7198         (check_multiple_declarators): Likewise.
7199         * class.c (class_stack_node_t): New type.
7200         (current_class_base): Remove.
7201         (current_class_stack): Change type.
7202         (current_access_specifier): New variable.
7203         (grow_method): Remove.
7204         (check_member_decl_is_same_in_complete_scope): Break out from
7205         finish_struct.
7206         (make_method_vec): New function.
7207         (free_method_vec): Likewise.
7208         (add_implicitly_declared_members): Break out from finish_struct_1.
7209         (free_method_vecs): New variable.
7210         (add_method): Rework for direct use from parser.
7211         (handle_using_decl): Watch for NULL_TREE while iterating through
7212         CLASSTYPE_METHOD_VEC.
7213         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
7214         just do some error-checking.
7215         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
7216         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
7217         (finish_struct): Change prototype.  Simplify; fields and methods
7218         are already set up at this point.
7219         (init_class_processing): Set up current_class_stack.
7220         (pushclass): Save current_access_specifier.
7221         (popclass): Restore it.
7222         (currently_open_class): Simplify.
7223         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
7224         * decl.c (saved_scope): Add access_specifier.
7225         (maybe_push_to_top_level): Save it.
7226         (pop_from_top_level): Restore it.
7227         (maybe_process_template_type_declaration): Use
7228         finish_member_declaration.
7229         (pushtag): Likewise.
7230         (pushdecl_class_level): Don't return a value.
7231         (fixup_anonymous_union): Break out from grok_x_components.
7232         (shadow_tag): Use it.
7233         (xref_tag): Complain about using an elaborated type specifier to
7234         reference a template type parameter or typedef name.
7235         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
7236         (current_local_enum): Remove.
7237         (build_enumerator): Call finish_member_declaration.
7238         (grok_enum_decls): Remove.
7239         * decl2.c (grok_x_components): Simplify.
7240         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
7241         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
7242         (merge_functions): Add to comment.
7243         (arg_assoc_type): Prototype.
7244         (arg_assoc): Pass as many arguments as there are parameters.
7245         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
7246         OFFSET_REF.
7247         * expr.c (cpls_expand_expr): Remove dead code.  Handle
7248         PTRMEM_CST.
7249         * friend.c (do_friend): Lookup friends when in nested classes.
7250         Change comments.
7251         * init.c (build_offset_ref): Do lookup even for classes that are
7252         only partially defined.
7253         (decl_constant_value): Remove dead code.
7254         * method.c (build_overload_value): Remove hack where by TYPE was
7255         not a TYPE.  Handle PTRMEM_CST.
7256         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
7257         should go.
7258         * parse.y (components, notype_components, component_decl,
7259         component_decl_1, component_declarator, component_declarator0):
7260         Now all are itype rather than ttype.  Rework to add members to
7261         classes on the fly.
7262         (typesqpecqual_reserved): Use check_multiple_declarators.
7263         (structsp): Update class to finish_class_definition.
7264         (do_xref_defn): Unsplit into named_class_head.
7265         (access_specifier): Set current_access_specifier.
7266         * pt.c (set_current_access_from_decl): New function.
7267         (finish_member_template_decl): Don't take the parameters.
7268         (comp_template_args): Make more robust.
7269         (lookup_template_class): Don't use current_local_enum.
7270         (for_each_template_parm): Handle PTRMEM_CST.
7271         (instantiate_class_template): Use set_current_access_from_decl,
7272         finish_member_declaration and unreverse_member_declarations.  Set
7273         lineno/input_filename before generating implicit member functions.
7274         (type_unification_real): Don't assume back-unification happens
7275         only for the last argument.
7276         (regenerate_decl_from_template): Call pushclass a bit earlier.
7277         (tsubst_chain): Remove.
7278         (tsubst_enum): Use set_current_access_from_decl.
7279         (set_mangled_name_for_template_decl): Fix indentation.
7280         * search.c (lookup_fnfields_1): Change iteration through
7281         CLASSTYPE_METHOD_VEC.
7282         (dfs_pushdecls): Likewise.
7283         (dfs_compress_decls): Likewise.
7284         (add_conversions): Likewise.
7285         * semantics.c (finish_class_definition): Don't take components.
7286         Change call to finish_struct.
7287         (finish_member_declaration): New function.
7288         (finish_member_class_template): Don't take template parameters.
7289         Change call to grok_x_components.  Call finish_member_template_decl.
7290         (check_multiple_declarators): New function.
7291         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
7292         a passed in fieldlist.
7293         * tree.c (search_tree): Handle PTRMEM_CST.
7294         (mapcar): Likewise.
7295         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
7296         INTEGER_CSTs, for pointer-to-data members.
7298         * call.c (resolve_args): Resolve template specializations, if
7299         possible.
7301 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7303         * Makefile.in (spew.o): Depend on toplev.h.
7305         * call.c (compare_ics): Initialize variables `deref_from_type2',
7306         `deref_to_type1' and `deref_to_type2'.
7308         * except.c (get_eh_type): Hide prototype and definition.
7309         (process_start_catch_block_old): Remove unused static prototype.
7311         * pt.c (tsubst_decl): Initialize variable `argvec'.
7313         * spew.c: Include toplev.h.
7315 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
7317         * pt.c (instantiate_decl): Do save and restore file position.
7319 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7321         * method.c (build_decl_overload_real): Clear
7322         numeric_output_need_bar after __.
7324 1998-10-05  Nathan Sidwell  <nathan@acm.org>
7326         * call.c (build_new_method_call): Issue 'incomplete type' error,
7327         if class is not defined.
7329 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7331         * call.c (build_object_call): Move declaration of variable
7332         `fn' into the scope where it is used.  Don't access variable
7333         `fn' when it is uninitialized, instead use `fns'.
7335 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
7337         * errfn.c (cp_thing): Print buf as a string not as a printf format
7338         to avoid problems with the operator%.  Consequently, `%%' sequences
7339         in format are copied as `%' in buf.
7341 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
7343         * pt.c (pop_tinst_level): Call extract_interface_info.
7344         (instantiate_decl): Don't save and restore file position.
7346         * decl.c (cp_finish_decl): Make statics in extern inlines and
7347         templates common, if possible and the target doesn't support weak
7348         symbols.
7350         * decl.c (grokdeclarator): Remove redundant calls to
7351         build_type_variant and some duplicated code.
7352         * sig.c (build_signature_reference_type): Only take the type parm.
7353         (build_signature_pointer_type): Likewise.
7354         * tree.c (build_cplus_method_type): Adjust.
7355         * cp-tree.h: Update.
7357 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
7359         * call.c (build_over_call): Make pedwarns about dropped qualifiers
7360         into full-fledged errors.
7361         * cvt.c (convert_to_reference): Likewise.
7362         * typeck.c (convert_for_assignment): Likewise.
7364         * search.c (expand_upcast_vtables): In addition to unsetting
7365         TREE_READONLY, remove top-level const type qualifier.
7367 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
7369         * class.c (current_class_ptr, current_class_ref): Clarify
7370         documentation.
7371         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
7372         NOP type conversions.
7373         * decl.c (decls_match): Use comptypes directly; ignore
7374         qualifiers on the DECL.
7375         (duplicate_decls): Remove qualifier checks on DECL.
7376         (grokdeclarator): Make the type built up include top-level
7377         qualifiers.
7378         * decl2.c (do_dtors): Fix spelling error.
7379         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
7380         when printing type information.
7381         * init.c (build_new_1): Add documentation.  Deal with the fact
7382         that type of allocated memory now contains qualifiers.
7383         * lex.c (is_global): Improve error-recovery.
7384         * sig.c (build_member_function_pointer): Don't cast away const
7385         on fields of sigtable_entry_type.
7386         * tree.c (lvalue_type): Don't look at top-level qualifiers on
7387         expressions.
7388         * typeck.c (decay_conversion): Likewise.
7389         (build_component_ref): Make sure the type of the COMPONENT_REF
7390         contains top-level qualifiers, as appropriate.  Improve
7391         error-handling.
7392         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
7393         (build_array_ref): Likewise.
7394         (build_unary_op): Improve error-recovery.
7395         (unary_complex_lvalue): Make taking the address a bound member
7396         function an error, not a sorry.
7397         (build_conditional_expr): Look at the type qualifiers, not the
7398         qualifiers on the expression itself.
7400 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
7402         * decl2.c (merge_functions): Remove duplicates.
7404         * decl2.c: Add -f{no-,}implicit-inline-templates.
7405         (import_export_decl): Check it.
7407         * decl.c (lookup_name_real): Template parms also take precedence
7408         over implicit typename.  Only warn if yylex.
7410         * typeck.c (build_conditional_expr): Only fold if ifexp is an
7411         INTEGER_CST.
7413         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
7414         instead of linkage.
7416 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
7418         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
7419         * class.c (build_vbase_pointer): Use it.
7420         * rtti.c (expand_class_desc): Likewise.
7421         * tree.c (build_vbase_pointer_fields): Likewise.
7423 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
7425         * decl.c (start_decl): Add invocation of
7426         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
7427         (start_function): Add invocation of
7428         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
7430         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
7431         HANDLE_GENERIC_PRAGMAS.
7433 1998-09-28  Anthony Green  <green@cygnus.com>
7435         * semantics.c (finish_asm_stmt): Always permit volatile asms.
7437 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
7439         * decl.c (grokdeclarator): Tighten checks for invalid
7440         destructors.  Improve error-messages and error-recovery.
7441         * decl2.c (check_classfn): Don't assume that mangled destructor
7442         names contain type information.
7444 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
7446         * search.c (get_base_distance): Remove assert.
7448         * decl2.c (build_anon_union_vars): Don't process a field with no
7449         name.
7450         (finish_anon_union): Also complain about local anon unions with no
7451         members.
7453 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7455         * decl.c (lookup_namespace_name): If the name is a namespace,
7456         return it immediately.
7458 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7460         * cp-tree.h (define_case_label): Remove unused parameter.
7461         (check_java_method): Likewise.
7462         (grokclassfn): Likewise.
7463         (expand_aggr_init): Likewise.
7464         (build_x_delete): Likewise.
7465         (maybe_end_member_template_processing): Likewise.
7466         (unshare_base_binfos): Add prototype.
7467         (string_conv_p): Likewise.
7468         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
7470         * cvt.c (build_up_reference): Remove unused parameter
7471         `checkconst', all callers changed.
7472         (build_type_conversion): Mark parameter `code' with
7473         ATTRIBUTE_UNUSED.
7474         (build_expr_type_conversion): Initialize variable `conv'.
7476         * decl.c (push_namespace): Initialize variable `d'.
7477         (define_case_label): Remove unused parameter `decl', all callers
7478         changed.
7480         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
7481         `argc' with ATTRIBUTE_UNUSED.
7482         (grokclassfn): Remove unused parameter `cname', all callers
7483         changed.
7484         (check_java_method): Likewise for parameter `ctype'.
7485         (copy_assignment_arg_p): Mark parameter `virtualp' with
7486         ATTRIBUTE_UNUSED.
7487         (finish_prevtable_vardecl): Likewise for parameter `prev'.
7489         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
7491         * init.c (expand_aggr_init_1): Remove unused parameter
7492         `alias_this', all callers changed.
7493         (expand_aggr_init): Likewise.
7494         (expand_default_init): Likewise.
7495         (build_new_1): Initialize variable `susp'.
7496         (build_x_delete): Remove unused parameter `type', all callers
7497         changed.
7499         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
7500         ATTRIBUTE_UNUSED.
7501         (readescape): Use (unsigned) value in shift.
7502         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
7503         comparing to a signed quantity.
7505         * pt.c (maybe_end_member_template_processing): Remove unused
7506         parameter `decl', all callers changed.
7507         (check_explicit_specialization): Add braces around empty body in
7508         an else-statement.
7509         (current_template_args): Initialize variable `args'.
7510         (lookup_template_class): Likewise for variable `prev_local_enum'.
7511         (tsubst_decl): Likewise for variable `r'.
7512         (set_mangled_name_for_template_decl): Initialize variable
7513         `context'.
7515         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
7516         Likewise for variable `i'.
7517         (yylex): Initialize variable `trrr'.
7519         * typeck.c (compparms): Mark variable `strict' with
7520         ATTRIBUTE_UNUSED.
7522         * xref.c (simplify_type): Cast argument of ctype function to
7523         `unsigned char'.
7525 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
7527         * cp-tree.h (language_lvalue_valid): Remove.
7528         * decl.c (grokdeclarator): Don't disallow references to functions.
7529         * tree.c (lvalue_p_1): New function, combining duplicated
7530         code from ...
7531         (lvalue_p): Use it.
7532         (real_lvalue_p): Likewise.
7533         * typeck.c (language_lvalue_valid): Remove.
7534         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
7535         they don't have TREE_READONLY set.
7536         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
7538 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7540         * spew.c (yylex): Give diagnostic.
7541         * hash.h (is_reserved_word): Add export.
7542         * gxx.gperf: Likewise.
7543         * lex.h (rid): Add RID_EXPORT.
7544         * lex.c (init_parse): Likewise.
7546 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
7548         * friend.c (do_friend): Make warning a full sentence.
7550 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
7552         * parse.y (component_decl_list): Improve error-recovery.
7554 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7556         * decl.c (make_typename_type): Move error to point where name
7557         variable can be used by dump_type.
7559 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
7561         * decl.c (grokfndecl): Improve error-recovery.
7562         * decl2.c (grokfield): Likewise.
7563         * pt.c (finish_member_template_decl): Likewise.
7565 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7567         * method.c (hack_identifier): Finding multiple members is always
7568         an error.
7570 1998-09-21  Per Bothner  <bothner@cygnus.com>
7572         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
7574 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
7576         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
7578 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
7580         * class.c (maybe_warn_about_overly_private_class): Reformat.
7582 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
7584         * exception.cc (__cplus_type_matcher): Realign some code.
7586 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
7588         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
7589         (tinfo2.o): Likewise.
7590         (exception.o): Likewise.
7591         (new.o): Likewise.
7592         (opnew.o): Likewise.
7593         (opnewnt.o): Likewise.
7594         (opvnew.o): Likewise.
7595         (opvnewnt.o): Likewise.
7596         (opdel.o): Likewise.
7597         (opdelnt.o): Likewise.
7598         (opvdel.o): Likewise.
7599         (opvdelnt.o): Likewise.
7601 1998-09-16  Richard Henderson  <rth@cygnus.com>
7603         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
7605 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
7607         * call.c (build_field_call): Handle static data members too.
7609         * typeck.c (comptypes): When comparing pointer types, check
7610         whether referred types match even in strictest modes.
7612 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
7614         * cp-tree.h: Revert previous change.
7615         (finish_struct_methods): Remove declaration.
7616         * class.c: Revert previous change.
7617         (maybe_warn_about_overly_private_class): New function.
7618         (finish_struct_methods): Declare here, and make static.  Remove
7619         unnecessary parameters.  Tidy slightly.  Use
7620         maybe_warn_about_overly_private_class.
7621         (finish_struct_1): Adjust.  Remove check for private constructors,
7622         now done elsewhere.
7623         (finish_struct): Adjust.
7625 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
7627         * except.c (expand_start_catch_block): No need to check for new
7628         exception model.
7629         (process_start_catch_block_old): Deleted.
7630         (process_start_catch_block): Add call to start_decl_1().
7631         (expand_end_catch_block): Add call to end_catch_handler().
7632         * exception.cc (__cplus_type_matcher): Only check the exception
7633         language if there is an exception table.
7635 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
7637         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
7638         as used to prevent conflicts with virtual function tables.
7640 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
7642         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
7643         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
7644         * class.c (maybe_class_too_private_p): New function.
7645         (finish_struct_methods): Use it.
7646         (finish_struct_1): Likewise.
7647         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
7648         appropriate.
7650         * pt.c (check_specialization_scope): Fix spelling error.
7651         (check_explicit_specialization): Remove code to handle explicit
7652         specializations in class scope; they are now correctly diagnosed
7653         as errors.
7655 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
7657         * decl.c (pushdecl): Don't copy types if the
7658         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
7659         type.
7661 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
7663         * class.c (get_enclosing_class): New function.
7664         (is_base_of_enclosing_class): Likewise.
7665         * cp-tree.h (get_enclosing_class): Declare.
7666         (is_base_of_enclosing_class): Likewise.
7667         * pt.c (coerce_template_parms): Use them.
7669 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
7671         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
7672         null to decide whether to use it.
7674         * error.c (dump_type_real): Handle NAMESPACE_DECL.
7675         * parse.y (base_class.1): Avoid crash on error.
7677 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7679         * decl.c (make_typename_type): If context is a namespace, the code
7680         is in error.
7682 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
7684         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
7686 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
7688         * cp-tree.h (anonymous_namespace_name): Declare.
7689         * decl.c: Define it.
7690         (push_namespace): Use anonymous_namespace_name, rather than local
7691         static anon_name.
7692         * error.c (dump_decl): If a namespace is named
7693         anonymous_namespace_name, call it {anonymous}.
7695         * decl.c (grokparms): Distinguish between references and pointers
7696         in error message.
7698 1998-09-08  Richard Henderson  <rth@cygnus.com>
7699             Mark Mitchell  <mark@markmitchell.com>
7701         * pt.c (process_partial_specialization): Consistently allocate
7702         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
7703         tpd.parms, where appropriate.
7705 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
7707         * Makefile.in (INCLUDES): Update after recent toplevel gcc
7708         reorganizations.
7710 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
7712         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
7713         * class.c (finish_struct): Remove hackery to deal with explicit
7714         specializations in class scope.
7715         * decl.c (grokfndecl): Improve error-recovery.
7716         * decl2.c (grokfield): Likewise.
7717         * pt.c (check_specialization_scope): New function.
7718         (begin_specialization): Call it.
7719         (process_partial_specialization): New function, split out from
7720         push_template_decl.  Check partial specializations more
7721         stringently.
7722         (push_template_decl): Call it.
7723         (check_explicit_specialization): Don't attempt to handle explicit
7724         specializations in class scope.
7725         (template_parm_data): Document.  Add current_arg and
7726         arg_uses_template_parms.
7727         (mark_template_parm): Set it.
7728         (tsubst_arg_types): Remove unused variable.
7729         * semantics.c (begin_class_definition): Tweak.
7731 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
7733         * inc/typeinfo (type_info::type_info(const char*)): Make
7734         `explicit'.
7736         * cp-tree.h (hash_tree_cons_simple): New macro.
7737         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
7738         (coerce_template_parms): Use make_temp_vec, instead of
7739         make_tree_vec.  Document this behavior.
7740         (lookup_template_class): Likewise.
7741         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
7742         Remove dead code (and add assertion to check its deadness).  Fix
7743         bug w.r.t. exception specifications.
7745 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
7747         * decl2.c (import_export_vtable): Always make artificials comdat.
7748         (import_export_decl): Likewise.
7749         * pt.c (mark_decl_instantiated): Likewise.
7751 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
7753         * cp-tree.h (finish_globally_qualified_member_call_expr):
7754         Rename to ...
7755         (finish_qualified_call_expr).
7756         * semantics.c: Likewise.
7757         * parse.y (primary): Use it.
7758         * method.c (hack_identifier): Remove redundant code.
7760         * init.c (resolve_offset_ref): Call convert_from_reference to
7761         handle members of reference type.  Improve error recovery.
7763 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
7765         * cp-tree.h: Declare warn_nontemplate_friend.
7766         * decl2.c (lang_decode_option): Set.
7767         * lang-options.h: Add -Wnon-template-friend.
7768         * friend.c (do_friend): Use to toggle non-template function warning.
7770 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
7772         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
7773         corresponding INTEGER_CSTs when processing_template_decl.
7774         * pt.c (tsubst_enum): Tweak accordingly.
7776 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
7778         * decl.c (pushdecl_class_level): Add warning here.
7779         (pushdecl): Tweak.
7781 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
7783         * cvt.c (convert_pointer_to_real): Tidy.
7784         * search.c (get_base_distance_recursive): Simplify.
7785         (get_base_distance): Likewise.
7787         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
7788         parms.
7790 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
7792         * lex.c (check_newline):  Call HANDLE_PRAGMA before
7793         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
7794         if unknown pragmas are encountered.
7795         (handle_sysv_pragma): Interpret return code from
7796         handle_pragma_token ().  Return success/failure indication rather
7797         than next unprocessed character.
7798         (pragma_getc): New function: retrieves characters from the
7799         input stream.  Defined when HANDLE_PRAGMA is defined.
7800         (pragma_ungetc): New function: replaces characters back into the
7801         input stream.  Defined when HANDLE_PRAGMA is defined.
7803 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
7805         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
7806         * class.c (build_vtable_entry_ref): Likewise.
7808 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
7810         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
7811         * decl2.c (import_export_decl): Likewise.
7812         * pt.c (instantiate_decl): Use it.
7814 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
7816         * decl.c (lookup_name_real): Also do implicit typename thing for
7817         artificial TYPE_DECLs.
7818         * search.c (lookup_field): Likewise.
7819         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
7820         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
7821         (enter_scope_of): Extract type from implicit typename.
7822         (begin_class_definition): Likewise.
7823         * lex.c (identifier_type): Handle implicit typename when checking
7824         for SELFNAME.
7826         * cp-tree.h: Declare flag_strict_prototype.
7827         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
7828         -fstrict-prototype.
7829         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
7830         specified, set it to the value of pedantic.
7832 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
7834         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
7836 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
7838         * decl.c (finish_enum): Handle member enums of classes declared in
7839         template functions.
7841         * decl2.c (grok_x_components): Strip attributes before calling
7842         groktypename.
7844 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
7846         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
7847         -fenum-int-equivalence and -fno-nonnull-objects.
7848         * class.c (check_for_override): Remove support for -fall-virtual.
7849         (finish_struct_1): Likewise.
7850         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
7851         * typeck.c (build_binary_op_nodefault): Likewise.
7852         * cvt.c (ocp_convert): Likewise.
7853         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
7854         * class.c (build_vbase_path): Likewise.
7856 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
7858         * Makefile.in (INTERFACE): New, set to 1.
7860 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
7862         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
7863         comparing with global_namespace.
7864         (dump_aggr_type): Likewise.
7866         * decl.c (grokfndecl): Issue error on declaration of friend
7867         templates with explicit template arguments.
7869         * pt.c (convert_template_argument): New function, split out
7870         from...
7871         (coerce_template_parms): Here.
7872         (tsubst): Attempt better error-recovery.
7874 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
7876         * pt.c (decl_template_parm_p): Add checks for
7877         TEMPLATE_TEMPLATE_PARM.
7879 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
7881         * lex.c (do_identifier): Fix thinko in previous change.
7883 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
7885         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
7886         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
7888 1998-08-28  Richard Henderson  <rth@cygnus.com>
7890         Add support for discarding unused virtual functions.
7891         * lang-options.h: Add -fvtable-gc.
7892         * cp-tree.h: Add flag_vtable_gc.
7893         * decl2.c (output_vtable_inherit): New fn.
7894         (finish_vtable_vardecl): Call it.
7895         * class.c (build_vtable_entry_ref): New fn.
7896         (build_vtbl_ref): Call it.
7898 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
7900         * cp-tree.h (build_enumerator): Take the enumeration type as a
7901         parameter.
7902         * decl.c (finish_enum): Don't set the TREE_TYPE for the
7903         enumeration constant values if we're processing_template_decls.
7904         Don't set the type for the CONST_DECLs either; that's done in
7905         build_enumerator.
7906         (build_enumerator): Take the enumeration type as a
7907         parameter.
7908         * lex.c (do_identifier): Don't resolve enumeration constants while
7909         processing template declarations, even if they happen to be
7910         TEMPLATE_PARM_INDEXs.
7912         * parse.y (current_enum_type): New variable.
7913         (primary): Don't allow statement-expression in local classes just
7914         as we don't in global classes.
7915         (structsp): Use current_enum_type.
7916         (enum_list): Likewise.
7917         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
7918         finish_enum; they no longer occur.
7920         * cp-tree.h (finish_base_specifier): New function.
7921         * parse.y (base_class): Use it.
7922         * semantics.c (finish_base_specifier): Define it.
7924         * parse.y (structsp): Warn on use of typename outside of template
7925         declarations.
7927 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
7929         * lex.c (handle_cp_pragma): Remove #pragma vtable.
7930         * lang-options.h: Remove +e options.
7931         * decl2.c (lang_decode_option): Likewise.
7932         (import_export_vtable): Don't check write_virtuals.
7933         (finish_vtable_vardecl, finish_file): Likewise.
7934         * search.c (dfs_debug_mark): Likewise.
7935         * semantics.c (begin_class_definition): Likewise.
7936         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
7938         * call.c (build_over_call): Check flag_elide_constructors.
7939         * decl2.c: flag_elide_constructors defaults to 1.
7940         * typeck.c (convert_arguments): Remove return_loc parm.
7941         (build_function_call_real): Adjust.
7943         * search.c: Tear out all mi_matrix and memoize code.
7944         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
7945         * lang-options.h: Remove documentation for -fhandle-exceptions,
7946         -fmemoize-lookups and -fsave-memoized.
7947         * cp-tree.h: Lose mi_matrix and memoize support.
7948         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
7949         * class.c: Lose struct class_level.
7950         (pushclass, popclass): Lose memoize support.
7951         * init.c (build_offset_ref): Likewise.
7953         Never change BINFO_INHERITANCE_CHAIN.
7954         * init.c (emit_base_init): Change modification of
7955         BINFO_INHERITANCE_CHAIN to an assert.
7956         * search.c (get_base_distance_recursive): Likewise.
7957         (get_base_distance): Likewise.
7958         (lookup_member): Likewise.
7959         (convert_pointer_to_single_level): Likewise.
7960         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
7961         (lookup_fnfields): Likewise.
7962         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
7963         (unshare_base_binfos): Don't call propagate_binfo_offsets.
7964         (layout_basetypes): Call propagate_binfo_offsets instead of
7965         unshare_base_binfos.
7966         * decl.c (xref_basetypes): Call unshare_base_binfos.
7967         * pt.c (instantiate_class_template): Likewise.
7968         * tree.c (reverse_path): Remove 'copy' parm; always make a
7969         temporary copy.
7970         * class.c (build_vbase_path): Just call it.
7971         * search.c (compute_access): Likewise.  Don't re-reverse.
7973 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
7975         * class.c (build_vbase_path): Use reverse_path.
7976         (finish_base_struct): Move warnings for inaccessible bases to
7977         layout_basetypes.
7978         (modify_one_vtable): Remove check of TREE_USED (binfo).
7979         (fixup_vtable_deltas1): Likewise.
7980         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
7981         (xref_tag): Remove binfos parameter.
7982         (make_binfo): Remove chain parameter.
7983         (reverse_path): Add copy parameter.
7984         * decl.c (init_decl_processing): Change calls to xref_tag.
7985         (xref_tag): Remove binfos parameter.
7986         (xref_basetypes): Change calls to make_binfo.
7987         * decl2.c (grok_x_components): Change calls to xref_tag.
7988         (handle_class_head): Likewise.
7989         * friend.c (do_friend): Likewise.
7990         * lex.c (make_lang_type): Change calls to make_binfo.
7991         * parse.y (structsp): Change calls to xref_tag.
7992         (named_complex_class_head_sans_basetype): Likewise.
7993         (named_class_head): Likewise.
7994         * rtti.c (init_rtti_processing): Likewise.
7995         * search.c (compute_access): Change calls to reverse_path.
7996         (dfs_get_vbase_types): Change calls to make_binfo.
7997         (get_vbase_types): Remove dead code.
7998         * tree.c (unshare_base_binfos): Change calls to make_binfo.
7999         (layout_basetypes): Warn here about inaccessible bases.
8000         (make_binfo): Remove chain parameter.
8001         (reverse_path): Add copy parameter.
8003 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
8005         * class.c: #if 0 complete_type_p.
8006         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
8007         * method.c (process_overload_item): Likewise.
8008         * typeck.c (comp_target_types): Likewise.
8010         Stop sharing binfos for indirect virtual bases.
8011         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
8012         (layout_basetypes): Likewise.
8013         (unshare_base_binfos): Copy vbases, too.
8014         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
8015         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
8016         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
8017         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
8018         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
8019         reference to BINFO_VIA_PUBLIC.
8020         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
8021         (push_class_decls): Use them.
8022         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
8023         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
8025 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
8027         * decl.c (build_enumerator): Set DECL_CONTEXT for the
8028         CONST_DECLs.
8030 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
8032         * cp-tree.h (finish_enum): Change prototype.
8033         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
8034         VALUES parameter.  Don't try to compute mins/maxs if
8035         processing_template_decl.
8036         * parse.y (structsp): Use new calling sequence for finish_enum.
8037         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
8038         (lookup_template_class): Remove unused variables.  Tweak.
8039         Register enums on instantiation list before substituting
8040         enumeration constants.
8041         (tsubst_decl): Remove unused variables.
8042         (regenerate_decl_from_template): Likewise.
8044         * decl.c (duplicate_decls): Don't obliterate the
8045         DECL_TEMPLATE_INFO for a template if we're not replacing it with
8046         anything.
8048         * lex.c (do_identifier): Fix typo in comment.
8050 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8052         * errfn.c: Remove stdarg.h/varargs.h.
8053         * tree.c: Likewise.
8055 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
8057         * pt.c (tsubst_copy): Only do typename overloading on an
8058         IDENTIFIER_NODE that happens to look like a typename if it actually
8059         has a type for us to use.
8061 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
8063         * typeck.c (comp_cv_target_types): Split out...
8064         (comp_target_types): From here.  Don't allow cv-qual changes under
8065         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
8066         (build_ptrmemfunc): Pass 1 to nptrs.
8067         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
8069 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
8071         * search.c (dependent_base_p): Don't compare a binfo to
8072         current_class_type; use the TREE_TYPE of the binfo instead.
8074         * cp-tree.h (CLASS_TYPE_P): Revise definition.
8076 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
8078         * decl.c (duplicate_decls): Don't complain about different
8079         exceptions from an internal decl even if pedantic.
8081         * typeck.c (convert_for_assignment): Converting from pm of vbase
8082         to derived is an error, not a sorry.
8084         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
8085         * class.c (fixed_type_or_null): Rename from
8086         resolves_to_fixed_type_p.  Return the dynamic type of the
8087         expression, if fixed, or null.
8088         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
8089         does not match the static type.
8090         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
8091         resolves_to_fixed_type_p again.
8093 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
8095         * pt.c (tsubst_decl): Move special case code for dealing with
8096         tricky friend templates here from ...
8097         (regenerate_decl_from_template): Here.
8099 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
8101         * decl.c (start_decl): Remove redundant linkage check.
8103 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
8105         * typeck.c (c_expand_return): Handle the case that valtype
8106         is wider than the functions return type.
8108 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
8110         * cp-tree.h (CLASS_TYPE_P): New macro.
8111         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
8112         * pt.c (process_template_parm): Undo previous change.
8114 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
8116         * cp-tree.h: Declare.
8117         * pt.c (decl_template_parm_p): New function.
8118         * decl.c (pushdecl): Check decls for redeclaring template parms.
8119         (xref_tag): Make redeclaration an error, print decl.
8120         * decl2.c (grokfield): Check field_decls for redeclaration as well.
8122 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
8124         * parse.y (primary): Fix up the type of string constants.
8126 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
8128         * typeck.c (convert_for_initialization): Move check for odd uses
8129         of NULL to avoid duplicate warnings.
8131 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
8133         * tree.c (lvalue_type): Fix for arrays.
8134         * typeck.c (string_conv_p): New fn.
8135         (convert_for_assignment): Use it.
8136         (build_unary_op): Use lvalue_type.
8137         * call.c (standard_conversion, convert_like): Use string_conv_p.
8138         (add_function_candidate): Use lvalue_type.
8139         * cvt.c (convert_to_reference): Likewise.
8140         * decl2.c (lang_decode_option): Ignore -traditional.
8141         * decl.c (init_decl_processing): flag_writable_strings inhibits
8142         flag_const_strings.
8144 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
8146         * lang-options.h (lang_options): Add fconst-strings to the list
8147         of valid options.
8148         * decl2.c (lang_f_options, lang_decode_option): Likewise.
8150 1998-08-24  Nathan Sidwell  <nathan@acm.org>
8152         * lex.c (real_yylex): Don't warn about long long constants if
8153         we're allowing long long.
8155 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8157         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
8158         accessing bindings directly.
8160         * search.c (my_tree_cons): Reimplement.
8162         * lang-specs.h: Remove __HONOR_STD.
8163         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
8165 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
8167         * decl.c (grokdeclarator): Complain about in-class initialization
8168         of aggregates and/or references.
8169         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
8170         TEMPLATE_TYPE_PARMs.
8172         * decl2.c (grok_array_decl): Add comment.
8173         (mark_used): Don't instantiate an explicit instantiation.
8174         * friend.c (make_friend_class): Remove bogus comment.  Fix check
8175         for partial specializations.
8176         * pt.c (check_explicit_specialization): Don't
8177         SET_DECL_EXPLICIT_INSTANTIATION here.
8178         (mark_decl_instantiated): Or here.
8179         (do_decl_instantiation): Do it here, instead.  Add checks for
8180         duplicate explicit instantiations, etc.  Tidy.
8181         (do_type_instantiation): Likewise.
8182         (instantiate_decl): Improve comments.  Complain about explicit
8183         instantiations where no definition is available.
8185         * cp-tree.h (ansi_null_node): Remove.
8186         * call.c (build_over_call): Warn about converting NULL to an
8187         arithmetic type.
8188         * cvt.c (build_expr_type_conversion): Likewise.  Use
8189         null_ptr_cst_p instead of expanding it inline.
8190         * decl.c (ansi_null_node): Remove.
8191         (init_decl_processing): Make null_node always have integral type.
8192         * except.c (build_throw): Warn about converting NULL to an
8193         arithmetic type.
8194         * lex.c (init_parse): Remove handling of ansi_null_node.
8195         * pt.c (type_unification_real): Don't convert NULL to void* type.
8196         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
8197         (convert_for_assignment): Warn about converting NULL to an
8198         arithmetic type.
8199         (convert_for_initialization): Likewise.
8201 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
8203         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
8204         * pt.c (coerce_template_parms): Use no_linkage_check.
8205         * decl.c (grokvardecl): Likewise.
8206         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
8208         * method.c (process_overload_item): Remove useless code.
8210 1998-08-20  Per Bothner  <bothner@cygnus.com>
8212         Handle new'ing of Java classes.
8213         * init.c (build_class_classref):  New function.
8214         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
8215         constructor does not return this;  don't need to exception-protect.
8217         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
8218         * decl2.c (acceptable_java_type):  Handle template-derived types.
8220 1998-08-20  Per Bothner  <bothner@cygnus.com>
8222         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
8224 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
8226         * decl.c (duplicate_decls): Always merge the old and new patterns
8227         for templates, regardless of whether or not the new one has
8228         DECL_INITIAL.  Don't throw away specializations.  Merge
8229         DECL_SAVED_TREE.
8230         * pt.c (tsubst_decl): Use the right pattern when calculating the
8231         complete args for a new template instance.
8232         (do_decl_instantiation): Fix typo in comment.
8233         (regenerate_decl_from_template): Deal with tricky friend template
8234         case.
8235         (instantiate_decl): Likewise.
8237 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
8239         * init.c (build_builtin_delete_call): Add missing assemble_external
8240         call.
8242 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
8244         * parse.y (notype_unqualified_id): Also accept ~A<int>.
8246 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
8248         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
8249         arithmetic.
8250         * except.c (build_throw): Warn when NULL is thrown, even with
8251         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
8252         thrown expression.
8254         * cp-tree.h (ansi_null_node): New variable.
8255         * decl.c (ansi_null_node): New variable.
8256         (init_decl_processing): Initialize its type.
8257         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
8258         for null_node in non-ANSI mode.
8259         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
8260         place of null_node to avoid spurious errors.
8262 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
8264         * cp-tree.h (enter_scope_of): New function.
8265         * parse.y (complex_direct_notype_declarator): Use it.
8266         * semantics.c (enter_scope_of): New function.
8268 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
8270         * decl.c (grokparms): No, here.
8272         * decl.c (grokdeclarator): Catch parm with pointer to array of
8273         unknown bound here...
8274         * method.c (process_overload_item): ...not here.
8276         * gxxint.texi: Remove obsolete documentation of overloading code.
8278         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
8279         * class.c (finish_struct_bits): Likewise.
8281         * tree.c (lvalue_type): Fix for arrays.
8282         * typeck.c (build_unary_op): Use lvalue_type.
8283         * call.c (add_function_candidate): Likewise.
8284         * cvt.c (convert_to_reference): Likewise.
8286         * decl2.c (lang_decode_option): Ignore -traditional.
8288         * init.c (build_offset_ref): Don't mess with error_mark_node.
8289         * lex.c (do_scoped_id): Use cp_error.
8291         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
8293 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
8295         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
8297 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
8299         * cp-tree.h (set_identifier_local_value): Provide prototype.
8301         * decl2.c (do_namespace_alias): Remove unused variables `binding'
8302         and `old'.
8304 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
8306         * Makefile.in: Rename BBISON to BISON so that it can be properly
8307         inherited from the parent makefile.
8309 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
8311         * lang-options.h: Add -finit-priority.
8312         * decl2.c: Likewise.  Check flag_init_priority instead of
8313         USE_INIT_PRIORITY.
8315         * decl2.c (setup_initp): New fn.
8316         (start_objects, finish_objects, do_ctors): Handle init_priority.
8317         (do_dtors, finish_file): Likewise.
8319 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
8321         * pt.c (tsubst_copy): Hush warning.
8323         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
8325 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
8327         * pt.c (print_template_context): Don't abort when instantiating a
8328         synthesized method.
8330         * decl.c (grokdeclarator): Issue errors on namespace qualified
8331         declarators in parameter lists or in class scope.
8333 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
8335         * pt.c (check_explicit_specialization): Don't abort on bogus
8336         explicit instantiations.
8338 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
8340         * typeck.c (require_complete_type): Use complete_type_or_else.
8341         (complete_type_or_else): Always return NULL_TREE on failure, as
8342         documented.
8344         * pt.c (tsubst_aggr_type): Prototype.
8345         (tsubst_decl): New function, split out from tsubst.  Set
8346         input_filename and lineno as appropriate.
8347         (pop_tinst_level): Restore the file and line number saved in
8348         push_tinst_level.
8349         (instantiate_class_template): Set input_filename and lineno as
8350         appropriate.
8351         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
8352         context for a TYPENAME_TYPE is complete.
8354         * decl2.c (grokbitfield): Issue errors on bitfields declared with
8355         function type.
8356         (do_dtors): As in do_ctors, pretend to be a member of the same
8357         class as a static data member while generating a call to its
8358         destructor.
8360         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
8361         conversions, even in complex virtual base class hierarchies.
8363 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
8365         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
8366         (TYPE_TEMPLATE_INFO): Likewise.
8367         (SET_TYPE_TEMPLATE_INFO): Likewise.
8368         (ENUM_TI_TEMPLATE): Likewise.
8369         (ENUM_TI_ARGS): Likewise.
8370         (lookup_nested_type_by_name): Remove.
8371         * decl.c (maybe_process_template_type_declaration): Handle enums.
8372         (start_enum): Don't check for primary-template enum declarations
8373         here.
8374         (finish_enum): Clean up, document.  Make sure template enum
8375         constants get the correct type.
8376         (build_enumerator): Copy initializers for template enumerations,
8377         too.
8378         (grok_enum_decls): Document.
8379         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
8380         better.  Build LOOKUP_EXPRs for local variables, even if they are
8381         TREE_PERMANENT.
8382         * pt.c (tsubst_enum): Remove field_chain parameter.
8383         (template_class_depth): Include the depth of surrounding function
8384         contexts.
8385         (push_template_decl): Check for primary-template enum declarations
8386         here.  Deal with enumeration templates.
8387         (lookup_template_class): Likewise.
8388         (for_each_template_parm): Likewise.
8389         (instantiate_class_template): Don't call tsubst_enum directly,
8390         call tsubst instead, to instantiate enums.  Deal with all
8391         field_chain issues here, not in tsubst_enum.
8392         (lookup_nested_type_by_name): Remove.
8393         (tsubst_aggr_type): Revise handling of enumeration types.
8394         (tsubst): Likewise.
8395         (tsubst_copy): Likewise.
8396         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
8398 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
8400         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
8401         uses template parameters.
8402         * method.c (build_template_parm_names): Use the full set of
8403         template arguments for tsubst'ing.
8404         (build_overload_identifier): Pass the full set of template
8405         arguments to build_template_parm_names, not just the
8406         innermost_args.
8407         * pt.c (TMPL_ARGS_DEPTH): Define using
8408         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
8409         (NUM_TMPL_ARGS): New macro.
8410         (add_outermost_template_args): Deal with the case where the outer
8411         args will be completely discarded.
8412         (coerce_template_parms): Use the full set of template arguments
8413         for tsubst'ing.  Simplify.  Add some asserts.  Improve
8414         error messages.
8415         (lookup_template_class): Pass the full set of template arguments
8416         to coerce_template_parms.
8417         (tsubst): Add assertion.
8418         (do_type_instantiation): Don't instantiate member template
8419         classes.
8421         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
8422         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
8424 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
8426         * method.c (set_mangled_name_for_decl): Change return type to void.
8428         * decl.c (lookup_name_real): A namespace-level decl takes priority
8429         over implicit typename.  Avoid doing the same lookup twice.
8431         * search.c (dependent_base_p): New fn.
8432         (dfs_pushdecls, dfs_compress_decls): Use it.
8434         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
8435         virtual functions if the type doesn't have any.
8437 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
8439         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
8440         uses template parameters.
8442 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
8444         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
8445         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
8446         * lex.c (do_identifier): Don't use a second argument, or a type,
8447         when building LOOKUP_EXPRs.
8448         (do_identifier): Likewise.
8449         (do_scoped_id): Likewise.
8450         * method.c (hack_identifier): Improve error message.
8451         * pt.c (lookup_template_function): Don't needlessly call
8452         copy_to_permanent or build_min.
8453         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
8454         necessary.
8455         (do_decl_instantiation): Improve error message.
8456         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
8457         (build_min): Copy the type to the permanent obstack, too.
8459 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
8461         * init.c (init_init_processing): Remove BI* handling.
8462         (build_builtin_call): Remove.
8463         (build_builtin_delete_call): New fn.
8464         (build_delete): Use it.
8466 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
8468         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
8469         (maybe_check_template_type): New function.
8470         * decl.c (maybe_process_template_type_declaration): New function,
8471         split out from pushtag  Call maybe_check_template_type.
8472         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
8473         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
8474         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
8475         * pt.c (template_class_depth_real): Generalization of ...
8476         (template_class_depth): Use it.
8477         (register_specialization): Use duplicate_decls for duplicate
8478         declarations of specializations.
8479         (maybe_check_template_type): New function.
8480         (push_template_decl_real): Fix comment.
8481         (convert_nontype_argument): Likewise.
8482         (lookup_template_class): Likewise.  Avoid an infinite loop on
8483         erroneous code.
8484         (tsubst_friend_function): Fix comment.
8485         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
8486         an IDENTIFIER_NODE.
8487         * semantics.c (begin_function_definition): Use
8488         reset_specialization to note that template headers don't apply
8489         directly to declarations after the opening curly for a function.
8491 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
8493         * decl.c (push_overloaded_decl): Use current_namespace instead of
8494         DECL_CONTEXT (decl) to determine where we go.
8496         * decl.c (lookup_name_real): Fix typo.
8498 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
8500         * friend.c (is_friend): Be lenient with member functions to deal
8501         with nested friends.
8503 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
8505         * class.c (finish_struct_1): Convert integer_zero_node to
8506         ssizetype before passing it to set_rtti_entry.
8507         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
8508         of any size to a pointer.
8510 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
8512         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
8513         (build_template_decl_overload): Remove.
8514         (set_mangled_name_for_decl): New function.
8515         (innermost_args): Remove is_spec parameter.
8516         (most_specialized, most_specialized_class): Remove declarations.
8517         (lookup_template_class): Add entering_scope parameter.
8518         (maybe_process_partial_specialization): New function.
8519         (finish_template_decl): Likewise.
8520         (finish_template_type): Likewise.
8521         * class.c (finish_struct): Clean up processing of member template
8522         specializations.
8523         * decl.c (pushtag): Fix formatting.
8524         (lookup_tag): Improve handling of pseudo-global levels.
8525         (make_typename_type): Adjust call to lookup_template_class.
8526         (shadow_tag): Use maybe_process_partial_specialization.
8527         (xref_tag): Improve handling of member friends.
8528         (start_function): Call push_nested_class before
8529         push_template_decl.  Don't call push_template_decl for
8530         specializations.
8531         * decl2.c (grok_x_components): Don't call xref_tag for
8532         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
8533         (grokclassfn): Use set_mangled_name_for_decl.
8534         (arg_assoc_class): Adjust call to innermost_args.
8535         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
8536         * error.c (dump_function_name): Improve printing of template
8537         function names.
8538         * friend.c (is_friend): Don't compare types of decls to determine
8539         friendship, unless flag_guiding_decls.
8540         (make_friend_class): Partial specializations cannot be friends.
8541         (do_friend): Use set_mangled_name_for_decl.  Call
8542         push_template_decl_real instead of push_template_decl.
8543         * method.c (build_decl_overload_real): Remove prototype.  Give it
8544         external linkage.
8545         (build_overload_identififer): Adjust call to innermost_args.
8546         (build_template_decl_overload): Remove.
8547         (set_mangled_name_for_decl): New function.
8548         * parse.y (.finish_template_type): New non-terminal.
8549         (template_def): Use finish_template_decl.  Use template_extdef
8550         instead of extdef.
8551         (template_extdef, template_datadef): New non-terminals, containing
8552         only those rules for things which can be templates.
8553         (datadef): Tidy.
8554         (template_type, self_template_type): Use .finish_template_type.
8555         (named_class_head): Use maybe_process_partial_specialization.
8556         * pt.c (mangle_class_name_for_template): Remove context parameter.
8557         (get_class_bindings): Remove outer_args parameter.
8558         (complete_template_args): Remove.
8559         (add_outermost_template_args): New function.
8560         (register_specialization): Return the specialization.
8561         (unregister_specialization): New function.
8562         (tsubst_template_parms): Likewise.
8563         (most_specialized, most_specialized_class): Prototype here as
8564         static.
8565         (original_template): Rename to most_general_template.
8566         (tsubst_template_parms): New function.
8567         (set_mangled_name_for_template_decl): Likewise.
8568         (TMPL_ARGS_DEPTH): New macro.
8569         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
8570         (TMPL_ARGS_LEVEL): New macro.
8571         (SET_TMPL_ARGS_LEVEL): Likewise.
8572         (TMPL_ARG): Likewise.
8573         (SET_TMPL_ARG): Likewise.
8574         (TMPL_ARGS_DEPTH): Likewise.
8575         (finish_member_template_decl): Use finish_template_decl.
8576         (maybe_process_partial_specialization): New function, split out
8577         from tsubst.
8578         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
8579         (maybe_begin_member_template_processing): Use new macros.
8580         (is_member_template): Likewise.
8581         (is_member_template_class): Likewise.
8582         (add_to_template_args): Likewise.  Deal with multiple levels of
8583         args.
8584         (maybe_process_partial_specialization): New function.
8585         (retrieve_specialization): Add consistency check.
8586         (determine_specialization): Return full argument list.
8587         (check_explicit_specialization): Tweak friend handling.  Use full
8588         argument lists.  Simplify.
8589         (current_template_args): Use new macros.
8590         (push_template_decl_real): Change ill-named mainargs to specargs.
8591         Check that a partial specialization actually specializes at least
8592         one parameter.   Improve friend handling.  Modify for full
8593         template arguments.
8594         (classtype_mangled_name): Don't mangle the names of
8595         specializations.
8596         (lookup_template_class): Add entering_scope parameter.  Use it to
8597         avoid finding a template type when an instantiation is required.
8598         Simplify.  Use full template arguments.
8599         (tsubst_friend_function): Use unregister_specialization.  Use new
8600         macros.  Use full template arguments.
8601         (tsubst_friend_class): Substitute, using tsubst_template_parms,
8602         into the template parameters before passing them to
8603         redeclare_class_template.
8604         (instantiate_class_template): Simplify.  Use full template
8605         arguments.  Adjust calls to get_class_bindings.  Use
8606         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
8607         (innermost_args): Use new macros.
8608         (tsubst_aggr_type): New function, split out from tsubst.
8609         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
8610         conventions for lookup_template_class.  Refine handling of partial
8611         instantiations.   Remove calls to complete_template_args.
8612         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
8613         and set_mangled_name_for_template_decl.
8614         (tsubst_copy): Use tsubst_aggr_type.
8615         (instantiate_template): Use full template arguments.
8616         (more_specialized): Improve formatting.
8617         (more_specialized_class): Adjust calls to get_class_bindings.
8618         (get_bindings_real): Don't call complete_template_args.
8619         (most_specialized): Don't overwrite input; create a new list.
8620         (most_specialized_class): Use most_general_template.
8621         (regenerate_decl_from_template): Use unregister_specialization.
8622         Use full template arguments.
8623         (instantiate_decl): Use full template arguments.
8624         (set_mangled_name_for_template_decl): New function.
8625         * semantics.c (begin_class_definition): Use
8626         maybe_process_partial_specialization.
8627         (finish_member_class_template): New function.
8628         (finish_template_decl): Likewise.
8629         (finish_template_type): Likewise.
8630         (typeck.c): Don't crash after issuing a compiler_error.
8631         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
8633 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
8635         * typeck2.c (build_functional_cast): Handle default-initialization.
8637         * call.c (build_over_call): Pass 1 to popclass.
8639         * parse.y (direct_notype_declarator): Add precedence declaration
8640         to notype_unqualified_id case.
8641         * Makefile.in (EXPECT): Adjust.
8643         * tree.c (ovl_member): Fix for single function in OVL.
8645 1998-07-27  Dave Brolley  <brolley@cygnus.com>
8647         * c-lex.c (yylex): Fix boundary conditions in character literal and
8648         string literal loops.
8650 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
8652         * decl.c (lookup_name_real): OK, do return the from_obj value
8653         unless got_object depends on template parms.
8655         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
8657         * pt.c (coerce_template_parms): Also complain about local enums.
8659         * cp-tree.h: Add prototype for set_identifier_local_value.
8660         * decl.c (set_identifier_local_value_with_scope): Make static,
8661         prototype.
8662         * search.c (covariant_return_p): Likewise.
8663         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
8665         * call.c (build_method_call): Only pull out the type of a destructor
8666         if it's a template type parm.
8667         * decl.c (lookup_name_real): Never return the from_obj value.
8669 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
8671         * except.c (process_start_catch_block_old): Call start_decl_1 for
8672         catch parm.
8673         * decl.c (start_decl_1): Avoid duplicate error.
8675         * init.c (expand_default_init): Only perform the initialization if
8676         it will do something.
8678 1998-07-23  H.J. Lu  (hjl@gnu.org)
8680         * parse.y (base_class): Check for invalid base class.
8682 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
8684         * decl2.c (import_export_template): Fold in...
8685         (import_export_class): ...to here.  Handle dllimport/export.
8687         * class.c (build_vtable): Pass at_eof to import_export_vtable.
8688         (prepare_fresh_vtable): Likewise.
8689         * decl2.c (import_export_class): Split out...
8690         (finish_prevtable_vardecl): From here.
8691         * class.c (finish_struct_1): Call import_export_class if at_eof.
8693         * decl.c (start_function): #if 0 mysterious code I wrote and have
8694         forgotten why.
8695         * rtti.c (get_tinfo_fn): If this is for a class type, set
8696         DECL_CONTEXT.
8698 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
8700         * inc/exception: Change terminate and unexpected to ().
8702         * parse.y (named_class_head_sans_basetype_defn): A
8703         named_class_head_sans_basetype followed by '{' or ':' is a defn.
8705 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
8707         * tree.c (canonical_type_variant): New fn to handle arrays.
8708         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
8709         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
8710         * method.c (process_overload_item): Use build_overload_value for
8711         arrays.
8713 1998-07-20  Dave Brolley  <brolley@cygnus.com>
8715         * lex.c (mbchar.h): #include it.
8716         (GET_ENVIRONMENT): New macro.
8717         (init_parse): Set character set based on LANG environment variable.
8718         (real_yylex): Handle multibyte characters in character literals.
8719         (real_yylex): Handle multibyte characters in string literals.
8721 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
8723         * lex.c (do_identifier): Look for class value even if we don't
8724         have a global value.  Do implicit declaration if parsing is 2.
8725         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
8726         lookup.
8728 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
8730         * decl.c (pushtag): Revert previous change.
8731         * pt.c (lookup_template_class): Don't put out debugging
8732         information for types that use template parameters.
8734         * decl.c (pushtag): Don't put out debugging information for
8735         compiler-generated typedefs.
8737         * error.c (dump_type_real): Don't crash when presented with
8738         intQI_type_node or the like.
8740         * semantics.c (finish_translation_unit): Fix spelling error in
8741         comment.
8743 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
8745         * decl.c (lookup_name_real): Pull out single function here.
8746         (select_decl): Not here.
8747         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
8749         * decl.c (qualify_lookup): Tweak again.
8751         * pt.c (lookup_template_class): Don't mess with the context of the
8752         instantiation.
8753         * decl2.c (current_decl_namespace): Remove special handling for
8754         templates.
8756         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
8757         a member template specialization.
8759         * tree.c (ovl_member): Use decls_match to compare functions.
8760         * decl.c (decls_match): Check the context of a function.
8762         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
8763         in Koenig lookup support rules.
8764         * semantics.c (finish_call_expr): Handle the new cases.
8766         * typeck.c (build_x_function_call): Handle overloaded methods.
8768         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
8770 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
8772         * semantics.c (finish_object_call_expr): Revert previous change.
8773         * call.c (build_new_method_call): Likewise.  Instead, convert
8774         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
8776 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
8778         * decl.c (qualify_lookup): Handle templates.
8780         * decl2.c (do_using_directive): Don't pass ancestor.
8781         * decl.c (push_using_directive): Calculate ancestor.
8783         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
8784         * decl.c (pushdecl): Move type shadowing handling from here...
8785         (duplicate_decls): ...to here.
8786         * decl.c (set_identifier_local_value_with_scope): New fn.
8787         (pushdecl): Use it.
8788         (set_identifier_local_value, lookup_type_current_level): New fns.
8789         * decl2.c (do_local_using_decl): Handle types and binding level
8790         stuff properly.
8792         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
8793         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
8794         (lookup_namespace_name): Likewise.
8795         * typeck.c (build_unary_op): Not here anymore.
8797         * decl2.c (do_class_using_decl): Make sure we get an identifier.
8798         * class.c (handle_using_decl): Ignore TYPE_DECLs.
8800         * decl.c (qualify_lookup): New fn.
8801         (lookup_name_real): Use it.
8803 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
8805         * decl2.c (add_using_namespace): When directly using a namespace
8806         that was indirect before, promote it.
8808         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
8809         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
8810         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
8811         * decl.c (select_decl): Replace two flag parameters by one.
8812         (unqualified_namespace_lookup): Likewise, pass flag.
8813         (lookup_flags): New function.
8814         (lookup_name_real): Compute flags, pass them.
8815         (lookup_namespace_name): Call with zero-flag.
8816         * decl2.c (ambiguous_decl): Add flag parameter, complain only
8817         according to flags.
8818         (lookup_using_namespace, qualified_lookup_using_namespace):
8819         Add flag parameter, pass them through.
8820         * lex.c (do_scoped_id): Call with zero-flag.
8822 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
8824         * typeck.c (convert_for_assignment): Use comptypes.
8826 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
8828         * semantics.c (finish_object_call_expr): Move test for the
8829         function called being a TYPE_DECL to ...
8830         * call.c (build_new_method_call): Here.
8832 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
8834         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
8835         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
8837         * lex.c (looking_for_typename): Don't initialize.
8839         * decl2.c (ambiguous_decl): Clarify error message.
8841         * decl.c (push_using_directive): Iterate over namespaces used
8842         indirectly.
8844 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8846         * decl2.c (add_using_namespace): Iterate over namespaces used
8847         indirectly.
8849         * decl.c (lookup_name_real): Accept namespace aliases as locals.
8850         (cat_namespace_levels): Ignore aliases.
8851         (duplicate_decls): Ignore duplicate aliases.
8852         * decl2.c (do_namespace_alias): Process block level namespace
8853         aliases.  Store alias with pushdecl.  Remove odr errors.
8854         * parse.y (namespace_alias): New non-terminal.
8855         (extdef): Use it.
8857 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
8859         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
8860         Handle TEMPLATE_TYPE_PARM.
8861         (arg_assoc): Rewrite.
8863         * pt.c (complete_template_args): Don't look at the context unless
8864         we have to.
8866         * method.c (build_decl_overload_real): Fix namespace handling.
8868         * typeck.c (build_unary_op): Extract a lone function from an
8869         OVERLOAD.
8871         * call.c (build_scoped_method_call): Handle getting a namespace
8872         for basetype in a destructor call.
8873         (check_dtor_name): Handle enums.
8875         * parse.y (using_directive): New nonterminal.
8876         (extdef, simple_stmt): Use it.
8878 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8880         * decl2.c (add_function): Move error message ...
8881         (arg_assoc_namespace): ... from here.
8883 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
8885         * parse.y (namespace_qualifier): Fix multiple level handling.
8886         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
8887         (arg_assoc): Don't skip the first argument of a function.
8889 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
8891         * search.c (my_tree_cons): Clean up.
8893 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
8895         * call.c (joust): Don't warn about "confusing" conversions to the
8896         same type.
8898 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8900         * class.c (push_nested_class): Complain about namespaces.
8901         * decl.c (start_decl): Enter the object's namespace.
8902         (cp_finish_decl): Leave it.
8903         (grokdeclarator): Likewise.
8904         * decl2.c (check_decl_namespace): New function.
8905         (finish_file): Call it.
8906         * parse.y (complex_direct_notype_declarator): Set complexity
8907         of namespace-qualified ids to -1, enter the namespace.
8909         * method.c (build_template_decl_overload): Expect _DECL as first
8910         parameter.  Put context temporarily into current_namespace.
8911         * pt.c (check_explicit_specialization): Change caller.
8912         (tsubst): Likewise.
8914         * init.c (build_offset_ref): Call mark_used and
8915         convert_from_reference for namespace members.
8917 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8919         * search.c (my_tree_cons): The bitfield is at index 2.
8921 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
8923         * lang-options.h: Format changed to work with new --help support
8924         in gcc/toplev.c
8926 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8928         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
8929         Do Koenig lookup in CALL_EXPR.
8930         (arg_assoc): Handle error_mark.
8931         * lex.c (is_global): New function.
8932         (do_identifier): Expect arguments for Koenig lookup.
8933         * parse.y (primary): Add rules for calls of unqualified function calls.
8934         (do_id): Change call of do_identifier.
8935         * pt.c (finish_stmt_expr): Likewise.
8936         * semantics.c (finish_id_expr): Likewise.
8937         (finish_call_expr): Add integer parameter to indicate
8938         argument-dependent lookup.
8940         * decl.c (struct binding_level): New field using_directives.
8941         (push_using_decl): Not sorry anymore.
8942         (push_using_directive): New function.
8943         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
8944         (unqualified_namespace_lookup): New function, code from ...
8945         (lookup_name_real): ... here.
8946         * decl2.c (lookup_using_namespace): Pass using list instead of
8947         initial scope.
8948         (validate_nonmember_using_decl): New function.
8949         (do_nonmember_using_decl): New function.
8950         (do_toplevel_using_decl): Use them.
8951         (do_local_using_decl): New function.
8952         (do_using_directive): Support block-level directives.
8953         * parse.y (simple_stmt): Support using declarations and
8954         directives.
8955         (namespace_qualifier, namespace_using_decl): New non-terminals.
8957         * xref.c (classname): New function.
8958         (GNU_xref_hier): Change class and base parameters to tree.
8959         * decl.c (xref_baseypes): Change caller.
8960         * friend.c (make_friend_class): Likewise.
8962 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8964         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
8965         comparison.
8967         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
8968         template template parameter, record its use.
8969         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
8970         its template arguments if exists.
8972         * pt.c (coerce_template_template_parms): New function equivalent
8973         to coerce_template_parms when IS_TMPL_PARM is true.
8974         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
8975         all callers changed.
8977         (coerce_template_parms): Access ARGLIST properly when creating a
8978         new vector.  Only accept implicit TYPE_DECL as valid argument for
8979         a template template parameter when it is a base class of
8980         current_class_type.  Don't display error message when COMPLAIN is
8981         false.
8983 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
8985         * repo.c (get_base_filename): Use file_name_nondirectory.
8986         (open_repo_file): Likewise.
8987         * cp-tree.h (file_name_nondirectory): Add prototype.
8989 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
8991         * friend.c (do_friend): Pull the identifier out of declarator.
8992         Use cp_error and friends.
8993         * decl2.c (qualified_lookup_using_namespace): Fix call to
8994         purpose_member.
8995         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
8996         (grokvardecl): Use DECL_CLASS_SCOPE_P.
8997         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
8998         * class.c (warn_hidden): Fix for OVERLOAD.
8999         From grahams@rcp.co.uk:
9000         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
9001         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
9003 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
9005         * g++.1 (-traditional): Remove duplicated documentation.
9007 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
9009         * method.c (flush_repeats): Add nrepeats parameter.
9010         (issue_nrepeats): Likewise.
9011         (is_back_referenceable_type): New function.  Don't back-reference
9012         TEMPLATE_TYPE_PARMs as well as simple types like integers.
9013         (build_mangled_name_for_type): Likewise.
9014         (build_mangled_name_for_type_with_Gcode): Likewise.
9015         (lasttype): Remove.
9016         (nrepeats): Likewise.
9017         (Nrepeats): Likewise.
9018         (start_squangling): Don't clear the variables removed above.
9019         (end_squangling): Likewise.
9020         (flush_repeats): Tidy.  Use nrepeats parameter rather than
9021         Nrepeats global.
9022         (issue_nrepeats): Likewise, but with nrepeats global.  Use
9023         is_backreferenceable_type.
9024         (build_overload_nested_name): Tidy.  Add comment.  Use
9025         build_mangled_name_for_type.
9026         (build_underscore_int): Comment.
9027         (build_overload_scope_ref): Use build_mangled_name_for_type.
9028         (build_overload_int): Likewise.
9029         (build_template_template_parm_names): Tidy.
9030         (build_template_parm_names): Use build_mangled_name_for_type.
9031         (build_overload_identifier): Add comments.
9032         (build_mangled_name_for_type_with_Gcode): Split out from
9033         build_mangled_name.
9034         (build_mangled_name_for_type): Use it.
9035         (build_mangled_name): Rework to use build_mangled_name_for_type
9036         and to not use global nrepeats/Nrepeats.  Tidy.
9037         (process_modifiers): Tidy.
9038         (check_btype): Use is_backreferenceable_type.  Add comment.
9039         Rename `node' to `type'.
9040         (process_overload_item): Set numeric_output_need_bar here.
9041         Use build_mangled_name_for_type.  Tidy.
9042         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
9043         build_mangled_name_for_type.
9045         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
9046         for TYPE_DECLs.
9048 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
9050         * cp-tree.h (warn_long_long): Define.
9051         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
9052         warning "ANSI C++ does not support `long long'".
9053         * decl2.c (warn_long_long): Define.
9054         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
9056 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
9058         * decl.c (xref_tag): Handle attributes between 'class' and name.
9059         * parse.y (aggr): Likewise.
9060         * semantics.c (finish_class_definition): Likewise.
9061         * Makefile.in (EXPECTED): Adjust.
9063         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
9064         * decl2.c: Define them.
9065         (lang_decode_option): Handle them.
9066         * lang-options.h: Add -foptional-diags.
9067         * class.c (finish_struct): Don't complain about multiple meanings of
9068         name if -fno-optional-diags.
9069         * decl.c (pushdecl_class_level): Likewise.
9070         * lex.c (real_yylex): Check warn_multichar.
9072 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
9074         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
9076         * tree.c (make_binfo): Fix length.
9078 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
9080         * decl2.c (lang_decode_option): Remove warn_template_debugging.
9081         * lang-options.h: Likewise.
9083 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9085         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
9086         (process_start_catch_block): Likewise for variables
9087         `false_label_rtx', `call_rtx' and `return_value_rtx'.
9089 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
9091         * tree.c (build_srcloc): Make sure we allocate this node on the
9092         permanent obstack.
9094 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
9096         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
9097         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
9098         (lang_specific_driver): Only add -lm automatically if need_math is
9099         nonzero.
9101 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
9103         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
9105 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9107         * Makefile.in (EXPR_H): New dependency variable.
9108         (decl2.o): Depend on $(EXPR_H).
9109         (typeck.o): Likewise.
9110         (init.o): Likewise.
9111         (expr.o): Likewise.
9113 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
9115         * decl.c (start_enum): Put local enums on permanent_obstack.
9117 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
9119         * cp-tree.h (c_get_alias_set): Declare.
9120         * decl.c (init_decl_processing): Set lang_get_alias_set.
9122 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
9124         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
9125         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
9126         flag for all function decls which are in the exception table.
9127         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
9128         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
9129         code is emitted for any referenced rtti function.
9131 1998-06-25  Dave Brolley  <brolley@cygnus.com>
9133         * lang-specs.h: Use new | syntax to eliminate
9134         string concatenation.
9136 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
9138         * cp-tree.h (CP_DECL_CONTEXT): New macro.
9139         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
9140         * method.c (build_overload_nested_name): Likewise.
9141         * sig.c (build_signature_pointer_or_reference_type): Don't set
9142         DECL_CONTEXT.
9144 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9146         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
9147         * cp-tree.h (FROB_CONTEXT): New macro.
9148         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
9149         * decl.c (namespace_binding): Replace NULL_TREE with
9150         global_namespace.
9151         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
9152         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
9153         Likewise.
9154         * decl.c (pushtag): Use FROB_CONTEXT.
9155         (pushdecl, make_typename_type, define_function, grokdeclarator):
9156         Likewise.
9157         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
9158         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
9159         Likewise.
9160         * decl2.c (decl_namespace): Return global_namespace if no context.
9161         * method.c (build_overload_nested_name): Expect null as context.
9162         * pt.c (mangle_class_name_for_template): Do nothing for null
9163         contexts.
9164         (lookup_template_class): Allow for null id_context.
9166 1998-06-25  Richard Henderson  <rth@cygnus.com>
9168         * method.c (emit_thunk): Set current_function_is_thunk for the
9169         ASM_OUTPUT_MI_THUNK case as well.
9171 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
9173         * exception.cc (__cplus_type_matcher): Get a match_info pointer
9174         instead of an exception table entry as a parameter.
9176 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
9178         * parse.y (function_try_block): Don't call start_catch_handler.
9179         * except.c (call_eh_info): Remove coerced field from declaration.
9180         (build_eh_type_type_ref): New function to create an address of a
9181         rtti function for the new style exception tables.
9182         (expand_start_catch_block): Split function, this contains the
9183         common part.
9184         (process_start_catch_block_old): New function to perform the rest
9185         of expand_start_catch_block under old style exceptions.
9186         (process_start_catch_block_old): New function to perform the rest
9187         of expand_start_catch_block under new style exceptions.
9188         (expand_end_catch_block): Only pop the false label off the stack under
9189         the old style of exceptions.
9190         * semantics.c (finish_try_block): Don't call start_catch_handler.
9191         * exception.cc (struct cp_eh_info): Add original_value field.
9192         (__cplus_type_matcher): Perform type matching on the original exception
9193         value, and if we have a match, set the current value.
9194         (__cp_push_exception): Set the original exception value.
9196 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
9198         * call.c (joust): Fix confusing conversion warning.
9200         * call.c (build_op_delete_call): Add placement parm.  Check
9201         LOOKUP_SPECULATIVELY.
9202         * cp-tree.h, decl2.c, init.c: Adjust.
9203         * decl.c (finish_function): Use it.
9205         * pt.c (tsubst): Diagnose creating void fields or variables.
9207 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9209         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
9211         * cp-tree.h (check_dtor_name): Add prototype.
9213         * init.c (expand_member_init): Remove unused variables
9214         `ptr_type_node', `parm' and `rval'.
9216         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
9217         in call to fprintf.
9218         (lang_print_xnode): Likewise.
9220         * typeck2.c (enum_name_string): Cast argument to sprintf to long
9221         and use %ld specifier.
9223         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
9224         specifier in call to fprintf.
9225         (GNU_xref_member): Cast argument to sprintf to int.
9227 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
9229         * typeck2.c (pop_init_level): Warn about implicit zero initialization
9230         of struct members.
9232 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9234         * cp-tree.h: Prototype function `check_java_method'.
9236 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
9238         * class.c (finish_struct): Make conflicting use of id a pedwarn.
9239         * decl.c (pushdecl_class_level): Likewise.
9241 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
9243         * pt.c (convert_nontype_argument): Issue an error when presented
9244         with an integer (real) constant that cannot be simplified to an
9245         INT_CST (REAL_CST).
9247         * cp-tree.h (c_get_alias_set): Remove declaration added in
9248         1998-06-13 change that should never have been checked in.
9250 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
9252         * typeck.c (build_binary_op_nodefault): Change % in format strings
9253         to %%.
9255         * decl.c (grokvardecl): Don't build_static_name for decls that
9256         aren't at namespace scope.
9258         * init.c (perform_member_init): Catch default-initialization of
9259         references.
9261 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
9263         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
9265 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
9267         * method.c (hack_identifier): Complain about getting a namespace
9268         or class template.
9269         * typeck.c (decay_conversion): Remove check for namespaces.
9270         * typeck2.c (incomplete_type_error): Likewise.
9271         * parse.y (template_arg): Add PTYPENAME expansion.
9273 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
9275         * decl.c (grokvardecl): Don't build external assembler names for
9276         TYPENAMEs in other namespaces as there is no declarator.
9277         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
9278         info from DECL_CONTEXT if it is NULL.
9280 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
9282         * call.c (check_dtor_name): Split out.
9283         (build_scoped_method_call): Use it.
9284         (build_method_call): Use it.
9285         * init.c (build_offset_ref): Use it.
9287         * typeck.c (build_static_cast): Fix handling of pointers to members.
9289         * decl.c (finish_function): Just return nothing from a constructor.
9290         * typeck.c (c_expand_return): Complain about returning a void
9291         expression from a destructor.
9293 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
9295         * class.c (alter_access): Accept a BINFO explaining how to get
9296         from the entity whose accessed is being altered to the type doing
9297         the altering.
9298         (handle_using_decl): New function containing code split out from ...
9299         (finish_struct_1): Here.
9301         * cp-tree.h (complete_type_or_else): Declare.
9302         * init.c (build_new_1, build_delete): Use it.
9303         * typeck.c (require_complete_type): Use complete_type, rather than
9304         expanding it inline.
9305         (complete_type_or_else): New function.
9306         (build_component_ref): Use it.
9307         (pointer_int_sum): Make sure the type pointed to is complete.
9308         (pointer_diff): Likewise.
9310         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
9311         types.
9313         * search.c (get_matching_virtual): Note that member templates
9314         cannot override virtual functions.
9316 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
9318         * pt.c (check_explicit_specialization): If DECLARATOR turned into
9319         an error_mark_node from lookup_template_function, return the same.
9320         (determine_specialization): Also make sure TEMPLATE_ID isn't an
9321         error_mark_node, before we try to read its operands.
9322         * decl.c (grokdeclarator): If we got an error_mark_node from
9323         check_explicit_specialization, just return it right back.
9325 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
9327         * class.c (instantiate_type): Don't treat template-ids that don't
9328         specify any template arguments as equivalent to ordinary
9329         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
9330         pointer-to-members for member templates.  Tidy slightly.
9331         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
9332         * init.c (build_offset_ref): Handle template-ids like ordinary
9333         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
9334         offset part of the OFFSET_REF.
9335         * typeck.c (build_unary_op): Change check for unknown types to
9336         look for OFFSET_REFs, not SCOPE_REFs.
9338 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
9340         * pt.c (is_member_template_class): New function.
9341         (push_template_decl_real): Use it.
9343 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
9345         * friend.c (do_friend): Add support for nested classes using
9346         member functions of the enclosing class as friends.
9348 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
9350         * call.c (convert_default_arg): Make global, not static.
9351         (convert_arg_for_ellipsis): Split out from ...
9352         (build_over_call): Here.
9353         * cp-tree.h (convert_default_arg); Declare.
9354         (convert_arg_to_ellipsis): Likewise.
9355         (do_member_init): Remove.
9356         * init.c (do_member_init): Remove; this code is dead.
9357         (expand_member_init): Remove much of this code; it is dead.
9358         * typeck.c (convert_arguments): Use convert_default_arg and
9359         convert_arg_for_ellipsis, rather than duplicating here.
9361         * call.c (convert_like): Don't fail silently if
9362         build_user_type_conversion fails.  Always return error_mark_node
9363         for failure.
9365 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
9367         * search.c (covariant_return_p): Complain about ambiguous base.
9369         * typeck.c (build_component_ref): Diagnose ref to nested type.
9371 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
9373         * decl.c (grokparms): Check that INIT isn't an error_mark_node
9374         before giving error about invalid type for default arg.
9376 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
9378         * call.c (build_method_call): Fix thinko.
9380 1998-06-10  Dave Brolley  <brolley@cygnus.com>
9382         * decl2.c (lang_decode_option): New argc/argv interface.
9383         * cp-tree.h (lang_decode_option): New argc/argv interface.
9384         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
9385         specified for cpplib-enabled compilers.
9386         * lex.c (lang_init): Don't check_newline for cpplib.
9387         (init_parse): Don't initialize cpplib here.
9389 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
9391         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
9392         piece before checking DECL_MUTABLE_P.
9394 1998-06-10  John Carr  <jfc@mit.edu>
9396         * tree.c (debug_binfo): Make printf format match arguments.
9398         * error.c (OB_PUTI): Make printf format match arguments.
9400 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
9402         * init.c (perform_member_init): Handle default-initialization.
9404         * except.c (build_throw): Handle throwing NULL.
9406         * typeck.c (build_x_function_call): Use resolve_offset_ref.
9408         * search.c (compute_access): Only strip an anonymous union
9409         for a FIELD_DECL.
9411         * call.c (add_builtin_candidates): Tweak.
9413         * cvt.c (build_expr_type_conversion): Restore code for conversion
9414         from class types.
9415         * decl2.c (delete_sanity): Use it.  Clean up.
9417         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
9419 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
9421         * typeck.c (c_expand_return): Don't warn about void expressions on
9422         return statements in functions returning void.
9424 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
9426         * pt.c (fn_type_unification): Revise documentation.  Tidy.
9427         (type_unification): Likewise.
9429 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
9431         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
9432         expand_end_catch.
9433         * parse.y (function_try_block): Rename expand_start_catch, and delete
9434         expand_end_catch.
9435         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
9436         expand_end_catch.
9438 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
9440         * search.c (lookup_member): New fn.
9441         * class.c (finish_struct_1): Use it.
9442         * decl.c (lookup_name_real): Use it.
9444 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9446         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
9448         * cp-tree.h: Add prototype for `maybe_print_template_context' and
9449         `maybe_make_one_only'.
9451         * decl.c (auto_function): Remove unused variable `decl'.
9453         * decl2.c: Include dwarf2out.h and dwarfout.h.
9455         * lex.c: Remove redundant declarations of `set_float_handler' and
9456         `asm_out_file'.
9458 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
9460         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
9461         time flag.  Call __cp_eh_info instead of __cp_exception_info.
9462         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
9463         (__cp_exception_info): Return offset into cp_eh_info structure to
9464         match what use to be the start of this structure.
9465         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
9466         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
9467         compile time flag.
9468         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
9469         __cp_eh_info instead of __cp_exception_info.
9471 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
9473         * decl.c (cp_finish_decl): Disable inlining of extern inlines
9474         with static variables.
9476 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
9478         * init.c (build_offset_ref): Correct previous change to use build,
9479         not build_min.
9481 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
9483         * class.c (instantiate_type): Handle pointer-to-members where the
9484         member is a template.
9485         * init.c (build_offset_ref): Likewise.
9486         * typeck.c (build_unary_op): Likewise.
9488 1998-06-07  Richard Henderson  <rth@cygnus.com>
9490         * lex.c (lang_init_options): New function.
9491         (lang_init): Remove flag_exceptions == 2 hack.
9493 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
9495         * search.c (envelope_add_decl): Tweak for implicit typename.
9497         * call.c (joust): Also warn about confusing conversion op/constructor
9498         overload resolution.
9500         * spew.c (yylex): Also return the TYPE_DECL if got_object.
9501         Don't clear got_object after '~'.
9502         * call.c (build_scoped_method_call): Tweak destructor handling.
9503         (build_method_call): Likewise.
9504         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
9505         TYPE_MAIN_VARIANT for destructors.
9506         * semantics.c (finish_object_call_expr): Complain about calling a
9507         TYPE_DECL.
9509 1998-06-05  Per Bothner  <bothner@cygnus.com>
9511         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
9512         Define - update needed by gcc.c change.
9514 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
9516         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
9518 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9520         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
9521         * decl.c (lookup_name_real): Add namespaces_only parameter.
9522         If set, return only NAMESPACE_DECLs.
9523         (select_decl): Likewise.
9524         (identifier_type_value): Give additional parameter.
9525         (lookup_name_nonclass): Likewise.
9526         (lookup_name): Likewise.
9527         (find_binding): Skip namespace aliases.
9528         (binding_for_name): Likewise.
9529         (push_namespace): Check for namespace aliases.
9530         (lookup_name_namespace_only): New function.
9531         (begin_only_namespace_names, end_only_namespace_names): New functions.
9532         * decl2.c (set_decl_namespace): Skip namespace aliases.
9533         (do_using_directive): Likewise.
9534         (do_namespace_alias): Produce namespace aliases, fix alias
9535         redeclaration.
9536         * error.c (dump_decl): Support SCOPE_REF.
9537         * parse.y (extdef): Wrap lookup with namespace_only for namespace
9538         aliases and using declarations.
9540 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
9542         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
9544         * error.c (dump_expr): Clean up NEW_EXPR case.
9546 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9548         Suggested by Brendan Kehoe
9549         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
9550         treat it as using ::decl.
9552         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
9554         * tree.c (mapcar): Support NEW_EXPR.
9556         * error.c (dump_expr): Support NEW_EXPR.
9558 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
9560         * method.c (make_thunk): Use overload machinery to make name.
9561         * search.c (covariant_return_p): New fn.
9562         (get_matching_virtual): Use it.
9564         * init.c (build_new_1): Fix check for void.
9566 1998-06-01  Per Bothner  <bothner@cygnus.com>
9568         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
9569         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
9570         java_int_type_node, java_long_type_node, java_float_type_node,
9571         java_double_type_node, java_char_type_node, java_boolean_type_node):
9572         New "primitive" types, with predefined names __java_byte etc.
9573         (record_builtin_java_type):  New function.
9574         (init_decl_processing):  Make Java types with record_builtin_java_type.
9575         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
9576         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
9577         (grokfndecl):  Call check_java_method for Java classes.
9578         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
9579         (process_overload_item):  Match types against specific
9580         java_XX_type_node types, rather than using is_java_type.
9581         * class.c (finish_struct_1):  Don't add default copy constructor
9582         or operator= if TYPE_FOR_JAVA.
9583         (pop_lang_conext):  Restore strict_prototyp proper if Java.
9584         * decl2.c (acceptable_java_type, check_java_method):  New functions.
9585         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
9586         (tsubst):  Move common statement after if statement.
9587         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
9589 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
9591         * pt.c (for_each_template_parm): Use first_rtl_op.
9593         * tree.c (build_cplus_array_type_1): Also check index_type for
9594         template parms.
9596 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
9598         * pt.c (tsubst): Always copy BINFO_BASETYPES.
9600 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
9602         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
9603         TYPE_SIZE_UNIT too.
9605 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
9607         * decl.c (grokdeclarator): Don't complain about in-class
9608         initialization of static consts if we don't really know the type
9609         of the variable.
9611 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
9613         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
9614         * method.c (build_destructor_name): New fn.
9615         * decl2.c (maybe_retrofit_in_chrg): Split out...
9616         (grokclassfn): From here.  Reorganize.
9617         * decl.c (grok_ctor_properties): Make sure ctors for types with
9618         vbases have the in_chrg parm.
9619         * pt.c (instantiate_class_template): Update
9620         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
9621         grok_*_properties.
9622         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
9624 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
9626         * pt.c (instantiate_decl): Make test for whether or not static
9627         variables should be instantiated early match its comment.
9629 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
9631         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
9632         a member.
9633         (start_function): Call check_default_args.
9634         * decl2.c (grokfield): Don't call check_default_args.
9635         (check_default_args): Use cp_error_at.
9636         * lex.c (do_pending_defargs): Call check_default_args.
9638 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
9640         * call.c (build_method_call): Make sure get_type_value returns
9641         something before we try to use its TYPE_MAIN_VARIANT.
9642         (build_scoped_method_call): Likewise.
9644 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
9646         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
9647         initialize an array.
9649         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
9650         DECL_VIRTUAL_P.
9652         * friend.c (do_friend): Clarify template warning.
9654 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
9656         * decl.c (shadow_label): Don't treat decls as identifiers.
9657         (maybe_push_to_top_level): Clear shadowed_labels.
9659         * pt.c (instantiate_decl): Reset lineno and filename after calling
9660         regenerate_decl_from_template.
9662         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
9663         error_mark_node.
9665 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
9667         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
9669 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
9671         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
9672         (convert_nontype_argument): Handle cases when nontype template
9673         parameters become classes after substitution.
9675 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
9677         * friend.c (is_friend): Use comptypes, rather than == to compare
9678         types.  Modify for new representation of template friends.
9679         (make_friend_class): Likewise.
9680         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
9681         (instantiate_class_template): Deal with template friends.
9683         * decl.c (store_parm_decls): Remove redundant call to
9684         expand_main_function.
9686 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
9688         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
9689         DECL_USE_TEMPLATE.
9691 1998-05-26  Per Bothner  <bothner@cygnus.com>
9693         * language_as_string:  Handle lang_java.
9695 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
9697         * decl.c (pushdecl): Don't copy the type_decl.
9699 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9701         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
9702         current_class_type.
9703         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
9705         * parse.y (complex_direct_notype_declarator): Use $1 to access
9706         scope of notype_qualified_id.
9708 1998-05-26  Dave Brolley  <brolley@cygnus.com>
9710         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
9711         (init_parse): Initialize cpplib interface.
9713         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
9714         empty continuation.
9716 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
9718         * decl.c (pushtag): Avoid crashing on erroneous input.
9720 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9722         * decl.c (push_namespace): Only produce one unique name for
9723         anonymous namespaces.
9724         (get_unique_name): Remove.
9726 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
9728         * call.c (tourney): Don't do any extra comparisons.
9730         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
9732         * cp-tree.h (processing_template_parmlist): Declare.
9733         * decl.c (pushtag): Don't call push_template_decl when we
9734         shouldn't.
9735         * pt.c (processing_template_parmlist): New variable.
9736         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
9737         (complete_template_args): Use it.
9738         (add_to_template_args): Likewise.
9739         (innermost_args): Likewise.
9740         (tsubst): Likewise.
9741         (begin_template_parm_list): Use processing_template_parmlist.
9742         (end_template_parm_list): Likewise.
9744         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
9745         * decl.c (grokdeclarator): Use it.
9746         * decl2.c (grok_x_components): Likewise.
9747         * init.c (initializing_context): Likewise.
9748         * method.c (do_build_copy_constructor): Likewise.
9749         (do_build_assign_ref): Likewise.
9750         * search.c (compute_access): Likewise.
9751         * typeck.c (build_component_ref): Likewise.
9753         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
9754         unnamed type a typedef name "for linkage purposes".
9756         * pt.c (lookup_template_class): Don't look at
9757         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
9759         * method.c (build_overload_int): Handle error cases gracefully.
9761         * pt.c (instantiate_decl): Handle static member variables
9762         correctly.
9764         * pt.c (tsubst): Use the tsubst'd type when producing new
9765         TEMPLATE_PARM_INDEX nodes.
9767 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
9769         * tree.c (cp_tree_equal): Handle pointers to member functions.
9771         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
9772         sure the type of the REF_BIND is a reference type.
9773         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
9774         target_type for clarity.
9776         * parse.y (xcond): Move call to condition_conversion ...
9777         * semantics.c (finish_for_cond): Here.
9778         * parse.c: Regenerated.
9780 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
9782         * decl.c (push_namespace): Namespaces have type void.
9783         * typeck2.c (incomplete_type_error): Complain about namespace
9784         used as expression.
9785         * typeck.c (decay_conversion): Likewise.
9787 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9789         * error.c (dump_expr): Support namespaces.
9791 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
9793         * cp-tree.def: Add SRCLOC.
9794         * cp-tree.h: Add struct tree_srcloc and accessor macros.
9795         * tree.c (build_srcloc, build_srcloc_here): New fns.
9796         * pt.c (add_pending_template): Use build_srcloc_here.
9797         (push_tinst_level): Update last_template_error_tick before erroring.
9798         (instantiate_decl): Restore lineno and input_filename before
9799         calling add_pending_template.
9800         * decl2.c (finish_file): Set up lineno and input_filename for
9801         pending templates.
9803 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
9805         * decl.c (lang_print_error_function): New fn.
9806         (init_decl_processing): Set print_error_function to use it.
9807         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
9809         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
9810         ICS_BAD_FLAG.
9812         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
9813         copy-initialization.
9815         * class.c (build_vtable_entry): Use int_fits_type_p.
9816         (build_vtable): Pass a signed offset to build_vtable_entry.
9817         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
9818         set_rtti_entry): Likewise.
9820 1998-05-22  Per Bothner  <bothner@cygnus.com>
9822         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
9823         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
9825 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
9827         * pt.c (print_template_context): Use fprintf instead of cp_error.
9829         * pt.c (determine_specialization): Just return an error_mark_node.
9830         Also print the decl we want in error messages.  If we complain,
9831         return error_mark_node.
9832         (tsubst_friend_function): Set lineno and input_filename so
9833         error messages will be useful.
9834         (instantiate_template): Just return an error_mark_node.
9835         (check_explicit_specialization): Don't mess with a returned
9836         error_mark_node.
9838         * pt.c (print_template_context): Add new argument.
9839         (maybe_print_template_context): New fn.
9840         (push_tinst_level): Increment tinst_level_tick.
9841         (pop_tinst_level): Likewise.
9842         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
9843         xrealloc instead of xmalloc.
9845         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
9847 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
9849         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
9850         if the template we looked up is the same as the one we already
9851         have.
9853 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
9855         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
9856         (cpp_reader,parse_in): Add for cpplib.
9857         (check_newline): Call handle_sysv_pragma with new interface.
9858         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
9860         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
9861         (sub_getch): Call GETC for cpplib.
9863         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
9864         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
9866         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
9868 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
9870         * decl2.c (maybe_make_one_only): New fn.
9871         (import_export_vtable): Use it.
9872         (import_export_decl): Likewise.
9873         * pt.c (mark_decl_instantiated): Likewise.
9875 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
9877         * decl2.c (find_representative_member): Rename to ...
9878         (build_anon_union_vars): New function.
9879         (finish_anon_union): Fix stupidity of previous change.
9881 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
9883         * decl.c (grokfndecl): Handle definition of specialization in
9884         friend declaration.
9886         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
9888 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
9890         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
9891         to look for type declarations.
9892         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
9893         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
9894         (finish_member_class_template): Declare.
9895         * decl.c (pushtag): Put member class templates on the
9896         CLASSTYPE_TAGS list, just as for ordinary member classes.
9897         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
9898         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
9899         IDENTIFIER_NAMESPACE_VALUEs.
9900         * parse.y (component_decl): Move code to ...
9901         * semantics.c (finish_member_class_template): New function.
9902         Don't put member class templates on the list of components for a
9903         class.
9904         * parse.c: Regenerated.
9905         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
9906         In fact, don't use DECL_CONTEXT at all here.
9908 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
9910         * decl.c (record_unknown_type): New function.
9911         (init_decl_processing): Call it for the unknown and global type
9912         nodes.
9914 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
9916         * decl2.c (find_representative_member): New function.
9917         (finish_anon_union): Use it.
9919         * cp-tree.h (MAIN_NAME_P): New macro.
9920         (DECL_MAIN_P): Likwise.
9921         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
9922         (grokfndecl): Use the new macros.
9923         (grokdeclarator): Likewise.
9924         (start_function): Likewise.
9925         (store_parm_decls): Likewise.
9926         (finsh_function): Likewise.
9927         * friend.c (do_friend): Likewise.
9928         * typeck.c (build_function_call_real): Likewise.
9929         (build_unary_op): Likewise.
9931 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
9933         * decl2.c (start_objects, finish_objects, do_dtors,
9934         do_ctors): Split out from...
9935         (finish_file): ...here.
9937 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
9939         * tree.c (is_overloaded_fn): Don't abort on placeholders from
9940         push_class_decls.
9942 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
9944         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
9946         * error.c (dump_expr): Handle an ARROW_EXPR.
9948 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
9950         * decl.c (saveable_obstack): Declare.
9951         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
9952         declare, if necessary.
9954 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
9956         * call.c (compare_qual): Remove.
9957         (is_subseq): Tweak.
9958         (is_properly_derived_from): New function.
9959         (maybe_handle_ref_bind): Likewise.
9960         (maybe_handle_implicit_object): Likewise.
9961         (compare_ics): Modify substantially to bring into conformance with
9962         the standard.
9963         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
9964         (comp_cv_qualification): Declare.
9965         (comp_cv_qual_signature): Likewise.
9966         * typeck.c (comp_cv_qualification): Likewise.
9967         (comp_cv_qual_signature): Likewise.
9969 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9971         * Makefile.in (parse.o): Depend on toplev.h.
9973         * class.c (typecode_p): Remove prototype and definition.
9975         * cp-tree.h (currently_open_class, is_empty_class, member_p):
9976         Add prototype.
9978         * decl.c (push_overloaded_decl_top_level): Remove prototype and
9979         definition.
9981         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
9982         in call to `cp_thing'.
9983         (cp_warning): Likewise for function pointer `warning'.
9985         * except.c (do_function_call): Remove prototype and definition.
9986         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
9988         * method.c (is_java_type): Add prototype and make it static.
9990         * parse.y: Include toplev.h.
9992         * pt.c (type_unification): Remove unused variable `arg'.
9993         (instantiate_decl): Likewise for `save_ti'.
9995         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
9997 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
9999         * init.c (build_member_call): Handle template_ids.
10000         * parse.y (primary): Add global_scope template_id.
10002 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
10004         * decl2.c (get_sentry): Use end_temporary_allocation.
10005         Don't declare permanent_obstack.
10007 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
10009         * parse.y (.finish_new_placement): New non-terminal.
10010         (unary_expr, new_type_id): Use it.
10011         * parse.c: Regenerated.
10013 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
10015         * pt.c (redeclare_class_template): Say where the original definition
10016         of the template-parameter's default argument appeared.
10018 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
10020         * call.c (build_over_call): Tweak empty class handling.
10022         * decl.c (make_typename_type): Use currently_open_class.
10024         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
10026 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
10028         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
10029         for a type unless it is one.
10031         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
10033 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
10035         * Makefile.in (program_transform_name, objdir): Define.
10037         * Makefile.in (BISON): Use bison from the build tree if it exists.
10038         (FLEX): Likewise.
10040 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
10042         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
10044         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
10046 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
10048         * call.c (build_scoped_method_call): Likewise.
10050 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
10052         * init.c (build_new_1): Call suspend_momentary around the creation
10053         of values that must be saved for exception handling.
10054         * parse.y (.build_new_placement): New non-terminal.
10055         (unary_expr, new_placement): Use it.
10056         * parse.c: Regenerated.
10058 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
10060         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
10061         old and new types.
10063         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
10064         canonical type.
10066         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
10068 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
10070         * decl.c (start_decl): Revert problem change.
10072         * Makefile.in (CONFLICTS): Fix.
10074 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10076         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
10078 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
10080         * class.c (finish_struct_1): Use BINFO_SIZE.
10082         * decl.c (start_decl): Use 'tem'.
10084 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
10086         * exception.cc: Include eh-common.h.
10087         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
10088         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
10089         (__cp_push_exception): Initialize eh_info struct as well.
10090         * except.c: Remove local structs and include eh-common.h.
10091         (init_exception_processing): Set language and version codes.
10092         (call_eh_info): Add presence of eh_info to runtime description of
10093         struct cp_eh_info.
10094         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
10095         * semantics.c (finish_try_block): Call start_catch_block() and
10096         end_catch_block().
10097         * parse.y (function_try_block): Call start_catch_block() and
10098         end_catch_block().
10100 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
10102         * typeck.c (original_type): New function.
10103         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
10104         to see if they're actually the same.
10105         * cp-tree.h (original_type): Declare.
10107 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10109         * Makefile.in (lex.o): Depend on output.h.
10111         * call.c (add_function_candidate): Remove unused variable `cand'.
10112         (add_conv_candidate): Likewise.
10113         (build_builtin_candidate): Likewise.
10115         * cp-tree.h: Add prototype for `types_overlap_p'.
10117         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
10119         * decl2.c (merge_functions): Remove unused variables `tmp' and
10120         `tempn'.
10122         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
10123         (code_as_string): Likewise.
10124         (language_as_string): Likewise.
10125         (parm_as_string): Likewise.
10126         (op_as_string): Likewise.
10127         (assop_as_string): Likewise.
10128         (cv_as_string): Likewise.
10130         * lex.c: Include output.h.
10132         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
10134         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
10135         ATTRIBUTE_UNUSED.
10137         * tinfo.cc (__class_type_info::dcast): Change the type of variable
10138         `i' from int to size_t.
10140         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
10141         ATTRIBUTE_UNUSED.
10143 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
10145         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
10146         DECL_NAMESPACE_SCOPE_P.
10147         (lang_decl_name): Likewise.
10148         * pt.c (tsubst_friend_function, tsubst): Likewise.
10149         * decl.c (pushdecl, redeclaration_error_message, start_decl,
10150         cp_finish_decl, start_function): Likewise.
10151         * class.c (finish_struct_1): Likewise.
10152         * call.c (build_over_call): Likewise.
10153         (compare_ics): Use DERIVED_FROM_P.
10155 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
10157         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
10158         * method.c (build_mangled_name): Use it.
10159         (build_decl_overload_real): Likewise.
10161         * error.c (dump_simple_decl): New function, broken out from ...
10162         (dump_decl): Use it.
10164 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
10166         * ptree.c (lang_print_xnode): Add missing `break'.
10168         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
10170         * call.c (add_template_candidate): Adjust for changes to
10171         fn_type_unification.
10172         (add_template_candidate_real): Likewise.
10173         (add_template_conv_candidate): Likewise.
10174         (build_user_type_conversion_1): Likewise.
10175         (build_new_function_call): Likewise.
10176         (build_object_call): Likewise.
10177         (build_new_op): Likewise.
10178         (build_new_method_call): Likewise.
10179         * class.c (instantiate_type): Likewise.
10180         * cp-tree.h (unification_kind_t): New type.
10181         (fn_type_unification): Adjust prototype.
10182         (type_unificaiton): Likewise.
10183         * pt.c (UNIFY_ALLOW_NONE): New macro.
10184         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
10185         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
10186         (UNIFY_ALLOW_DERIVED): Likewise.
10187         (unify): Change prototype.
10188         (maybe_adjust_types_for_deduction): New function.
10189         (check_cv_quals_for_unify): Likewise.
10190         (determine_specialization): Adjust.
10191         (fn_type_unification): Likewise.
10192         (type_unification): Likewise.
10193         (type_unification_real): Likewise.  Use
10194         maybe_adjust_types_for_deduction.  Fix mishandling of
10195         back-unification of template functions passed as arguments.  Pass
10196         appropriate combination of UNIFY_ALLOW_* to unify.
10197         (unify): Remove unused NTPARMS parameter.  Use
10198         check_cv_quals_for_unify.  Remove bogus code that allowed
10199         too-generous unification in order to adhere more closely to standard.
10200         (get_bindings_real): Adjust.
10201         (get_class_bindings): Likewise.
10203         * method.c (build_overload_identifier): Only use the innermost
10204         template arguments when mangling.
10205         * pt.c (tsubst_template_argument_vector): New function.
10206         (complete_template_args): Deal with the situation where the
10207         extra_args contain more than one level of arguments.
10208         (lookup_template_class): Deal with member template classes, which
10209         may have more than one level of arguments.
10210         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
10211         Improve handling of member template classes.  Use
10212         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
10213         tsubst_template_argument_vector where appropriate.
10214         (regenerate_decl_from_template): Break out from ...
10215         (instantiate_decl): Here.
10217         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
10218         * parse.h: Regenerated.
10219         * parse.c: Really regenerated.
10221         * cp-tree.h (finish_unary_op_expr): New function.
10222         (finish_id_expr): Likewise.
10223         (begin_new_placement): Likewise.
10224         (finish_new_placement): Likewise.
10225         (finish_declarator): Likewise.
10226         (finish_translation_unit): Likewise.
10227         (finish_parmlist): Likewise.
10228         (begin_class_definition): Likewise.
10229         (finish_class_definition): Likewise.
10230         (finish_default_args): Likewise.
10231         (finish_inline_definitions): Likewise.
10232         * parse.y (GCC_ASM_KEYWORD): Remove.
10233         (TYPENAME_ELLIPSIS): Likewise.
10234         * parse.c: Regenerated.
10235         Use new functions in semantics.c in the actions for many rules.
10236         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
10237         * hash.h: Regenerated.
10238         * semantics.c (finish_expr_stmt): Allow NULL expr.
10239         (finish_unary_op_expr): New function, containing
10240         code previously in parse.y.
10241         (finish_id_expr): Likewise.
10242         (begin_new_placement): Likewise.
10243         (finish_new_placement): Likewise.
10244         (finish_declarator): Likewise.
10245         (finish_translation_unit): Likewise.
10246         (finish_parmlist): Likewise.
10247         (begin_class_definition): Likewise.
10248         (finish_class_definition): Likewise.
10249         (finish_default_args): Likewise.
10250         (finish_inline_definitions): Likewise.
10252 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
10254         * typeck.c (build_c_cast): Don't decay arrays and functions to
10255         pointer type when converting to a class type.
10257 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
10259         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
10260         (DECL_CLASS_SCOPE_P): Likewise.
10262 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
10264         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
10265         * decl2.c (constructor_name_full): Likewise.
10267 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
10269         * tree.c (mapcar): Add OVERLOAD support.
10271         * init.c (resolve_offset_ref): We must use basetype_path before we
10272         destroy it with a call to convert_pointer_to.
10274 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
10276         * class.c (currently_open_class): New fn.
10277         * decl.c (lookup_name_real): Use it.
10278         * search.c (lookup_field): Likewise.
10280 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10282         * cp-tree.def (OVERLOAD): New node.
10283         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
10284         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
10285         (NAMESPACE_BINDING): Remove.
10286         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
10287         namespace_binding.
10288         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
10289         Define.
10290         (tree_overload): New struct.
10291         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
10292         (REAL_IDENTIFIER_TYPE_VALUE): Define.
10293         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
10294         (lang_decl_flags): Remove in_namespace.
10295         (lang_decl): Remove chain.
10296         (DECL_CHAIN, DECL_NAMESPACE): Remove.
10297         (flag_honor_std): Declare extern.
10298         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
10299         namespace_binding, set_namespace_binding,
10300         lookup_function_nonclass, cat_namespace_levels,
10301         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
10302         scratch_ovl_cons, ovl_member, build_overload): Declare.
10303         (decl_list_length, get_namespace_id, current_namespace_id,
10304         overloaded_globals_p): Remove.
10305         (lookup_using_namespace, qualified_lookup_using_namespace): Change
10306         return type.
10307         (push_scratch_obstack): New macro.
10308         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
10309         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
10310         convs, fns.
10311         (build_new_function_call): Iterate using OVL_CHAIN.
10312         Print DECL_NAME in when reporting ambiguities.
10313         (build_object_call): Iterate using OVL_NEXT for fns, convs.
10314         (build_new_op): Call lookup_function_nonclass.
10315         Iterate using OVL_NEXT.
10316         (build_op_delete_call): Change detection of members.
10317         Do not wrap TREE_LIST around fields and single global functions.
10318         (build_over_call): Don't push a class level if the context is a
10319         namespace.
10320         (build_new_method_call): Iterate using OVL_NEXT.
10321         * class.c (add_method): Chain overloaded members using
10322         build_overload.  Remove copying of method.
10323         (grow_method): When iterating through the obstack, expect OVERLOAD
10324         nodes.  Chain overload members.
10325         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
10326         nodes in call to get_baselinks.
10327         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
10328         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
10329         fdecls that are OVERLOAD nodes.
10330         (validate_lhs): New function.
10331         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
10332         code.  Use DECL_NAME in error messages.  Split code between global
10333         and member function processing.
10334         * decl.c (global_type_node): New static variable.
10335         (in_std): New global.
10336         (struct binding_level): New field usings.
10337         (resume_binding_level): Assert that we are not in a class.
10338         (toplevel_bindings_p): Just check for namespace_p or
10339         pseudo_global.
10340         (resume_level): Remove.
10341         (find_binding): New function.
10342         (binding_for_name): Call it.
10343         (namespace_binding, set_namespace_binding): New functions.
10344         (push_namespace): Associate binding level with new namespace,
10345         resume_binding_level for existing namespace.  Remove old code.
10346         Fake std by counting.
10347         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
10348         (maybe_push_to_top_level): Save current namespace.
10349         (pop_from_top_level): Restore saved namespace.
10350         (pop_namespace): Call suspend_binding_level.  Remove old code.
10351         (cat_namespace_levels): New function.
10352         (set_identifier_type_value_with_scope): For namespace bindings,
10353         set BINDING_TYPE, and use global_type_node.
10354         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
10355         (identifier_type_value): New function.
10356         (pushtag): If no context, use current_namespace.
10357         (duplicate_decls): Don't process DECL_CHAIN.
10358         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
10359         already set.  Never reset it to NULL_TREE.  Lookup global variables
10360         in their namespace.  Push overloaded templates if they are on
10361         namespace level.
10362         (pushdecl_namespace_level): New function.
10363         (pushdecl_top_level): Implement using pushdecl_namespace_level.
10364         (pushdecl_using_decl): New function.
10365         (overloaded_globals_p): Remove.
10366         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
10367         them.  Use namespace_binding and set_namespace_value.
10368         (redeclaration_error_message): Complain if the declarations come
10369         from different namespaces.
10370         (lookup_tag): On namespace level, look in the BINDING_TYPE.
10371         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
10372         old code.
10373         (select_decl): New function.
10374         (lookup_name_real): Call it for qualified and unqualified lookup.
10375         Pass tree_bindings from the stack.
10376         If prefer_type is 1, also accept namespaces.
10377         (lookup_function_nonclass): New function.
10378         (init_decl_processing): Set the binding level of the global
10379         namespace to global_binding_level.
10380         Build a proper type list for __builtin_apply.
10381         Initialize std_node to "fake std" if flag_honor_std is set.
10382         Initialize global_type_node.
10383         Allocated bad_alloc in namespace std if flag_honor_std.
10384         (define_function): Set the DECL_CONTEXT to the current_namespace.
10385         (start_decl): A namespace is not considered as a context here.  If
10386         the DECL_CONTEXT is a namespace, push the decl.
10387         (cp_finish_decl): Check for namespaces used as initializers.
10388         (grokfndecl): Add namespace parameter.  Remove processing of
10389         DECL_CHAIN.
10390         (grokvardecl): Add namespace parameter.
10391         (grokdeclarator): Process SCOPEs that are namespaces.  For
10392         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
10393         (start_function): Check for contexts that are namespaces.
10394         Set context for declarations that have not been pushed.
10395         (store_parm_decls): Check for ::main only.
10396         (finish_function): Likewise.
10397         (start_method): Check for contexts that are namespaces.
10398         (start_method): Remove DECL_CHAIN processing.
10399         * decl2.c (flag_honor_std): Declare.
10400         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
10401         (decl_namespace_list): New static global.
10402         (grok_x_components): Ignore namespaces as type contexts.
10403         (check_classfn): Expect OVERLOAD nodes.
10404         (grokfield): Remove DECL_CHAIN processing.
10405         (finish_file): Call cat_namespace_levels.
10406         (merge_functions): New function.
10407         (ambiguous_decl): Rewrite.
10408         (lookup_using_namespace): Produce tree_bindings.
10409         (qualified_lookup_using_namespace): Likewise.
10410         (set_decl_namespace, decl_namespace, current_decl_namespace,
10411         push_decl_namespace, pop_decl_namespace): New functions.
10412         (arg_lookup): New struct.
10413         (add_function, arg_assoc_namespace, arg_assoc_class,
10414         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
10415         New functions.
10416         (get_namespace_id, current_namespace_id): Remove.
10417         (do_toplevel_using_decl): Rewrite.
10418         (do_class_using_decl): Complain about namespace qualifiers.
10419         (do_using_directive): Sorry if not on namespace level.  Complain
10420         about unknown namespaces.
10421         * error.c (dump_aggr_type): Check for namespace contexts.
10422         * except.c (init_exception_processing): Push terminate into std.
10423         * friend.c (is_friend): A namespace is not a context, here.
10424         * init.c (expand_member_init): Remove DECL_CHAIN processing.
10425         (build_offset_ref): Process OVERLOAD nodes.
10426         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
10427         * lex.c (identifier_type): Loop using OVL_CHAIN.
10428         (see_typename): Set looking_for_typename to 2.
10429         (real_yylex): Likewise.
10430         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
10431         (do_scoped_id): Expect OVERLOAD nodes.
10432         Change calling convention for qualified_lookup_using_namespace.
10433         (build_lang_decl): Don't set in_namespace anymore.
10434         * method.c (typevec_size): New global.
10435         (build_overload_nested_name): Return if global_namespace.
10436         Otherwise, always expect a declaration context.
10437         (build_qualified_name): Likewise.
10438         Make sure we don't write beyond typevec_size.
10439         (build_decl_overload_real): Likewise.
10440         Allocate one extra slot for the namespace.
10441         (hack_identifier): Mark code dead.
10442         Process OVERLOAD and NAMESPACE_DECL nodes.
10443         * parse.y (program): Pop namespaces until in global namespace.
10444         (extdef): In a using-declaration, don't discard the identifier if
10445         there is no declaration.
10446         (left_curly): Ignore type contexts which are namespaces.
10447         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
10448         used as scope.
10449         * pt.c (template_class_depth): Expect types to be namespaces.
10450         (determine_specialization): Simplify by expecting OVERLOAD nodes.
10451         (push_template_decl): Push into namespace level.
10452         Reset ctx if it is a namespace.
10453         Set DECL_CONTEXT to current_namespace if not set already.
10454         Ignore real contexts that are namespaces.
10455         (mangle_class_name_for_template): Skip global_namespace.
10456         Mangle other namespaces as declarations.
10457         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
10458         (lookup_template_class): Push into namespace of context.
10459         If the context is a namespace, set it to global_namespace.
10460         Use id_context for mangling.
10461         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
10462         (tsubst_friend_function): Ignore namespace contexts.
10463         Push into namespace level.
10464         (tsubst): Handle NAMESPACE_DECL nodes.
10465         Remove DECL_CHAIN processing.
10466         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
10467         * ptree.c (print_lang_identifier): Print bindings.
10468         (lang_print_xnode): Print OVERLOAD nodes.
10469         * rtti.c (init_rtti_processing): Push type_info into std.
10470         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
10471         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
10472         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
10473         lookup_fnfields_here): Likewise.
10474         Process all nodes, instead of going through TREE_CHAIN.
10475         * sig.c (build_signature_pointer_or_reference_type): Set context
10476         to global_namespace.
10477         (build_signature_table_constructor): Expect OVERLOAD nodes.
10478         * spew.c (yylex): Save old setting of looking_for_typename.
10479         * tree.c (decl_list_length): Remove.
10480         (binding_init): New function.
10481         (count_functions): Rewrite.
10482         (is_overloaded_fn): Expect OVERLOAD nodes.
10483         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
10484         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
10485         ovl_member): New functions.
10486         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
10487         (type_unknown_p): Likewise.
10488         (require_instantiated_type): Likewise.
10489         (build_component_ref): Declare code dead.
10490         (build_x_function_call): Create and expect OVERLOAD nodes.
10491         (build_function_call_real): Check for ::main only.
10492         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
10493         (convert_for_assignment): Check for TREE_LIST before accessing
10494         TREE_VALUE.
10495         * decl.c (duplicate_decls): Check for namespace bindings instead
10496         of global bindings.
10497         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
10498         lookup_name_current_level, start_decl, xref_tag,
10499         finish_enum): Likewise.
10500         * init.c (build_offset_ref): Likewise.
10501         * search.c (lookup_field): Likewise.
10502         (lookup_fnfields): Likewise.
10503         (dfs_debug_mark): Likewise.
10504         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
10505         (poplevel_class, pop_from_top_level): Likewise.
10506         * decl2.c (finish_method): Likewise.
10507         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
10508         * decl.c (record_builtin_type): Likewise.
10509         (init_decl_processing, grokfndecl): Likewise.
10510         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
10511         (make_lang_type): Likewise.
10512         * parse.y (make_thunk): Likewise.
10513         * pt.c (tsubst): Likewise.
10514         * tree.c (debug_binfo): Likewise.
10515         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
10516         tinfo2.cc, inc/new.h: Add std qualifications.
10517         * inc/new: Wrap with namespace std if __HONOR_STD.
10518         * inc/typeinfo: Likewise.
10520 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
10522         * call.c (build_user_type_conversion_1): Handle second_conv
10523         properly for templates.
10525 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
10527         * method.c (build_decl_overload_real): Set TREE_USED flag to
10528         zero for build_type_variants nodes as well.
10530 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
10532         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
10534 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
10536         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
10537         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
10538         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
10539         xref.o): Add toplev.h dependencies.
10541 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
10543         * errfn.c (cp_error, cp_warning): Remove declarations for
10544         error and warning respectively.
10546 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10548         * error.c: Convert to using ctype macros defined in system.h.
10549         * method.c: Likewise.
10550         * xref.c: Likewise.
10551         * lex.c: Likewise.  Also remove redundant system header stuff.
10553 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
10555         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
10556         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
10557         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
10558         xref.c: Add include of toplev.h.
10560 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
10562         * tree.c (perm_manip): Also regenerate the RTL of an extern.
10563         (copy_to_permanent): Use end_temporary_allocation.
10565 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
10567         * init.c (expand_vec_init): The initialization of each array
10568         element is a full-expression.
10570 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
10572         * method.c (build_mangled_name): Add a call to build_type_variant
10573         to get the right type.
10575 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
10577         * Makefile.in: Add .SUFFIXES.
10579         * cp-tree.def: Remove NAMESPACE_DECL.
10581 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
10583         * call.c (build_over_call): Do evaluate arg even if it has empty
10584         class type.
10585         * decl.c (start_function): Don't push a member function.
10587 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
10589         * Makefile.in (g++FAQ.info): Put -o option before input file.
10591 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
10593         * gxxint.texi: Add info for squangling codes K and B.
10595 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
10597         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
10598         the expression in templates.
10599         (finish_stmt_expr): Likewise.
10601 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
10603         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
10605 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
10607         * decl.c (maybe_push_to_top_level): Always clear
10608         current_template_parms and processing_template_decl.
10609         (pushtag): Remove check of current_class_type and some comments,
10610         since maybe_push_to_top_level no longer creates confusion.
10612 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
10614         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
10615         (DECL_CLASS_TEMPLATE_P): Likewise.
10616         (DECL_PRIMARY_TEMPLATE): Likewise.
10617         (PRIMARY_TEMPLATE_P): Use it.
10618         (push_template_decl_real): New function.
10619         (redeclare_class_template): Take new template parameters as
10620         input.
10621         (is_specialization_of): New function.
10622         (comp_template_args): Declare.
10623         * decl.c (pushtag): Handle friend template classes.
10624         (xref_tag): Likewise.  Use new calling convention for
10625         redeclare_class_template.
10626         * decl2.c (grok_x_components): Handle friend templates.
10627         * friend.c (is_friend): Use is_specialization_of where
10628         appropriate.  Deal with friend class templates.
10629         (make_friend_class): Let a class template be friends with itself.
10630         * pt.c (comp_template_args): Remove declaration.
10631         (tsubst_friend_class): New function.
10632         (push_template_decl_real): New function.
10633         (push_template_decl): Use it.
10634         (redeclare_class_template): Adjust for new calling convention.
10635         (comp_template_args): Give it external linkage.
10636         (instantiate_class_type): Use tsubst_friend_class to deal
10637         with friend templates.
10638         * typeck.c (comptypes): Use comp_template_args, rather than
10639         expanding it inline.
10640         * parse.y (component_decl): Handle a nested template type
10641         like other component type declarations.
10643         * pt.c (check_explicit_specialization): Handle overloaded
10644         constructors correctly.
10646         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
10647         (lookup_template_class): Use it.
10649 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
10651         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
10652         * cp-tree.h: Add WRAPPER support.
10653         * call.c (add_candidate): Split out from add_*_candidate fns.
10654         (build_over_call): Take the candidate instead of function and args.
10655         Enforce access control here.  Emit overload warnings here.
10656         (add_warning): New fn.
10657         (joust): Add WARN parm.  If not set, call add_warning instead of
10658         printing a warning.  Re-enable some warnings.
10659         (tourney): Pass it.
10660         (convert_like): Adjust.
10661         (build_new_op): Adjust.
10662         (build_new_function_call): Adjust.
10663         (build_user_type_conversion_1): Adjust.
10664         (USER_CONV_FN): Adjust.
10665         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
10666         build_int_wrapper): New fns.
10668 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
10670         * pt.c (unify): Fix typo in previous change.
10672 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
10674         * error.c (dump_type_real): Declare canonical_name.
10676         * typeck.c (comp_target_types): Fix PMFs.
10678 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
10680         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
10681         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
10682         TEMPLATE_DECL.
10684         * pt.c (tsubst): Decrease the template-level of
10685         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
10686         TEMPLATE_PARM_INDEX.
10687         (template_decl_level): New function.
10688         (unify): Make sure to record unifications for template
10689         parameters, even when the parameters exactly match the arguments.
10690         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
10691         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
10692         aren't from the level we're currently working on.
10694 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
10696         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
10698         * decl2.c (check_member_template): Set DECL_IGNORED for member
10699         class templates, too.
10701         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
10703 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10705         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
10707 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
10709         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
10710         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
10711         (init_decl_processing): Handle TI types.
10712         * typeck.c (unsigned_type, signed_type): Handle TI types.
10714 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
10716         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
10717         New local added_libraries.  Increment count when add library to
10718         arglist.
10720 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
10722         * cp-tree.h (type_as_string_real): New function.
10723         * pt.c (mangle_class_name_for_template): Use it.
10724         * error.c (dump_aggr_type): Change prototype.
10725         (dump_type_prefix): Likewise.
10726         (dump_type_suffix): Likewise.
10727         (dump_type_real): Convert from dump_type.  If desired, the
10728         "canonica" name of a typedef, i.e., the name of the underlying
10729         type, can be printed.
10730         (dump_type): Call dump_type_real.
10732 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
10734         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
10736         * typeck.c (comp_target_types): Tweak pedantic case.
10737         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
10738         Return -1 or 1 instead of 1 or 2.
10739         (compparms): Remove STRICT handling.
10740         (convert_for_assignment): Fix handling of pmfs.
10742 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
10744         * typeck.c (comp_target_types): Handle references like pointers.
10745         (comp_target_parms): Note that return code from comp_target_types
10746         can be negative to indicate failure.
10748 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
10750         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
10751         which requires a working target compiler to build.
10753 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
10755         * tree.c (avoid_overlap): Add prototype.
10757         * spew.c (num_tokens): Add prototype.
10758         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
10760         * search.c (dfs_check_overlap): Add prototype.
10761         (dfs_no_overlap_yet): Likewise.
10763         * pt.c (original_template): Add prototype.
10764         (inline_needs_template_parms): Likewise.
10765         (push_inline_template_parms_recursive): Likewise.
10766         (retrieve_specialization, register_specialization): Likewise.
10767         (print_candidates, reduce_template_parm_level): Likewise.
10768         (build_template_decl, mark_template_parm): Likewise.
10769         (tsubst_friend_function, get_bindings_real): Likewise.
10771         * method.c (start_squangling): Add prototype.
10772         (end_squangling, check_ktype, issue_ktype): Likewise.
10773         (build_overloaded_scope_ref, check_btype): Likewise.
10774         (build_mangled_template_parm_index): Likewise.
10776         * lex.c (init_cpp_parse): Add prototype.
10777         (handle_cp_pragma, handle_sysv_pragma): Likewise.
10778         (reduce_cmp, token_cmp): Likewise.
10780         * except.c (call_eh_info): Add prototype.
10781         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
10782         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
10784         * decl2.c (is_namespace_ancestor): Add prototype.
10785         (namespace_ancestor, add_using_namespace): Likewise.
10786         (ambiguous_decl): Likewise.
10788         * decl.c (indent): Add prototype.
10790         * call.c (add_template_candidate_real): Add prototype.
10792 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
10794         * decl2.c (build_expr_from_tree): Just return a PMF.
10796 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
10798         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
10799         when doing initializations.
10801         * pt.c (unify): Use comptypes to compare type args.
10803 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
10805         * decl.c (duplicate_decls): Fix check for when it's safe to free
10806         the new decl.
10808         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
10809         to type_as_string.
10811 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
10813         * pt.c (build_template_parm_index): Add prototype.
10815         * search.c (my_tree_cons): Don't clear words outside the
10816         newly allocated node.
10818 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
10820         * lex.c (init_parse): Now returns char* containing the filename.
10822 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
10823                           Jeff Law   <law@cygnus.com>
10825         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
10826         than a pointer.
10828 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10830         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
10832 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10834         * decl.c (duplicate_decls): Don't warn for redundant decls if
10835         friend: let add_friend take care of it.
10837 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
10839         * sig.c (build_signature_pointer_constructor): Don't set
10840         TREE_HAS_CONSTRUCTOR for a signature pointer.
10841         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
10842         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
10843         here, too.
10844         * typeck.c (build_unary_op): Only allow taking the address of a
10845         real constructor.
10846         * typeck2.c (digest_init): Simplify.
10847         (store_init_value): Don't pedwarn about using { } for pmfs.
10849 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
10851         * cp-tree.h (start_decl):  Update prototype.
10852         * decl.c (start_decl):  Like the C version, new parameters
10853         for the attributes.  Call cplus_decl_attributes here,
10854         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
10855         (grokdeclarator):  Pass NULL for new start_decl arguments.
10856         * pt.c (tsubst_expr):  Likewise.
10857         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
10858         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
10859         * lex.c (build_lang_decl): Add lang_name_java.
10860         * class.c (push_lang_context): Add lang_name_java.
10861         * method.c (build_mangled_name): Check for is_java_type.
10863 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10865         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
10866         * call.c (build_scoped_method_call): Check for TREE_CODE for
10867         VOID_TYPE instead of type ==  void_type_node.
10868         (build_method_call): Likewise.
10869         * decl.c (lookup_name_real): Likewise.
10870         (grokdeclarator): Likewise.
10871         (start_decl): Likewise.
10872         (grokparms): Likewise.
10873         (start_function): Likewise.
10874         (finish_function): Likewise.
10875         (start_method): Likewise.
10877 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
10879         * lex.c (finput): New variable.
10880         (init_cpp_parse):  Renamed from init_parse.
10881         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
10882         (finish_parse): New function.
10883         * cp-tree.h (init_lex, init_parse): Remove declarations.
10885 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
10887         * call.c (build_call): Still evaluate the actual argument.
10888         * class.c (is_empty_class): Update for -fnew-abi.
10890         * decl2.c: -fnew-abi implies -fsquangle.
10892         * method.c (do_build_assign_ref): Don't do anything to copy
10893         an empty class.
10894         (do_build_copy_constructor): Likewise.
10895         * call.c (build_over_call): Likewise.
10897 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
10899         * tree.c (avoid_overlap): Return a value.
10901 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
10903         * method.c (check_btype): Add missing argument to xrealloc.
10904         (check_ktype): Likewise.
10906 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
10908         Implement empty base optimization.
10909         * class.c (finish_struct_1): Add vbase fields earlier.  Set
10910         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
10911         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
10912         (types_overlap_p): New fn.
10913         * tree.c (avoid_overlap): New fn.
10914         (build_base_fields): Use it to avoid overlapping empty bases.
10915         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
10917         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
10919         Re-implement allocation of base class subobjects.
10920         * tree.c (unshare_base_binfos): New fn.
10921         (layout_basetypes): Use it.  Now handles offsets of both virtual and
10922         non-virtual bases, after layout_type.
10923         (layout_vbasetypes): Remove.
10924         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
10925         (build_vbase_pointer_fields): Split out from old layout_basetypes.
10926         * class.c (finish_base_struct): Lose offset handling code.
10927         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
10928         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
10929         * cp-tree.h: Adjust.
10931 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
10933         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
10934         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
10935         * class.c (duplicate_tag_error): Likewise.
10936         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
10937         * tree.c (layout_vbasetypes): Update from layout_record, remove
10938         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
10939         (layout_basetypes): Likewise.
10941 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
10943         * class.c, Make sure system.h is included just after config.h.
10944         Delete lingering stdio and errno references too.
10945         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
10947 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
10949         * friend.c (is_friend): Fix access control for local classes.
10951         * class.c (is_empty_class): New fn.
10952         * call.c (build_call): Don't pass empty class objects to a function.
10954 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
10956         * call.c (build_over_call): Do name resolution for default
10957         arguments of function templates in the scope of the templates.
10959 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
10961         * call.c: Include system.h.  Remove includes, declarations and
10962         defines provided by system.h.
10963         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
10964         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
10965         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
10966         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
10967         * typeck2.c, xref.c: Likewise.
10968         * Makefile.in: Dependencies updated as appropriate.
10969         * Make-lang.in: Likewise.
10971 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
10973         * pt.c (fn_type_unification): Allow incomplete unification without
10974         an immediate error message.
10976 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
10978         * tree.c (member_p): New fn.
10979         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
10980         initializing class members.
10982         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
10983         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
10985         * call.c (build_method_call): Handle non-scoped destructors, too.
10986         * pt.c (tsubst_copy): Likewise.
10988         * pt.c (print_template_context): Split out...
10989         (push_tinst_level): ...from here.
10991         * friend.c (is_friend): Don't pass a type to decl_function_context.
10993         * typeck.c (convert_for_initialization): Always hand off
10994         conversions to class type.
10996 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
10998         * friend.c (is_friend): Local classes have the same access as the
10999         enclosing function.
11001 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
11003         * typeck.c (expand_target_expr): Delete dead function.
11005         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
11007         * repo.c (save_string): Delete dead function.
11009         * method.c (thunk_printable_name): Delete dead function.
11011         * lex.c (yynextch): Delete dead function.
11013         * expr.c (tree_extract_aggr_init): #if 0 out.
11015         * except.c (do_unwind): Delete dead function.
11016         (easy_expand_asm): Likewise.
11018         * cvt.c (build_conversion_type_1): Delete dead function.
11020         * cp-tree.h (push_expression_obstack): Declare.
11022         * call.c (source_type): #if 0 out.
11024         * class.c (alter_access): Remove unused label.  Add braces
11025         around empty else clause.
11027         * lex.c (yyprint): Fix argument to printf.
11029 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
11031         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
11033         * pt.c (instantiate_class_template): Make sure template
11034         arguments are permanent.
11035         * init.c (resolve_offset_ref): Don't go looking around in
11036         template types.
11038         * semantics.c: Add routines to handle expressions, and some
11039         declaration processing.
11040         * parse.y: Use them.
11041         (current_class_depth): Move declaration to cp-tree.h.
11042         * parse.c: Regenerated.
11043         * cp-tree.h: Use them.
11044         (current_class_depth): Declare.
11045         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
11047 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
11049         * error.c (dump_decl): Be a bit more explicit with template
11050         type arguments, when verbose.
11052 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
11054         * inc/exception: Reorder closing braces.
11056 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
11058         * pt.c (redeclare_class_template): New function.
11059         * cp_tree.h (redeclare_class_template): Declare it.
11060         * decl.c (xref_tag): Use it.
11062 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
11064         * call.c (build_over_call): Check IS_AGGR_TYPE, not
11065         TYPE_LANG_SPECIFIC.
11066         * typeck.c (convert_arguments): Likewise.
11068         * decl.c (grokdeclarator): Remove const and volatile from type after
11069         setting constp and volatilep.
11071         * class.c (finish_struct_1): Don't warn about bool bitfield larger
11072         than one bit.
11074 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
11076         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
11078 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
11080         * call.c (build_object_call): Complain about ambiguous operator(),
11081         rather that crashing.
11082         (build_new_op): Likewise.
11083         (build_op_delete_call): Likewise.
11085 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
11087         * cvt.c (perform_qualification_conversions): Use comp_target_types
11088         instead of comp_ptr_ttypes.
11090 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
11092         * cp-tree.h (enforce_access): Declare.
11093         * call.c (enforce_access): Make it extern, not static.
11094         * class.c (alter_access): Use enforce_access; modify code for ISO
11095         compliance, rather than ARM rules.
11097 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11099         * cp-tree.h: Fix typo.
11101 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
11103         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
11104         if (aggregate_value_p (type)).
11106         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
11108 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
11110         * tree.c (mapcar): When dealing with a DECL, use it's constant
11111         value, if any.
11112         * pt.c (lookup_template_class): Don't mangle the names of template
11113         classes whose arguments are unknown.
11115         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
11117 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
11119         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
11121 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
11123         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
11124         boolean_type_node to 1.
11126 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
11128         * error.c (dump_expr): Remove unused variable `l'.
11130         * pt.c (for_each_template_parm): New function, created by
11131         converting uses_template_parms.
11132         (tree_fn_t): New typedef.
11133         (uses_template_parms): Use it.
11134         (mark_template_parm): New function.
11135         (push_template_decl): Check that the argument list of a partial
11136         specialization uses all the template parameters.
11138         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
11139         with it; we might want it for debugging.
11140         * cp-tree.h (type_unification): Change interface.
11141         * class.c (finish_struct_1): Skip nested template types, just like
11142         ordinary nested types.
11143         (instantiate_type): Use new interface to type_unification.
11144         * lex.c (init_lex): Add __sz as opname for sizeof.
11145         * method.c (build_overload_scope_ref): New function.
11146         (build_overload_int): Handle complex expressions.  Set
11147         numeric_output_need_bar if necessary.
11148         (build_overload_value): Handle non-PARM_DECL nodes; this
11149         routine is now used by build_overload_int.  Remove some
11150         assignments to numeric_output_need_bar.  Use
11151         build_overload_scope_ref.
11152         (build_qualified_name): Note that some template mangled names end
11153         with digits, and set numeric_output_need_bar appropriately.  Use
11154         build_underscore_int.
11155         * pt.c (unify): Change interface.
11156         (type_unification_real): Likewise.
11157         (determine_specialization): Use new interfaces.
11158         (tsubst): Deal gracefully with situations in which the argument
11159         vector is not fully filled.
11160         (fn_type_unification): Use new interfaces.
11161         (type_unification): Likewise.  Remove NOP_EXPR hack.
11162         (type_unification_real): Likewise.
11163         (unify): Likewise.  Deal with unification of complex expressions.
11165 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11167         * pt.c (complete_template_args): Initialize skip properly.
11169         * decl.c (make_typename_type): Revert.
11170         (make_implicit_typename): Remove.
11171         (lookup_name_real): Don't call it.  Call lookup_field if we see a
11172         TYPE_DECL from a template base.
11173         * search.c (lookup_field): Do implicit typename stuff.
11175 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
11176                           Geoff Noer    <noer@cygnus.com>
11178         * Makefile.in: Various fixes for building cygwin32 native toolchains.
11179         * Make-lang.in: Likewise.
11181 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11183         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
11185 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
11187         * decl.c (make_implicit_typename): Rewrite removed code.
11188         (make_typename_type): Call it if the type we look up comes from
11189         a base that uses template parms.
11191         * pt.c (complete_template_args): Rewrite.
11192         (tsubst, FUNCTION_DECL): Use it.
11194 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
11196         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
11197         c_expand_asm_operands () if output_operands, input_operands or
11198         clobbers is not NULL_TREE.
11200 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11202         * pt.c (complete_template_args): New function.
11203         (get_bindings): Deal with specializations of function templates
11204         with return type containing parameters from outer class
11205         templates.
11206         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
11207         substitute arguments and compose a new type.
11209 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
11211         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
11212         FUNCTION_DECLs.
11214 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
11216         * decl.c (make_implicit_typename): Lose useless code.
11218         * call.c (standard_conversion): Handle A* -> const A* properly.
11220         * pt.c (get_bindings_real): Rename from get_bindings.  Add
11221         check_rettype parm.
11222         (get_bindings): Pass 1.
11223         (get_bindings_overload): Pass 0.
11225 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
11227         * pt.c (check_explicit_specialization): When reverting a static
11228         member function, also remove the `this' parameter from
11229         last_function_parms.
11231 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
11233         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
11234         a function context.
11236         * decl.c (store_bindings): Use free_binding_vecs.
11237         (pop_from_top_level): Likewise.
11239 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
11241         * decl.c (make_implicit_typename): Only change the type of a
11242         TYPENAME_TYPE.
11244 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
11246         * semantics.c: New file, containing routines to perform the
11247         semantic phase of parsing.
11248         * parse.y: Use it.
11249         * pt.c (tsubst_expr): Likewise.
11250         * cp-tree.h: Declare the various functions in semantics.c.
11251         Provide macros to access _STMT tree nodes.
11252         * cp-tree.def: Add ASM_STMT tree node.
11253         * Makefile.in, Make-lang.in: Add dependencies on and for
11254         semantics.c.
11256 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
11258         * pt.c (push_template_decl): Only check primary templates.
11260         * pt.c (check_explicit_specialization): Complain about default args
11261         in explicit specialization.
11263         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
11264         constructor_declarator.
11266 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
11268         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
11269         has no overloaded operator ->.
11271         * call.c (build_field_call): Don't crash when presented with a
11272         field that is actually a nested type.
11274         * decl.c (pushtag): Deal with friend class injection in local
11275         classes.
11277         * call.c (build_object_call): Don't crash if OBJ is a
11278         pointer-to-member-function.
11280 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
11282         * pt.c (push_template_decl): Complain about template with C linkage,
11283         anonymous template class.
11285 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
11287         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
11288         * search.c: Likewise.
11290         * lex.c (do_pending_defargs): Only call
11291         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
11293         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
11295 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
11297         * parse.y: Deal with CONSTRUCTORS in new_initializers.
11299 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
11301         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
11302         closely mimics the behavior in parse.y.
11303         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
11304         into a compound statement.
11306 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
11308         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
11309         * pt.c (inline_needs_template_parms): New fn.
11310         (original_template): New fn.
11311         (push_inline_template_parms_recursive): New fn.
11312         (maybe_begin_member_template_processing): Use them.
11313         (maybe_end_member_template_processing): Likewise.
11314         (is_member_or_friend_template): Rename to is_member_template.
11315         Member functions of local classes are never member templates.
11317 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11319         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
11320         added in the class scope to catch redefinition error.
11322         * pt.c (reduce_template_parm_level): Also copy
11323         the DECL_TEMPLATE_PARMS field.
11325 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
11327         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
11328         reduced-level template type parameter.
11330 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11332         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
11333         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
11334         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
11335         * decl.c (duplicate_decls): Propagate it.
11336         * typeck2.c (abstract_virtuals_error): Use two loops to emit
11337         abstract virtual functions and virtual functions which need a
11338         final overrider separately.
11340 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11342         * lang-specs.h: Properly put brackets around array elements in
11343         initializer.
11345         * typeck.c (build_binary_op_nodefault): Correctly place parens around
11346         && and || in expression.
11348 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11350         * call.c (default_parm_conversions): Remove prototype definition.
11351         (build_method_call): Remove unused variable result.
11353         * cvt.c (ocp_convert): Remove unused variable conversion.
11355         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
11357         * except.c (do_unwind): #if 0 definition of unused variables fcall
11358         and next_pc.
11360         * expr.c (extract_scalar_init): #if 0 prototype and function
11361         definition.
11363         * init.c (expand_aggr_init_1): Remove unused variable init_type.
11364         (build_new_1): Remove unused variable t.
11366         * pt.c (instantiate_class_template): Remove unused variable newtag;
11367         cast called function return value to void.
11368         (do_decl_instantiation): Remove unused variables name and fn.
11370         * tree.c (get_type_decl): Add default return to shut up compiler from
11371         complaining control reaches end of non-void function.
11373         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
11375 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11377         * call.c (default_parm_conversions): Remove prototype definition.
11378         (build_method_call): Remove unused variable result.
11379         (build_over_call): Add default case in enumeration switch.
11381 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11383         * decl2.c (lang_decode_option): Change j's type to size_t.
11385         * tree.c (layout_vbasetypes): record_align and desired_align are of
11386         type unsigned int; const_size and nonvirtual_const_size likewise.
11388 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
11390         * parse.y (new_initializer): Make sure all initializers are
11391         lists.
11393 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
11395         * decl2.c (import_export_decl): Mark tinfo functions for
11396         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
11398 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
11400         * method.c: Fix typo.
11402 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11404         * method.c: Include "system.h" to get stdlib.h, stdio.h,
11405         ctype.h, string.h, etc.
11406         (issue_nrepeats): Add default case in enumeration switch.
11407         (check_btype): Likewise.
11408         (process_overload_item): Likewise.
11410         * Makefile.in (method.o): Depend on system.h.
11412 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
11414         * lex.c (do_scoped_id): Fix parenthesizing.
11416 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
11418         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
11419         FLAG_RTTI is unset, initialize type info machinery and continue
11420         with FLAG_RTTI enabled.
11421         (get_typeid): Likewise.
11423 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
11425         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
11426         from B.
11428 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
11430         * pt.c (finish_member_template_decl): Deal more gracefully with
11431         invalid declarations.
11433 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
11435         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
11436         cp-tree.h: Clean up more old overloading code, old RTTI code, and
11437         some formatting quirks.
11439         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
11440         method.c, pt.c, ptree.c, typeck.c: Remove support for
11441         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
11442         * class.h: Remove.
11443         * Makefile.in: Adjust.
11445         * pt.c (unify): Don't allow reduced cv-quals when strict.
11447         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
11448         *type_unification* and unify.
11450 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
11452         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
11453         (nested_name_specifier): And add it before this use.
11454         (typename_sub0): And this use.  Also add use without the keyword.
11455         (typename_sub1): Likewise.
11456         * pt.c (instantiate_class_template): Don't actually instantiate
11457         anything if our type uses template parms.
11459 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
11461         * decl.c (start_function): Don't call temporary_allocation for a
11462         nested function.
11464 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11466         * pt.c (instantiate_class_template): Don't mess with friends if
11467         our type uses template parms.
11469 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
11471         * parse.y (nested_name_specifier): Use explicit_template_type.
11472         (typename_sub): Allow a template_type, an explicit_template_type,
11473         or an implicit template type at the end.
11474         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
11475         * decl.c (make_typename_type): Handle template-id where the name
11476         is a TEMPLATE_DECL.
11477         * call.c (build_scoped_method_call): Handle member template
11478         destructor call.
11479         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
11480         destructor is represented by the type.
11482         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
11483         * parse.y (nested_name_specifier): Add 'template' case.
11484         (explicit_template_type): New rule.
11485         (typename_sub): Use it.
11486         * decl.c (make_typename_type): Handle getting a template-id for NAME.
11487         * pt.c (tsubst): Likewise.
11489 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
11491         * pt.c (add_to_template_args): Fix thinko.
11492         (instantiate_class_template): Call it later.
11494         * pt.c (get_class_bindings): Add outer_args parm.
11495         (most_specialized_class): Likewise.
11496         (instantiate_class_template): Pass it.
11497         (more_specialized_class): Likewise.
11498         (lookup_template_class): Get context from template if none
11499         was specified.
11500         (finish_member_template_decl): Don't do anything with a
11501         partial specialization.
11502         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
11503         AGGREGATE_TYPE_P.
11504         * class.c (finish_struct): Member class templates have already been
11505         checked for name clashes.
11506         * decl.c (pushdecl_with_scope): Handle pushing at class level.
11508 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
11510         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
11511         (tsubst, *_PARM): Support multiple levels of template classes.
11512         (instantiate_class_template): Look up the pattern from the
11513         original template.
11514         (lookup_template_class): Handle getting a template for d1.
11515         (push_template_decl): Correct setting of 'primary'.
11516         (reduce_template_parm_level): Add 'levels' parm.
11517         (finish_member_template_decl): Support member class templates.
11518         (template_class_depth): Handle multiple levels.
11519         * parse.y (component_decl_1, fn.def2): Remove member template case.
11520         (component_decl): Add member template cases.
11521         * decl2.c (check_member_template): We now handle member template
11522         classes.
11523         * decl.c (pushtag): Handle member templates.
11524         * method.c (do_inline_function_hair): Don't touch
11525         IDENTIFIER_GLOBAL_VALUE.
11526         * init.c (build_offset_ref): If name isn't an identifier, just
11527         return it.
11528         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
11530         * typeck.c (get_delta_difference): Do adjust for conversions to
11531         and from virtual base.
11533 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
11535         * typeck.c (get_delta_difference): Give hard error for conversion
11536         from virtual base.
11538         * cp-tree.h: Tweak formatting.
11540 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
11542         * decl.c (push_namespace): Handle redeclaration error.
11544         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
11545         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
11546         (NAMESPACE_BINDING): New macro.
11547         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
11548         * *.c: Use them.
11550         * pt.c (push_template_decl): Use innermost_args.
11552         * decl.c (get_unique_name): Tweak from earlier in the name.
11554 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11556         * cp-tree.def: Add CPLUS_BINDING node.
11557         * cp-tree.h (tree_binding): New struct.
11558         (BINDING_SCOPE, BINDING_VALUE): New macros.
11559         (current_namespace, global_namespace): Declare extern.
11560         (struct lang_decl_flags): New field in_namespace.
11561         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
11562         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
11563         (TREE_INDIRECT_USING): New macro.
11564         * decl2.c (current_namespace, global_namespace): Declare.  The
11565         value is a NAMESPACE_DECL now, not a TREE_LIST.
11566         (is_namespace_ancestor, namespace_ancestor): New static functions.
11567         (add_using_namespace, ambiguous_decl): Likewise.
11568         (lookup_using_namespace): New support function for lookup_name.
11569         (qualified_lookup_using_namespace): New support function for
11570         do_scoped_id and lookup_namespace_name.
11571         (get_namespace_id): Mark as obsolete.
11572         (current_namespace_id): Likewise.
11573         (do_namespace_alias): Implement.
11574         (do_using_directive): Implement as call to add_using_namespace.
11575         * decl.c (binding_for_name): New function.
11576         (push_namespace, pop_namespace): Implement.
11577         (push_decl): Don't install a FUNCTION_DECL in the global branch.
11578         (lookup_namespace_name): Implement using qualified lookup.
11579         (lookup_name_real): For global scoping, lookup in
11580         global_namespace.  For namespace scoping, lookup in given
11581         namespace.  For unscoped lookup, iterate over namespace,
11582         considering using directives.
11583         (init_decl_processing): Initialize global_namespace.
11584         (grokvardecl): Build assembler name as static name for globals.
11585         (grokdeclarator): Remove old namespace mangling.
11586         (xref_tag): When installing a global binding for the
11587         tag, make sure we have an identifier.
11588         * method.c (build_overload_nested_name): Mangle namespaces.
11589         (build_qualified_name): Likewise.
11590         (build_decl_overload_real): Likewise.
11591         * lex.c (build_lang_decl): Set namespace for new declaration to
11592         current_namespace.
11593         (do_scoped_id): Find global names in global or current
11594         namespace, or using qualified namespace lookup, depending on
11595         context.
11596         * init.c (build_member_call): When scope is namespace, use
11597         build_x_function_call instead.
11598         (build_offset_ref): When scope is namespace, collapse processing
11599         to lookup_namespace_name instead.
11600         * error.c (dump_decl): Support NAMESPACE_DECL.
11601         * decl.c (pushdecl): Bind globals to current namespace.
11602         (push_overloaded_decl): Likewise.
11603         (lookup_tag): Likewise.
11604         (lookup_name_current_level): Likewise.
11605         (xref_tag): Likewise.
11606         (start_function): Likewise.
11607         * lex.c (do_identifier): Likewise.
11608         (identifier_typedecl_value): Likewise.
11609         (real_yylex): Likewise.
11610         * method.c (do_inline_function_hair): Likewise.
11611         * parse.y (unscoped): Likewise.
11612         * pt.c (check_explicit_specialization): Likewise.
11613         (lookup_template_class): Likewise.
11614         * rtti.c (call_void_fn): Likewise.
11615         * sig.c (build_sigtable): Likewise.
11616         * ptree.c (lang_print_xnode): New function.
11618 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
11620         * pt.c (instantiate_class_template): Don't instantiate if pedantic
11621         and the args use template parms.
11623         * pt.c (push_tinst_level): If the instantiation uses template parms,
11624         fail silently.
11625         * decl.c (xref_basetypes): Do call complete_type for basetypes
11626         that involve template parameters.
11628 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
11630         * typeck2.c (process_init_constructor): Fix labeled init check.
11632 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
11634         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
11635         argument to tsubst and friends.
11637         * pt.c (tsubst, FUNCTION_DECL): Tidy.
11639         * typeck.c (build_x_function_call): Handle static member function
11640         templates like non-templates.  Handle friend templates like normal
11641         function templates.
11642         * pt.c (tsubst, *_PARM): Don't use orig_level.
11643         (get_bindings): Don't call add_to_template_args.
11644         (instantiate_template): Likewise.
11645         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
11646         * ptree.c (print_lang_type): Print index/level for template parms.
11648 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
11650         * Make-lang.in (cc1plus): Note that cc1plus depends on
11651         cp/cp-tree.h and cp/cp-tree.def.
11653         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
11654         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
11655         position in a template parameter list.
11656         * cp-tree.h (template_parm_index): New structure, used as the tree
11657         structure for a TEMPLATE_PARM_INDEX.
11658         (TEMPLATE_PARM_IDX): New macro.
11659         (TEMPLATE_PARM_LEVEL): Likewise.
11660         (TEMPLATE_PARM_DESCENDANTS): Likewise.
11661         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
11662         (TEMPLATE_PARM_DECL): Likewise.
11663         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
11664         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
11665         (TEMPLATE_TYPE_DECL): Likewise.
11666         (TEMPLATE_CONST_IDX): Remove.
11667         (TEMPLATE_CONST_LEVEL): Likewise.
11668         (TEMPLATE_CONST_SET_INFO): Likewise.
11669         (TEMPLATE_TYPE_SET_INFO): Likewise.
11670         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
11671         node.
11672         (TEMPLATE_TYPE_LEVEL): Likewise.
11673         * decl.c (decls_match): Call comp_template_parms, rather than
11674         expanding it inline.
11675         (duplicate_decls): If two template declarations are being merged,
11676         then their TEMPLATE_INFOs should be merged as well.
11677         (grokfndecl): Save template-id information when declaring a friend
11678         with explicit template arguments.  Pass arguments to
11679         check_explicit_specialization via correct convention; at some
11680         point check_explicit_specialization changed, but these call-sites
11681         did not.
11682         (grokdeclarator): Tidy up slightly.
11683         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
11684         two template functions with the same DECL_ASSEMBLER_NAME the same,
11685         since the names are not yet mangled.
11686         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
11687         TEMPLATE_CONST_PARM.
11688         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
11689         decl for a non-type parameter, rather than printing `<tparm ...>'.
11690         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
11691         (do_friend): Deal with template friends.
11692         * lex.c (do_pending_inlines): Call
11693         maybe_begin_member_template_processing, rather than
11694         conditionally calling begin_member_template_processing.
11695         (process_next_inline): Likewise.  Call
11696         maybe_end_member_template_processing, rather than
11697         conditionally calling end_member_template_processing.
11698         (do_pending_defargs): Likewise.
11699         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
11700         TEMPLATE_CONST_PARM.
11701         * method.c (build_mangled_template_parm_index): New function.
11702         (build_overload_value): Use it.
11703         (build_overload_name): Likewise.
11704         * pt.c (finish_member_template_decl): Allow friend declarations.
11705         (template_class_depth): New function.
11706         (is_member_template): Rename, and modify, to become...
11707         (is_member_or_friend_template): New function.
11708         (end_member_template_processing): Rename, and modify, to become...
11709         (maybe_end_member_template_processing).
11710         (build_template_parm_index): New function.
11711         (reduce_template_parm_level): New function.
11712         (process_template_parm): Modify to use build_template_parm_index.
11713         (push_template_decl): Deal with friend templates.
11714         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
11715         TEMPLATE_CONST_PARM.
11716         (tsubst_friend_function): New function.
11717         (instantiate_class_template): Generate the DECL_FRIENDLIST
11718         for a new instantiation by using tsubst_friend_function rather
11719         than just tsubst.
11720         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
11721         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
11722         appropriate new macros.  Use reduce_template_parm_level to
11723         generate lower-level template parameters.  Handle tsubst'ing into
11724         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
11725         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
11726         templates.  Similarly for the template parameters for a new
11727         template.
11728         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
11729         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
11730         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
11731         (get_bindings): Call add_to_template_args if necessary.
11732         (instantiate_decl): Handle instantiations of friend templates.
11733         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
11734         TEMPLATE_TYPE_PARM as a list of fields; it's not!
11735         * spew.c (yylex): Do a little manual constant propagation to
11736         clarify the code.
11738 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
11740         * error.c: Include sys/types.h.
11742 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
11744         * method.c (build_mangled_name): Start CPP directives in column zero.
11746 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
11748         * typeck2.c (process_init_constructor): Sorry about non-trivial
11749         labeled initializers.
11750         * parse.y (initlist): Re-enable labeled initializers.
11752 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11754         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
11755         all callers changed.  Rely on the new parameter instead of arg
11756         being a TREE_LIST when determine whether we are working inside
11757         template template parameter.  Clean up is_type test.
11759 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
11761         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
11762         * typeck2.c (initializer_constant_valid_p): Allow conversions
11763         between pointers and references.
11765 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
11767         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
11768         if pedantic || warn_pointer_arith.
11770 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11772         * pt.c (unify): Handle TEMPLATE_DECL.
11774 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
11776         * cp-tree.h (strip_attrs): Remove decl.
11778 1998-02-18  Doug Evans  <devans@cygnus.com>
11780         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
11781         Update olddecl's attributes too.
11782         (strip_attrs): Remove function.
11783         * typeck.c (common_type): Call merge_machine_type_attributes.
11785 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
11787         * parse.y (initdcl0_innards): New grammar symbol.
11788         (nomods_initdecls, nomods_initdcl0): Change type from itype to
11789         none, since the resulting value is never used.
11790         (parse_decl): New function.
11791         (datadef): Remove redundant actions.
11792         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
11793         * parse.c: Regenerated.
11795 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
11797         * parse.y (simple_stmt): Use getdecls() to check for decl.
11799 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
11801         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
11802         macros.
11803         (c++.install-common): Install c++filt properly as native or as cross
11804         variant.
11805         (c++.uninstall): Add c++filt.
11807 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11809         * call.c (standard_conversion): Fix multi-level ptr conversions.
11811 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
11813         * init.c (build_new): Propagate error_mark_node up.
11815 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
11817         * parse.y (simple_stmt): If the condition isn't a declaration,
11818         start the controlled block after the test.
11820 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
11822         * call.c (build_over_call): Convert builtin abs, labs and fabs to
11823         tree-codes.
11824         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
11825         builtins.
11827 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
11829         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
11831 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
11833         * cp-tree.h: Add access_protected_virtual_node.
11834         * class.c (init_class_processing): Initialize it.
11835         * decl.c (xref_basetypes): Use it.
11836         * parse.y (base_class_access_list): Likewise.
11838         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
11839         (c++.install-common): Install c++filt.
11841 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11843         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
11845 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
11847         * call.c (reference_binding): Use comptypes when comparing
11848         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
11850 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
11852         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
11853         (really_overloaded_fn): Move check here from is_overloaded_fn.
11854         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
11856 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
11858         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
11859         conversions.
11861 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
11863         * cp-tree.h (push_template_decl): Return the decl passed in, or an
11864         equivalent duplicate.
11865         * decl.c (pushtag): Use the return value from push_template_decl.
11866         (duplicate_decls): When duplicating a template declaration, merge
11867         the DECL_TEMPLATE_RESULTs as well.
11868         (make_implicit_typename): Don't try to dive into typename types to
11869         find a context for making a new implicit typename.
11870         (start_decl): Use the return value from push_template_decl.
11871         (grokdeclarator): Complain about declarations list `const operator
11872         int'.  Since we don't correctly handle in-class initializations of
11873         non-static data members, complain about this (now illegal)
11874         practice.  Issue an error for initializations of non-const statics
11875         since that is illegal as well, and since we don't handle that case
11876         correctly either.
11877         (start_function): Use the return value from push_template_decl.
11878         (start_method): Likewise.
11879         * decl2.c (grokfield): Likewise.  Since the change to
11880         grokdeclarator ensures that all initialized fields are in fact
11881         static, remove a redundant test for TREE_PUBLIC.
11882         * parse.y (initlist): Disable labeled initializers since they do
11883         not work as per the documentation, and since they do not use the
11884         same syntax as the C front end.
11885         * pt.c (push_template_decl): Return the decl passed in, or an
11886         equivalent duplicate.
11887         (lookup_template_class): When searching in a nested context,
11888         use the right arguments.
11889         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
11890         * typeck.c (build_component_ref): Assign the correct type to the
11891         result of build_vfn_ref.
11893 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
11895         * pt.c (convert_nontype_argument): Fix typo.
11896         (check_explicit_specialization): Allow old-style specialization
11897         of class template members.
11899 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
11900                           Manfred Hollstein  <manfred@s-direktnet.de>
11902         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
11903         when deciding to override DECL_ASSEMBLER_NAME.
11905 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
11907         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
11908         * cp-tree.h (flag_do_squangling): Add declaration.
11909         * lang-options.h: Add -fsquangle and -fno-squangle.
11910         * method.c: Add macros and static variables for squangling.
11911         (build_overload_name): Rename to build_mangled_name, add logic for B
11912         compression, and split into process_modifiers and
11913         process_overload_item.
11914         (process_modifiers): New function, to handle constant, reference,
11915         and pointer types.
11916         (process_overload_item): New function, handles issue of type codes.
11917         (build_overload_name): New function, start squangling and call
11918         build_mangled_name.
11919         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
11920         (start_squangling): New function to initialize squangling structs.
11921         (end_squangling): New function to destroy squangling structs.
11922         (nrepeats): Rename variable to Nrepeats.
11923         (issue_nrepeats): New function for issuing 'n' type repeats.
11924         (check_ktype): New function to check for type K name compression.
11925         (build_overload_nested_name): Add a check for K name compression.
11926         (build_qualified_name): Add a check for K name compression and don't
11927         use DECL_ASSEMBLER_NAME when squangling is on.
11928         (check_btype): New function, checks for B type compression.
11929         (build_static_name, build_decl_overload_real): Initiate squangling.
11930         (build_typename_overload, build_overload_with_type): Initiate
11931         squangling
11933 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
11935         * method.c (make_thunk): Avoid name buffer overflow.
11937 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
11939         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
11940         don't define them yet.
11942         * parse.y (nomods_initdcl0): Add constructor_declarator case.
11944 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11946         * config-lang.in (diff_excludes): Use basename only.
11948 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
11950         * tinfo2.cc: Add tinfo for signed char.
11952 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
11954         * search.c (compute_access): Handle protected constructors in derived
11955         classes as accessible.
11957 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
11959         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
11960         Call convert_from_reference sooner.
11962 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
11964         * cvt.c (ocp_convert): Obtain the constant values from constant
11965         decls even if the destination type is the same as the type of the
11966         decl.
11968         * decl2.c (finish_file): Make sure that static inlines with
11969         definitions are not marked DECL_EXTERNAL before returning.
11971 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
11973         * decl.c: Lose arg_looking_for_template.
11974         (lookup_name_real): Likewise.
11975         * parse.y: Lose processing_template_arg, template_arg1.
11976         (primary): Likewise.
11977         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
11979 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11981         * error.c (dump_decl): Fix type of default arguments for template
11982         template parameters and nontype template parameters.
11983         * parse.y (template_parm): Handle invalid default template
11984         template arguments here.
11986         * parse.y (template_parm): Use template_arg instead of PTYPENAME
11987         for default template template argument.
11988         * pt.c (coerce_template_parms): Merge default template argument
11989         codes.  Can treat RECORD_TYPE as template name if it is implicitly
11990         created.  Fix argument index in error message.
11991         * typeck.c (comptypes): Merge template argument comparison codes in
11992         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
11994 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
11996         * lex.c (file_name_nondirectory): Also check for '/'.
11998 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
12000         * parse.y (primary): Deal with statement-expressions in
12001         templates.
12002         * pt.c (tsubst_copy): Handle BIND_EXPR.
12003         * tree.c (mapcar): Likewise.
12005         * call.c (add_template_candidate_real): Pass extra parameter to
12006         fn_type_unification.
12007         * cp-tree.h (fn_type_unification): Add parameter.
12008         * pt.c (fn_type_unification): Add additional parameter to deal with
12009         static member functions.
12010         (get_bindings): Deal with static member functions.
12012         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
12013         (revert_static_member_fn): Declare.
12014         * decl.c (revert_static_member_fn): Remove declaration.  Change
12015         linkage from internal to external.
12016         (cp_finish_decl): Deal with virtual functions in classes local to
12017         template functions.
12018         * decl2.c (finish_file): Don't forget to emit increment/decrement
12019         expressions in initializers for file-scope variables.
12020         * parse.y (typename_sub2): If the typename doesn't names a
12021         template, rather than a type, issue an error message.
12022         * pt.c (check_explicit_specialization): Handle specializations of
12023         static member functions.
12024         (coerce_template_parms): Handle offset references to lists of
12025         member functions.
12026         * search.c (note_debug_info_needed): Don't crash when handed a
12027         type which is being defined.
12028         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
12029         that can happen with some illegal code.
12031 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12033         * call.c (user_harshness): Initialize `code' to 0.
12034         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
12035         (null_ptr_cst_p): Add parentheses around && within ||.
12036         (standard_conversion): Likewise.
12037         (z_candidate): Likewise.
12038         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
12039         (build_object_call): Likewise for `mem_args'.
12040         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
12041         default case in enumeration switch.
12043         * class.c (build_vtable_entry): Add explicit braces to avoid
12044         ambiguous `else'.
12045         (build_class_init_list): Likewise.
12046         (finish_struct_1): Initialize `width' to 0.
12047         (instantiate_type): Initialize `name' to NULL_TREE.  Add
12048         explicit braces to avoid ambiguous `else'.
12050         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
12051         `else'.
12053         * decl.c (grok_reference_init): Eliminate unused parameter, all
12054         callers changed.
12055         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
12056         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
12057         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
12058         (grokdeclarator): Add parentheses around && within ||.  Add
12059         explicit braces to avoid ambiguous `else'.
12060         (grokparms): Initialize `type' to NULL_TREE.
12061         (xref_tag): Remove unused label `just_return'.
12062         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
12063         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
12064         (hack_incomplete_structures): Add parentheses around assignment
12065         used as truth value.
12067         * decl2.c (coerce_delete_type): Hide definition of `e3'.
12069         * error.c: Include <stdlib.h>.
12070         (dump_expr): Change the type of `i' to size_t.  Remove unused
12071         label `error'.
12073         * except.c (init_exception_processing): Remove unused variable `d'.
12074         (expand_throw): Likewise for `label'.
12076         * friend.c (add_friends): Add explicit braces to avoid ambiguous
12077         `else'.
12079         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
12080         (sort_base_init): Likewise for `binfo'.
12081         (expand_member_init): Likewise for `rval'.
12082         (build_member_call): Add parentheses around assignment used as
12083         truth value.
12084         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
12085         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
12086         `old_immediate_size_expand' to 0.
12087         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
12088         (build_vec_delete_1): Remove unused variable `block'.
12089         (expand_vec_init): Initialize `itype' to NULL_TREE.
12091         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
12092         declaration of `index' and `rindex' with autoconf macros.
12093         (reinit_parse_for_expr): Remove unused variables
12094         `look_for_semicolon' and `look_for_lbrac'.
12095         (cons_up_default_function): Initialize `args' to NULL_TREE.
12096         (readescape): Initialize `firstdig' to 0.
12097         (real_yylex): Add parentheses around assignment used as truth value.
12099         * method.c: Include <strings.h> if we don't have <string.h>.
12100         Protect declaration of `index' with autoconf macro.
12102         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
12103         Initialize `type' to NULL_TREE.
12104         (structsp): Remove unused variable `id'.
12106         * pt.c (coerce_template_parms): Add explicit braces to avoid
12107         ambiguous `else'.
12108         (lookup_template_class): Initialize `template' to NULL_TREE.
12109         (instantiate_class_template): Remove unused variable `name' and `e'.
12110         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
12111         (do_poplevel): Initialize `saved_warn_unused' to 0.
12112         (type_unification): Remove unused varable `parm'.
12113         (unify): Likewise for `j'.
12115         * repo.c (init_repo): Add parentheses around assignment used as
12116         truth value.
12117         (finish_repo): Remove unused varable `p'.
12119         * search.c (get_binfo): Initialize `type' to NULL_TREE.
12120         (get_base_distance): Likewise.
12121         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
12122         and `new_v' to NULL_TREE.
12123         (lookup_fnfields): Likewise for `rval_binfo_h'.
12124         (breadth_first_search): Add parentheses around assignment used as
12125         truth value.
12126         (get_template_base): Initialize `type' to NULL_TREE.
12128         * sig.c (append_signature_fields): Initialize `last_mfptr' to
12129         NULL_TREE.
12130         (build_signature_table_constructor): Likewise for
12131         `last_rhs_field', `pfn' and `vt_off'.
12132         (build_sigtable): Likewise for `init'.
12134         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
12135         (propagate_binfo_offsets): Likewise for `delta'.
12136         (hash_tree_cons): Initialize hashcode to 0.
12137         (can_free): Likewise for `size'.
12138         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
12140         * typeck.c (convert_sequence): Hide prototype.
12141         (common_type): Add explicit braces to avoid ambiguous `else'.
12142         (comp_target_types): Likewise.
12143         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
12144         (build_function_call_real): Add explicit braces to avoid ambiguous
12145         `else'.
12146         (convert_arguments): Initialize `called_thing' to 0.
12147         (convert_for_initialization): Initialize `savew' and `savee' to 0.
12149         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
12150         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
12151         (build_x_arrow): Likewise for `last_rval'.
12153         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
12155 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
12157         * decl.c (init_decl_processing): Use set_sizetype.
12158         * decl2.c (sizetype): Don't declare.
12159         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
12160         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
12161         (build_component_addr, unary_complex_lvalue): Likewise.
12162         * rtti.c (expand_class_desc): Likewise.
12163         * class.c (get_vfield_offset): Likewise.
12165 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
12167         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
12168         early to avoid bogus error.  Handle overloaded function
12169         names provided as template arguments correctly.
12170         (coerce_template_parms): Don't mishandle overloaded functions when
12171         dealing with template template parameters.
12172         (lookup_template_class): Issue an error message, rather than
12173         crashing, when the TYPE_DECL provided is not a template type.
12175 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
12177         * class.c (instantiate_type): Don't just return a known type if
12178         it's wrong.
12180 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
12182         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
12183         since that code could never be reached.
12185         * error.c (dump_decl): Avoid aborting in the midst of printing an
12186         error message about an illegal template declaration.
12188         * parse.y (structsp): Print an error message, rather than crashing,
12189         when a class-head does not name a class.
12191         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
12192         template arguments as a g++ extension.
12194         * cp-tree.def (ALIGNOF_EXPR): New tree code.
12195         * decl2.c (grok_alignof): If processing_template_decl, just store
12196         the expression.
12197         * typeck.c (c_alignof): Likewise.
12198         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
12199         * error.c (dump_expr): Likewise.
12200         * pt.c (tsubst_copy): Likewise.
12201         * tree.c (cp_tree_equal): Likewise.
12202         * pt.c (uses_template_parms): Correctly determine whether or not a
12203         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
12204         folding can be done.
12206         * cp-tree.h (grok_enum_decls): Remove type parameter.
12207         * decl.c (grok_enum_decls): Likewise.
12208         * decl2.c (grok_x_components): Call grok_enum_decls
12209         unconditionally, since it will do nothing if there is no
12210         current_local_enum.  Use the new calling sequence.
12211         * pt.c (tsubst_enum): Use the new calling sequence for
12212         grok_enum_decls.
12214         * decl.c (start_function): Make member functions of local classes
12215         in extern inline functions have comdat linkage here...
12216         (grokdeclarator): Rather than here.
12218 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
12220         * pt.c (convert_nontype_argument): Use decl_constant_value.
12222 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
12224         * call.c (add_template_candidate_real): New function.
12225         (add_template_candidate): Use it.
12226         (add_template_conv_candidate): Likewise.
12227         (joust): Pass extra argument to more_specialized.
12228         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
12229         (is_local_class): Remove.
12230         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
12231         * cp-tree.h (is_local_class): Remove.
12232         (perform_array_to_pointer_conversion): Likewise.
12233         (finish_member_template_decl): Add.
12234         (check_explicit_specialization): Return a tree, not an int.
12235         (more_specialized): Take additional argument.
12236         (get_bindings): Likewise.
12237         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
12238         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
12239         (perform_array_to_pointer_conversion): Remove.
12240         * decl.c (saved_scope): Add processing_specialization,
12241         processing_explicit_instantiation fields.
12242         (maybe_push_to_top_level): Save them.
12243         (pop_from_top_level): Restore them.
12244         (grokfndecl): Use new return value from
12245         check_explicit_specialization.
12246         (start_decl): Don't check flag_guiding_decls before pushing
12247         decls.
12248         (cp_finish_decl): Remove previous (bogus) change.
12249         (grok_declarator): Use decl_function_context rather than
12250         is_local_class.
12251         * decl2.c (finish_file): Pass extra argument to get_bindings.
12252         (build_expr_from_tree): Let build_x_component_ref check
12253         validity of arguments rather than doing it here.
12254         * lex.c (cons_up_default_function): Remove code fooling with
12255         processing_specialization, processing_explicit_instantiation
12256         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
12257         * method.c (build_overload_identifier): Mangle local classes in
12258         template functions correctly.
12259         * parse.y (finish_member_template_decl): Move to pt.c.
12260         * pt.c (finish_member_template_decl): Moved here from parse.y.
12261         (print_candidates): New function.
12262         (determine_specialization): Change interface.  Properly look for
12263         most specialized versions of template candidates.
12264         (check_explicit_specialization): Fully process explicit
12265         instantiations.
12266         (push_template_decl): Avoid looking at CLASSTYPE fields in
12267         FUNCTION_DECLS.
12268         (determine_overloaded_function): Remove.
12269         (convert_nontype_argument): Change name from
12270         convert_nontype_parameter.  Use determine_overloaded_function
12271         instead of instantiate_type.
12272         (mangle_class_name_for_template): Handle type contexts as well as
12273         function contexts.
12274         (classtype_mangled_name): Likewise.
12275         (lookup_template_class): Likewise.
12276         (tsubst): Likewise.
12277         (more_specialized): Take explict template arguments as a
12278         parameter.
12279         (most_specialized): Likewise.
12280         (get_bindings): Likewise.  Check that return types match before
12281         proclaiming a function a match.
12282         (do_decl_instantiation): Remove code searching for function to
12283         instantiate; that is now done in check_explicit_specialization.
12284         (add_maybe_template): Pass extra argument to get_bindings.
12285         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
12286         implementation.
12287         * typeck.c (build_component_ref): Check for invalid arguments.
12289 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
12291         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
12292         return_target and call_target are equivalent.
12294         * pt.c (type_unification_real): Just accept function parms that
12295         don't use any template parms.
12297 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
12299         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
12300         unset DECL_NOT_REALLY_EXTERN.
12302         * parse.y (typename_sub*): Fix std::.
12304 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
12306         * error.c (dump_decl): Fix type default template args.
12307         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
12309 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
12311         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
12312         (file_name_nondirectory): Use.
12314 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12316         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
12317         that are not really present.  Substitute default arguments in
12318         template template arguments.  Correctly convert TEMPLATE_DECL to
12319         TEMPLATE_TEMPLATE_PARM.
12320         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
12321         are no longer treated specially here.
12322         * parse.y (template_template_parm): Fix copy error.
12323         * decl.c (grokdeclarator): Warn about missing `typename' for nested
12324         type created from template template parameters.
12325         * parse.y (bad_parm): Likewise
12327         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
12328         (push_nested_class): Likewise.
12329         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
12330         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
12331         (copy_template_template_parm): Declare.
12332         * decl.c (arg_looking_for_template): New variable.
12333         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
12334         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
12335         node if arg_looking_for_template is nonzero.
12336         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
12337         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
12338         (grokdeclarator): Handle TEMPLATE_DECL.
12339         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
12340         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
12341         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
12342         (dump_decl): Handle unnamed template type parameters.
12343         Handle template template parameters.
12344         (dump_function_name): Handle template template parameters.
12345         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
12346         Handle TEMPLATE_TEMPLATE_PARM.
12347         * method.c (build_template_template_parm_names): New function.
12348         (build_template_parm_names): Handle TEMPLATE_DECL.
12349         (build_overload_nested_name, build_overload_name):
12350         Handle TEMPLATE_TEMPLATE_PARM.
12351         * parse.y (maybe_identifier): New nonterminal.
12352         (template_type_parm): Use it.
12353         (template_template_parm, template_arg1): New nonterminal.
12354         (template_parm): Add template_template_parm rules.
12355         (template_arg): Set processing_template_arg.
12356         (template_arg1): Rules moved from template_arg.
12357         (primary, nonnested_type): Set arg_looking_for_template if we are
12358         processing template arguments.
12359         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
12360         (process_template_parm): Handle template template parameters.
12361         (coerce_template_parms, comp_template_args): Likewise.
12362         (mangle_class_name_for_template, lookup_template_class): Likewise.
12363         (uses_template_parms): Handle TEMPLATE_DECL and
12364         TEMPLATE_TEMPLATE_PARM.
12365         (current_template_args): Handle TEMPLATE_DECL.
12366         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
12367         * search.c (dfs_walk, dfs_record_inheritance):
12368         Handle TEMPLATE_TEMPLATE_PARM.
12369         * tree.c (copy_template_template_parm): New function.
12370         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
12371         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
12373 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
12375         * decl.c (start_decl): Don't allow duplicate definitions of static
12376         data members.
12378         * call.c (build_user_type_conversion_1): Handle user-defined
12379         template conversion operators correctly.
12381         * decl2.c (build_expr_from_tree): Issue an error message if the
12382         object in a COMPONENT_REF is a TEMPLATE_DECL.
12384         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
12386         * class.c (is_local_class): New function.
12387         * cp-tree.h (is_local_class): Declare it.
12388         (last_tree): Likewise.
12389         (begin_tree): Likewise.
12390         (end_tree): Likewise.
12391         (lookup_template_class): Change prototype.
12392         * decl.c (cp_finish_decl): Check for NULL where necessary.
12393         Consider FUNCTION_DECLS to declare objects with top-level binding,
12394         when calling make_decl_rtl.
12395         (grokdeclarator): Give members of local classes internal linkage.
12396         (start_function): Remove declaration of last_tree.
12397         (finish_function): Set flag_keep_inline_functions around call to
12398         rest_of_compilation if we are processing a member function in a
12399         local class.
12400         (start_method): Call push_template_decl for member functions of
12401         local classes in template functions.
12402         * decl2.c (import_export_decl): Don't give external linkage to
12403         instantiations of templates with internal linkage.
12404         * parse.y (last_tree): Remove declaration.
12405         (template_type): Pass extra parameter to lookup_template_class.
12406         (self_template_type): Likewise.
12407         (structsp): Move call to reset_specialization into left_curly.
12408         (left_curly): Call reset_specialization, and begin_tree.
12409         * pt.c (saved_trees): New variable.
12410         (mangle_class_name_for_template): Change prototype.  Use
12411         additional function context to name local classes in templates
12412         correctly.
12413         (classtype_mangled_name): Pass the context.
12414         (push_template_decl): Handle local classes and templates, and
12415         member functions for such classes.
12416         (convert_nontype_parameter): Fix handling of pointer-to-member
12417         constants.
12418         (lookup_template_class): Handle local classes in templates.
12419         (tsubst): Likewise.  Don't assume that template instantiations
12420         have external linkage; pay attention to the template declaration.
12421         (mark_decl_instantiated): Likewise.
12422         (begin_tree): New function.
12423         (end_tree): Likewise.
12425         * decl.c (xref_basetypes): Don't call complete_type for basetypes
12426         that involve template parameters; that can lead to infinite
12427         recursion unnecessarily.
12429         * pt.c (register_specialization): Do not register specializations
12430         that aren't ready to be registered yet.
12431         (check_explicit_specialization): Handle explicit specialization of
12432         constructors and destructors.
12433         (build_template_decl): New function.
12434         (push_template_delc): Handle out-of-class specializations of
12435         member templates.
12437         * pt.c (check_explicit_specialization): Set up the template
12438         information before registering the specialization.
12439         (coerce_template_parms): Fix thinko.
12440         (tsubst): Handle specializations of member templates correctly.
12442         * class.c (finish_struct_methods): Remove calls to
12443         check_explicit_specialization from here.
12444         (finish_struct): And insert them here.
12445         * cp-tree.h (perform_qualification_conversions): New function.
12446         (perform_array_to_pointer_conversion): Likewise.
12447         (begin_explicit_instantiation): Likewise.
12448         (end_explicit_instantiation): Likewise.
12449         (determine_specialization): Renamed from
12450         determine_explicit_specialization.
12451         (comp_template_parms): New function.
12452         (processing_explicit_instantiation): New variable.
12453         * cvt.c (perform_qualification_conversions): New function.
12454         (perform_array_to_pointer_conversion): Likewise.
12455         * decl.c (duplicate_decls): Don't consider template functions
12456         alike unless they have the same parameters.  Refine handling of
12457         instantiation/specialization mismatches.
12458         (start_decl): Don't call pushdecl for template specializations,
12459         since they don't affect overloading.
12460         (start_function): Likewise.
12461         (grokfndecl): Call check_explicit_specialization a little later.
12462         Don't call duplicate_decls for memberm template specializations.
12463         (grokdeclarator): Don't update template_count for classes that are
12464         themselves specializations.  Remove use of `2' as parameter to
12465         grokfndecl since that value isn't used.
12466         * lex.c (cons_up_default_function): Save and restore
12467         processing_explicit_instantiation around calls to grokfield.
12468         * parse.y (finish_member_template_decl): New function.
12469         (component_decl_1): Use it.
12470         (fn.def2): Likewise.
12471         (template_arg_list_opt): New nonterminal.
12472         (template_type): Use it.
12473         (self_template_type): Likewise.
12474         (template_id): Likewise.
12475         (object_template_id): Likewise.
12476         (notype_template_declarator): Likwise.
12477         (begin_explicit_instantiation): Likewise.
12478         (end_explicit_instantiation): Likewise.
12479         (explicit_instantiation): Use them.
12480         * pt.c (coerce_template_parms): Add parameters.
12481         (processing_explicit_instantiation): New variable.
12482         (convert_nontype_parameter): New function.
12483         (determine_overloaded_function): Likewise.
12484         (begin_explicit_instantiation): Likewise.
12485         (end_explicit_instantiation): Likewise.
12486         (retrieve_specialization): Likewise.
12487         (register_specialization): Likewise.
12488         (processing_explicit_specialization): Removed.
12489         (determine_specialization): Handle specializations of member
12490         functions of template class instantiations.
12491         (check_explicit_specialization): Refine to conform to standard.
12492         (comp_template_parms): New function.
12493         (coerce_template_parms): Call convert_nontype_parameter.
12494         (tsubst): Refine handling of member templates.  Use
12495         register_specialization.
12496         (instantiate_template): Use retrieve_specialization.
12497         (do_decl_instantiation): Likewise.
12498         (instantiate_decl): Likewise.
12499         (type_unification): Improve handling of explict template
12500         arguments.
12501         * tree.c (mapcar): Return error_mark_node, rather than aborting,
12502         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
12503         * typeck.c (build_unary_op): Call determine_specialization, rather
12504         than determine_explicit_specialization.
12506 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
12508         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
12510 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12512         * error.c (dump_decl): For enum tags, output the tag, not its value.
12514 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
12516         * decl.c (init_decl_processing): Only call init_rtti_processing
12517         FLAG_RTTI is set.
12519 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
12521         * init.c (build_new_1): Split out from build_new.
12522         (build_new): Just return a NEW_EXPR.
12523         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
12525         * decl2.c (get_temp_regvar): Tweak.
12527         * cp-tree.h (TREE_CALLS_NEW): Comment out.
12528         * class.c (resolves_to_fixed_type_p): Remove use.
12529         * method.c (build_opfncall): Likewise.
12530         * call.c (build_new_op): Likewise.
12532 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
12534         * exception.cc (__eh_alloc, __eh_free): New fns.
12535         (__cp_push_exception, __cp_pop_exception): Use them.
12536         (__uncatch_exception): Call terminate here if no exception.
12537         * except.c (build_terminate_handler): New fn.
12538         (expand_start_catch_block): Use it.
12539         (expand_exception_blocks): Likewise.
12540         (alloc_eh_object): New fn.
12541         (expand_throw): Use it.  Protect exception init with terminate.
12542         * typeck.c (build_modify_expr): Remove code that ignores trivial
12543         methods.
12545 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12547         * call.c (add_builtin_candidate): Add default case in enumeration
12548         switch.
12549         (build_new_op): Likewise.
12550         (convert_like): Likewise.
12551         * cvt.c (build_expr_type_conversion): Likewise.
12552         * tree.c (real_lvalue_p): Likewise.
12553         (lvalue_p): Likewise.
12554         (cp_tree_equal): Likewise.
12555         * typeck.c (comptypes): Likewise.
12556         (build_component_ref): Likewise.
12557         (build_function_call_real): Likewise.
12558         (build_binary_op_nodefault): Likewise.
12559         (build_unary_op): Likewise.
12560         (build_modify_expr): Likewise.
12561         * typeck2.c (initializer_constant_valid_p): Likewise.
12563 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
12565         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
12567 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
12569         * pt.c (coerce_template_parms): Make sure to digest_init if
12570         possible.
12572         * decl.c (duplicate_decls): Make the newdecl virtual if the
12573         olddecl was, just as is done with other attributes of olddecl.
12575 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
12577         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
12578         address of an OFFSET_REF.
12580         * cp-tree.def: Add AGGR_INIT_EXPR.
12581         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
12582         AGGR_INIT_EXPR where appropriate.
12583         * expr.c (cplus_expand_expr): Likewise.  Simplify.
12585         * decl2.c (finish_file): Remove call to register_exception_table.
12587 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12589         * pt.c (instantiate_class_template): Don't do injection when
12590         processing_template_decl is true, as pollutes current_binding_level
12591         for base classes.
12593 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
12595         * pt.c (maybe_fold_nontype_arg): Add prototype.
12597 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
12599         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
12600         * error.c (dump_expr): Likewise.
12602 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
12604         * typeck.c (build_function_call_real): Remove "inline called before
12605         definition" pedwarn.
12607         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
12609 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
12611         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
12613         * pt.c (type_unification_real): Change __null to type void* with
12614         a warning.
12616 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
12618         * call.c (implicit_conversion): Don't call
12619         build_user_type_conversion_1 with a NULL expr, since it will
12620         crash.
12622         * pt.c (unify): Don't try to unify array bounds if either array is
12623         unbounded.
12625 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12627         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
12628         Replace extern decls with casts.
12630         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
12631         Update last_parm_cleanup_insn.
12632         (store_after_parms): Remove.
12633         * cp-tree.h: Adjust.
12635 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
12637         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
12638         (finish_file): Check DECL_COMDAT instead of weak|one_only.
12639         (import_export_vtable): Use make_decl_one_only instead of
12640         comdat_linkage for win32 tweak.
12641         (import_export_decl): Likewise.
12642         * pt.c (mark_decl_instantiated): Likewise.
12644         * decl2.c (finish_file): Lose handling of templates in pending_statics.
12646 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
12648         * decl2.c (finish_file): Lose call to expand_builtin_throw.
12649         * except.c (expand_builtin_throw): Remove.
12650         * cp-tree.h: Remove ptr_ptr_type_node.
12651         * decl.c: Likewise.
12653 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
12655         * decl.c (ptr_ptr_type_node): Define.
12656         (init_decl_processing): Initialize it.
12657         * cp-tree.h: Declare it.
12658         * exception.cc (__cp_exception_info): Use __get_eh_info.
12659         (__cp_push_exception): Likewise.
12660         (__cp_pop_exception): Likewise.
12662         From Scott Snyder <snyder@d0sgif.fnal.gov>:
12663         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
12664         saved_pc.
12665         (init_exception_processing): Removed saved_pc initialization.
12667 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
12669         * pt.c (instantiate_decl): Defer all templates but inline functions.
12671 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
12673         * init.c (expand_vec_init): Don't fold a list of parameters.
12675         * decl.c (copy_args_p): Handle copy elision for types with virtual
12676         bases.
12677         * call.c (build_over_call): Likewise.
12679 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
12681         * pt.c (lookup_template_function): Copy the template arguments,
12682         not just the list containing them, to the permanent obstack.
12684 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
12686         * except.c (expand_start_catch_block): suspend_momentary for the
12687         terminate handler.
12689         * error.c (dump_decl): Handle LOOKUP_EXPR.
12691 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
12693         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
12694         permanent obstack if we are processing a template decl.
12695         * typeck.c (build_static_cast): Likewise.
12696         (build_const_cast): Likewise.
12697         (build_reinterpret_cast): Likewise.
12699         * pt.c (coerce_template_parms): Coerce some expressions, even
12700         when processing_template_decl.
12702 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12704         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
12705         handling of pointer difference expressions.
12707         * typeck.c (comp_target_types): Comparison of function/method types
12708         is independent of nptrs.
12710 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
12712         * pt.c (tsubst): Avoid creating pointer to reference and
12713         reference to reference types.
12715 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
12717         * parse.y (do_id): New nonterminal.
12718         (template_id): Use it.
12720 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
12722         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
12723         * spew.c (yylex): Don't do_identifier here.
12724         * decl2.c (build_expr_from_tree): Revert last change.
12726         * decl2.c (build_expr_from_tree): Expand the name for a method call.
12727         * parse.y (object_template_id): Don't try to take the DECL_NAME.
12729 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
12731         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
12732         alloc_expr.
12733         * call.c (build_op_delete_call): Adjust.
12735         * except.c (expand_end_catch_block): Lose rethrow region.
12736         (expand_start_catch_block): Likewise.
12737         (expand_end_catch_block): Don't expand_leftover_cleanups.
12739 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12741         * pt.c (tsubst): Remove tree_cons call (places redundant info into
12742         DECL_TEMPLATE_INSTANTIATION).
12744 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
12746         * tree.c (is_overloaded_fn): Handle getting a fn template.
12747         (really_overloaded_fn): Likewise.
12748         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
12749         * pt.c (check_explicit_specialization): Tweak.
12750         (determine_explicit_specialization): Tweak.
12752         * tree.c, cp-tree.h (get_target_expr): New fn.
12754 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
12756         * pt.c (check_explicit_specialization): Fix misspelling in
12757         diagnostic: `preceeded'.
12758         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
12759         `conversiona'.
12761 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
12763         * pt.c (determine_explicit_specialization): Avoid an internal
12764         error for bad specializations.
12766         * method.c (build_overload_value): Handle SCOPE_REF.
12768 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
12770         * class.c (prepare_fresh_vtable): Enable even more complex MI
12771         vtable names.
12773 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
12775         * exception.cc (__check_eh_spec): Optimize a bit.
12777         * exception.cc (__cp_pop_exception): Lose handler arg.
12778         * except.c (do_pop_exception): Likewise.
12779         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
12780         (expand_end_catch_block): Likewise.
12782 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12784         * pt.c (check_explicit_specialization): Complain about using a
12785         template-id for a non-specialization.
12787 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
12789         * repo.c: Prototype rindex only if needed.
12790         * xref.c: Likewise.
12792 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
12794         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
12796 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
12798         * typeck.c (build_const_cast): Handle references here instead of
12799         handing off to convert_to_reference.
12801         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
12802         TerminateFunctionCall.
12803         (init_exception_processing): Likewise.  Terminate et al are now
12804         the fns, not ADDR_EXPRs.
12805         (various): Lose redundant assemble_external calls.
12806         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
12808         * cp-tree.h (struct lang_decl_flags): Add comdat.
12809         (DECL_COMDAT): New macro.
12810         * decl.c (duplicate_decls): Propagate it.
12811         (cp_finish_decl): Handle it.
12812         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
12814         * class.c: Remove static pending_hard_virtuals.
12815         (add_virtual_function): Take pointers to pending_virtuals
12816         and pending_hard_virtuals.
12817         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
12819 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
12821         * decl2.c (import_export_vtable): If we support one_only but not
12822         weak symbols, mark instantiated template vtables one_only.
12823         (import_export_decl): Likewise for tinfo functions.
12824         (finish_vtable_vardecl): Also write out vtables from explicitly
12825         instantiated template classes.
12826         * pt.c (mark_class_instantiated): Revert last change.
12828         * except.c (expand_throw): Call mark_used on the destructor.
12830 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
12832         * lex.c (lang_init): Enable flag_exceptions by default if no
12833         command line switch was specified.
12835 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
12837         * pt.c (unify): Handle `void' template parameters in
12838         specializations.
12840 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
12842         * rtti.c (build_dynamic_cast): Handle template case here.
12843         (build_dynamic_cast_1): Not here.
12845         * typeck2.c (digest_init): Make copies where appropriate.
12847         * decl2.c (delete_sanity): resolve_offset_ref.
12849         * except.c: Call terminate without caching so many bits.
12851         * except.c (expand_start_catch_block): Fix catching a reference
12852         to pointer.
12854 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
12856         * init.c (build_new): Copy size to the saveable obstack.
12858         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
12859         TRY_CATCH_EXPR for now.
12861 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
12863         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
12864         has DECL_LANG_SPECIFIC.
12866         * exception.cc (struct cp_eh_info): Add handlers field.
12867         (__cp_push_exception): Initialize it.
12868         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
12869         (__throw_bad_exception): Remove.
12870         * except.c (call_eh_info): Add handlers field.
12871         (get_eh_handlers): New fn.
12872         (push_eh_cleanup): Increment handlers.
12874 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
12876         * except.c (expand_start_eh_spec): Use the try/catch code.
12877         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
12878         doing everything inline.
12879         (init_exception_processing): throw_type_match now takes
12880         const void pointers.
12881         * exception.cc (__check_eh_spec): New fn.
12882         * inc/exception: Neither terminate nor unexpected return.
12883         * decl.c: Make const_ptr_type_node public.
12884         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
12886         * except.c (expand_start_catch_block): We only need the rethrow
12887         region for non-sjlj exceptions.
12888         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
12890 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
12892         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
12893         (various.o): Likewise.
12894         * inc/new: Add placement deletes.  Add throw specs for default new.
12895         * new.cc (set_new_handler): Move here from libgcc2.
12896         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
12897         (new): Move from libgcc2.  Throw bad_alloc.
12898         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
12899         * decl.c (init_decl_processing): Update exception specs on new and
12900         delete.
12902         * method.c (build_decl_overload_real): Don't mess with global
12903         placement delete.
12905         * init.c (build_new): Check for null throw spec, not nothrow_t.
12907         * decl.c (duplicate_decls): Don't complain about different exceptions
12908         from an internal declaration.
12910         * call.c (build_op_delete_call): Fix check for member fns again.
12912         * decl2.c (import_export_decl): Interface hackery affects
12913         virtual synthesized methods.
12915 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
12917         * decl.c (start_decl): Don't just complain about a mismatched
12918         scope, fix it.
12920         * decl.c (make_implicit_typename): Handle case where t is not
12921         actually from context.
12922         * tree.c (get_type_decl): Lose identifier case.
12923         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
12924         * parse.y (nonnested_type): Just use lookup_name.
12925         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
12927 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
12929         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
12930         T was built in C language context (for example, by
12931         output_func_start_profiler).
12933 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
12935         * decl.c (make_implicit_typename): New fn.
12936         (lookup_name_real): Use it.  Use current_class_type as the context.
12938 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
12940         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
12942 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
12944         * friend.c (do_friend): Warn about non-template friends in templates.
12946         * call.c (build_op_delete_call): Fix handling of inherited delete.
12948         * search.c (dfs_record_inheritance): Ignore template type parms.
12950 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
12952         * call.c (build_new_op): Fix copy error.
12953         (build_op_new_call): New fn.
12954         (build_op_delete_call): New fn.
12955         * cp-tree.h: Declare them.
12956         * init.c (build_new): Use them.  Support placement delete.
12957         (build_x_delete): Use build_op_delete_call.
12958         (build_delete): Likewise.
12959         * decl2.c (delete_sanity): Likewise.
12960         (coerce_delete_type): Don't complain about placement delete.
12962 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
12964         * call.c (build_new_function_call): Remove unused 'obj' parm.
12965         * cp-tree.h, typeck.c: Adjust.
12967         * init.c (build_new): Make the cleanup last longer.
12968         (expand_vec_init): Call do_pending_stack_adjust.
12970 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
12972         * pt.c (do_type_instantiation): Fix typo.
12973         (mark_class_instantiated): If we support one_only but not weak
12974         symbols, don't mark this as known.
12976         * init.c (build_new): Handle vec delete in EH cleanup.
12978 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12980         * call.c (build_method_call): Call complete_type before checking
12981         for destructor.
12983 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
12985         * decl.c (add_block_current_level): Delete.
12986         * init.c (build_vec_delete_1): Delete build_block and
12987         add_block_current_level calls.
12989 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
12991         * init.c (build_new): Handle freeing allocated memory when the
12992         constructor throws.
12994         * call.c (build_new_method_call): Fix flags arg.
12996         * pt.c (do_type_instantiation): Don't try to instantiate
12997         member templates.
12998         (mark_decl_instantiated): If we support one_only but not
12999         weak symbols, mark this one_only.
13000         * decl2.c (import_export_vtable): Don't defer handling of vtables
13001         if MULTIPLE_SYMBOL_SPACES.
13003 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
13005         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
13007 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
13009         * except.c (do_pop_exception): Return a value.
13011 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
13013         * call.c (build_new_method_call): Handle getting a
13014         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
13015         if we got template parms.
13016         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
13017         not just the args.
13018         * decl2.c (build_expr_from_tree): Tweak last change.
13019         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
13020         (maybe_fold_nontype_arg): Split out from tsubst_copy.
13021         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
13023 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
13025         * pt.c (tsubst_copy): Handle explicit template arguments in
13026         function calls.
13027         * typeck.c (build_x_function_call): Likewise.
13028         * decl2.c (build_expr_from_tree): Lookup function name if it
13029         hasn't been done.
13031         * pt.c (tsubst): Instantiate template functions properly when
13032         template parameter does not appear in function arguments and return
13033         type.
13034         (comp_template_args): Handle member templates required by tsubst.
13036 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13038         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
13039         previous change.
13041 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13043         * pt.c (coerce_template_parms): Tweak error message.
13045         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
13046         return type defaults to `int', even if there are storage-class
13047         specifiers.
13049 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
13051         Complete nested exception support.
13052         * except.c (do_pop_exception): Split out...
13053         (push_eh_cleanup): From here.  Handle the EH region by hand.
13054         (expand_start_catch_block): Add a new level for the catch parm.
13055         Move the rethrow region outside the two cleanup regions.
13056         Protect the initializer for the catch parm with terminate.
13057         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
13058         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
13059         popping off the middle of the stack.
13060         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
13061         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
13062         (build_cplus_new): Only wrap CALL_EXPRs.
13063         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
13064         the constructor call.
13066 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13068         * Make-lang.in (c++.distdir): Make inc subdirectory.
13070 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
13072         * decl2.c (finish_file): Put back some code.
13074 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
13076         * decl2.c (finish_file): Remove redundant code.
13077         * method.c (emit_thunk): Don't let the backend defer generic thunks.
13079 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
13081         * except.c (call_eh_info): Split out...
13082         (push_eh_info): From here.
13083         (expand_builtin_throw): Use it.
13084         (expand_start_catch_block): Move region start back.
13086 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
13088         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
13089         (real_yylex): Record wide strings using target endianness, not host.
13091 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
13093         * repo.c (rindex): Add decl unconditionally.
13094         (get_base_filename, open_repo_file): Don't cast rindex.
13095         * xref.c (rindex): Add decl unconditionally.
13096         (index): Remove unused decl.
13097         (open_xref_file): Don't cast rindex.
13099 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
13101         * class.c (build_vbase_path): Propagate the result type properly.
13103 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
13105         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
13106         remaining use of saved_throw_type with a call to get_eh_type.
13108 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
13110         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
13111         (file_name_nondirectory): New function, doing the same as the macro.
13112         (set_typedecl_interface_info): Use it instead of the macro.
13113         (check_newline): Likewise.
13114         (handle_cp_pragma): Likewise.
13116         * repo.c (get_base_filename): Cast result of rindex to char*.
13117         (open_repo_file): Likewise.
13118         * xref.c (open_xref_file): Likewise.
13119         * error.c (dump_char): Make its arg int, not char.
13121         * except.c (push_eh_info): Pass the number of fields - 1 down, not
13122         the exact number of fields.
13124 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
13126         Support for nested exceptions.
13127         * tinfo2.cc (__is_pointer): New fn.
13128         * exception.cc (struct cp_eh_info): Define.
13129         (__cp_exception_info, __uncatch_exception): New fns.
13130         (__cp_push_exception, __cp_pop_exception): New fns.
13131         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
13132         Lose empty_fndecl.
13133         (init_exception_processing): Likewise.  __eh_pc is now external.
13134         (push_eh_info): New fn.
13135         (get_eh_{info,value,type,caught}): New fns.
13136         (push_eh_cleanup): Just call __cp_pop_exception.
13137         (expand_start_catch_block): Use push_eh_info.  Start the eh region
13138         sooner.
13139         (expand_end_eh_spec): Use push_eh_info.
13140         (expand_throw): Call __cp_push_exception to set up the exception info.
13141         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
13142         when we rethrow.
13143         (expand_builtin_throw): Don't refer to empty_fndecl.
13145 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
13147         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
13149 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
13151         * method.c (build_template_parm_names, build_decl_overload_real):
13152         Add static to definitions.
13153         * pt.c (add_to_template_args, note_template_header,
13154         processing_explicit_specialization, type_unification_real): Likewise.
13155         ({determine,check}_explicit_specialization): Use a single string for
13156         error messages.
13158 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
13160         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
13161         (expand_end_catch_block): Likewise.
13162         (expand_end_eh_spec): Likewise.
13164 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
13166         * decl.c (duplicate_decls): Handle template specializations
13167         correctly.
13168         * error.c (dump_function_name): Fix printing of specializations of
13169         member functions that are not member templates.
13170         * cp-tree.h (processing_specialization): Make global.
13171         * pt.c (processing_specialization): Likewise.
13172         * lex.c (cons_up_default_function): Save and restore
13173         processing_specialization to avoid confusion.
13175 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
13177         * decl.c (init_decl_processing): Give null_node unknown* type.
13178         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
13179         (common_type): Likewise.
13180         * error.c (args_as_string): Recognize null_node.
13182 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13184         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
13185         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
13187         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
13189         * Make-lang.in (g++): Include prefix.o.
13191 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
13193         * pt.c (determine_explicit_specialization): Initialize "dummy"
13194         to keep Purify quiet.
13196 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
13198         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
13199         (build_overload_int): Not here.
13201 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
13203         * class.c (build_type_pathname): Remove.
13204         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
13206 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
13208         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
13209         &&label GNU extension.
13211 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
13213         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
13214         so as to avoid incorrect manglings.
13215         * method.c (build_decl_overload_real): Don't mangle return types
13216         for constructors.
13218 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
13220         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
13221         scratch_tree_cons): Define as macros for now.
13222         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
13223         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
13224         typeck2.c: Use them and the expression_obstack variants.
13226 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13228         * decl.c (store_return_init): Allow classes with explicit ctors to
13229         be used with the named return values extension.
13231 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
13233         * pt.c (instantiate_decl): Fix previous change.
13235 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
13237         * pt.c (tsubst): Fix thinko.
13238         (instantiate_decl): Really use the original template.
13240         * call.c (build_new_method_call): Use simple constructor_name for
13241         error messages.
13243 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
13245         * method.c (build_underscore_int): Don't use ANSI specific
13246         features.
13248 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
13250         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
13251         for our key method; it might have been inlined by -O3.
13253 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
13255         * decl.c (make_typename_type): Do not try to call lookup_field for
13256         non-aggregate types.
13258 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
13260         * typeck.c (build_reinterpret_cast): Tweak.
13262 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
13264         * typeck.c (build_reinterpret_cast): Converting a void pointer
13265         to function pointer with a reinterpret_cast produces a warning
13266         if -pedantic is issued.
13268 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13270         * typeck.c (c_expand_return): Don't warn about returning a
13271         reference-type variable as a reference.
13273 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
13275         * method.c (build_static_name): Fix typo.
13277 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
13279         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
13280         OLDDECL before we try to do DECL_USE_TEMPLATE.
13282 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13284         * decl.c (duplicate_decls): Don't warn about template instances.
13286         * typeck.c (mark_addressable): Lose ancient code that unsets
13287         DECL_EXTERNAL.
13289         * pt.c (do_decl_instantiation): Lose support for instantiating
13290         non-templates.
13292         * call.c (build_new_function_call): Fix handling of null explicit
13293         template args.
13294         (build_new_method_call): Likewise.
13296 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
13298         * method.c (build_underscore_int): Fix typo.
13300 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
13302         * tree.c (print_lang_statistics): #if 0 call to
13303         print_inline_obstack_statistics until its definition is checked in.
13305 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
13307         * decl2.c (finish_file): Move dump_tree_statistics to end.
13309         * pt.c (instantiate_decl): Look for the original template.
13310         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
13311         of member templates.
13313 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13315         * Makefile.in (g++FAQ.*): New rules.
13316         (CONFLICTS): Update.
13317         * g++FAQ.texi: Moved from libg++.
13319         * parse.y (PFUNCNAME): Only specify the type once.
13321 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
13323         * lex.c (real_yylex): Clean up the code to fully behave the way
13324         the c-lex.c parser does for complex and real numbers.
13326 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13328         * method.c (build_decl_overload_real): Reformat.
13330 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
13332         * method.c (synthesize_method): If at_eof, determine our linkage.
13334 1997-09-29  Paul Eggert  <eggert@twinsun.com>
13336         * lex.c (real_yylex): Treat `$' just like `_', except issue a
13337         diagnostic if !dollars_in_ident or if pedantic.
13339         * lang-specs.h (@c++): -ansi no longer implies -$.
13341         * decl2.c (lang_decode_option):
13342         -traditional and -ansi now do not mess with
13343         dollars_in_ident.
13345 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
13347         * Makefile.in (parse.o, decl.o): Also depend on
13348         $(srcdir)/../except.h $(srcdir)/../output.h.
13349         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
13350         $(srcdir)/../except.h $(srcdir)/../output.h.
13351         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
13352         ../insn-codes.h.
13354         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
13356         * expr.c (cplus_expand_expr): Make it static.
13358         * decl2.c, init.c, typeck.c: Include "expr.h".
13359         (expand_expr): Use proper values when calling the function.
13361 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
13363         * lang-options.h: New -Wold-style-cast flag.
13364         * cp-tree.h (warn_old_style_cast): New variable.
13365         * decl2.c (warn_old_style_cast): Likewise.
13366         (lang_decode_option): Support -Wold-style-cast.
13367         (reparse_absdcl_as_casts): Produce old-style-cast warning.
13369 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13371         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
13372         TREE_USED, reset value based on already_used.
13374         * init.c (expand_member_init): Revert change.
13376 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
13378         * cp-tree.h, decl.c, decl2.c, pt.c:
13379         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
13381         * decl2.c (lang_decode_option): Add missing ;.
13383 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
13385         * friend.c (do_friend): Disable injection for all template-derived
13386         decls.
13387         * decl2.c (lang_decode_option): Handle -fguiding-decls.
13388         * parse.y (notype_template_declarator): New nonterminal.
13389         (direct_notype_declarator): Use it.
13390         (complex_direct_notype_declarator): Likewise.
13391         (object_template_id): Accept any kind of identifier after TEMPLATE.
13392         (notype_qualified_id): Don't add template declarators here.
13394 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
13396         * call.c (add_template_candidate): Add explicit_targs parameter.
13397         (build_scoped_method_call): Use it.
13398         (build_overload_call_real): Likewise.
13399         (build_user_type_conversion_1): Likewise.
13400         (build_new_function_call): Likewise.
13401         (build_object_call): Likewise.
13402         (build_new_op): Likewise.
13403         (build_new_method_call): Likewise.
13404         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
13405         (build_new_method_call): Likewise.
13407         * class.c (finish_struct_methods): Add specialization pass to
13408         determine which methods were specializing which other methods.
13409         (instantiate_type): Handle TEMPLATE_ID_EXPR.
13411         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
13413         * cp-tree.h (name_mangling_version): New variable.
13414         (flag_guiding_decls): Likewise.
13415         (build_template_decl_overload): New function.
13416         (begin_specialization): Likewise.
13417         (reset_specialization): Likewise.
13418         (end_specialization): Likewise.
13419         (determine_explicit_specialization): Likewise.
13420         (check_explicit_specialization): Likewise.
13421         (lookup_template_function): Likewise.
13422         (fn_type_unification): Add explicit_targs parameter.
13423         (type_unification): Likewise.
13425         * decl.c (duplicate_decls): Add smarts for explicit
13426         specializations.
13427         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
13428         specializations.
13429         (grokfndecl): Call check_explicit_specialization.
13431         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
13432         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
13433         (check_classfn): Handle specializations.
13435         * error.c (dump_function_name): Print specialization arguments.
13437         * friend.c (do_friend): Don't call pushdecl for template
13438         instantiations.
13440         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
13442         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
13443         and -fno-guiding-decls.
13445         * lex.c (identifier_type): Return PFUNCNAME for template function
13446         names.
13448         * method.c (build_decl_overload_real): New function.
13449         (build_template_parm_names): New function.
13450         (build_overload_identifier): Use it.
13451         (build_underscore_int): New function.
13452         (build_overload_int): Use it.  Add levels for template
13453         parameters.
13454         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
13455         (build_overload_nested_names): Handle template type parameters.
13456         (build_template_decl_overload): New function.
13458         * parse.y (YYSTYPE): New ntype member.
13459         (nested_name_specifier): Use it.
13460         (nested_name_specifier_1): Likewise.
13461         (PFUNCNAME): New token.
13462         (template_id, object_template_id): New non-terminals.
13463         (template_parm_list): Note specializations.
13464         (template_def): Likewise.
13465         (structsp): Likewise.
13466         (fn.def2): Handle member template specializations.
13467         (component_decl_1): Likewise.
13468         (direct_notype_declarator): Handle template-ids.
13469         (component_decl_1): Likewise.
13470         (direct_notype_declarator): Handle template-ids.
13471         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
13473         * pt.c (processing_specializations): New variable.
13474         (template_header_count): Likewise.
13475         (type_unification_real): New function.
13476         (processing_explicit_specialization): Likewise.
13477         (note_template_header): Likewise.
13478         (is_member_template): Handle specializations.
13479         (end_template_decl): Call reset_specialization.
13480         (push_template_decl): Handle member template specializations.
13481         (tsubst): Likewise.
13482         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
13483         (instantiate_template): Handle specializations.
13484         (instantiate_decl): Likewise.
13485         (fn_type_unification): Handle explicit_targs.
13486         (type_unification): Likewise.  Allow incomplete unification
13487         without an error message, if allow_incomplete.
13488         (get_bindings): Use new calling sequence for fn_type_unification.
13490         * spew.c (yylex): Handle PFUNCNAME.
13492         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
13493         (really_overloaded_fn): Likewise.
13494         (get_first_fn): Handle function templates.
13496         * typeck.c (build_x_function_call): Use really_overloaded_fn.
13497         Handle TEMPLATE_ID_EXPR.
13498         (build_x_unary_op): Likewise.
13499         (build_unary_op): Likewise.
13500         (mark_addressable): Templates whose address is taken are marked
13501         as used.
13503 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
13505         * decl.c (init_decl_processing): Declare __builtin_constant_p as
13506         accepting any kind of type, not only int.
13508 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
13510         * search.c (get_matching_virtual): Notice virtual bases when sorrying
13511         about covariant returns.
13513         * parse.y (member_init): Also imply typename here.  Remove ancient
13514         extension for initializing base members.
13516 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13518         Handle multi-level typenames and implicit typename in base list.
13519         * parse.y (typename_sub{,[0-2]}): New rules.
13520         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
13521         (nonnested_type): New rule.
13522         (complete_type_name): Use it.
13523         (base_class.1): Use typename_sub and nonnested_type.
13524         (nested_name_specifier): Don't elide std:: here.
13525         * decl.c (make_typename_type): Handle getting a type for NAME.
13526         (lookup_name_real): Turn std:: into :: here.
13528         Rvalue conversions were removed in London.
13529         * call.c (is_subseq): Don't consider lvalue transformations.
13530         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
13531         (joust): Re-enable ?: kludge.
13533 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
13535         * decl.c (start_function): Up warning of no return type to be a
13536         pedwarn.
13538 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13540         * init.c (expand_member_init): Don't set TREE_USED.
13541         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
13542         set,don't clear TREE_USED wholesale.
13544 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
13546         * call.c (build_over_call): Do require_complete_type before
13547         build_cplus_new.
13549 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
13551         * search.c (lookup_field): Call complete_type in all cases.
13553         * decl.c (finish_function): Just warn about flowing off the end.
13555 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13557         * decl.c (grokparms): Don't bash a permanent list node if we're
13558         in a function.
13560 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
13562         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
13564 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
13566         * call.c (build_new_op): Give better error for syntactically
13567         correct, but semantically invalid, use of undeclared template.
13569         * call.c (compare_qual): Handle pmfs.
13571         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
13572         after the exception spec.
13574 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13576         * call.c (null_ptr_cst_p): Integer type, not integral type.
13578         * call.c (joust): Disable warnings until they can be moved to the
13579         right place.
13581 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
13583         * Makefile.in, config-lang.in:  Convert to autoconf.
13585 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
13587         * decl.c (lookup_name_real): Add implicit 'typename' to types from
13588         base classes.
13590         * pt.c (most_specialized_class): Fix typo.
13591         (tsubst): Move constant folding to TREE_VEC case.
13593 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
13595         * pt.c (do_poplevel): Don't warn about unused local variables
13596         while processing_template_decl since we don't always know whether
13597         or not they will need constructing/destructing.
13599         * pt.c (uses_template_parms): Check the values of an enumeration
13600         type to make sure they don't depend on template parms.
13602         * decl.c (make_typename_type): Don't lookup the field if the
13603         context uses template parms, even if we're not
13604         processing_template_decl at the moment.
13606         * pt.c (coerce_template_parms): Avoid looking at the
13607         TYPE_LANG_DECL portion of a typename type, since there won't be
13608         one.
13609         (tsubst): Do constant folding as necessary to make sure that
13610         arguments passed to lookup_template_class really are constants.
13612 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
13614         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
13615         * decl2.c (finish_file): Only register exception tables if we
13616         need to.
13618         * decl.c (init_decl_processing): Add __builtin_[fs]p.
13620 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13622         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
13624 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
13626         * error.c (dump_decl): Avoid crashing when presented with a
13627         uninitialized constant, as can occur with a template parameter.
13628         (dump_expr): Make sure that there are enough levels of
13629         current_template_parms before we start diving through them.
13631 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
13633         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
13634         c-typeck.c.
13636 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13638         * except.c (expand_throw): Call build_delete for all
13639         exception types, not just objects with destructors.
13641 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
13643         * decl.c (current_local_enum): Remove static.
13644         * pt.c (tsubst_enum): Save and restore value of current_local_enum
13645         in case template is expanded in enum decl.
13646         (instantiate_class_template): Use new tsubst_enum signature.
13647         (tsubst_expr): Likewise.
13649 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
13651         * pt.c (begin_member_template_processing): Take a function as
13652         argument, not a set of template arguments.  Use the template
13653         parameters, rather than the arguments.  Handle non-type parameters
13654         correctly.  Push a binding level for the parameters so that multiple
13655         member templates using the same parameter names can be declared.
13656         (end_member_template_processing): Pop the binding level.
13657         (push_template_decl): Mark member templates as static when
13658         appropriate.
13660         * lex.c (do_pending_inlines): Pass the function, not its template
13661         arguments, to begin_member_template_processing.
13662         (process_next_inline): Likewise.
13663         (do_pending_defargs): Likewise.
13665         * error.c (dump_expr): Obtain the correct declaration for a
13666         TEMPLATE_CONST_PARM.
13668         * call.c (add_template_conv_candidate): New function.
13669         (build_object_call): Handle member templates, as done in the other
13670         build_ functions.
13672 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
13674         * decl.c (replace_defag): Undo previous change.
13675         * lex.c (do_pending_defargs): Deal with member templates.
13677         * pt.c (is_member_template): Avoid crashing when passed a
13678         non-function argument.
13680 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13682         * class.c (grow_method): Remove check for redeclaration.
13684 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
13686         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
13687         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
13688         (PRIMARY_TEMPLATE_P): Use it.
13689         * call.c (build_overload_call_real): Use it.
13690         * class.c (instantiate_type): Likewise.
13691         * decl.c (decls_match): Likewise.
13692         * method.c (build_overload_identifier): Likewise.
13693         * pt.c (push_template_decl): Likewise.
13694         (classtype_mangled_name): Likewise.
13695         (lookup_template_class): Likewise.
13697         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
13698         DECL_NTPARMS to conform to usage elsewhere.
13699         * call.c (add_template_candidate): Likewise.
13700         * class.c (instantiate_type): Likewise.
13701         * pt.c (instantiate_template): Likewise.
13702         (get_bindings): Likewise.
13704         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
13705         is_member_template.
13707         * pt.c (unify): Undo changes to allow multiple levels of template
13708         parameters.
13709         (type_unification): Likewise.
13710         (fn_type_unification): Likewise.
13711         (get_class_bindings): Likewise.
13712         * cp-tree.h (Likewise).
13714         * decl.c (replace_defarg): Check that the type of the default
13715         parameter does not invlove a template type before complaining
13716         about the initialization.
13718         * error.c (dump_expr): Deal with template constant parameters in
13719         member templates correctly.
13721         * pt.c (is_member_template): Deal with class specializations
13722         correctly.
13723         (tsubst): Handle "partial instantiation" of member templates
13724         correctly.
13726 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
13728         * pt.c (type_unification): Change calling sequence to allow for
13729         multiple levels of template parameters.
13730         (tsubst_expr): Likewise.
13731         (tsubst): Likewise.
13732         (tsubst_copy): Likewise.
13733         (instantiate_template): Likewise.
13734         (unify): Likewise.
13735         * call.c (build_overload_call_real): Use it.
13736         (add_builtin_candidate): Use it.
13737         (build_new_method_call): Use it.
13738         * class.c (instantiate_type): Use it.
13739         * decl.c (grokdeclarator): Use it.
13740         * decl2.c (finish_file): Use it.
13741         * method.c (build_overload_identifier): Use it.
13743         * call.c (add_template_candidate):  Add additional parameter for
13744         the function return type.  Call fn_type_unification istead of
13745         type_unification.
13746         (build_user_type_conversion_1): Handle member templates.
13747         (build_new_function_call): Likewise.
13748         (build_new_op): Likewise.
13749         (build_new_method_call): Likewise.
13751         * class.c (grow_method): Don't give an error message indicating
13752         that two member templates with the same name are ambiguous.
13753         (finish_struct): Treat member template functions just like member
13754         functions.
13756         * cp-tree.h (check_member_template): Add declaration.
13757         (begin_member_template_processing): Likewise.
13758         (end_member_template_processing): Likewise.
13759         (fn_type_unification): Likewise.
13760         (is_member_template): Likewise.
13761         (tsubst): Change prototype.
13762         (tsubst_expr): Likewise.
13763         (tsubst_copy): Likewise.
13764         (instantiate_template): Likewise.
13765         (get_bindings): Likewise.
13767         * decl.c (decls_match): Handle multiple levels of template
13768         parameters.
13769         (pushdecl): Handle template type params just like other type
13770         declarations.
13771         (push_class_level_binding): Return immediately if the
13772         class_binding_level is NULL.
13773         (grokfndecl): If check_classfn() returns a member_template, use
13774         the result of the template, not the template itself.
13776         * decl2.c (check_member_template): New function.  Check to see
13777         that the entity declared to be a member template can be one.
13778         (check_classfn): Allow redeclaration of member template functions
13779         with different types; the new functions can be specializations or
13780         explicit instantiations.
13782         * error.c (dump_decl): Handle multiple levels of template
13783         parameters.
13784         (dump_function_decl): Update to handle function templates.
13786         * lex.c (do_pending_inlines): Set up template parameter context
13787         for member templates.
13788         (process_next_inline): Likewise.
13790         * method.c (build_overload_identifier): Adjust for multiple levels
13791         of template parameters.
13793         * parse.y (fn.def2): Add member templates.
13794         (component_decl_1): Likewise.
13796         * pt.c (begin_member_template_processing): New function.
13797         (end_member_template_processing): Likewise.
13798         (is_member_template): Likewise.
13799         (fn_type_unification): Likewise.
13800         (current_template_parms): Return a vector of all the template
13801         parms, not just the innermost level of parms.
13802         (push_template_decl): Deal with the possibility of member
13803         templates.
13804         (lookup_template_class): Likewise.
13805         (uses_template_parms): Likewise.
13806         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
13807         TEMPLATE_CONST_PARM to deal with multiple levels of template
13808         arguments.   Add processing of TEMPLATE_DECL to produce new
13809         TEMPLATE_DECLs from old ones.
13810         (do_decl_instantiation): Handle member templates.
13812         * search.c (lookup_fnfields_1): Handle member template conversion
13813         operators.
13815         * tree.c (cp_tree_equal): Check the levels, as well as the
13816         indices, of TEMPLATE_CONST_PARMs.
13818         * typeck.c (comptypes): Check the levels, as well as the indices,
13819         fo TEMPLATE_TYPE_PARMs.
13820         (build_x_function_call): Treat member templates like member
13821         functions.
13823 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13825         * typeck.c (c_expand_return): Always convert_for_initialization
13826         before checking for returning a pointer to local.
13828         * pt.c (type_unification): If strict and the function parm doesn't
13829         use template parms, just compare types.
13831 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
13833         * method.c (build_overloaded_value): Replace direct call
13834         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
13836 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
13838         * typeck.c (convert_arguments): Don't arbitrarily choose the first
13839         of a set of overloaded functions.
13841 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13843         * lex.c (real_yylex): Don't elide __FUNCTION__.
13845         * method.c (build_overload_value): Add in_template parm.
13846         (build_overload_int): Likewise.
13847         (build_overload_identifier): Pass it.
13849         * decl.c (duplicate_decls): Don't bash a previous template
13850         definition with a redeclaration.
13852         * pt.c (unify): float doesn't match double.
13854         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
13855         TYPE_DECL.  Handle getting non-template types.
13856         * parse.y (explicit_instantiation): Use typespec instead of
13857         aggr template_type.
13859 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
13861         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
13863 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
13865         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
13866         (compare_ics): Likewise.
13868 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
13870         * call.c (joust): Warn about choosing one conversion op over
13871         another because of 'this' argument when the other return type is
13872         better.
13873         (source_type): New fn.
13875         * call.c (build_new_op): Strip leading REF_BIND from first operand
13876         to builtin operator.
13878         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
13879         use its RTL.
13881 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
13883         * call.c (null_ptr_cst_p): Remove support for (void*)0.
13885 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
13887         * typeck.c (expand_target_expr): Make definition match declaration.
13889         * class.c (get_basefndecls): Make definition match declaration.
13891 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
13893         * input.c (sub_getch): Eventually give up and release the input file.
13895         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
13896         right place.
13898         * call.c (joust): Tweak message.
13900 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
13902         * error.c (type_as_string): Put const/volatile on template type
13903         parameters where appropriate.
13905 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
13907         * call.c (strictly_better): Make arguments unsigned ints.
13909 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
13911         * lex.c (real_yylex): Refer to __complex instead of complex.
13913 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
13915         * lex.c (real_yylex): Don't use getc directly.
13917 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
13919         * call.c (is_subseq): Don't try to be clever.
13921 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
13923         * parse.y, pt.c: Include "except.h".
13924         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
13925         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
13926         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
13927         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
13928         prototyping.
13930 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
13932         * decl2.c (mark_vtable_entries): Instead of replacing pure
13933         virtuals with a reference to __pure_virtual, copy the decl and
13934         change the RTL.
13936 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
13938         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
13940         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
13942         * pt.c (instantiate_class_template): Call repo_template_used
13943         before finish_prevtable_vardecl.
13945         * call.c (is_subseq): New fn.
13946         (compare_ics): Use it.
13948         * repo.c (finish_repo): Don't crash on no args.
13950         * parse.y (named_complex_class_head_sans_basetype): Handle
13951         explicit global scope.
13952         * decl2.c (handle_class_head): New fn.
13954         * pt.c (unify): Add CONST_DECL case.
13956 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
13958         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
13960         * cp-tree.h (report_type_mismatch): Add prototype.
13961         * call.c (build_overload_call_real): Remove erroneous fourth
13962         argument to report_type_mismatch.
13963         (build_user_type_conversion_1): Remove erroneous second arg to
13964         tourney.
13965         (build_new_function_call): Likewise.
13966         (build_object_call): Likewise.
13967         (build_new_op): Likewise.
13968         (build_new_method_call): Likewise.
13970 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
13972         * error.c (dump_decl): Don't bother processing a function with no
13973         DECL_LANG_SPECIFIC.
13975         * method.c (emit_thunk): Call init_function_start in the macro case.
13977 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
13979         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
13980         defined and used to set flag_vtable_thunks.
13982 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
13984         * parse.y: Don't clear the inlines from their obstack until they've
13985         all been processed.
13987         * decl.c (duplicate_decls): Don't complain about exception
13988         specification mismatch if flag_exceptions is off.
13990 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
13992         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
13994 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
13996         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
13997         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
13998         Include <stdio.h> before include files that formerly used STDIO_PROTO.
14000         * decl.c, g++spec.c, lex.c, method.c, repo.c:
14001         Include "config.h" first, as per autoconf manual.
14003 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
14005         * decl.c (duplicate_decls): Tweak wording.
14006         * lex.c (do_pending_defargs): Don't die if we see a default arg
14007         that isn't a DEFAULT_ARG.
14008         * error.c (dump_expr): Handle DEFAULT_ARG.
14010         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
14011         * lang-options.h: Add -fhandle-exceptions.
14013         * class.c (build_vtable): Vtables are artificial.
14014         (prepare_fresh_vtable): Likewise.
14016 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
14018         * cvt.c (ocp_convert): After converting to the target type, set
14019         LOOKUP_NO_CONVERSION.
14021         * call.c (joust): Warn about potentially confusing promotion rules
14022         with -Wsign-promo.
14023         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
14025 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
14027         * exception.cc: Declare __terminate_func with noreturn attribute.
14029 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
14031         * parse.y: Break out eat_saved_input, handle errors.
14032         (function_try_block): Use compstmt instead of compstmt_or_error.
14034 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
14036         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
14038 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14040         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
14041         existence of cc1plus check whether $(LANGUAGES) contains C++.
14043 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14045         * method.c (do_build_copy_constructor): When copying an anonymous
14046         union member loop around to handle nested anonymous unions.  Use
14047         the offset of the member relative to the outer structure, not the
14048         union.
14050 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
14052         * call.c (resolve_args): New fn.
14053         (build_new_function_call): Use it.
14054         (build_object_call): Likewise.
14055         (build_new_method_call): Likewise.
14057 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
14059         * call.c (build_over_call): tsubst all default parms from templates.
14061 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
14063         * decl.c (struct cp_function): Add static_labelno.
14064         (push_cp_function_context): Save it.
14065         (pop_cp_function_context): Restore it.
14067 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
14069         * typeck.c (build_component_ref_1): Convert from reference.
14071 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14073         * parse.y (current_declspecs, prefix_attributes): Initialize to
14074         NULL_TREE.
14076         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
14077         before we try to force it to be a TREE_LIST.
14078         (decl): Make sure $1.t is non-nil.
14080 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
14082         * pt.c (uses_template_parms): Handle template first-parse codes.
14084         * decl.c (cp_finish_decl): Only warn about user-defined statics.
14086 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
14088         * pt.c (unify): Handle BOOLEAN_TYPE.
14090         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
14091         * pt.c (tsubst): Don't set it.
14092         * call.c (build_over_call): Use uses_template_parms.
14094 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
14096         * method.c (build_overload_nested_name): Use static_labelno
14097         instead of var_labelno.
14098         (build_qualified_name): New fn.
14099         (build_overload_name): Split out from here.
14100         (build_static_name): Use build_qualified_name.
14101         * decl.c (cp_finish_decl): Statics in extern inline functions
14102         have comdat linkage.
14103         (start_function): Initialize static_labelno.
14105 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14107         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
14108         before "all member functions in class [] are private".
14110 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
14112         * lex.c (do_scoped_id): convert_from_reference.
14113         * init.c (build_offset_ref): Likewise.
14115 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
14117         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
14119 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
14121         * typeck.c (get_member_function_from_ptrfunc): Promote index
14122         before saving it.
14124 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
14126         * tree.c (layout_basetypes): Move non-virtual destructor warning.
14127         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
14129 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14131         * decl.c (grokdeclarator): Call add_defarg_fn for the function
14132         type, too.
14133         * lex.c (add_defarg_fn): Adjust.
14134         (do_pending_defargs): Adjust.  Don't skip the first parm.
14136 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
14138         * decl.c (build_enumerator): Global enumerators are also readonly.
14140         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
14141         (build_dynamic_cast): Call it and convert_from_reference.
14143         * lex.c (add_defarg_fn): New fn.
14144         (snarf_defarg): Don't add to defarg_types.
14145         (do_pending_defargs): Lose defarg_types.  All fns we process now
14146         have defargs.
14147         * decl.c (grokfndecl): Call add_defarg_fn.
14149         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
14150         * cp-tree.def: Add DEFAULT_ARG.
14151         * spew.c (yylex): Call snarf_defarg as appropriate.
14152         * parse.y: New tokens DEFARG and DEFARG_MARKER.
14153         (defarg_again, pending_defargs, defarg, defarg1): New rules.
14154         (structsp): Use pending_defargs.
14155         (parms, full_parm): Use defarg.
14156         * lex.c (init_lex): Initialize inline_text_firstobj.
14157         (do_pending_inlines): Never pass the obstack to feed_input.
14158         (process_next_inline): Call end_input instead of restore_pending_input.
14159         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
14160         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
14161         * input.c (end_input): New fn.
14162         (sub_getch): At the end of some fed input, just keep returning EOF
14163         until someone calls end_input.
14164         Remove 'obstack' field from struct input_source.
14165         * decl.c (grokparms): Handle DEFAULT_ARG.
14166         (replace_defarg): New fn.
14167         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
14169 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14171         * call.c (implicit_conversion): If nothing else works, try binding
14172         an rvalue to a reference.
14174 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
14176         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
14177         ifndef for Cygwin32 to include SIGSEGV.
14179 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
14181         * class.c (finish_struct_1): Only complain about pointers without
14182         copy stuff if there are any constructors.
14184         * rtti.c (build_dynamic_cast): Call complete_type on the types.
14186         * decl.c (grokfndecl): If the function we chose doesn't actually
14187         match, die.
14189         * decl2.c (grokclassfn): Don't specify 'const int' for the
14190         artificial destructor parm.
14192         * pt.c (type_unification): If we are called recursively, nothing
14193         decays.
14195 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
14197         * decl.c (init_decl_processing): Stop trying to catch signals
14198         other than SIGABRT since the Cygwin32 library doesn't support
14199         them correctly yet.  This fixes a situation in which g++ causes
14200         a hang on SIGSEGVs and other such signals in our Win32-hosted
14201         tools.
14203 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
14205         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
14207 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
14209         * typeck2.c (store_init_value): Always return the value if our
14210         type needs constructing.
14212         * method.c (hack_identifier): Convert class statics from
14213         reference, too.
14215 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
14217         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
14219 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
14221         * typeck.c (c_expand_return): Make sure we clean up temporaries at
14222         the end of return x;
14224 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14226         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
14228 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
14230         * except.c (expand_builtin_throw): Add support
14231         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
14233 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
14235         * repo.c (extract_string): Null-terminate.
14237         * cp-tree.h (TI_SPEC_INFO): New macro.
14238         (CLASSTYPE_TI_SPEC_INFO): New macro.
14239         * pt.c (push_template_decl): Correctly determine # of template parms
14240         for partial specs.
14242         * call.c (compare_ics): Really fix 'this' conversions.
14244         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
14245         non-template fn.
14247         * pt.c (push_template_decl): Complain about mismatch in # of
14248         template parms between a class template and a member template.
14250 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
14252         * method.c (synthesize_method): You can't call
14253         function_cannot_inline_p after finish_function.
14254         * decl.c (finish_function): Turn on flag_inline_functions and turn
14255         off DECL_INLINE before handing a synthesized method to the
14256         backend.
14258 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14260         * method.c (synthesize_method): Remove July 30 change to never set
14261         DECL_INLINE if at_eof.
14263 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
14265         * xref.c (GNU_xref_member): Ensure that the node has a
14266         decl_lang_specific part before checking DECL_FRIEND_P.
14268 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
14270         * pt.c (instantiate_class_template): Diagnose non-class types used
14271         as bases.
14273 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
14275         * typeck.c (build_conditional_expr): Use convert_for_initialization
14276         instead of convert_and_check.
14278 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14280         * parse.y (typespec): Don't pedwarn for typeof.
14282 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
14284         * repo.c (finish_repo): Only check changes if we would write a
14285         repo file.
14287         * call.c (compare_ics): Fix handling of 'this' conversions.
14289         * pt.c (do_decl_instantiation): Support static data too.  Rename
14290         from do_function_instantiation.
14291         * cp-tree.h: Adjust.
14292         * parse.y: Adjust.
14294         * repo.c (extract_string): New fn.
14295         (get_base_filename): Use it.
14296         (init_repo): Compare old args with current args.
14298 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
14300         * Makefile.in, Make-lang.in: Protect C-ls with a comment
14301         character, idea from Paul Eggert <eggert@twinsun.com>.
14303 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
14305         * typeck.c (c_expand_return): Be more persistent in looking for
14306         returned temps.
14308         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
14309         pointer to reference.
14311         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
14313 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
14315         * init.c (build_member_call, build_offset_ref):
14316         Use do_scoped_id instead of do_identifier.
14318         * cvt.c (convert): Remove bogosity.
14320 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14322         * cvt.c (build_up_reference): Do checks of ARGTYPE and
14323         TARGET_TYPE before trying to use get_binfo.
14325 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
14327         * cvt.c (build_up_reference): Call get_binfo to get access control.
14329         * decl2.c (import_export_decl): If we don't support weaks, leave
14330         statics undefined.
14332 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
14334         * except.c (expand_builtin_throw): Add support for machines that
14335         cannot access globals after throw's epilogue when
14336         -fno-sjlj-exceptions is used.
14338 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
14340         * parse.y: 'std::' becomes '::'.
14341         * lex.c (real_yylex): Remove 'namespace' warning.
14342         * init.c (build_member_call): Ignore 'std::'.
14343         (build_offset_ref): Likewise.
14344         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
14345         (do_toplevel_using_decl): Ignore 'using std::whatever'.
14346         * decl.c (push_namespace): Just sorry.
14347         (pop_namespace): Nop.
14348         (init_decl_processing): Declare std namespace.
14350 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
14352         * search.c (push_class_decls): A name which ambiguously refers to
14353         several instantiations of the same template just refers to the
14354         template.
14356 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
14358         * decl.c (build_enumerator): Fix problem with unsigned long
14359         enumerated values being smashed to ints, causing overflow
14360         when computing next enumerated value (for enum values around
14361         MAX_VAL).
14363 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
14365         * typeck.c (build_component_ref): Only call mark_used on a decl.
14367 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14369         * typeck.c (build_c_cast): Make the check for a ptr to function
14370         more specific before possible default_conversion call.
14372 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
14374         * except.c (expand_exception_blocks): Simplify and fix and make
14375         sure we don't end a region in a sequence, as expand_end_bindings
14376         doesn't like it.
14378 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
14380         * except.c (init_exception_processing): Mark terminate as not
14381         returning so that the optimizer can optimize better.
14383 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
14385         * cvt.c (convert): Don't do any extra work, if we can avoid it
14386         easily.
14388 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
14390         * *.[chy]: Change cp_convert to ocp_convert, change convert to
14391         cp_convert.  convert is now reserved for the backend, and doesn't
14392         have the semantics a frontend person should ever want.
14394 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
14396         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
14397         Lose -traditional support.
14399 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14401         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
14403         * parse.y (self_reference): Do it for templates, too.
14404         * class.c (pushclass): Don't overload_template_name; the alias
14405         generated by build_self_reference serves the same purpose.
14407         * tree.c (list_hash): Make static, take more args.
14408         (list_hash_lookup): Likewise.
14409         (list_hash_add): Make static.
14410         (list_hash_canon): Lose.
14411         (hash_tree_cons): Only build a new node if one isn't already in the
14412         hashtable.
14413         (hash_tree_chain): Use hash_tree_cons.
14414         * cp-tree.h: Adjust.
14415         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
14416         of calling lookup_name.
14418 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
14420         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
14421         doesn't refer to the CONST_DECLs.
14423 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
14425         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
14426         is bigger.
14427         (expand_class_desc): Convert the last argument to a sizetype.
14429 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14431         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
14432         __real__): Add reswords.
14433         * hash.h: Regenerate.
14434         * lex.h (rid): Add RID_COMPLEX.
14435         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
14436         * lex.c (init_lex): Add building of RID_COMPLEX.
14437         (real_yylex): General cleanup in line with what c-lex.c also has,
14438         sans the cruft for traditional; add handling of SPEC_IMAG, complex
14439         types, and imaginary numeric constants.
14440         * parse.y (REALPART, IMAGPART): Add tokens.
14441         (unary_expr): Add REALPART and IMAGPART rules.
14442         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
14443         * decl.c (complex_{integer,float,double,long}_type_node): Define
14444         types.
14445         (init_decl_processing): Set up the types.
14446         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
14447         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
14448         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
14449         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
14450         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
14451         COMPLEX_TYPE case.
14452         * method.c (build_overload_name): Add handling of the different
14453         COMPLEX_TYPEs, prefixing them with `J'.
14454         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
14455         as a template parm.
14456         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
14457         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
14458         (mapcar): Handle COMPLEX_CST.
14459         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
14460         (common_type): Add code for complex types.
14461         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
14462         (convert_for_assignment): Likewise.
14463         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
14465 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
14467         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
14468         tsubst_expr, as it might try to do overload resolution.
14470 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
14472         * pt.c (instantiate_class_template): Oops.
14474 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
14476         * cp-tree.def: Add TAG_DEFN.
14477         * pt.c (tsubst_enum): New fn.
14478         (instantiate_class_template): Use it.
14479         (tsubst_expr): Support TAG_DEFN.
14480         (tsubst): Support local enums.
14481         (tsubst_copy): Likewise.
14482         * decl.c (finish_enum): Likewise.
14483         (start_enum): If this is a local enum, switch to permanent_obstack.
14485 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
14487         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
14488         (finish_function): Put the base init code for constructors just
14489         after the parm cleanup insns.
14490         (struct cp_function): Add last_parm_cleanup_insn.
14491         (push_cp_function_context): Likewise.
14492         (pop_cp_function_context): Likewise.
14494 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
14496         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
14498 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14500         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
14501         for THUNK_FNDECL before we switch to temporary allocation.
14503 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
14505         * call.c (build_new_op): Handle null arg2 for ?:.
14507 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
14509         * except.c (expand_exception_blocks): Ensure that we flow through
14510         the end of the exception region for the exception specification.
14511         Move exception region for the exception specification in, so that
14512         it doesn't protect the parm cleanup.  Remove some obsolete code.
14513         * decl.c (store_parm_decls): Likewise.
14514         (finish_function): Likewise.
14516 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
14518         * init.c (build_new): Fix nothrow handling.
14520 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14522         * init.c (emit_base_init): Don't warn about the initialization
14523         list for an artificial member.
14525 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14527         * expr.c (do_case): Handle !START case for the error msg.
14529 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
14531         * decl2.c, lang-options.h: New option -Weffc++.
14532         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
14533         to -Weffc++.
14535         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
14536         to MULTIPLE_SYMBOL_SPACES.
14538 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
14540         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
14542         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
14544         * typeck.c (c_expand_return): Don't complain about returning void
14545         to void in an artificial function.
14546         * method.c (make_thunk): Change settings of READONLY/VOLATILE,
14547         don't set DECL_RESULT, set DECL_ARTIFICIAL.
14548         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
14550 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
14552         * init.c (init_decl_processing): Add support for setjmp/longjmp based
14553         exception handling.
14554         * except.c (init_exception_processing): Likewise.
14555         (expand_end_catch_block): Likewise.
14556         (expand_exception_blocks): Likewise.
14557         (expand_throw): Likewise.
14558         * exception.cc (__default_terminate): Likewise.
14560         * init.c (perform_member_init): Use new method of expr level
14561         cleanups, instead of cleanups_this_call and friends.
14562         (emit_base_init): Likewise.
14563         (expand_aggr_vbase_init_1): Likewise.
14564         (expand_vec_init): Likewise.
14565         * decl.c (cp_finish_decl): Likewise.
14566         (expand_static_init): Likewise.
14567         (store_parm_decls): Likewise.
14568         (cplus_expand_expr_stmt): Likewise.
14569         * decl2.c (finish_file): Likewise.
14571         * Make-lang.in (exception.o): Ok to compile with -O now.
14573         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
14574         we know it will be done later by the backend.
14576         * decl2.c (lang_f_options): Remove support for short temps.
14577         * lang-options.h: Likewise.
14579 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
14581         * tree.c (varargs_function_p): New fn.
14582         * method.c (emit_thunk): Replace broken generic code with code to
14583         generate a heavyweight thunk function.
14585 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
14587         * pt.c (process_template_parm): pedwarn about floating-point parms.
14589         * decl.c (grokdeclarator): inline no longer implies static.
14591         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
14593 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
14595         * class.c (check_for_override): The signature of an overriding
14596         function is not changed.
14598         * call.c (build_over_call): Move setting of conv into the loop.
14599         Note: this change, along with the related changes of the 18th thru
14600         the 20th of April, fix an infinite loop problem in conversions.
14602 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
14604         * call.c (build_user_type_conversion_1): Really ignore rvalue
14605         conversions when looking for a REFERENCE_TYPE.
14607         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
14608         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
14609         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
14610         (build_unary_op): Likewise.
14611         * call.c (build_over_call): See through a CONVERT_EXPR around the
14612         ADDR_EXPR for on a temporary.
14613         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
14614         the ADDR_EXPR for a local variable.
14616 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
14618         * call.c (build_user_type_conversion_1): If we're trying to
14619         convert to a REFERENCE_TYPE, only consider lvalue conversions.
14620         (build_new_function_call): Print candidates.
14621         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
14622         (reference_binding): Binding a temporary of a reference-related type
14623         is BAD.
14625 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14627         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
14628         * tinfo2.cc (type_info::before): Likewise.
14630 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
14632         * call.c (implicit_conversion): Oops.
14634 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
14636         * call.c (implicit_conversion): Try to find a reference conversion
14637         before binding a const reference to a temporary.
14639 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
14641         * exception.cc (__default_unexpected): Call terminate by default,
14642         so that if the user overrides terminate, the correct function will
14643         be called.
14645 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
14647         * parse.y (left_curly): Avoid trying to use any fields of
14648         error_mark_node, as there aren't any.
14650 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
14652         * lex.c (do_identifier): Avoid breaking on overloaded methods
14653         as default arguments.
14655 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
14657         * call.c (add_template_candidate): Initialize the variable "dummy".
14659 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
14661         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
14662         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
14664 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14666         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
14667         (debug_binfo): Delete decl, not needed.
14669         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
14670         promotes_to_aggr_type): Delete fns.
14671         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
14672         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
14673         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
14675         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
14677         * friend.c (is_friend_type): Delete fn.
14678         * cp-tree.h (is_friend_type): Delete decl.
14680         * decl.c (original_result_rtx, double_ftype_double,
14681         double_ftype_double_double, int_ftype_int, long_ftype_long,
14682         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
14683         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
14685         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
14686         fwd decls.
14687         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
14689         * decl.c (pushdecl_nonclass_level): #if 0, unused.
14690         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
14692         * lex.c (reinit_lang_specific): #if 0, unused.
14693         * cp-tree.h (reinit_lang_specific): #if 0 decl.
14695         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
14696         * cp-tree.h (revert_static_member_fn): Delete decl.
14698         * class.c (root_lang_context_p): Delete fn.
14699         * cp-tree.h (root_lang_context_p): Delete decl.
14701         * decl.c (set_current_level_tags_transparency): #if 0, unused.
14702         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
14704         * lex.c (set_vardecl_interface_info): Make static.
14705         * cp-tree.h (set_vardecl_interface_info): Delete decl.
14707         * call.c (find_scoped_type): Make static.
14708         * cp-tree.h (find_scoped_type): Delete decl.
14710         * search.c (convert_pointer_to_vbase): Make static.
14711         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
14713         * decl.c (const_ptr_type_node): Likewise.
14714         * cp-tree.h (const_ptr_type_node): Delete decl.
14716         * typeck.c (common_base_type): Make static.
14717         * cp-tree.h (common_base_types): Delete erroneous decl.
14719         * pt.c (classtype_mangled_name): Make static.
14720         * cp-tree.h (classtype_mangled_name): Delete decl.
14722         * lex.c (check_newline): Make static.
14723         * cp-tree.h (check_newline): Delete decl.
14725         * typeck.c (build_x_array_ref): Delete fn, same idea as
14726         grok_array_decl.
14727         * cp-tree.h (build_x_array_ref): Delete decl.
14729         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
14730         copy_lang_decl.
14731         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
14733         * class.c (build_vtable_entry): Make static.
14734         * cp-tree.h (build_vtable_entry): Delete decl.
14736         * class.c (build_vbase_pointer): Make static.
14737         * cp-tree.h (build_vbase_pointer): Delete decl.
14739         * sig.c (build_sptr_ref): Add forward decl and make static.
14740         * cp-tree.h (build_sptr_ref): Delete decl.
14742         * call.c (build_new_method_call): Add forward decl and make static.
14743         * cp-tree.h (build_new_method_call): Delete decl.
14745         * call.c (build_object_call): Make static.
14746         * class.c (check_for_override, complete_type_p, mark_overriders):
14747         Likewise.
14748         * decl.c (cp_function_chain): Likewise.
14749         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
14750         Likewise.
14751         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
14752         Likewise.
14753         * tree.c (build_cplus_array_type_1): Likewise.
14754         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
14755         (comp_target_parms): Likewise.
14757         * init.c (build_builtin_call): Make static.
14758         * cp-tree.h (build_builtin_call): Delete decl.
14760         * typeck.c (binary_op_error): Delete decl.
14761         * cp-tree.h (binary_op_error): Likewise.
14763 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14765         * call.c (build_method_call): Compare against error_mark_node
14766         directly, rather than the ERROR_MARK tree code.
14767         * cvt.c (cp_convert): Likewise.
14768         * decl.c (print_binding_level): Likewise.
14769         (duplicate_decls): Likewise.
14770         (grokdeclarator): Likewise.
14771         (grokdeclarator): Likewise.
14772         * init.c (expand_aggr_init_1): Likewise.
14773         (decl_constant_value): Likewise.
14774         * method.c (build_opfncall): Likewise.
14775         (hack_identifier): Likewise.
14776         * typeck.c (build_modify_expr): Likewise.
14778         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
14780 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14782         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
14784         * pt.c (coerce_template_parms): Add new error message.
14786         * method.c (build_overload_value): Implement name mangling for
14787         floating-point template arguments.
14789         * method.c (build_overload_int, icat, dicat): Fix mangling of template
14790         arguments whose absolute value doesn't fit in a signed word.
14792 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14794         * friend.c: New file; put all of the friend stuff in here.
14795         * init.c: Instead of here.
14796         * Makefile.in (CXX_OBJS): Add friend.o.
14797         (friend.o): Add dependencies.
14798         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
14800 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
14802         * call.c (build_scoped_method_call): Complain if the scope isn't a
14803         base.
14805 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
14807         * parse.y (left_curly): Don't crash on erroneous type.
14809         * init.c (build_delete): Fix type of ref.
14811 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
14813         * search.c (get_vbase_1): Renamed from get_vbase.
14814         (get_vbase): Wrapper, now non-static.
14815         (convert_pointer_to_vbase): Now static.
14817         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
14818         * init.c (build_delete): Pass one.
14819         (build_partial_cleanup_for): Use build_scoped_method_call.
14820         * decl.c (finish_function): Pass a binfo.
14822 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14824         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
14826         * typeck.c (build_c_cast): Lose other reference to flag.
14828         * call.c (build_field_call): Don't look for [cd]tor_identifier.
14829         * decl2.c (delete_sanity): Remove meaningless use of
14830         LOOKUP_HAS_IN_CHARGE.
14831         * decl.c (finish_function): Use build_scoped_method_call instead
14832         of build_delete for running vbase dtors.
14833         * init.c (build_delete): Call overload resolution code instead of
14834         duplicating it badly.
14836 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
14838         * call.c (build_over_call): Call mark_used before trying to elide
14839         the call.
14841         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
14843 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14845         * typeck.c (build_modify_expr): Always pedwarn for a cast to
14846         non-reference used as an lvalue.
14848 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
14850         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
14852 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
14854         * parse.y (handler): Fix template typo.
14856 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14858         * error.c (lang_decl_name): New fn.
14859         * tree.c (lang_printable_name): Use it.
14861 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
14863         * g++spec.c: Include config.h so that we can catch bzero #defines
14864         from the config file.
14866 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
14868         * new1.cc: Include a declaration for malloc, to avoid warning, and
14869         avoid lossing on systems that require one (ones that define malloc
14870         in xm.h).
14872 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14874         * decl2.c (max_tinst_depth): New variable.
14875         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
14876         option.
14877         * pt.c (max_tinst_depth): Variable moved.
14878         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
14879         as legal.
14881 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
14883         * decl.c (xref_basetypes): Allow a base class that depends on
14884         template parms to be incomplete.
14886         * decl2.c (build_expr_from_tree): Support typeid(type).
14887         * rtti.c (get_typeid): Support templates.
14888         (expand_si_desc, expand_class_desc): Fix string length.
14889         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
14891 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
14893         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
14895         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
14897 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14899         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
14900         smashes together template and non-template decls of the same
14901         signature.
14903 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
14905         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
14907 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14909         * decl.c (duplicate_decls): Next route, pedwarn about different
14910         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
14912 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14914         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
14915         (struct lang_type): Delete has_default_implementation member.
14916         Increase dummy to 21.
14917         * decl.c (start_method): Delete usage.
14919         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
14920         store_after_parms, start_decl_1, auto_function): Add decls.
14921         (get_arglist_len_in_bytes, declare_implicit_exception,
14922         have_exceptions_p, make_type_decl, typedecl_for_tag,
14923         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
14924         build_component_type_expr, cplus_exception_name,
14925         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
14926         * call.c (build_this): Make static.
14927         (is_complete): Likewise.
14928         (implicit_conversion): Likewise.
14929         (reference_binding): Likewise.
14930         (standard_conversion): Likewise.
14931         (strip_top_quals): Likewise.
14932         (non_reference): Likewise.
14933         (build_conv): Likewise.
14934         (user_harshness): Likewise.
14935         (rank_for_ideal): Likewise.
14936         * decl.c (start_decl_1): Delete forward decl.
14937         (push_decl_level): Make static.
14938         (resume_binding_level): Make static.
14939         (namespace_bindings_p): Make static.
14940         (declare_namespace_level): Make static.
14941         (lookup_name_real): Make static.
14942         (duplicate_decls): Make static.  Take register off NEWDECL and
14943         OLDDECL parm decls.
14944         * decl2.c (get_sentry): Make static.
14945         (temp_name_p): Delete fn.
14946         * except.c (auto_function): Delete decl.
14947         * lex.c (handle_{cp,sysv}_pragma): Make static.
14948         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
14949         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
14950         * pt.c (tsubst_expr_values): Make static.
14951         * rtti.c (combine_strings): Delete decl.
14953 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
14955         * pt.c (push_template_decl): Handle getting a typedef.
14957         * call.c (build_new_function_call): Complain about void arg.
14959 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14961         * decl.c (duplicate_decls): Give pedwarn of different exceptions
14962         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
14964 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
14966         * except.c (expand_throw): Don't expand the cleanup tree here,
14967         since we are not going to write the rtl out.  Fixes problem with
14968         -g -O on SPARC.
14970 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
14972         * Make-lang.in: Add $(exeext) as necessary.
14974 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
14976         * parse.y (handler_seq): Must have at least one catch clause.
14978 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
14980         * call.c (add_builtin_candidate): Restore ?: hack.
14982         * decl.c (grok_op_properties): More warnings.
14984 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14986         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
14987         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
14989         * decl.c (duplicate_decls): Scale back to a warning, and only do
14990         'em if -pedantic.
14992 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
14994         * decl.c (duplicate_decls): pedwarn mismatched exception
14995         specifications.
14997 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
14999         * call.c (build_new_method_call): Don't display the invisible
15000         argument for controlling virtual bases.
15002 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
15004         * new: Add nothrow new and delete, bad_alloc and throw specifications
15005         for delete.
15006         * decl.c (init_decl_processing): Add throw specification for delete.
15007         * new.cc (nothrow): Define.
15008         * lex.c (real_yylex): Removing warning that throw and friends are
15009         keywords.
15010         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
15011         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
15012         * Make-lang.in: Add new{1,2}.{cc,o}.
15014 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
15016         * lex.c (cons_up_default_function): Fix return type of synth op=.
15018         * init.c (emit_base_init): Add warnings for uninitialized members
15019         and bases.
15021         * decl.c (xref_basetypes): Add warning for non-polymorphic type
15022         with destructor used as base type.
15024         * decl.c (grok_op_properties): Add warning for op= returning void.
15025         * typeck.c (c_expand_return): Add warning for op= returning anything
15026         other than *this.
15028         * class.c (finish_struct_1): Add warning for class with pointers
15029         but not copy ctor or copy op=.
15031         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
15032         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
15033         (instantiate_template): If -fexternal-templates, add this
15034         instantiation to pending_templates.
15036         * decl2.c (copy_assignment_arg_p): Disable old hack to support
15037         Booch components.
15039 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
15041         * cvt.c (cp_convert): pedwarn enum to pointer conversions.
15043 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
15045         * call.c (standard_conversion): Handle getting references.  Tack
15046         on RVALUE_CONV here.  Do it for non-class types, too.
15047         (reference_binding): Pass references to standard_conversion.
15048         (implicit_conversion): Likewise.
15049         (add_builtin_candidate): Disable one ?: kludge.
15050         (convert_like): Handle RVALUE_CONVs for non-class types.
15051         (joust): Disable the other ?: kludge.
15053 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15055         * decl.c (init_decl_processing): Add code to build up common
15056         function types beforehand, to avoid creation then removal of
15057         things already in the hash table.
15059 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
15061         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
15062         the arguments.
15064         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
15065         current_template_parms.
15067 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
15069         * search.c (lookup_field): Don't return a function, check want_type.
15071 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15073         * init.c (build_new): Make sure PLACEMENT has a type.
15075 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
15077         * init.c (build_new): Support new (nothrow).
15079 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
15081         * pt.c (instantiate_decl): Also do push_to_top_level before setting
15082         up DECL_INITIAL.
15084         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
15085         * pt.c (tsubst): Defer instantiation of default args.
15086         * call.c (build_over_call): Until here.
15088 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15090         * search.c (lookup_field): Make sure we have an
15091         IDENTIFIER_CLASS_VALUE before we try to return it.
15093 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15095         * call.c (build_method_call): Delete unused var PARM.
15096         (build_overload_call_real): Likewise.
15097         (build_object_call): Delete unused var P.
15098         (build_new_op): Likewise.
15099         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
15100         var definitions, which are never used.
15101         (shadow_tag): Delete unused var FN.
15102         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
15103         * init.c (build_new): Delete unused var ALLOC_TEMP.
15104         * method.c (hack_identifier): Delete unused var CONTEXT.
15105         (do_build_copy_constructor): Delete unused var NAME.
15106         (synthesize_method): Delete unused var BASE.
15107         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
15108         * rtti.c (build_headof): Delete unused var VPTR.
15109         (get_typeid): Delete unused var T.
15110         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
15111         and ORIG_OP2.
15112         (build_ptrmemfunc): Delete unused vars U and NINDEX.
15113         * typeck2.c (build_functional_cast): Delete unused var BINFO.
15115 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
15117         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
15118         things in a type being defined.
15119         * decl.c (finish_enum): Reverse the values so that they are in
15120         the correct order.
15122         * pt.c (instantiate_class_template): Don't initialize
15123         BINFO_BASETYPES until the vector is filled out.
15124         (unify): Don't abort on conflicting bindings, just fail.
15125         (instantiate_decl): Do push_tinst_level before any tsubsting.
15127         * method.c (build_overload_value): Handle getting a
15128         TEMPLATE_CONST_PARM for a pointer.
15130 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
15132         * init.c (expand_member_init): Don't give 'not a base' error for
15133         templates.
15135         * pt.c (instantiate_decl): Call import_export_decl later.
15137         * pt.c (instantiate_class_template): Return a value.
15139         * parse.y (extension): New rule for __extension__.
15140         (extdef, unary_expr, decl, component_decl): Use it.
15142 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
15144         * class.c (base_binfo): Remove unused base_has_virtual member.
15145         (finish_base_struct): Likewise.
15146         (finish_struct_1): Likewise.
15148 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
15150         * search.c (expand_upcast_fixups): Fix bogus code generation
15151         problem where the generated code uses the wrong index into the
15152         runtime built vtable on the stack.  Old code could clobber random
15153         stack values.
15155 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
15157         * init.c (perform_member_init): Make sure the partial EH cleanups
15158         live on the function_obstack.
15160 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
15162         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
15163         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
15165 Tue Dec 24 10:24:03 1996  Jeffrey A Law  <law@cygnus.com>
15167         * decl.c (grokvardecl): Avoid ANSI style initialization.
15169 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
15171         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
15173 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
15175         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
15177 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15179         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
15180         arguments we compare against.  Start the count of I at 1, not 0,
15181         since argv[0] is still the command.
15183 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
15185         * lang-specs.h: Accept .cp as an C++ extension.
15187 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15189         * cp-tree.h (ptr_reasonably_similar): Add decl.
15191 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15193         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
15194         pointer.  New local SPECBITS with the parm's value.
15195         (grokdeclarator): Pass &specbits down.
15197         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
15198         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
15200         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
15201         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
15203         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
15204         not an error_mark_node.
15206 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
15208         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
15209         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
15211 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
15213         * decl.c (grokdeclarator): When giving an anonymous struct a name,
15214         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
15215         not affected).
15217         * typeck2.c (build_m_component_ref): If component is a pointer
15218         to data member, resolve the OFFSET_REF now.
15220         * call.c (convert_like): Don't go into infinite recursion.
15222         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
15224         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
15225         * tree.c (layout_basetypes): And on the vbase ptr.
15227 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15229         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
15230         CHAR_TYPE_SIZE so bool is always the same size as another type.
15232         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
15234 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
15236         * decl2.c (grok_x_components): Remove synthesized methods from
15237         TYPE_METHODS of an anonymous union, complain about member
15238         functions.
15239         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
15240         anonymous unions.
15241         (finish_function): Just clear the DECL_RTL of our arguments.
15243 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15245         * decl2.c (finish_file): Emit DWARF debugging info for static data
15246         members.
15248         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
15250 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
15252         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
15253         IDENTIFIER_NODE.
15255 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
15257         * Make-lang.in (g++-cross$(exeext)): Fix typo.
15259 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15261         Make the g++ driver now be a standalone program, rather than one
15262         that tries to run the gcc driver after munging up the options.
15263         * Make-lang.in (g++.c, g++spec.o): New rules.
15264         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
15265         added.
15266         (g++$(exeext)): New rule, based on xgcc rule.
15267         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
15268         * g++spec.c: New file.
15269         * g++.c: Removed file.
15271 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
15273         * cvt.c (build_up_reference): Arrange for any temporary values
15274         that have been keep in registers until now to be put into memory.
15276 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15278         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
15279         that make -j3 bootstrap works better.
15281 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
15283         * decl.c (pushtag): Do pushdecl for anon tags.
15285 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
15287         * typeck.c (c_expand_return): Fix logic.
15288         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
15290 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
15292         * g++.c (main): Make sure arglist has a final NULL entry.  Add
15293         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
15294         stdin/stdout of the invoked program are redirected to
15295         nowheresville.
15297 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
15299         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
15301 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
15303         * init.c (resolve_offset_ref): Handle obj.vfn better.
15304         * typeck.c (build_component_ref): Set TREE_TYPE on result from
15305         build_vfn_ref.
15307 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
15309         * typeck.c (convert_for_assignment): Also handle anachronistic
15310         implicit conversions from (::*)() to cv void*.
15311         * cvt.c (cp_convert_to_pointer): Likewise.
15313 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
15315         * lex.c (handle_cp_pragma): Fix bogus warning.
15317 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
15319         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
15320         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
15322 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15324         * class.c (finish_struct_1): Support DWARF2_DEBUG.
15325         * search.c (dfs_debug_mark): Likewise.
15326         * decl2.c (finish_vtable_vardecl): Likewise.
15327         * decl.c (pushtag, finish_enum): Likewise.
15328         * lex.c (check_newline): Use debug_* instead of calling *out
15329         functions directly.
15331 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15333         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
15334         on some picky hosts.
15336 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15338         * class.c (finish_struct_1): A class has a non-trivial copy
15339         constructor if it has virtual functions.
15341         * cvt.c (cp_convert): Always call a constructor.
15343         * call.c (reference_binding): Still tack on a REF_BIND
15344         for bad conversions.
15345         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
15347         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
15348         (c_expand_return): Likewise.
15349         * typeck2.c (digest_init): Likewise for { }.
15350         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
15351         * cvt.c (cp_convert): Handle failure better.
15353 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15355         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
15356         of GCC be path-relative.
15358 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
15360         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
15361         it does need choose-temp.o and pexecute.o.
15363 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15365         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
15366         that we still use it.
15367         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
15369 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
15371         * init.c (expand_default_init): Avoid calling constructors to
15372         initialize reference temps.
15374         * cvt.c (convert_to_reference): Fix.
15376 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15378         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
15379         (convert_to_reference): Likewise.
15380         * typeck.c (convert_for_initialization): Likewise.
15381         * init.c (expand_default_init): Likewise.
15382         (expand_aggr_init_1): Likewise.
15383         * cp-tree.h (CONV_NONCONVERTING): Lose.
15384         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
15385         * *.c: Adjust.
15386         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
15388 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
15390         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
15392 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15394         * init.c (expand_aggr_init_1): Don't crash on non-constructor
15395         TARGET_EXPR.
15397 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15399         * g++.c: Include gansidecl.h.
15400         (VPROTO, PVPROTO, VA_START): Delete.
15401         (choose_temp_base_try, choose_temp_base, perror_exec,
15402         run_dos) [__MSDOS__]: Delete fns.
15403         (pfatal_with_name): Delete fn.
15404         (temp_filename): Declare like in gcc.c.
15405         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
15406         (error_count, signal_count): Define.
15407         (error): Delete both definitions.
15408         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
15409         (pfatal_pexecute): Add fn from gcc.c.
15410         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
15411         code to use the pexecute stuff also used by gcc.c.
15412         (MIN_FATAL_STATUS): Define.
15413         * Make-lang.in (g++): Add dependency on and linking with
15414         choose-temp.o and pexecute.o.
15416         * cp-tree.h: Include gansidecl.h.
15417         (STDIO_PROTO): Delete #undef/#define.
15418         * cvt.c (NULL): Delete #undef/#define.
15419         * expr.c (NULL): Likewise.
15420         * init.c (NULL): Likewise.
15421         * rtti.c (NULL): Likewise.
15422         * xref.c (NULL): Likewise.
15424         * cp-tree.h (build_user_type_conversion): Add prototype.
15425         * call.c (build_user_type_conversion): Delete prototype.  Correct
15426         decl of FLAGS arg to be an int.
15427         * cvt.c (build_user_type_conversion): Likewise.
15429 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
15431         * cp-tree.def: Add TRY_BLOCK and HANDLER.
15432         * except.c (expand_start_catch_block): Support templates.
15433         * parse.y (try_block, handler_seq): Likewise.
15434         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
15436 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
15438         * pt.c (current_template_args): New fn.
15439         (push_template_decl): Use it.
15440         * decl.c (grokdeclarator): Use it.
15442         * decl2.c (build_expr_from_tree): Dereference ref vars.
15444         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
15445         the decl-specifier-seq.
15447         * decl.c (grok_op_properties): Don't force the type of a conversion
15448         op to be complete.  Don't warn about converting to the same type
15449         for template instantiations.
15451         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
15452         methods.
15454 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
15456         * typeck.c (get_delta_difference): Remove previous bogusness.
15457         Don't give errors if force is set.
15459 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
15461         * decl2.c (finish_file): Don't emit debug info.
15462         * decl.c (pushdecl): Lose obsolete code.
15463         (grokdeclarator): Still do the long long thing after complaining.
15464         * search.c (note_debug_info_needed): Don't do anything if we're in a
15465         template.
15466         * method.c (synthesize_method): For non-local classes,
15467         push_to_top_level first.
15469 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
15471         * typeck.c (get_delta_difference): Add no_error parameter.
15472         (build_ptrmemfunc): Call get_delta_difference with no_error set;
15473         we don't want error messages when converting unrelated
15474         pointer-to-member functions.
15476 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
15478         * error.c (dump_expr): Improve the wording on error messages that
15479         involve pointer to member functions.
15481 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
15483         * cvt.c (cp_convert_to_pointer): Move code for conversions from
15484         (::*)() to void* or (*)() up a bit, so that we can convert from
15485         METHOD_TYPEs as well.
15487 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15489         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
15490         There are no 'member' types.
15491         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
15492         (build_x_typeid): Handle errors.
15494 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
15496         * typeck.c (convert_for_assignment): Handle anachronistic implicit
15497         conversions from (::*)() to void* or (*)().
15498         * cvt.c (cp_convert_to_pointer): Likewise.
15499         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
15500         conversions from here.
15501         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
15502         * lang-options.h: Likewise.
15503         * decl2.c (warn_pmf2ptr): Define.
15504         * cp-tree.h: Declare it.
15505         * typeck2.c (digest_init): Allow pmfs down into
15506         convert_for_initialization.
15508 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
15510         * typeck.c (c_expand_return): Fix for returning overloaded fn.
15512 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
15514         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
15515         * decl.c (grok_reference_init): Pass DIRECT_BIND.
15516         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
15517         DIRECT_BIND.
15518         * call.c (convert_like): Don't pass INDIRECT_BIND.
15519         * typeck.c (convert_arguments): Likewise.
15520         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
15522 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
15524         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
15525         similar code in build_up_ref.
15526         * cvt.c (build_up_reference): Drastically simplify.
15528 Mon Oct 28 12:45:05 1996  Jeffrey A Law  <law@cygnus.com>
15530         * typeck.c (signed_or_unsigned_type): If the given type already
15531         as the correct signedness, then just return it.
15533         * typeck.c ({un,}signed_type): If can't do anything, call
15534         signed_or_unsigned_type.
15536 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
15538         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
15539         current_class_type is NULL.
15541 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
15543         * class.c (finish_struct_1): Avoid empty structs by adding a field
15544         so layout_type gets the mode right.
15546         * typeck.c (c_expand_return): Drastically simplify.
15548 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
15550         * typeck.c (decay_conversion): Handle overloaded methods.
15552 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
15554         * call.c (build_over_call): A TARGET_EXPR has side-effects.
15556 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
15558         * cvt.c (convert_to_pointer_force): Add code to support pointer to
15559         member function to pointer to function conversions.
15560         * init.c (resolve_offset_ref): Add code to allow faked up objects,
15561         ignoring them if they are not used, and giving an error, if they
15562         are needed.
15563         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
15564         code, and so that we can give an error, if we needed an object,
15565         and one was not provided.
15566         (build_c_cast): Don't call default_conversion when we want to
15567         convert to pointer to function from a METHOD_TYPE.
15569 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
15571         * Make-lang.in (cplib2.ready): Fix logic.
15573         * decl.c (shadow_tag): Only complain about non-artificial function
15574         members.
15576         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
15578 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
15580         * expr.c (cplus_expand_expr): Pre-tweak call_target like
15581         expand_inline_function would.
15583         * pt.c (mark_decl_instantiated): If extern_p, call
15584         mark_inline_for_output.
15586 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
15588         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
15589         pmd conversions.
15591         * typeck.c (get_delta_difference): Fix wording, as we can be used
15592         for pointer to data members.
15594 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
15596         * pt.c (tsubst): If the function decl isn't a member of this
15597         template, return a copy of the decl (including copying the
15598         lang-specific part) so we don't hose ourselves later.
15600 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15602         * class.c (finish_struct): Remove DWARF-specific tag handling.
15603         * decl.c (pushtag): Likewise.
15604         (finish_function): Always clear DECL_ARGUMENTS on function decls with
15605         no saved RTX.
15606         * decl2.c (finish_file): Emit DWARF debugging info for static data
15607         members.
15609 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
15611         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
15612         isn't the same as the new one before we whack it.
15614 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
15616         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
15617         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
15618         warn_traditional and warn_strict_prototypes; remove ancient
15619         'overload' code; remove references to flag_traditional.
15621 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
15623         * input.c (sub_getch): Handle 8-bit characters in string literals.
15625 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
15627         * tree.c (mapcar): Handle CONSTRUCTORs.
15628         (copy_to_permanent): Handle expression_obstack properly.
15630         * Make-lang.in (cplib2.txt): Also depend on the headers.
15632         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
15633         INT_TYPE_SIZE.
15634         (expand_class_desc): Use USItype for offset field.
15635         * tinfo.h (struct __class_type_info): Likewise.
15637         * method.c (build_overload_int): TYPE_PRECISION should be applied
15638         to types.
15640 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
15642         * call.c (build_new_op): A COND_EXPR involving void must be a
15643         builtin.
15645 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15647         * typeck.c (build_x_component_ref): New fn.
15648         (build_object_ref): Use it.
15649         * parse.y (primary): Use it.
15650         * decl2.c (build_expr_from_tree): Use it.
15651         * cp-tree.h: Declare it.
15653         * decl.c (start_decl): Variable-sized arrays cannot be initialized.
15654         * error.c (dump_type_suffix): Handle variable arrays.
15656 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15658         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
15660 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
15662         * decl.c (lookup_name_real): Don't try to look up anything in a
15663         TYPENAME_TYPE.
15665         * tinfo2.cc (__throw_type_match_rtti): Oops.
15667 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15669         * Make-lang.in (exception.o): Use -fno-PIC for now.
15671 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
15673         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
15674         calling them.
15675         (get_tinfo_fn_dynamic): Extracted from build_typeid.
15676         * tinfo2.cc (__dynamic_cast): Adjust.
15678         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
15679         (build_x_typeid): Likewise.
15681         * parse.y: Call build_x_typeid instead of build_typeid.
15682         * cp-tree.def: Add TYPEID_EXPR.
15683         * pt.c (tsubst_copy): Handle typeid.
15684         * decl2.c (build_expr_from_tree): Likewise.
15685         * rtti.c (build_x_typeid): Throw bad_typeid from here.
15686         (build_typeid): Not here.
15687         * cp-tree.h: Declare build_x_typeid.
15689 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
15691         * call.c (convert_like): Pull out constant values.
15693         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
15695 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
15697         * decl.c (init_decl_processing): Create short int types before
15698         creating size_t in case a machine description needs to use
15699         unsigned short for size_t.
15701 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
15703         * Make-lang.in (exception.o): Turn off pic.
15705         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
15706         type, multi-level ptr conversions.
15708         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
15709         (throw_bad_cast): Use it.
15710         (throw_bad_typeid): New fn.
15711         (build_typeid): Throw bad_typeid as needed.
15712         Use build_call.
15713         (synthesize_tinfo_fn): Handle functions and arrays before checking
15714         for cv-quals.
15716         * Remove .h from standard C++ headers, add new.h, move into inc
15717         subdirectory.
15719         * exception*: Remove pointer from object, constructors.  Add
15720         default exception::what that uses type_info::name.  Add
15721         __throw_bad_typeid.
15723         * init.c (build_new): Don't add a cookie to new (void *) T[2].
15725 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
15727         * Make-lang.in: Building C++ code depends on cc1plus.
15729 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15731         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
15732         a HOST_WIDE_INT, not a tree.
15734 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
15736         * exception.cc: Don't include <stdlib.h>.
15738         * Make-lang.in (c++.clean): Remove cplib2.*.
15740 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
15742         * parse.y (component_decl_1, component_costructor_declarator case):
15743         Pass attributes/prefix_attributes in tree list.
15745 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
15747         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
15749 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
15751         * lex.c (do_identifier): Don't do deferred lookup in a template
15752         header.
15754         * typeck2.c (store_init_value): Oops.
15756         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
15757         New files for C++ lang-support library.
15758         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
15759         (CXX_LIB2FUNCS): Define.
15760         And rules for building the C++ lang-support code.
15761         * config-lang.in (headers): Define.
15762         (lib2funcs): Define.
15764 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15766         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
15767         digest_init.
15768         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
15769         * typeck2.c (store_init_value): Check for initializing pmf with { }
15770         here.
15771         (process_init_constructor): Not here.
15773 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15775         * pt.c (begin_template_parm_list): Increment
15776         processing_template_decl here.
15777         (end_template_parm_list): Not here.
15778         (process_template_parm): No need to add 1 to it now.
15779         * *.c: Use processing_template_decl instead of current_template_parms
15780         to check for being in a template.
15782         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
15783         (tsubst_copy): Handle CONSTRUCTOR.
15784         (instantiate_decl): Set up context properly for variables.
15785         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
15786         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
15788 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15790         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
15792 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
15794         * method.c (make_thunk): Call comdat_linkage before setting the
15795         TREE_CODE.
15797         * decl2.c (comdat_linkage): Use make_decl_one_only.
15798         (import_export_decl): Likewise.
15799         * decl.c (init_decl_processing): Check supports_one_only instead of
15800         SUPPORTS_WEAK.
15802 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
15804         * decl2.c (grokfield): Tighten checking for access decls.
15806         * decl.c (make_typename_type): Resolve references to
15807         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
15808         (lookup_name_real): Types that depend on a template parameter get
15809         an implicit 'typename' unless they're in the current scope.
15810         (start_decl_1): We don't care about incomplete types that depend
15811         on a template parm.
15812         (grokdeclarator): Resolve 'typename's in the type specifier that
15813         refer to members of the current scope.
15815         * call.c (build_over_call): Remove 'inline called before
15816         definition' diagnostic.
15817         (build_method_call): Likewise.
15818         * decl.c (duplicate_decls): Downgrade 'used before declared
15819         inline' to a warning, only with -Winline.
15821 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
15823         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
15825 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
15827         * call.c (build_method_call): When calling a signature
15828         default implementation, as in other cases, let instance_ptr simply
15829         be instance.
15831 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
15833         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
15835 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
15837         * except.c (expand_start_catch_block): Add a pushlevel so that -g
15838         works on hppa and SPARC.
15840 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15842         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
15844 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
15846         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
15847         before testing whether it's a signature.
15849 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
15851         * call.c (build_new_method_call): Don't complain about signature
15852         pointers and references not being an aggr type.
15853         (build_this): If a signature pointer or reference was passed in,
15854         just return it.
15855         (build_new_method_call): If instance is a signature pointer, set
15856         basetype to the signature type of instance.
15857         * sig.c (build_signature_method_call): Deleted basetype and
15858         instance parameters, they can be found as the DECL_CONTEXT of
15859         function and as the first argument passed in.
15860         * cp-tree.h: Changed declaration of build_signature_method_call.
15861         * call.c (build_method_call): Deleted first two arguments in call
15862         of build_signature_method_call.
15863         (build_over_call): Added call to build_signature_method_call.
15865 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
15867         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
15868         target_expr.
15870 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
15872         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
15874 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
15876         * except.c (expand_start_try_stmts): Move to except.c in the backend.
15877         (expand_end_try_stmts): Remove.
15879         * init.c (perform_member_init): Use add_partial_entry () instead
15880         of directly manipulating lists.
15881         (emit_base_init): Likewise.
15883 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
15885         * except.c (expand_exception_blocks): Always make sure USE and
15886         CLOBBER insns that came at the end still do, the backend relies
15887         upon this.
15889 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
15891         * call.c (build_over_call): We can only use a TARGET_EXPR of the
15892         right type.
15894 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
15896         * cvt.c (convert_to_reference): Revert last change, don't complain
15897         about temp without target decl.
15899 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
15901         * decl.c (grokdeclarator): Don't core dump when void() is given.
15903 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
15905         * decl.c (copy_args_p): Don't crash.
15907 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
15909         * pt.c (tsubst): And support template args inside the exception
15910         specification.
15912         * pt.c (tsubst): Add support for exception specifications in
15913         template functions.
15915 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
15917         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
15918         fields now.
15919         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
15920         (start_function): Likewise.
15921         (start_method): Likewise.
15922         (grokfield): Likewise.
15923         (make_call_declarator): Add throw spec parameter.
15924         (set_quals_and_spec): Add routine.
15925         * lex.c (set_quals_and_spec): Likewise.
15926         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
15927         * decl.c (shadow_tag): Eliminate the throw spec parameter to
15928         grokdeclarator.
15929         (groktypename): Likewise.
15930         (start_decl): Eliminate the throw spec parameter.  Eliminate the
15931         throw spec parameter to grokdeclarator.  Eliminate the throw spec
15932         field in DECL_STMT.
15933         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
15934         (grokfndecl): Remove useless set of raises.
15935         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
15936         the throw spec parameter to start_decl.  Pull the throw spec out
15937         of the call declarator.
15938         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
15939         (start_function): Eliminate the throw spec parameter.  Eliminate
15940         the throw spec parameter to grokdeclarator.
15941         (start_method): Likewise.
15942         * decl2.c (grokfield): Likewise.
15943         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
15944         (grokoptypename): Likewise.
15945         (finish_file): Eliminate the throw spec parameter to
15946         start_function.  Add throw spec to make_call_declarator.
15947         * except.c (init_exception_processing): Add throw spec to
15948         make_call_declarator.  Eliminate the throw spec parameter to
15949         start_decl.
15950         (expand_start_catch_block): Eliminate the throw spec parameter to
15951         grokdeclarator.
15952         (expand_builtin_throw): Add throw spec to make_call_declarator.
15953         Eliminate the throw spec parameter to start_function.
15954         (start_anon_func): Likewise.
15955         * lex.c (make_call_declarator): Add throw spec parameter.
15956         (set_quals_and_spec): New routine.
15957         (cons_up_default_function): Add throw spec to make_call_declarator.
15958         Eliminate the throw spec parameter to grokfield.
15959         * method.c (synthesize_method): Eliminate the throw spec parameter
15960         to start_function.
15961         * pt.c (process_template_parm): Eliminate the throw spec parameter
15962         to grokdeclarator.
15963         (tsubst): Add throw spec to make_call_declarator.
15964         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
15965         (do_function_instantiation): Eliminate the throw spec parameter to
15966         grokdeclarator.  Eliminate the throw spec parameter to
15967         start_function.
15968         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
15969         to start_function.
15970         * parse.y (datadef): Remove non-winning optimization.
15971         (decl): Likewise.
15972         (fndef): Remove ambiguous error productions uncovered by grammar
15973         fixing.
15974         (constructor_declarator): Add exception_specification_opt here.
15975         (component_constructor_declarator): Likewise.
15976         (direct_after_type_declarator): Likewise.
15977         (complex_direct_notype_declarator): Likewise.
15978         (direct_abstract_declarator): Likewise.
15979         (fn.def1): Remove exception_specification_opt.
15980         (fn.def2): Likewise.
15981         (condition): Likewise.
15982         (initdcl0): Likewise.
15983         (initdcl): Likewise.
15984         (notype_initdcl0): Likewise.
15985         (nomods_initdcl0): Likewise.
15986         (component_decl_1): Likewise.
15987         (component_declarator): Likewise.
15988         (after_type_component_declarator0): Likewise.
15989         (after_type_component_declarator): Likewise.
15990         (notype_component_declarator): Likewise.
15992 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
15994         * call.c (build_over_call): Also use an INIT_EXPR when
15995         initializing anything from an rvalue.
15997         * call.c (build_over_call): Call stabilize_reference when building
15998         an INIT_EXPR instead of calling the copy ctor.
16000         * call.c (joust): Extend the previous change to all comparisons.
16002         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
16003         NO_LINKAGE_HEURISTICS.
16005         * decl2.c (finish_file): Emit any statics that weren't already.
16007         * typeck.c (build_static_cast): Implement.
16008         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
16009         * decl.c (grokparms): Use can_convert_arg instead of
16010         implicit_conversion directly.
16011         (copy_args_p): New fn.
16012         * cvt.c (convert_to_reference): Don't complain about temp with
16013         static_cast.
16014         (build_up_reference): Handle TARGET_EXPRs.
16015         * call.c (build_over_call): Elide unnecessary temps.
16016         (can_convert*): Use new overloading code.
16018 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
16020         * call.c: Move TYPE_PTR*_MACROS ...
16021         * cp-tree.h: To here.
16022         * typeck.c (build_reinterpret_cast): Implement.
16024         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
16025         ptr_complete_ob.
16026         (joust): If we're comparing a function to a builtin and the worst
16027         conversion for the builtin is worse than the worst conversion for the
16028         function, take the function.
16030         * typeck.c (build_const_cast): Implement.
16031         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
16032         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
16034 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
16036         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
16037         too early.  Make sure we explode if exprtype turns out to be a
16038         NULL_TREE when it shouldn't be.
16040 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
16042         * cp-tree.h: New routine make_call_declarator.
16043         * lex.c (make_call_declarator): Define it.
16044         * except.c (init_exception_processing): Use it.
16045         (expand_builtin_throw): Likewise.
16046         (start_anon_func): Likewise.
16047         * decl2.c (finish_file): Likewise.
16048         * lex.c (cons_up_default_function): Likewise.
16049         * parse.y: Likewise.
16050         * pt.c (tsubst): Likewise.
16052 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
16054         * decl2.c (groktypefield): Remove unused code.
16056 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
16058         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
16059         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
16060         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
16061         nonempty_cv_qualifiers.
16062         * hash.h: Rebuild.
16064         * lex.c (make_pointer_declarator): Change type_quals into
16065         cv_qualifiers.
16066         (make_reference_declarator): Likewise.
16068 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
16070         * decl.c (start_function): Only check interface_* for templates
16071         with flag_alt_external_templates.
16073         * call.c (build_new_op): Check for comparison of different enum types.
16074         (build_over_call): Fix arg # output.
16076         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
16078 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
16080         * call.c (build_new_op): Check for erroneous args.
16082         * call.c (build_new_method_call): Add missing args to cp_error.
16084         * tree.c (error_type): Don't print reference-to-array.
16086         * typeck.c (convert_for_assignment): Don't say contravariance for
16087         removing const.
16089 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
16091         * call.c (build_over_call): Diagnose bad convs for `this'.
16093         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
16094         on _ctor_arg.
16096         * call.c (convert_like): Handle bad convs.
16097         (build_over_call): Handle bad convs better.
16099         * decl2.c: -fansi-overloading is now the default.
16101         * call.c (build_new_method_call): Check for erroneous args.
16103         * pt.c (instantiate_class_template): Propagate
16104         TYPE_USES_MULTIPLE_INHERITANCE.
16106 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
16108         * call.c (enforce_access): Add static to routine.
16110 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
16112         * call.c (build_user_type_conversion_1): Fix bad handling.
16113         (compare_ics): Likewise.
16115 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
16117         * call.c (standard_conversion): Oops.
16119 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
16121         * g++.c: Update test for win32 (&& ! cygwin32).
16123 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
16125         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
16126         (ptr_reasonably_similar): New fn.
16127         * call.c (BAD_RANK): New rank.
16128         (ICS_BAD_FLAG): New macro.
16129         (standard_conversion): Handle almost-right pointer conversions.
16130         (reference_binding): Handle bad rvalue bindings.
16131         (add_*_candidate): Stuff.
16132         (build_over_call): Pass bad conversions to convert_for_initialization.
16133         (compare_ics): Handle bad convs.
16134         (joust): Likewise.
16136 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
16138         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
16139         integer_type_node when computing pointer offsets.
16141 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
16143         * tree.c (lvalue_type): New fn.
16144         (error_type): New fn.
16145         * call.c (op_error): Use error_type.
16146         (add_conv_candidate): Use lvalue_type.
16147         (add_builtin_candidates): Likewise.
16148         * error.c (args_as_string): Use error_type.
16150 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
16152         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
16153         (tsubst): Not here.
16155         * decl.c (init_decl_processing): With -ansi, __null's type is the
16156         signed integral type with the same number of bits as a pointer.
16157         Introduce a new variable null_node for it.
16158         * cp-tree.h: Adjust.
16159         * call.c (null_ptr_cst_p): Adjust.
16161 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
16163         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
16164         optimize.
16166 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
16168         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
16169         fns of classes without virtual functions.
16171         * call.c (add_function_candidate): Handle `this' specially.
16172         (compare_ics): Likewise.
16174 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
16176         * typeck.c (build_conditional_expr): Fix handling of __null.
16178         * decl2.c (comdat_linkage): New fn.
16179         (import_export_vtable): Use it.
16180         (import_export_decl): Use it.
16181         * method.c (make_thunk): Use it.
16183 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
16185         * pt.c (end_template_decl): If we don't actually have parms, return.
16186         * parse.y (template_header): Accept 'template <>'.
16188         * errfn.c: Allow 5 args.
16190 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
16192         * tree.c (make_temp_vec): New fn.
16193         * pt.c (push_template_decl): Handle partial specs.
16194         (instantiate_class_template): Likewise.
16195         (more_specialized): Use get_bindings.
16196         (more_specialized_class): New fn.
16197         (get_class_bindings): New fn.
16198         (most_specialized_class): New fn.
16199         (do_function_instantiation): List candidates for ambiguous case.
16200         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
16201         (shadow_tag): Call push_template_decl for partial specializations.
16202         * parse.y: Likewise.
16203         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
16204         DECL_TEMPLATE_MEMBERS.
16205         * call.c (print_z_candidates): Reduce duplication.
16207 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
16209         * decl2.c (lang_decode_option): Allow -fansi-overloading.
16211 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
16213         * pt.c (get_bindings): New fn.
16214         (most_specialized): Likewise.
16215         (do_function_instantiation): Use them.
16216         (add_maybe_template): New fn.
16217         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
16218         * call.c (build_new_op): Handle guiding decls.
16219         (build_new_function_call): Likewise.
16220         * decl2.c (finish_file): Likewise.
16222         * decl2.c (mark_used): Do synthesis here.
16223         * call.c (build_method_call): Not here.
16224         (build_over_call): Or here.
16225         * typeck.c (build_function_call_real): Or here.
16226         * tree.c (bot_manip): Call mark_used on functions used in default
16227         args.
16229 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
16231         * decl2.c (import_export_vtable): Delete code that disabled vtable
16232         heuristic on systems with ASM_OUTPUT_EXTERNAL.
16234 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
16236         * typeck.c (build_x_function_call): Handle static call context
16237         better.
16239         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
16240         the function, not its outer block.
16242         * call.c (build_field_call): Pass fields on to build_opfncall
16243         regardless of TYPE_OVERLOADS_CALL_EXPR.
16244         (build_method_call): Pass on to build_new_method_call sooner.
16246         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
16247         gives us.
16248         * class.c (instantiate_type): Don't put a POINTER_TYPE to
16249         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
16250         modifying it.
16252 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
16254         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
16255         (add_builtin_candidate): Don't take enums for ++.
16256         (build_new_method_call): Handle non-aggregates and field calls.
16257         Move new overloading code from...
16258         * cvt.c: Here.
16260         * decl.c (grokparms): Don't check default args in templates.
16262 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
16264         * cvt.c (build_new_op): Fix args to build_unary_op.
16265         (add_builtin_candidates): Don't call type_promotes_to on float.
16267         * decl.c (grokparms): Check the type of the default arg.
16269         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
16270         returning NULL_TREE.
16272         * typeck.c (build_x_binary_op): Avoid doing extra work.
16273         (build_x_unary_op): Likewise.
16274         (build_x_conditional_expr): Likewise.
16275         * cvt.c (build_over_call): Return.
16276         (add_builtin_candidate): Fix MEMBER_REF.
16277         (build_new_op): Likewise.
16279 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
16281         * method.c (build_overload_name): Put bug fix into code but leave
16282         disabled for now so we can be bug compatible with older releases
16283         that do repeats incorrectly.  In the future, we can enable it.
16285 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
16287         * cvt.c (convert_like): Don't call build_cplus_new twice.
16289         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
16290         Control new overloading code with -fansi-overloading.
16292 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
16294         * cvt.c (build_over_call): Call build_cplus_new.
16295         * call.c (build_method_call): Likewise.
16296         * typeck.c (build_function_call_real): Likewise.
16297         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
16298         the COND_EXPR in a TARGET_EXPR so they use the same slot.
16300         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
16301         recursive calls.
16302         * typeck.c (complete_type): Propagate
16303         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
16305 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
16307         * cvt.c (joust): More ?: kludging.  Sigh.
16308         (build_over_call): Don't try to synthesize global fns.
16310         * search.c (lookup_conversions): Use binfo marking.
16312 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
16314         * search.c (build_mi_matrix): Use the correct value of cid
16315         when determining the new mi_size.
16317 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
16319         * cvt.c (add_builtin_candidates): Do consider type conversion ops
16320         for the first parms of += et al.
16321         (strip_top_quals): New fn.
16322         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
16323         (implicit_conversion): Likewise.
16324         (add_builtin_candidates): Be careful about arrays.
16325         (build_new_method_call): Handle vtable optimization.
16327 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
16329         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
16330         * cvt.c (reference_binding): Use it.
16331         (implicit_conversion): Use it.
16332         (add_builtin_candidate, COND_EXPR): Use it.
16334         * cvt.c (build_new_function_call): Check for error args.
16336         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
16338         * gxx.gperf: Add __null.
16339         * hash.h: Regenerate.
16340         * lex.h: Add RID_NULL.
16341         * lex.c (init_lex): Create null_pointer_node here, stick it in
16342         RID_NULL.
16343         * decl.c (init_decl_processing): Still set its type here.
16344         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
16345         (convert_to_pointer_force): Likewise.
16346         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
16347         if (! pedantic).
16348         * call.c (convert_harshness): Use null_ptr_cst_p.
16349         * typeck.c (convert_for_assignment): Likewise.  Don't produce
16350         null_pointer_node.
16352         * error.c (args_as_string): Handle lists of actual args, too.
16353         * cvt.c (null_ptr_cst): Support (void*)0 for now.
16354         (build_user_type_conversion_1): Improve diagnostics.
16355         (build_new_function_call): Likewise.
16356         (build_object_call): Likewise.
16357         (build_new_method_call): Likewise.  Move call before def diagnostic...
16358         (build_over_call): Here.
16360         * cvt.c (build_new_method_call): Don't complain about no match if
16361         LOOKUP_SPECULATIVELY.
16362         (build_over_call): Fix 'this' for virtual fn.
16363         (build_new_method_call): Add diagnostic.
16365 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16367         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
16368         constructors to be passed in.
16369         (build_over_call): Likewise.
16370         (build_user_type_conversion_1): Pass them in.
16371         (convert_like): Likewise.
16372         (build_object_call): Handle overloaded conversions.
16373         (build_over_call): Pass the right args to build_vfn_ref.
16374         (standard_conversion): Fix pmf convs.
16375         (joust): Handle comparing statics and non-statics.
16376         (build_new_method_call): New fn.
16377         * call.c (build_method_call): Call it if NEW_OVER.
16379 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
16381         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
16382         %D instead.
16384 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
16386         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
16387         instead of just maybe_build_cleanup so that we deallocate the
16388         thrown object.
16390 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16392         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
16393         * cp-tree.h (finish_prevtable_vardecl): Add decl.
16395 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
16397         * pt.c (instantiate_class_template): Call complete_type.  Also, if
16398         we're at the end of the file and we just instantiated a template
16399         class with a vtable, call finish_prevtable_vardecl.
16401         * error.c (dump_decl): Don't explode (or explode more gracefully
16402         as appropriate) if the object being dumped has a null type.
16403         (dump_expr): Likewise.
16405         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
16406         by counting the number of nodes that we'll need before allocating
16407         the array.
16408         (lookup_fnfields): Fix comment.
16409         (breadth_first_search): Fix comment.
16411 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
16413         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
16414         TYPE_ALIGN.
16415         * class.c (finish_struct): Call cplus_decl_attributes here.
16416         (finish_struct_1): Not here.
16417         * cp-tree.h: Adjust.
16419         * pt.c (type_unification): New parameter STRICT.
16420         (unify): If STRICT, don't allow cv addition or base deduction.
16421         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
16423 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
16425         * search.c (get_template_base{_recursive}): New fns.
16426         * pt.c (more_specialized): New fn.
16427         (do_function_instantiation): Use it.
16428         (unify): Handle base deduction.
16429         * cvt.c (joust): Use more_specialized.
16430         Don't arbitrarily choose between non-builtin candidates.
16431         (build_over_call): Call require_complete_type.
16433         * decl.c (start_function): Statics are static even in a #pragma
16434         interface file.
16436         * decl2.c (import_export_vtable): Disable vtable heuristic on
16437         systems with ASM_OUTPUT_EXTERNAL.
16439         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
16440         (standard_conversion): No std conv to enum type.
16442         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
16443         for ptm's.
16445         * cvt.c (reference_binding): Bind directly to a base subobject of
16446         a class rvalue.
16448         * cvt.c (build_new_op): Enforce access control.
16450 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
16452         * typeck2.c (process_init_constructor): When scanning the
16453         union for a named field, skip things that aren't FIELD_DECLs.
16455         * method.c (synthesize_method): Don't scan fndecl's rtl if
16456         we're at the end of the file; just assume the function can't
16457         be inlined.
16459 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16461         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
16462         it failed.
16464         * cvt.c (build_user_type_conversion_1): Handle overloaded
16465         conversion ops.
16467         * cvt.c (add_builtin_candidates): Don't consider type conversion
16468         operators for the first parameter of operator=.
16470 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
16472         * typeck.c (complete_type): Only call layout_type if we're not
16473         expanding a template.
16475 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
16477         * cvt.c (compare_ics): Oops.
16479         * cvt.c (op_error): Oops.
16481         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
16482         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
16483         (build_conv): Use them.
16484         (implicit_conversion): Use them.
16485         (convert_like): Handle them.
16486         (build_new_op): Handle builtin COND_EXPR again.
16487         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
16488         in lists of types for COND_EXPR.
16489         (add_builtin_candidate): Add enum candidates for COND_EXPR.
16491 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
16493         * typeck.c (build_modify_expr): Always attempt to build a call to
16494         the assignment operator, even if we're using a default one.
16495         (convert_for_initialization): Call complete_type.
16497 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
16499         * cvt.c (reference_binding): A REF_BIND gets the reference type.
16500         (implicit_conversion): Likewise.
16501         (convert_like): Likewise.
16502         (compare_ics): Likewise.
16503         (compare_qual): Likewise.
16504         (print_z_candidates): Handle no candidates.
16505         (build_new_op): Don't handle builtin COND_EXPR for now.
16507 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
16509         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
16511 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
16513         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
16515         * cvt.c (build_builtin_candidate): Oops.
16516         (build_new_op): Oops.
16518         * method.c (build_opfncall): Pass COND_EXPR on.
16519         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
16520         (add_builtin_candidate{,s}): Likewise.
16521         (add_builtin_candidates): Likewise.
16522         (print_z_candidates, op_error, build_new_op): Likewise.
16523         (type_decays_to): New fn.
16524         * lex.c (init_lex): Just say ?: for COND_EXPR.
16526 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
16528         * typeck.c (complete_type): Call layout_type rather than building
16529         a new array type.
16531         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
16532         only use ptrdiff_t.
16534 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
16536         * cvt.c: Always compile the new overloading code (but don't use it).
16537         (implicit_conversion): Add a BASE_CONV when converting to
16538         the same class type.
16539         (convert_like): Handle BASE_CONV.
16541 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16543         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
16544         (add_builtin_candidate): Likewise.
16546         NEW_OVER changes:
16547         * typeck.c (build_x_function_call): Try an operator function
16548         whenever we call an object of class type.
16549         * method.c (build_opfncall): Pass CALL_EXPRs through.
16550         * cvt.c (implicit_conversion): Do const-ref case first.
16551         (add_conv_candidate, build_object_call, op_error): New fns.
16552         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
16553         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
16554         builtin candidates.
16555         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
16556         Fall back on preincrement handling.  Use op_error.
16557         Handle warn_synth.
16558         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with
16559         an error_mark_node.
16560         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
16561         properly.
16563 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
16565         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
16567 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
16569         * typeck.c (build_component_ref_1): Use build_component_ref
16570         instead of open coding it here.
16572 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
16574         * g++.c (main): Don't link with -lg++.
16576         NEW_OVER changes:
16577         * cvt.c (convert_to_reference): Don't use convert_from_reference on
16578         result of build_type_conversion.
16579         (cp_convert): Only call build_method_call for ctors if
16580         build_type_conversion failed.
16581         (ptr_complete_ob): New function.
16582         (TYPE_PTR{,OB,MEM}_P): New macros.
16583         ({add,build}_builtin_candidate{,s}): New functions.
16584         (print_z_candidates): Handle builtins.
16585         (build_user_type_conversion_1): Don't use conversion fns for
16586         converting to a base type.
16587         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
16588         (build_user_type_conversion): Use convert_from_reference.
16589         (build_new_op): New function.
16590         (build_over_call): Fix handling of methods.
16591         (compare_ics): Handle AMBIG_CONV properly.
16592         * typeck2.c: Increment abort count.
16593         * method.c (build_opfncall): Forward most requests to build_new_op.
16594         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
16596 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16598         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
16599         invalid second argument to dump_expr_list.
16601 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
16603         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
16605 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
16607         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
16608         ASSEMBLE_EXTERNAL.
16610 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
16612         * typeck2.c (process_init_constructor): New pedwarn for using { }
16613         to initialize a pointer to member function.
16614         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
16615         we can avoid the new error.
16617 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
16619         * typeck.c (build_ptrmemfunc1): New function to hide details of
16620         pointer to member functions better.
16622 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
16624         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
16625         methods into the actual method, as we know the implied object is
16626         not used.
16628 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16630         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
16631         inside a system header.
16633 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
16635         * call.c (build_method_call): Call complete_type on the
16636         instance type.
16638 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
16640         * typeck.c (build_component_ref): Always build up an OFFSET_REF
16641         for obj_ptr->func so that we can know which object to use in a
16642         method call.
16644 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
16646         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
16647         around things.  Also improve maintainability.
16649 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
16651         * decl.c (grokdeclarator): Check for overflow when evaluating an
16652         array dimension.
16654 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
16656         * cvt.c (cp_convert): Don't check for ambiguity with constructor
16657         if NEW_OVER.
16659         * typeck.c (build_x_function_call): Pass function overload
16660         questions to new overloading code if NEW_OVER.
16661         * init.c (expand_aggr_init_1): Only check for type conversion ops
16662         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
16663         Don't check for ambiguity with constructor if NEW_OVER.
16664         * cvt.c (convert_to_reference): Dereference the result of a type
16665         conversion operator.
16666         (build_conv): Propagate ICS_USER_FLAG.
16667         (implicit_conversion): Call instantiate_type.
16668         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
16669         (add_function_candidate): Fix cv-quals on argtype.
16670         (print_z_candidates): New function.
16671         (build_new_function_call): Call it.
16672         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
16673         consider non-converting constructors.
16674         Call print_z_candidates.
16675         Return an AMBIG_CONV for an ambiguous conversion.
16676         (build_user_type_conversion): Handle AMBIG_CONV.
16677         (convert_like): Fix test for building TARGET_EXPR.
16678         Call instantiate_type.
16679         Handle AMBIG_CONV and LVALUE_CONV.
16680         (build_over_call): Handle 0 args and ellipsis.
16681         * cp-tree.def: Add AMBIG_CONV.
16683 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
16685         * decl.c (lookup_name_real): If we find mem in obj when parsing
16686         `obj->mem', make sure we return the right value.
16688 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
16690         * search.c (get_base_distance): Call complete_type.
16692 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
16694         * decl.c (store_bindings): Make static.
16696 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
16698         * init.c (expand_aggr_init_1): Don't check type conversions if
16699         NEW_OVER.
16701         * cvt.c (z_candidate): Put back template field.
16702         (add_function_candidate): Set it.
16703         (add_template_candidate): Likewise.
16704         (joust): Use it.
16705         (compare_qual): Handle references and pointers to members.
16706         (compare_ics): Handle reference bindings.
16708         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
16710 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
16712         * call.c (compute_conversion_costs): Call complete_type.
16714         * tree.c (vec_binfo_member): Use comptypes instead of comparing
16715         pointers, so we can handle template parameters.
16717 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
16719         * cvt.c (cp_convert_to_pointer): We have to call complete_type
16720         here; let's make it explicit instead of a side effect of an
16721         error check.
16723 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
16725         * cvt.c (z_candidate): Remove template field.
16726         (reference_binding): Handle binding to temporary.
16727         (implicit_conversion): Likewise.
16728         (add_function_candidate): Handle artificial constructor parms.
16729         Handle functions with too few parms.
16730         (add_template_candidate): New function.
16731         (build_user_type_conversion_1): Handle constructors.
16732         (convert_like): Likewise.
16733         (build_over_call): Likewise.
16734         (build_new_function_call): Support templates.
16735         (compare_ics): Fix reference, inheritance handling.
16737 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
16739         * decl.c: Add signed_size_zero_node.
16740         (init_decl_processing): Build it.
16741         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
16742         when we're trying to make a negative delta.
16744 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16746         Stop doing this damn index==strchr variable name confusion.
16747         * class.c (add_virtual_function): Change local var INDEX to be
16748         named IDX.
16749         (add_method): Likewise.
16750         * lex.c (print_parse_statistics): Likewise.
16751         * search.c (make_memoized_table_entry): Likewise.
16752         (lookup_fnfields_here): Likewise.
16753         (lookup_field): Likewise.
16754         (lookup_fnfields): Likewise.
16755         (get_baselinks): Likewise.
16756         * sig.c (build_signature_table_constructor): Likewise.
16757         (build_signature_method_call): Likewise.
16758         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
16759         (get_member_function_from_ptrfunc): Likewise.
16760         (build_ptrmemfunc): Change local var INDEX to be IDX.
16761         (c_expand_start_case): Likewise.
16763 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
16765         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
16766         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
16767         (convert_to_reference): Use build_type_conversion to convert to
16768         the reference type directly.
16769         (standard_conversion): Fix void* case, non-conversions.
16770         (reference_binding): Fix expr == 0 case, non-conversions.
16771         (convert_like): Support REF_BIND.
16772         (compare_qual): Split out from compare_ics.
16773         (compare_ics): Use it, handle icses with only a qual_conv.
16775         * init.c (expand_vec_init): Don't crash if decl is NULL.
16777 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
16779         * mpw-config.in: New file, configury for Mac MPW.
16780         * mpw-make.sed: New file, makefile editing for MPW.
16782 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16784         * pt.c (instantiate_class_template): Call repo_template_used.
16786         * search.c (lookup_conversions): Only lookup conversions in
16787         complete types.
16789 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16791         * cp-tree.def: Renamed from tree.def, to avoid confusion with
16792         gcc's tree.def.
16793         * cp-tree.h, lex.c: Include cp-tree.def.
16794         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
16796 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
16798         * init.c (build_vec_delete_1): Call complete_type.
16800 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
16802         * except.c (start_anon_func): Make sure anonymous functions are
16803         never external.
16805 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
16807         * decl.c (finish_function): If function_depth > 1, set nested.
16809         * decl2.c (grokbitfield): Revert Bob's change.
16810         * class.c (finish_struct_1): Fix handling of named bitfield widths.
16812 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
16814         * pt.c (add_pending_template): Handle types.
16815         (lookup_template_class): With -fexternal-templates, just add the class
16816         to pending_templates instead of instantiating it now.
16817         * decl2.c (finish_file): Handle types in pending_templates.
16819 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
16821         * decl2.c (grokbitfield): Handle constant decls appropriately.
16822         Give an appropriate error message now instead of spewing core
16823         later.
16825 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
16827         * decl2.c: Don't turn on thunks by default for now.
16829 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
16831         * typeck.c (complete_type): Handle error_mark_node.
16832         (common_type, OFFSET_TYPE): Handle template_type_parms.
16834 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
16836         * pt.c (instantiate_decl): If at_eof, call import_export_decl
16837         regardless of DECL_INLINE.
16839         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
16841         * class.c (finish_struct_bits): Copy TYPE_SIZE.
16843         * rtti.c (build_dynamic_cast): Support templates.
16844         * tree.def: Support DYNAMIC_CAST_EXPR.
16845         * pt.c (tsubst_copy): Likewise.
16846         * decl2.c (build_expr_from_tree): Likewise.
16848 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
16850         * typeck.c (build_static_cast): Support templates.
16851         (build_const_cast): Likewise.
16852         * tree.def: Support CONST/STATIC_CAST_EXPR.
16853         * pt.c (tsubst_copy): Likewise.
16854         * decl2.c (build_expr_from_tree): Likewise.
16856 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
16858         * decl2.c (finish_vtable_vardecl): Don't trust
16859         TREE_SYMBOL_REFERENCED for vtables of local classes.
16861 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
16863         * pt.c (tsubst_copy): Handle operator T.
16865 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16867         * init.c (build_delete): Move creation of PARMS inside test of
16868         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
16870 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
16872         * typeck.c (build_conditional_expr): Don't assume that
16873         the arguments to ?: are always pointers or records.
16875 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
16877         * decl2.c (import_export_decl): Still emit static/weak/comdat
16878         copies of inline template functions with -fno-implicit-templates.
16880 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
16882         * init.c (build_delete): Determine the complete basetype
16883         path to the destructor we're calling.
16885 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
16887         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
16888         initialize the enum, because we really and truly don't know where
16889         it came from.
16890         (start_enum): Don't copy integer_zero_node because
16891         build_enumerator will do it.
16893 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16895         * decl.c (finish_function): Do access control on base destructors.
16897         * pt.c (tsubst, case FUNCTION_DECL): Set up
16898         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
16899         hose us.
16901 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
16903         * cvt.c (build_up_reference): If we have already extended the
16904         lifetime of the temporary, don't try it again.
16905         * typeck.c (c_expand_return): Don't try and convert the return
16906         value twice when we want a reference, once is enough.
16908 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
16910         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
16911         LOOKUP_ONLYCONVERTING at all for now.
16913         * search.c (add_conversions): Put the conversion function in
16914         TREE_VALUE, the basetype in TREE_PURPOSE.
16915         * cvt.c (build_type_conversion): Adjust.
16916         * cvt.c (build_expr_type_conversion): Adjust.
16917         * call.c (user_harshness): Adjust.
16919 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
16921         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
16922         backend's benefit.
16924 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
16926         * except.c (expand_start_catch_block): Add a dummy region, if we
16927         get an error, so that we can avoid core dumping later.
16929 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
16931         * cp-tree.h (OFFSET_REF): Remove.
16932         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
16933         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
16934         * init.c (expand_aggr_init_1): Likewise.
16935         (build_new): Likewise.
16936         * typeck.c (expand_target_expr): Likewise.
16938 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
16940         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
16941         TARGET_EXPR.
16943 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
16945         * cvt.c (build_up_reference): Redo how and when temporaries are
16946         created.
16947         * decl.c (grok_reference_init): Don't try and be smart about
16948         running cleanups.
16950 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
16952         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
16953         (TARGET_EXPR...), now that it has 4 arguments.
16954         * tree.c (build_cplus_new): Likewise.
16956 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16958         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
16960         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
16961         * decl.c (struct saved_scope): Remove named_labels,
16962         {base,member}_init_list.
16963         (maybe_push_to_top_level): Don't set them.  Call
16964         push_cp_function_context if appropriate.
16965         (pop_from_top_level): Likewise.
16967         * method.c (do_build_assign_ref): Remove obsolete check of
16968         TYPE_HAS_ASSIGN_REF (basetype).
16970         * decl.c (grokfndecl): Diagnose user definition of
16971         implicitly-declared methods.
16973 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
16975         * method.c (do_build_copy_constructor): Add code to give
16976         meaningful error messages instead of crashing.
16977         (do_build_assign_ref): Don't synthesize assignment operators for
16978         classes containing reference or const members.
16980         * class.c (struct base_info): Remove cant_synth_copy_ctor
16981         and cant_synth_asn_ref.
16982         (finish_base_struct): Remove the code that tries to conditionalize
16983         synthesis of copy constructors & assignment operators based on
16984         access permissions.  Instead, let it fail when it tries to
16985         synthesize the copy constructor.  This will give meaningful error
16986         messages instead of silently generating code to perform a bitcopy.
16988 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
16990         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
16991         determining types for constant values.
16993         * decl.c (struct named_label_list): Use instead of stuffing
16994         random items into a TREE_LIST node.
16995         (named_label_uses): Use the new struct.
16996         (poplevel): Likewise.
16997         (lookup_label): Likewise.
16998         (define_label): Add an error message to tell the user the line
16999         where the goto is located in addition to the destination of the
17000         goto.
17001         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
17002         named_label_uses.
17003         (finish_function): Likewise.
17005         (start_decl): Complain about defining a static data member
17006         in a different type from which it was declared.
17008 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
17010         * cvt.c (build_expr_type_conversion): Adjust.
17012 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
17014         * call.c (build_method_call): Always convert 'this' to the
17015         appropriate type.
17017         * search.c (add_conversions): Put the conversion function in
17018         TREE_VALUE, the type in TREE_PURPOSE.
17019         * cvt.c (build_type_conversion): Adjust.
17020         * call.c (user_harshness): Adjust.
17022         * method.c (emit_thunk): Call temporary_allocation and
17023         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
17025         * tree.c (build_cplus_array_type): Handle tweaking of
17026         TYPE_MAIN_VARIANT here.
17027         * typeck.c (common_type): Not here.
17029         * typeck.c (complete_type): Only try to complete an array type if
17030         it has a domain.
17032 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
17034         * decl.c (grokvardecl): Call complete_type.
17035         (grokdeclarator): Call complete_type for PARM_DECLs.
17037 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
17039         * pt.c (instantiate_class_template): Re-set
17040         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
17042 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
17044         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
17045         smart enough to do it right.
17046         * tree.c (cp_expand_decl_cleanup): Likewise.
17047         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
17048         cp_expand_decl_cleanup.
17049         (store_parm_decls): Likewise.
17050         (hack_incomplete_structures): Likewise.
17051         * except.c (push_eh_cleanup): Likewise.
17053 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
17055         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
17056         frontend to the backend where it belongs.
17057         * tree.c (unsave_expr): Likewise.
17058         (unsave_expr_now): Likewise.
17059         * tree.def (UNSAVE_EXPR): Likewise.
17060         * cp-tree.h (unsave_expr): Likewise.
17061         (unsave_expr_now): Likewise.
17063 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
17065         * init.c (emit_base_init): Make sure the partial EH cleanups live
17066         on the function_obstack.
17068 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
17070         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
17071         when checking for pointer types.
17073 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
17075         * pt.c (instantiate_class_template): Remove obsolete check for
17076         access declarations.
17078 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
17080         * call.c (build_overload_call): Simplify calls to
17081         build_overload_call by removing last parameter.
17082         (build_method_call): Likewise.
17083         * cp-tree.h: Likewise.
17084         * method.c (build_opfncall): Likewise.
17085         * typeck.c (build_x_function_call): Likewise.
17087 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
17089         * call.c (default_parm_conversions): Factor out common code.
17090         (build_method_call): Use it.
17091         (build_overload_call_real): Use it.
17093 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
17095         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
17096         but pedwarn as the code is bogus.
17097         * typeck.c (decay_conversion): Likewise.
17098         (build_function_call_real): Use build_addr_func instead of
17099         default_conversion.  Don't allow pointer-to-method functions down
17100         here.
17101         (build_unary_op): Use real pointer-to-member functions instead of
17102         fake ones.
17103         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
17104         (convert_for_assignment): Removed some obsolete code.
17105         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
17106         build_x_function_call instead of current_class_ptr.  Only call
17107         digest_init once on an initializer, we do this just checking
17108         TREE_TYPE.
17109         (build_expr_from_tree): Pass current_class_ref to
17110         build_x_function_call instead of current_class_ptr.
17111         * init.c (build_member_call): Likewise.
17112         * pase.y: Likewise.
17113         * error.c (dump_expr): Handle OFFSET_REFs better.
17114         * pt.c (unify): Handle pointer-to-member functions better.
17115         * decl.c (finish_function): Clear out current_class_ref just like
17116         we do for current_class_ptr.
17118         * typeck.c (get_delta_difference): Handle virtual bases better.
17120 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
17122         * sig.c (build_signature_table_constructor): Use the delta for
17123         the original basetype for this virtual function with thunks.
17124         (build_signature_method_call): We still need to adjust 'this'
17125         with thunks.
17127 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
17129         * call.c (build_addr_func): New routine.  Used to get the `real'
17130         address of a function or a method.  Needed to avoid getting a
17131         pointer-to-member function.
17132         (build_call): New routine to build CALL_EXPRs.
17133         (build_method_call): Use it.
17134         * cvt.c (convert_to_aggr): Likewise.
17135         * typeck.c (build_function_call_real): Likewise.
17136         * sig.c (build_signature_table_constructor): Use build_addr_func.
17137         * cp-tree.h (build_call, build_addr_func): Declare them.
17139 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
17141         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
17142         * parse.y: Remove uses of LOOKUP_AGGR.
17144 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
17146         * *.[chy]: Rename current_class_decl to current_class_ptr, and
17147         C_C_D to current_class_ref.
17149 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
17151         * call.c (convert_harshness): Tighten up pointer conversions.
17153 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
17155         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
17156         (finish_file): Likewise.
17158 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
17160         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
17162         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
17163         code.
17165 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
17167         * decl2.c: Turn on thunks by default where supported.
17169 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
17171         * cp-tree.h (build_overload_call_maybe): Removed.
17172         * call.c (build_overload_call_real): Invert meaning of last arg to
17173         be require_complete.
17174         (build_overload_call): Likewise.
17175         * typeck.c (build_x_function_call): Use build_overload_call_real
17176         instead of build_overload_call_maybe.
17178 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
17180         * decl2.c (finish_file): Don't try to emit functions that haven't
17181         been compiled.
17183 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
17185         * decl2.c (finish_vtable_vardecl): Oops.
17187         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
17188         Also store the bindings from previous_class_values.
17189         (pop_from_top_level): Restore them.
17191 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
17193         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
17194         symbol has been referenced.
17195         (finish_file): Re-join synthesis/vtable loop with inline emission
17196         loop, disable inlining when an inline is output.
17198 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
17200         * except.c (init_exception_processing): Setup saved_in_catch.
17201         (push_eh_cleanup): Reset __eh_in_catch.
17202         (expand_start_catch_block): Set __eh_in_catch.
17204 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
17206         * except.c (push_eh_cleanup): Add tracking for whether or not we
17207         have an active exception object.
17208         (expand_builtin_throw): Use it to make sure a rethrow without an
17209         exception object is caught.
17211 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
17213         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
17214         cache.
17216 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
17218         * decl2.c (finish_file): Also use sentries for vars with
17219         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
17220         created).
17222         * lex.c (handle_cp_pragma): Disable #pragma
17223         interface/implementation if SUPPORTS_ONE_ONLY > 1.
17225 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
17227         * method.c (emit_thunk): Wrap default case in
17228         temporary/permanent_allocation.
17230         * method.c (make_thunk): Use DECL_ONE_ONLY.
17231         (emit_thunk): Call assemble_end_function.
17233 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
17235         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
17236         (import_export_decl): Likewise.
17237         (finish_prevtable_vardecl): Disable vtable hack if
17238         SUPPORTS_ONE_ONLY > 1.
17240 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
17242         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
17243         PREDECREMENT_EXPRs take two arguments, not one.
17245 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
17247         * class.c (build_vtable_entry): Don't build thunks for abstract
17248         virtuals.
17250         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
17251         frontend.
17253 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
17255         * class.c (set_rtti_entry): Use size_zero_node.
17256         (build_vtable): Likewise.
17258 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
17260         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
17261         (prepare_fresh_vtable): Likewise.
17263 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
17265         * method.c (emit_thunk): Call mark_used on the target function.
17267         * call.c (build_method_call): Don't warn about pending templates.
17269 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
17271         * decl2.c (finish_file): Fix list walking logic.
17273         * typeck2.c (check_for_new_type): Only warn if -pedantic.
17275 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
17277         * class.c (finish_struct_1): Remove old code for
17278         dont_allow_type_definitions.
17279         * cp-tree.h: Likewise.
17280         * spew.c: Make sure cp-tree.h is included before parse.h, so the
17281         definition of flagged_type_tree is found before it is used.
17282         * lex.c: Likewise.
17283         * parse.y: Added the ftype member to the type union, and changed a
17284         number of rules to use it instead of ttype.  Added calls to
17285         check_for_new_type() as appropriate.
17286         * typeck2.c (check_for_new_type): New function for checking
17287         if a newly defined type appears in the specified tree.
17288         * cp-tree.h: Add new type flagged_type_tree.  Add a prototype
17289         for check_for_new_type().
17291 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
17293         * decl2.c (finish_file): Only use a sentry if the decl is public.
17295         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
17296         don't pass LOOKUP_ONLYCONVERTING.
17298 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
17300         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
17301         properly keeps track of const and volatile type modifiers.
17303 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
17305         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
17306         * pt.c (comp_template_args): Use it.
17308         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
17309         assemble_external for artificial function decls.
17311         * decl.c (cp_finish_decl): Oops.
17313 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
17315         * decl2.c (import_export_decl): Put static data member templates
17316         into common storage, or make them weak, depending on whether they
17317         are dynamically or statically initialized.
17318         (get_sentry): New function.
17319         (finish_file): Do import_export_decl for static data members before
17320         building the init/fini functions.  Don't init/fini a variable that's
17321         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
17322         push/pop_temp_slots.
17323         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
17324         expand_static_init thang.
17325         * method.c (get_id_2): New function.
17327 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
17329         * parse.y (empty_parms): Make sure we use C++-style prototypes
17330         when we're declaring member functions.
17332 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
17334         * Makefile.in (CONFLICTS): 16 s/r conflicts.
17335         * parse.y (self_template_type): New nonterminal.
17337 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
17339         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
17340         name.
17341         * parse.y (base_class.1): Allow 'typename foo::bar'.
17343         * lex.c (check_newline): Remove #pragma code that plays with the
17344         input stream, since we now deal with tokens.  Clear nextchar when
17345         we're done.
17346         (handle_cp_pragma): Use real_yylex.
17347         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
17348         in one place.
17350         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
17352         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
17354 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17356         * parse.y: New token SELFNAME for potential constructor.
17357         * spew.c (yylex): Handle it.
17358         * lex.c (identifier_type): Produce it.
17360         * parse.y (complete_type_name): In :: case, don't push class binding.
17361         (complex_type_name): Likewise.
17363 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
17365         * typeck.c (build_reinterpret_cast): Handle pointer to member
17366         functions.
17368 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17370         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
17371         pragmas.
17372         (check_newline): Put the vtable/unit/implementation/interface pragma
17373         code into handle_cp_pragma, replacing it with a call.
17374         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
17375         args.  Get the next token after handling the pragma token.
17377 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
17379         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
17380         (convert_to_pointer_force): Likewise.
17382         * init.c (build_new): Fix array new without -fcheck-new.
17384 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
17386         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
17387         tree.c: Lose TYPE_NESTED_NAME.
17389         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
17390         as identifiers.
17392         * tree.def: Add VEC_INIT_EXPR.
17393         * expr.c (cplus_expand_expr): Handle it.
17394         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
17395         the extra file-scope symbol nastiness.
17397 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
17399         * method.c (make_thunk): Thunks are static.
17400         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
17402         * decl2.c (mark_vtable_entries): Emit thunks as needed.
17403         (finish_file): Don't emit them here.
17405 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
17407         * rtti.c (build_dynamic_cast): Handle null pointers.
17408         (ifnonnull): New function.
17410 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
17412         * call.c (build_method_call): Remember the original basetype we
17413         were called with.  Give an error message instead of trying
17414         (incorrectly) to call a non-static member function through a
17415         non-inherited class.
17417         * search.c (expand_upcast_fixups): Mark the new fixup as
17418         DECL_ARTIFICIAL.
17420 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17422         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
17424         * class.c (set_rtti_entry): Fix for thunks.
17426         * decl2.c (import_export_decl): Still emit typeinfo fns for
17427         cv-variants of builtin types.
17429         * rtti.c (expand_class_desc): Set up base_info_type_node here.
17430         (init_rtti_processing): Instead of here.
17432 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
17434         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
17435         (build_typeid): Only complain about taking dynamic typeid without
17436         -frtti.
17438         * decl2.c: flag_rtti defaults to 1.
17440         * rtti.c (get_tinfo_var): The general class case is now smaller.
17441         (init_rtti_processing): Pack the latter three fields of base_info
17442         into 32 bits.
17444 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
17446         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
17448 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
17450         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
17451         (push_memoized_context): Split out code to undefer pop_type_level to
17452         (clear_memoized_cache): here.
17453         (pop_memoized_context): We can only handle one layer of deferral of
17454         pop_type_level so clear the cache, if there was a previous level.
17456 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17458         * rtti.c (init_rtti_processing): Build up base_info_type_node.
17459         (expand_class_desc): Use one pointer to an array of base_info
17460         structs, passed using a CONSTRUCTOR.
17462 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
17464         * class.c (build_vbase_path): Remove block extern for
17465         flag_assume_nonnull_objects here.
17466         (build_vfn_ref): Split out functionality into build_vtbl_ref.
17467         (build_vtbl_ref): New routine.
17468         (build_vtable): Set up rtti info here.
17469         (add_virtual_function): Note in CLASSTYPE_RTTI the best
17470         place where we can get the rtti pointers from to avoid having to
17471         search around for a place.
17472         (finish_base_struct): Likewise.
17473         (finish_struct_1): Likewise.  Never create totally new vtables
17474         with totally new vtable pointers for rtti.  Disable code to layout
17475         vtable pointers better until we want to break binary
17476         compatibility.
17477         * rtti.c (build_headof_sub): New routine to convert down to a
17478         sub-object that has an rtti pointer in the vtable.
17479         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
17480         maintainable.
17481         (build_dynamic_cast): Make sure we have saved it, if we need to.
17482         * search.c (dfs_init_vbase_pointers): Disable code that deals with
17483         a more efficient vtable layout, enable later.
17484         * call.c (flag_assume_nonnull_objects): Moved declaration to
17485         * cp-tree.h: here.  Declare build_vtbl_ref.
17486         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
17487         function calls that want a tree.
17489 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
17491         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
17492         other X subobjects in the most derived type.  Ack.
17494         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
17495         get_typeid will do it for us.
17496         (get_typeid_1): Break out call-building for expand_*_desc to use.
17497         (get_typeid): Call it.
17498         (expand_*_desc): Likewise.
17499         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
17500         and void *.
17501         (init_decl_processing): Lose builtin_type_tdescs lossage.
17502         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
17504 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
17506         * pt.c (tsubst): When calling set_nested_typename, use
17507         TYPE_NESTED_NAME (current_class_type) instead of
17508         current_class_name.
17510         * decl.c (pushdecl): Likewise.
17511         (pushdecl_class_level): Likewise.
17512         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
17513         set_nested_typename.
17515 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
17517         * rtti.c (synthesize_tinfo_fn): Handle arrays.
17519         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
17521 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
17523         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
17524         (init_rtti_processing): Lose bad_cast_type.
17525         (build_dynamic_cast): Use throw_bad_cast.
17527         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
17529         * decl2.c (finish_file): Don't synthesize artificial functions
17530         that are external and not inline.
17532         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
17534         * decl2.c (finish_file): Handle having new inlines added to
17535         saved_inlines by synthesis.
17537         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
17539 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17541         RTTI rewrite to initialize nodes as needed, not require that
17542         users #include <typeinfo>, complete functionality and reduce wasted
17543         space.
17544         * rtti.c (init_rtti_processing): New fn.
17545         (build_typeid): The vtable entry is now a function.
17546         (get_tinfo_var): New fn.
17547         (get_tinfo_fn): Likewise.
17548         (get_typeid): Use it.
17549         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
17550         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
17551         points __rtti_*.
17552         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
17553         (synthesize_tinfo_fn): New fn.
17554         * method.c (build_t_desc_overload): Lose.
17555         (build_overload_with_type): More generic.
17556         * decl.c (init_decl_processing): Call init_rtti_processing.
17557         * class.c (set_rtti_entry): Use get_tinfo_fn.
17558         * decl2.c (mark_vtable_entries): Mark the rtti function.
17559         (finish_prevtable_vardecl): Don't build_t_desc.
17560         (import_export_decl): Handle tinfo functions.
17561         (finish_file): Likewise.
17562         * typeck.c (inline_conversion): New fn.
17563         (build_function_call_real): Use it.
17564         * cp-tree.h: Add decls.
17566         * method.c (hack_identifier): Also convert component_refs from
17567         references.
17569         * lex.c (cons_up_default_function): Use the type, not the name, in
17570         declspecs.
17572         * decl2.c (import_export_vtable): Fix weak vtables.
17574 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
17576         * search.c (get_base_distance_recursive): Fix access checks for
17577         protected bases.
17579 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17581         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
17582         cp-tree.h.
17583         (convert_harshness): Add prototypes wrapped by PROTO.
17584         * decl2.c (grok_function_init): Likewise.
17585         (do_toplevel_using_decl): Change to void return type.
17586         * class.c (build_vtable_entry): Remove decl of make_thunk.
17587         (merge_overrides): Fix order of arg definitions.
17588         (finish_vtbls): Likewise.
17589         (fixup_vtable_deltas): Likewise.
17590         (modify_all_direct_vtables): Likewise.
17591         (modify_all_indirect_vtables): Likewise.
17592         * search.c (get_base_distance_recursive): Likewise.
17593         (get_abstract_virtuals_1): Likewise.
17594         (fixup_virtual_upcast_offsets): Likewise.
17595         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
17596         * init.c (perform_member_init): Fix order of arg definitions.
17597         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
17598         * cp-tree.h (make_thunk): Add decl.
17599         (overload_template_name, push_template_decl): Add decls.
17600         (do_toplevel_using_decl): Change to void return type.
17601         (vec_binfo_member): Add decl.
17603 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17605         * typeck.c (mark_addressable, convert_for_assignment,
17606         convert_for_initialization, pointer_int_sum, pointer_diff,
17607         unary_complex_lvalue): Add prototypes wrapped by PROTO.
17608         (convert_sequence): #if 0 fn decl, since definition also is.
17610 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
17612         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
17613         cast to pointer types for type searching.
17615 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17617         * typeck.c (get_delta_difference): Use cp_error, not error, in the
17618         case where BINFO == 0.
17620 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
17622         * call.c (build_method_call): Fix wording of error messages so
17623         constructors come out right.
17625 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
17627         * decl.c (push_overloaded_decl): Don't warn about hidden
17628         constructors when both the type and the function are declared
17629         in a system header file.
17631 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
17633         * class.c (finish_struct_1): Propagate the TYPE_PACKED
17634         flag for the type to the type's fields.
17636 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17638         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
17640 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
17642         * class.c (base_info, finish_base_struct): Replace
17643         needs_virtual_dtor with base_has_virtual.
17645         (finish_struct_1): Remove the old code that tried to make default
17646         destructors virtual.  Use base_has_virtual when checking if we need
17647         to add a vtable entry for the rtti code.
17649 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
17651         * pt.c (push_template_decl): Complain about template decl with
17652         inappropriate declaration.
17654 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
17656         * typeck.c (build_x_unary_op): Remove bogus check for taking
17657         the address of a member function.
17659 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
17661         * parse.y (constructor_declarator): Only push the class if
17662         we are not already in the class.
17664 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
17666         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
17667         Add additional argument to INIT_CUMULATIVE_ARGS.
17669 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
17671         * decl.c (shadow_tag): Fix error about anon union with methods.
17673         * parse.y (self_reference): Only generate a self-reference if this
17674         is a non-template class.
17675         (opt.component_decl_list): Only use it if it was generated.
17677         * parse.y (component_decl_1): Use constructor_declarator.
17678         (fn.def2): Likewise.
17679         (notype_component_declarator0): Likewise.
17681 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
17683         * typeck.c (build_x_unary_op): Add checks for taking the address
17684         of a TARGET_EXPR or of a member function, and give appropriate
17685         warnings.
17687 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
17689         * pt.c (process_template_parm): Allow template type parms to be
17690         used as types for template const parms.
17692 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
17694         * init.c (expand_vec_init): Ensure the eh cleanups are on the
17695         function_obstack.
17697 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
17699         * decl.c (lookup_name_real): Be even more picky about the
17700         ambiguous lookup warning.
17701         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
17702         * parse.y (constructor_declarator): Rather than here.
17704         * parse.y (constructor_declarator): New nonterminal.
17705         (fn.def1): Use it.
17706         (explicit_instantiation): Likewise.
17708 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17710         Add implicit declaration of class name at class scope.
17711         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
17712         * parse.y (self_reference): New nonterminal.
17713         (opt.component_decl_list): Use it.
17714         (fn.def1): Add nested_name_specifier type_name cases.
17715         * class.c (build_self_reference): New function.
17716         (finish_struct): Handle access_default later, move self-reference
17717         decl to the end.
17718         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
17719         * cp-tree.h: Adjust.
17721         * pt.c (do_function_instantiation): Separate handling of member
17722         functions and non-member functions properly.
17724 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
17726         * pt.c (process_template_parm): Improve error for 'volatile class K'.
17728         * class.c (finish_struct_1): Check the right slot for destructors.
17730         * decl.c (start_enum): Complain about enum templates.
17732 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
17734         * init.c (resolve_offset_ref): Offset pointers to member data by one.
17735         * typeck.c (unary_complex_lvalue): Likewise.
17737 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
17739         * typeck.c (c_expand_return): Check for a returned local
17740         array name, similar to the check for an ADDR_EXPR.
17742 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
17744         * decl.c (cp_finish_decl): Don't build cleanups for static
17745         variables here.
17747 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
17749         * typeck.c (build_modify_expr): Fix error messages to be more
17750         accurate.
17751         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
17752         assignment operators.
17753         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
17754         assignment operators.
17756 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
17758         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
17759         give an error if initialized.  pedwarn about nested type with the
17760         same name as its enclosing class.
17762         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
17764         * typeck.c (require_complete_type): Be sure to instantiate the
17765         MAIN_VARIANT of the type.
17767         * decl2.c (finish_file): Instantiate pending templates before
17768         processing static constructors and destructors.
17770         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
17771         unless at_eof.
17773 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
17775         * decl2.c (delete_sanity): If error_mark_node is passed
17776         in as an expression, quit while we're ahead.
17778         * decl.c (grokdeclarator): Give an error message if `friend'
17779         is combined with any storage class specifiers.
17781 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
17783         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
17784         definition of nonexistent nested type.
17786         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
17787         not to say 'typedef'.
17789 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17791         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
17792         * search.c (dfs_walk, dfs_init_vbase_pointers,
17793         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
17794         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
17796 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
17798         * except.c (build_throw): Support minimal parse.
17799         * pt.c (tsubst_copy): Support THROW_EXPR.
17800         * decl2.c (build_expr_from_tree): Likewise.
17802         * pt.c (mangle_class_name_for_template): Always allocate
17803         scratch_firstobj.
17805 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
17807         * cvt.c (cp_convert_to_pointer): Give an appropriate error
17808         when trying to cast from an incomplete type.
17810 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17812         * pt.c (instantiate_class_template): Don't bother setting up
17813         CLASSTYPE_TAGS explicitly, as the nested types will add
17814         themselves.
17816 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
17818         * decl.c (shadow_tag): Remove old error check for usage of
17819         an enum without a previous declaration.
17820         (xref_tag): Add error message about usage of enums without a
17821         previous declaration.
17823 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
17825         * lex.c (do_identifier): Only do name consistency check if we're
17826         parsing.
17828         * pt.c (push_template_decl): Don't crash if we get a member defn
17829         that doesn't match.
17831         * decl.c (xref_tag_from_type): New function to do an xref without
17832         always having to figure out code_type_node.
17833         * cp-tree.h: Declare it.
17834         * pt.c (instantiate_class_template): Use it for friend classes.
17835         (lookup_template_class): Use it.
17837         * typeck2.c (build_functional_cast): Pull out a single parm before
17838         passing it to build_c_cast.
17840 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
17842         * expr.c (do_case): Give an error message if a pointer is
17843         given as a case value.
17845 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
17847         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
17848         an overload list.
17850         * lex.c (cons_up_default_function): Really, now, interface hackery
17851         does not apply to synthesized methods.
17853 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
17855         * call.c (build_method_call): Ctors and dtors now have special names
17856         with respect to lookups.
17857         * class.c (add_method): Likewise.
17858         (grow_method): Likewise.
17859         (finish_struct_methods): Likewise.
17860         (warn_hidden): Likewise.
17861         (finish_struct_1): Likewise.
17862         * cvt.c (convert_to_reference): Likewise.
17863         (convert_to_aggr): Likewise.
17864         (cp_convert): Likewise.
17865         * decl2.c (check_classfn): Likewise.
17866         * init.c (expand_member_init): Likewise.
17867         (expand_default_init): Likewise.
17868         (expand_aggr_init_1): Likewise.
17869         (build_offset_ref): Likewise.
17870         (build_new): Likewise.
17871         (build_delete): Likewise.
17872         * lex.c (do_inline_function_hair): Likewise.
17873         * search.c (lookup_field_1): Likewise.
17874         (lookup_fnfields_here): Likewise.
17875         (lookup_field): Likewise.
17876         (lookup_fnfields): Likewise.
17877         (get_virtual_destructor): Likewise.
17878         (dfs_debug_mark): Likewise.
17879         (dfs_pushdecls): Likewise.
17880         (dfs_compress_decls): Likewise.
17881         * tree.c (layout_basetypes): Likewise.
17882         * typeck.c (build_component_ref): Likewise.
17883         (build_x_function_call): Likewise.
17884         (build_modify_expr): Likewise.
17885         (convert_for_initialization): Likewise.
17886         (build_functional_cast): Likewise.
17887         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
17888         (CTOR_NAME): New.
17889         (DTOR_NAME): New.
17890         * decl.c (ctor_identifier): New.
17891         (dtor_identifier): New.
17892         (init_decl_processing): Set them.
17894 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
17896         * typeck.c (build_component_ref): Don't get confused by fields whose
17897         context has no type name, like pointer to member functions.
17899 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
17901         * decl.c (grokdeclarator): Handle typedef without declarator.
17903         * pt.c (tsubst): Handle SCOPE_REF in declarator.
17905         * parse.y (bad_parm): Catch another case of missing `typename'.
17907         * lex.c (yyprint): Handle TYPE_DECLs.
17909         * decl.c (start_function): Don't try to be clever.
17911         * lex.c: Lose compiler_error_with_decl.
17912         * typeck2.c: Lose error_with_aggr_type.
17913         (incomplete_type_error): Use cp_* instead of old functions.
17914         (readonly_error): Likewise.
17915         * typeck.c (convert_arguments): Likewise.
17916         * search.c (lookup_nested_field): Likewise.
17917         * method.c (make_thunk): Likewise.
17918         * decl.c (grokparms): Likewise.
17919         * cp-tree.h: Update.
17921         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
17922         and value.
17924 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
17926         * method.c (build_opfncall): When deleting a pointer to an
17927         array, build a new pointer to the tree past any ARRAY_TYPE
17928         nodes.
17930 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17932         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
17934 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
17936         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
17937         and ! DECL_INLINE.
17939         * decl.c (finish_function): Don't set nested based on
17940         hack_decl_function_context.
17941         * parse.y (function_try_block): Check for nested function.
17942         (pending_inlines): Likewise.
17944         * decl2.c (build_expr_from_tree): If a unary op already has a
17945         type, just return it.
17947         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
17949         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
17950         (finish_file): Check the return value of walk_vtables.
17951         (finish_prevtable_vardecl): Return int.
17952         (finish_vtable_vardecl): Likewise.
17953         (prune_vtable_vardecl): Likewise.
17954         * lex.c (set_vardecl_interface_info): Likewise.
17955         * cp-tree.h: Adjust return types.
17957         * class.c (delete_duplicate_fields_1): Don't complain about
17958         duplicate nested types if they're the same type.
17959         (finish_struct): Remove check for duplicate.
17960         * decl2.c (grokfield): Don't check for typedef of anonymous type.
17962 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
17964         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
17966         * decl.c (grokdeclarator): Lose special handling of class-level
17967         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
17968         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
17970         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
17972         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
17974         * search.c (compute_access): Fix handling of anonymous union
17975         members.
17976         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
17977         from anonymous unions to their members.
17979         * typeck.c (build_x_function_call): For static member functions,
17980         hand off to build_member_call.
17982 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
17984         * typeck.c (build_component_ref): Handle OFFSET_REFs.
17986         * init.c (expand_vec_init): Fix init == 0 case.
17988 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
17990         * init.c (build_new): pedwarn about init and array new.
17991         (expand_vec_init): Handle lists, use convert_for_initialization.
17993         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
17994         when converting to an aggregate type.
17995         * cvt.c (cp_convert): Pass it through.
17997         * typeck.c (build_conditional_expr): Handle user-defined
17998         conversions to slightly different types.
18000         * decl.c (grokdeclarator): Force an array type in a parm to be
18001         permanent.
18003         * decl2.c (do_using_directive): Sorry.
18004         (do_namespace_alias): Likewise.
18005         * lex.c (real_yylex): Warn about using the `namespace' keyword.
18007 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
18009         * parse.y (datadef): Move call to note_list_got_semicolon up.
18011 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
18013         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
18015 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
18017         * decl.c (cp_finish_decl): The exception regions have to be
18018         nested, not overlapping.  We start the exception region for a
18019         decl, after it has been fully built, and all temporaries for it
18020         have been cleaned up.
18022 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
18024         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
18026 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
18028         * tree.def: Add RETURN_INIT.
18029         * pt.c (instantiate_decl): Handle RETURN_INIT.
18030         * decl.c (store_return_init): Handle minimal_parse_mode.
18032         * tree.c (cp_build_type_variant): Just return an error_mark_node.
18033         * decl.c (make_typename_type): Don't try to get the file and line
18034         of an identifier.
18035         * typeck.c (comptypes): Handle TYPENAME_TYPE.
18037 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
18039         * decl.c (poplevel): Make sure we clear out and restore old local
18040         non-VAR_DECL values by default when they go out of scope.
18042 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
18044         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
18045         referring to addresses of variables and functions.
18047         * error.c (dump_expr): Support SIZEOF_EXPR.
18049         * init.c (do_friend): Use the return value of check_classfn.
18051         * typeck.c (convert_arguments): Call complete_type.
18053         * method.c (hack_identifier): After giving an error, set value to
18054         error_mark_node.
18056 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
18058         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
18059         lossage for local classes.
18060         * cp-tree.h: Declare it.
18061         * decl.c (lookup_name_real): Evil, painful hack for local classes.
18062         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
18063         Use hack_decl_function_context.
18064         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
18065         (start_function): Use hack_decl_function_context.
18066         (finish_function): Likewise.
18067         * method.c (synthesize_method): Likewise.
18068         * lex.c (process_next_inline): Likewise.
18069         (do_pending_inlines): Likewise.
18070         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
18071         done with it.
18073 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
18075         * sig.c (build_signature_pointer_or_reference_type): Align
18076         signature pointers/references on 8-byte boundaries so they can be
18077         grabbed 2 words at a time on a Sparc.
18079 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
18081         * method.c (hack_identifier): Requiring a static chain is now a
18082         hard error.
18083         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
18084         functions.
18086 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
18088         * init.c (build_offset_ref): Call complete_type.
18090         * decl.c (pop_from_top_level): Always pop previous_class_type.
18092         * parse.y: Handle multiple decls in a for-init-statement.
18093         * pt.c (tsubst_expr): Likewise.
18095         * pt.c (tsubst): Use tsubst_expr for the second operand of an
18096         ARRAY_REF.
18098         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
18099         (poplevel_class): Set it here.
18100         (pop_from_top_level): Pop it here if we're returning to class scope.
18101         * class.c (pushclass): Don't set it here.
18103         * decl.c (maybe_push_to_top_level): Save current_template_parms,
18104         and clear it if !pseudo.
18105         (pop_from_top_level): Restore it.
18107         * decl2.c (finish_file): Push the dummy each time we walk the list
18108         of vtables.
18110         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
18111         something for CAST_EXPR.
18113 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
18115         * cvt.c (cp_convert): Warn about implicit conversion of the
18116         address of a function to bool, as it is always true.
18118 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
18120         * typeck.c (c_expand_return): Fix warning for local externs returned.
18122 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
18124         * tree.c (mapcar): Propagate const and volatile properly.
18126         * typeck.c (complete_type): Be sure to instantiate the
18127         MAIN_VARIANT of the type.
18129         * method.c (synthesize_method): Class interface hackery does not
18130         apply to synthesized methods.
18132 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
18134         * pt.c (comp_template_args): Use comptypes rather than just
18135         checking for TEMPLATE_TYPE_PARM equivalence.
18137         * typeck.c (build_x_function_call): Call complete_type before
18138         checking TYPE_OVERLOADS_CALL_EXPR.
18140 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
18142         * g++.c (main): Check also for new define ALT_LIBM.
18144 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
18146         * pt.c (instantiate_class_template): If we don't have a pattern
18147         yet, that's OK.
18148         (coerce_template_parms): If we see a local class, bail.
18150         * decl.c (grok_reference_init): Make sure there's a type before
18151         checking its code.
18153         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
18154         (push_template_decl): Likewise.
18156         * parse.y (named_class_head): Set
18157         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
18159         * decl.c (xref_tag): Diagnose redeclaration of template
18160         type-parameter name.
18162         * error.c (dump_type): Handle anonymous template type parms.
18164         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
18165         TYPE_STUB_DECL.
18166         (coerce_template_parms): Likewise.
18168 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
18170         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
18171         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
18173 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
18175         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
18176         before trying to get its STUB_DECL.
18177         (coerce_template_parms): Likewise.
18179         * parse.y (template_type_parm): If they didn't use 'class',
18180         pretend they did after giving an error.
18182         * pt.c (coerce_template_parms): Diagnose use of local class.
18184         * decl.c (grok_reference_init): Use instantiate_type.
18186         * error.c (dump_expr): Handle TEMPLATE_DECLs.
18188         * parse.y (named_class_head): Diagnose mismatching types and tags.
18190         * decl.c (pushdecl): Type decls and class templates clash with
18191         artificial type decls, not hide them.
18193         * decl.c (redeclaration_error_message): Diagnose redefinition of
18194         templates properly.
18195         (duplicate_decls): Diagnose disallowed overloads for template
18196         functions, too.
18198         * decl.c (start_decl): Call complete_type before checking for a
18199         destructor.
18201         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
18203         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
18205 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18207         * decl.c (grok_op_properties): Don't check for operator++(int) in
18208         a template.
18210         * tree.c (perm_manip): Return a copy of variable and function
18211         decls with external linkage.
18213         * tree.def: Change some of the min tree codes to type "1".
18214         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
18215         * method.c (build_overload_int): Emit something arbitrary for
18216         anything but an INTEGER_CST if we're in a template.
18218         * decl.c (cp_finish_decl): Call complete_type before deciding
18219         whether or not to lay out the decl.
18221         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
18223 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
18225         * typeck2.c (build_x_arrow): Call complete_type.
18227         * pt.c (add_pending_template): Broken out.
18228         (lookup_template_class): If -fexternal-templates, call it for all
18229         the methods of implemented types.
18230         (instantiate_class_template): Instead of instantiating them here.
18231         (instantiate_decl): Handle -fexternal-templates earlier.
18233 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18235         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
18236         memoized lookup stuff inside GATHER_STATISTICS.
18238 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
18240         * decl.c (start_decl): Complain about array of incomplete type
18241         here.
18242         (grokdeclarator): Not here.
18244         * parse.y (template_parm): Expand full_parm inline so we can set
18245         the rule's precedence.
18247         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
18248         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
18249         * decl2.c (grokbitfield): Don't check for integer constant here.
18250         * class.c (finish_struct_1): Check here.
18252         * decl.c (define_label): Make the min decl go on permanent_obstack.
18254         * pt.c (unify): Don't handle CONST_DECLs.
18255         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
18256         (tsubst_copy): Likewise.
18258         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
18259         CONST_DECL for a template parm.
18261 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
18263         * decl.c (grokdeclarator): Complain about array of incomplete type
18264         here.
18265         (start_decl_1): Not here.
18267         * pt.c (tsubst): Handle pointer-to-function declarators.
18269         * method.c (hack_identifier): If pedantic, diagnose local class
18270         methods that require a static chain.
18272         * decl.c (grok_op_properties): No longer static.
18273         * cp-tree.h: Declare it.
18274         * pt.c (tsubst): Call it for operators.
18275         Use tsubst_copy for TREE_VECs.
18277         * parse.y (template_arg): The expr has precedence like '>'.
18279 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
18281         * pt.c (coerce_template_parms): Don't coerce an expression using
18282         template parms.
18283         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
18284         (tsubst): Don't use build_index_2_type if the max_value uses template
18285         parms.
18286         * method.c (build_overload_int): Emit something arbitrary for an
18287         expression using template parms.
18289         * parse.y (template_close_bracket): New non-terminal to catch use
18290         of '>>' instead of '> >' in template class names.
18291         (template_type): Use it.
18292         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
18294         * tree.def: Add CAST_EXPR.
18295         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
18296         CONVERT_EXPR for minimal_parse_mode.
18297         * typeck.c (build_c_cast): Likewise.
18298         * pt.c (tsubst_copy): Likewise.
18299         * decl2.c (build_expr_from_tree): Likewise.
18300         * error.c (dump_expr): Likewise.
18302 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18304         * except.c (SetTerminate, SetUnexpected): Put back global vars.
18305         (init_exception_processing): Put back decl/init of
18306         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
18307         fns from libstdc++.
18309         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
18310         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
18311         Delete unused fns.
18312         * cp-tree.h (declare_uninstantiated_type_level,
18313         uninstantiated_type_level_p): Delete prototypes.
18315 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
18317         * pt.c (tsubst_expr): Add default return.
18319 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18321         * error.c (fndecl_as_string): Delete unused arg CNAME.
18322         * sig.c (build_signature_table_constructor,
18323         build_signature_method_call): Fix calls.
18325         * class.c (the_null_vtable_entry): Delete var definition.
18326         (init_class_processing): Delete tree the_null_vtable_entry init.
18327         * decl.c (no_print_{functions, builtins}): Declare as static.
18328         (__tp_desc_type_node): #if 0 var definition.
18329         (init_type_desc): #if 0 init of __tp_desc_type_node.
18330         (vb_off_identifier): Move var decl into init_decl_processing.
18331         (current_function_assigns_this): Declare as static.
18332         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
18333         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
18334         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
18335         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
18336         * init.c (BI_header_type, BI_header_size): Declare as static.
18337         * pt.c (template_classes): Delete unused var.
18338         (add_pending_template): Delete decl for non-existent fn.
18339         (lookup_template_class): Delete vars CODE and TAG_CODE.
18340         (instantiate_template): Delete unused var TARGS.
18341         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
18342         Delete decls.
18343         (__tp_desc_type_node): #if 0 var decl.
18344         (fndecl_as_string): Fix prototype.
18346 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
18348         * tree.def: Add GOTO_STMT.
18349         * pt.c (tsubst_expr): Support goto and labels.
18350         * decl.c (define_label): Support minimal parsing.
18351         * parse.y (simple_stmt): Likewise.
18353 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18355         * xref.c (GNU_xref_member): Only define/set var I if
18356         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
18357         used.
18358         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
18359         (GNU_xref_end): Fix call.
18360         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
18361         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
18363         * tree.c (build_exception_variant): Delete unused vars I, A, T,
18364         T2, and CNAME.
18365         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
18366         (mapcar): Delete unused var CODE.
18367         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
18368         (break_out_cleanups): Fix call.
18369         (bot_manip): Likewise.
18370         * call.c (build_method_call): Likewise.
18371         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
18372         Likewise.
18373         * typeck.c (unary_complex_lvalue, build_modify_expr,
18374         convert_for_initialization): Likewise.
18375         * typeck2.c (build_functional_cast): Likewise.
18376         * cp-tree.h (build_cplus_new): Fix prototype.
18378         * repo.c (open_repo_file): Delete unused var Q.
18379         (repo_compile_flags, repo_template_declared,
18380         repo_template_defined, repo_class_defined, repo_inline_used,
18381         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
18382         (repo_get_id, repo_vtable_used): Declare as static.
18383         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
18384         prototypes.
18386 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
18388         * parse.y (pending_inlines): Add function_try_block case.
18390         * pt.c (unify): Fix for template const parms.
18392 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18394         * lex.c (extract_interface_info): Delete forward decl.
18395         (default_copy_constructor_body, default_assign_ref_body): Delete
18396         decls for non-existent functions.
18397         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
18398         (init_lex): Delete setting them.
18399         (cons_up_default_function): Delete unused vars FUNC_BUF,
18400         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
18401         #if 0'd synth code.
18402         (toplevel, expression_obstack): Delete unused extern decls.
18403         (tree_node_kind): Delete unused enum.
18404         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
18405         GATHER_STATISTICS.
18406         (tree_node_kind_names): Delete unused extern decl.
18407         (synth_obstack): Delete unused var.
18408         (init_lex): Don't set it.
18409         (init_parse): Add decl before use.
18410         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
18411         (current_unit_{name, language}): Delete unused vars.
18412         (check_newline): Don't bother setting them, just accept the #pragma.
18413         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
18414         (current_unit_{name, language}): Delete decls.
18416         * search.c: Wrap all of the memoized functions, macros, and
18417         variables inside #ifdef GATHER_STATISTICS.
18418         (lookup_field, lookup_fnfields): Likewise.
18419         (init_search_processing): Likewise.
18420         (reinit_search_statistics): Wrap whole function.
18421         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
18423         * decl.c (finish_function): Only call pop_memoized_context if
18424         GATHER_STATISTICS is defined.
18425         (start_function): Likewise for push_memoized_context.
18426         * class.c (pushclass, popclass): Likewise.
18428         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
18429         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
18431         * cvt.c (cp_convert): Delete unused local var FORM.
18432         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
18433         prototypes.
18435 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18437         * pt.c (do_poplevel): Oops; really return what we get from
18438         poplevel this time.
18440 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18442         * cp-tree.h (is_aggr_type): Add prototype.
18444         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
18445         * method.c ({push,pop}_cp_function_context): Delete decls.
18446         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
18447         (SetUnexpected, SetTerminate): Delete unused vars.
18448         (init_exception_processing): Don't set SetUnexpected or
18449         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
18450         (output_exception_table_entry): Delete unused array LABEL.
18451         (expand_internal_throw): Delete unused var PARAMS.
18452         (expand_start_catch_block): Delete unused var CLEANUP.
18453         (emit_exception_table): Delete unused var EH_NODE_DECL.
18454         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
18455         GOTO_UNWIND_AND_THROW.  Don't set them.
18456         (end_eh_unwinder): Add top decl.
18457         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
18458         (exception_section, push_rtl_perm, do_function_call,
18459         lang_interim_eh, push_eh_cleanup, eh_outer_context,
18460         expand_end_eh_spec, end_eh_unwinder): Declare as static.
18461         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
18462         throw_used): Likewise.
18463         * cp-tree.h (expand_end_eh_spec): Delete prototype.
18465         * search.c (dfs_mark, dfs_mark_vtable_path,
18466         dfs_unmark_vtable_path, dfs_mark_new_vtable,
18467         dfs_unmark_new_vtable, dfs_clear_search_slot,
18468         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
18469         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
18470         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
18471         functions.
18472         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
18473         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
18474         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
18475         Only define #ifdef GATHER_STATISTICS.
18476         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
18477         is defined.
18478         (vbase_decl): Delete var definition.
18479         (init_search): Delete old decl.
18480         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
18481         never actually used.
18482         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
18483         (get_base_distance_recursive): Delete unused fourth arg
18484         BASETYPE_PATH.  Fix call .
18485         (get_base_distance): Fix call.
18486         (push_class_decls): Delete unused var ID.
18487         (make_memoized_table_entry): Declare as static.
18488         (breadth_first_search): Declare as static.
18489         (tree_has_any_destructor_p): Declare as static.
18490         (pop_class_decls): Delete unused arg pop_class_decls.
18491         * class.c (popclass): Fix call to pop_class_decls.
18492         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
18493         tree_has_any_destructor_p): Delete prototypes.
18495         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
18496         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
18497         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
18498         (build_user_desc): Delete unused var T.
18499         (build_class_desc): Delete unused vars T and OFF.
18500         (build_t_desc): Delete unused var NAME_STRING.
18501         (build_headof): Make static.
18502         (get_bad_cast_node): Likewise.
18503         (get_def_to_follow): Likewise.
18504         * cp-tree.h (init_type_desc): Add prototype.
18505         (build_headof): Remove prototype.
18507 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
18509         * pt.c (tsubst): Only look for matching decls at file scope for
18510         non-member functions.
18512         * call.c (build_scoped_method_call): Handle scoped destructor
18513         calls in templates.
18515         * decl.c (*_top_level): Also save previous_class_values.
18517         * pt.c (tsubst_expr): Support do {} while loops.
18518         * parse.y (simple_stmt): Likewise.
18519         * tree.def: Likewise.
18521         * method.c (build_overload_identifier): For a class nested in a
18522         template class, don't mangle in the template parms from our
18523         context.
18525         * lex.c, cp-tree.h: Remove support for template instantiations in
18526         the pending_inlines code.
18527         * pt.c: Remove dead functions and unused arguments.
18528         (uses_template_parms): TYPENAME_TYPEs always use template parms.
18529         * parse.y: Stop passing anything to end_template_decl.
18530         * tree.c (print_lang_statistics): Only print tinst info #ifdef
18531         GATHER_STATISTICS.
18533 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18535         * init.c (expand_recursive_init{,_1}): Delete decls.
18536         (sort_member_init): Delete unused var INIT.
18537         (emit_base_init): Delete unused var X.
18538         (build_offset_ref): Delete unused var CNAME.
18539         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
18540         (emit_base_init): Delete unused local var BASE.  Delete extern
18541         decl of IN_CHARGE_IDENTIFIER.
18542         (build_delete): Delete unused local var VIRTUAL_SIZE.
18544         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
18545         (build_delete): Fix call.
18546         * decl2.c (delete_sanity): Likewise.
18547         * cp-tree.h (build_vec_delete): Update prototype.
18549         * typeck.c (common_base_type): Delete unused var TMP.
18550         (build_binary_op): Delete local var ARGS_SAVE.
18551         (build_array_ref): Delete unused var ITYPE.
18552         (c_expand_return): Delete unused var USE_TEMP.
18554         * typeck.c (compexcepttypes): Delete unused arg STRICT.
18555         (comptypes): Fix calls.
18556         * decl.c (duplicate_decls): Likewise.
18557         * cp-tree.h (compexcepttypes): Delete extra arg.
18559         * decl2.c (check_classfn): Delete unused second arg CNAME.
18560         * decl.c (start_decl, grokfndecl): Fix calls.
18561         * init.c (do_friend): Likewise.
18562         * cp-tree.h (check_classfn): Update prototype.
18564         * cp-tree.h (signature_error, import_export_vtable,
18565         append_signature_fields, id_in_current_class, mark_used,
18566         copy_assignment_arg_p): Add decls.
18567         * decl2.c (mark_used): Delete decl.
18569         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
18571         * class.c (get_vtable_entry): Disable unused function.
18572         (doing_hard_virtuals): Delete unused static global var.
18573         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
18574         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
18575         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
18576         (modify_one_vtable): Delete unused var OLD_RTTI.
18577         (finish_struct_anon): Delete unused vars OFFSET and X.
18578         (finish_struct_bits): Delete unused var METHOD_VEC.
18579         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
18580         for-scope local variable METHODS.
18582         * call.c (user_harshness): Delete unused/unneeded arg PARM.
18583         (ideal_candidate): Delete unused args BASETYPE and PARMS.
18584         (build_method_call): Delete unused args passed into ideal_candidate.
18585         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
18586         * cp-tree.h (synthesize_method): Add decl.
18588         * decl.c (note_level_for_for): Give void return type.
18589         (pushdecl_nonclass_level): Likewise.
18590         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
18591         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
18592         (suspend_binding_level): Delete unused var LEVEL.
18593         (duplicate_decls): Delete unused var CTYPE.
18594         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
18595         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
18596         PTR_ENDLINK.
18597         (grokdeclarator): Delete unused var C.
18598         (grokdeclarator): Delete unused var SIZE_VARIES.
18599         (grokparms): Delete unused var SAW_VOID.
18600         (start_function): Delete unused var OLDDECL.
18601         (cplus_expand_expr_stmt): Delete unused var
18602         REMOVE_IMPLICIT_IMMEDIATELY.
18604         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
18606         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
18608 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18610         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
18611         (build_min_nt): Likewise.
18612         * pt.c (do_pushlevel): Emit line note.
18613         (do_poplevel): Return what we get from poplevel.
18614         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
18615         * parse.y: Use do_pushlevel and do_poplevel.
18616         * cp-tree.h: Declare do_poplevel.
18618         * cp-tree.h: Declare at_eof.
18619         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
18620         * decl2.c (import_export_decl): Renamed from import_export_inline.
18621         (finish_file): Call it to do interface handling for statics.
18622         * pt.c (tsubst_copy): Call mark_used on variables and functions
18623         used here.
18625         * decl2.c (finish_file): Don't emit statics we can't generate.
18626         * pt.c (instantiate_decl): Don't set interface on instantiations
18627         we can't generate.
18629         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
18630         * tree.c (print_lang_statistics): Print max template depth.
18631         * pt.c (push_tinst_level): Dump entire instantiation context.
18632         (instantiate_class_template): Use it and pop_tinst_level.
18633         (instantiate_decl): Likewise.
18635         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
18636         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
18638 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
18640         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
18641         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
18642         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
18643         the new template implementation.
18645 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18647         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
18649 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
18651         * decl.c (cp_finish_decl): Delay emitting the debug information for
18652         a typedef that has been installed as the canonical typedef, if the
18653         type has not yet been defined.
18655 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
18657         * decl2.c (grokfield): Still call pop_nested_class for access decls.
18659 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18661         * decl.c (lookup_label): Call label_rtx.
18663         * decl.c (make_binding_level): New function.
18664         (pushlevel, pushlevel_class): Call it instead of explicit
18665         duplicate calls to xmalloc.
18667         * decl.c (init_decl_processing): Delete useless build_pointer_type
18668         call.
18670         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
18671         (sizet_ftype_string): Delete variable.
18672         (init_decl_processing): Add built-in functions fabsf, fabsl,
18673         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
18674         variable strlen_ftype, used for strlen.
18676 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
18678         * decl.c (push_to_top_level): Start from current_binding_level
18679         again for now; the stl hacks depend on g++ being broken in this
18680         way, and it'll be fixed in the template rewrite.
18682         * tree.def: Add USING_DECL.
18683         * decl2.c (do_class_using_decl): Implement.
18684         (grokfield): Pass access decls off to do_class_using_decl instead of
18685         grokdeclarator.
18686         * error.c (dump_decl): Handle USING_DECLs.
18687         * decl.c (grokdeclarator): Remove code for handling access decls.
18688         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
18689         as access decls for now.
18690         (finish_struct): Don't check USING_DECLs for other uses of the name.
18692         * search.c (get_matching_virtual): Use cp_error_at.
18694 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18696         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
18697         match c-typeck.c.
18698         (self_promoting_args_p): Move the check that TYPE is non-nil
18699         before trying to look at its main variant.
18700         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
18702         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
18703         Delete macros.
18704         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
18705         (do_friend): Delete call to xref_friend.
18706         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
18708         * typeck.c (convert_sequence): #if 0 unused function.
18710         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
18711         be in decl_in_memory_p.
18712         (decl_in_memory_p): Delete decl.
18713         * expr.c (decl_in_memory_p): Delete fn.
18714         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
18716         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
18718 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
18720         * class.c (finish_struct_1): Check for a pure-specifier on a
18721         non-virtual function here.
18723         * decl2.c (grok_function_init): Don't check whether the function
18724         is virtual here.
18725         (grokfield): Don't call check_for_override here.
18727         * decl.c (push_to_top_level): Start from inner_binding_level,
18728         check class_shadowed in class levels.
18730 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
18732         * decl.c (resume_level): Ignore things that don't have names, instead
18733         of core dumping.
18735 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18737         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
18739 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
18741         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
18742         synthesized dtor.
18744         * parse.y (complete_type_name): Bind global_scope earlier.
18745         (complex_type_name): Likewise.
18746         (qualified_type_name): Remove.
18748 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
18750         * decl.c (grokfndecl): Move code that looks for virtuals in base
18751         classes...
18752         * class.c (check_for_override): ... to a new function.
18753         (finish_struct_1): Call it.
18755         * cp-tree.h: Declare warn_sign_compare.
18757         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
18758         rather than extra_warnings to decide whether to warn about
18759         comparison of signed and unsigned.
18761         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
18762         implies -Wsign-compare.  -Wall doesn't imply -W.
18764 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
18766         * typeck.c (build_component_ref): Fix to handle anon unions in base
18767         classes as well.
18769 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18771         * class.c (resolves_to_fixed_type_p): Delete code dealing with
18772         a WITH_CLEANUP_EXPR, since we don't generate them any more.
18773         * cvt.c (build_up_reference): Likewise.
18774         * decl.c (grok_reference_init): Likewise.
18775         (cp_finish_decl): Likewise.
18776         * error.c (dump_expr): Likewise.
18777         * tree.c (real_lvalue_p): Likewise.
18778         (lvalue_p): Likewise.
18779         (build_cplus_new): Likewise.
18780         (unsave_expr_now): Likewise.
18781         * typeck.c (unary_complex_lvalue, build_modify_expr,
18782         c_expand_return): Likewise.
18784 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18786         Make the C++ front-end pay attention to attributes for structures.
18787         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
18788         finish_struct_1.
18789         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
18790         Take out old round_up_size use and setting the DECL_ALIGN possibly
18791         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
18792         can override what the attribute set.
18793         * cp-tree.h (finish_struct): Update prototype.
18794         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
18795         attributes to finish_struct.
18796         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
18797         value down into finish_struct.
18798         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
18800 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
18802         * decl.c (poplevel):  Re-word dead for local handling.
18803         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
18804         (cp_finish_decl):  If is_for_scope, check for duplicates so
18805         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
18807         * lex.c (do_identifier):  Use global binding in preference of
18808         dead for local variable.
18810 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
18812         * init.c (initializing_context): Handle anon union changes, the
18813         context where fields of anon unions can be initialized now has to be
18814         found by walking up the TYPE_CONTEXT chain.
18816 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
18818         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
18819         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
18820         (obscure_complex_init): If bss is supported, always set
18821         DECL_INITIAL to error_mark_node.
18823 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18825         * init.c (is_friend): Make sure there's a context before we see if
18826         it's an aggr type.
18828 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
18830         * init.c (is_friend): Classes are not friendly with nested classes.
18832 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
18834         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
18835         and record its result.
18837 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
18839         * class.c (finish_struct_anon): Switch around code to not move anon
18840         union elements around, nor mess up their contexts, nor offsets,
18841         instead we now build up the right number of COMPONENT_REFs for all
18842         the anon unions that may be present at build_component_ref time.
18843         * typeck.c (lookup_anon_field): New routine to handle field lookup
18844         on fields without names.  We find them, based upon their unique type
18845         instead.
18846         * typeck.c (build_component_ref): Allow FIELD_DECL components.
18847         Handle finding components in anonymous unions, and ensure that a
18848         COMPONENT_REF is built for each level as necessary.
18850 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
18852         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
18853         code that ensures that copy ctors are used if appropriate.
18855 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18857         * init.c (build_vec_delete): Only give an error if base isn't an
18858         error_mark_node.
18860 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
18862         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
18863         (yylex): If we see `new', keep slurping.
18865 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
18867         * class.c (finish_struct_1): Move code for handling anon unions...
18868         (finish_struct_anon): to here.  Fixup so that we do the offset
18869         calculations right, and so that the fields are physically moved to
18870         the containers's chain.
18872 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18874         * decl.c (grokdeclarator): Avoid trying to get an operand off an
18875         identifier node.
18877 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
18879         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
18880         POINTER_SIZE to agree with expr.c.
18882 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
18884         * search.c (lookup_field): Don't report ambiguities if protect is 0,
18885         instead return NULL_TREE.
18887 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
18889         * class.c (finish_struct_1): Call warn_hidden if we want warnings
18890         about overloaded virtual functions.
18891         (warn_hidden): New routine to warn of virtual functions that are
18892         hidden by other virtual functions, that are not overridden.
18893         (get_basefndecls): New routine, used by warn_hidden.
18894         (mark_overriders): New routine, used by warn_hidden.
18895         * search.c (get_matching_virtual): Remove old warning that just
18896         isn't very useful.
18898 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18900         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
18902         * typeck.c (null_ptr_cst_p): Delete unused fn.
18903         (build_function_call_maybe): Delete unused fn.
18905         * expr.c (extract_init): #if 0 the code after unconditional return 0
18906         for now.
18908         Delete old cadillac code.
18909         * edsel.c: Remove file.
18910         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
18911         * Makefile.in (CXX_OBJS): Delete edsel.o.
18912         (edsel.o): Delete rule.
18913         * cp-tree.h (flag_cadillac): Delete var decl.
18914         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
18915         * decl2.c (flag_cadillac): Delete var definition.
18916         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
18917         (grokfield): Delete code depending on flag_cadillac.
18918         (finish_anon_union): Likewise.
18919         * class.c (finish_struct_1): Likewise.
18920         (pushclass): Likewise.
18921         (popclass): Likewise.
18922         (push_lang_context): Likewise.
18923         (pop_lang_context): Likewise.
18924         * decl.c (init_decl_processing): Likewise.
18925         (start_decl): Likewise.
18926         (cp_finish_decl): Likewise.
18927         (xref_tag): Likewise.
18928         (finish_enum): Likewise.
18929         (start_function): Likewise.
18930         (finish_function): Likewise.
18931         (finish_stmt): Likewise.
18932         * lex.c (lang_init): Likewise.
18933         (check_newline): Likewise.
18935         * lex.c (do_pending_inlines): Delete synthesized method kludge.
18937         Delete defunct, ancient garbage collection implementation.
18938         * rtti.c: New file with the RTTI stuff from gc.c.
18939         * gc.c: Removed file (moved the remaining stuff into rtti.c).
18940         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
18941         (rtti.o): New rule, replacing gc.o.
18942         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
18943         * cp-tree.h: Delete gc-related fn decls.
18944         (DECL_GC_OFFSET): Delete macro.
18945         (flag_gc): Delete extern decl.
18946         * decl.c (current_function_obstack_index): Delete var decl.
18947         (current_function_obstack_usage): Delete var decl.
18948         (start_function): Delete clearing of current_function_obstack_index
18949         and current_function_obstack_usage.
18950         (init_decl_processing): Delete code relying on -fgc.
18951         Delete call to init_gc_processing.
18952         (cp_finish_decl): Delete calls to build_static_gc_entry and
18953         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
18954         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
18955         and to expand_expr of a __gc_main call.
18956         (maybe_gc_cleanup): Delete var decl.
18957         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
18958         * decl2.c (flag_gc): Delete var decl.
18959         (lang_f_options): Delete offering of -fgc.
18960         (lang_decode_option): Delete -fgc and -fno-gc handling.
18961         (get_temp_regvar): Delete gc code.
18962         * init.c (build_new): Delete gc code.
18963         * lex.c (init_lex): Delete checking of flag_gc.
18965         * typeck.c (convert_arguments): Delete gc code.
18966         (build_component_addr): Delete -fgc warning.
18967         (build_modify_expr): Delete gc code.
18969         * decl2.c (build_push_scope): Delete fn.
18970         * cp-tree.h (build_push_scope): Delete decl.
18972         * search.c (clear_search_slots): Delete fn.
18973         * cp-tree.h (clear_search_slots): Delete decl.
18975         * search.c (tree_needs_constructor_p): Delete fn.
18976         * cp-tree.h (tree_needs_constructor_p): Delete decl.
18978         * tree.c (id_cmp): Delete fn.
18980         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
18981         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
18983         * tree.c (decl_value_member): Delete fn.
18984         * cp-tree.h (decl_value_member): Delete decl.
18986         * tree.c (list_hash_lookup_or_cons): Delete fn.
18987         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
18989         * method.c (cplus_exception_name): Delete fn.
18990         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
18992         * spew.c (shift_tokens): Delete fn.
18994 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
18996         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
18997         to cp_finish_decl.
18998         * parse.y: Likewise.
19000 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19002         * tree.c (build_cplus_staticfn_type): Delete function definition;
19003         never used.
19004         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
19006         * tree.c (virtual_member): Delete function definition; never used.
19007         * cp-tree.h (virtual_member): Delete decl.
19009 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
19011         * typeck.c (build_component_ref): Handle getting vbase pointers
19012         out of complex multiple inheritance better.
19014 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
19016         * typeck.c (build_object_ref): Make sure we use the real type, not
19017         any reference type.
19019 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
19021         * tree.c (build_exception_variant): Don't create new types if we
19022         don't have to, also build new types on the right obstack.
19024 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
19026         * decl.c (store_bindings): Split out from push_to_top_level.
19027         (push_to_top_level): Call it for b->type_shadowed on class binding
19028         levels.
19030 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
19032         * search.c (expand_upcast_fixups): Fix so that offsets stored in
19033         vbase_offsets are always right.  Fixes a problem where virtual base
19034         upcasting and downcasting could be wrong during conversions on this
19035         during virtual function dispatch at ctor/dtor time when dynamic
19036         vtable fixups for deltas are needed.  This only sounds easier than
19037         it is.  :-)
19038         (fixup_virtual_upcast_offsets): Change to reflect new calling
19039         convention for expand_upcast_fixups.
19041 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19043         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
19044         check that it's usable as the bitfield width.
19046 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19048         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
19049         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
19050         only ever used for functions in it.
19052 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
19054         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
19055         (nested_type): Likewise.
19056         (nested_name_specifier): Use lastiddecl.
19058         * decl.c (grokdeclarator): Adjust accordingly.
19059         * init.c (expand_member_init): Likewise.
19060         * parse.y (base_class): Likewise.
19061         * typeck2.c (build_functional_cast): Likewise.
19063         * typeck2.c (build_functional_cast): Fill in name after we've
19064         checked for non-aggr type.
19066 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
19068         * decl2.c (warn_pointer_arith): Default to on.
19070 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
19072         * lex.c (is_rid): New function.
19073         * decl.c (grokdeclarator): Diagnose reserved words used as
19074         declarator-ids.
19076 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
19078         * tree.c (get_decl_list): Don't lose cv-quals.
19080         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
19081         typespecs used as declarator-ids.
19083 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
19085         * decl.c (poplevel): When poping a level, don't give a warning for
19086         any subblocks that already exist.
19088 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
19090         * typeck.c (build_object_ref): Finish what I started.
19092         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
19094         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
19096         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
19097         scope.
19099 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
19101         * decl.c (xref_tag): Handle passing a type in directly.
19103         * parse.y (qualified_type_name): Pull out the type.
19104         (nested_type): Likewise.
19105         Take types directly instead of as identifiers.
19106         * call.c (build_scoped_method_call): Take types directly instead of
19107         as identifiers.
19108         * decl.c (xref_basetypes): Likewise.
19109         * init.c (expand_member_init): Likewise.
19110         (build_member_call): Likewise.
19111         (build_offset_ref): Likewise.
19112         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
19113         * method.c (do_build_assign_ref): Likewise.
19114         * decl.c (grokdeclarator): Handle a type appearing as the
19115         declarator-id for constructors.
19116         * method.c (do_build_copy_constructor): current_base_init_list now
19117         uses the types directly, not their names.
19118         * init.c (sort_base_init): Likewise.
19119         (expand_member_init): Likewise.
19120         * init.c (is_aggr_type): New function, like is_aggr_typedef.
19122 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
19124         * tree.c (layout_basetypes): Call build_lang_field_decl instead
19125         of build_lang_decl if first arg is a FIELD_DECL.
19127 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19129         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
19130         non-empty.
19131         * except.c (expand_start_catch_block): Set TREE_USED to avoid
19132         warnings about the catch handler.
19134 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
19136         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
19137         expand_target_expr.
19139 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19141         Fix access control to use trees rather than integers.
19142         * class.c (access_{default, public, protected, private,
19143         default_virtual, public_virtual, private_virtual}_node): Add
19144         definitions.
19145         (init_class_processing): Do creation of those nodes.
19146         * cp-tree.h (access_type): Delete enum decl.
19147         (access_{default, public, protected, private, default_virtual,
19148         public_virtual, private_virtual}_node): Add decls.
19149         (compute_access): Change return type.
19150         * search.c (compute_access): Have tree return type, instead of enum.
19151         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
19152         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
19153         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
19154         * parse.y (VISSPEC): Make ttype rather than itype.
19155         (base_class_access_list): Likewise.
19156         * *.[cy]: Change all refs of `access_public' to `access_public_node',
19157         etc.
19158         * call.c (build_method_call): Make ACCESS be a tree.
19159         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
19160         * cvt.c (convert_to_aggr): Likewise.
19161         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
19162         Likewise.
19163         * method.c (hack_identifier): Likewise.
19164         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
19166 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
19168         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
19169         frontend, and make it more consistent with respect to
19170         warn_pointer_arith.
19172 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
19174         * decl.c (pushdecl): Check for duplicate parameter names.
19176 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
19178         * decl.c (expand_static_init): Call assemble_external for atexit.
19180 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
19182         * except.c (do_unwind): Remove some generated dead code.
19183         (eh_outer_context): New routine, factor out some common code from
19184         expand_builtin_throw and end_eh_unwinder.  Add code to do return
19185         address masking for the PA.
19186         (expand_builtin_throw): Use eh_outer_context instead of open coding
19187         it here.
19188         (end_eh_unwinder): Likewise.
19190 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
19192         * except.c (expand_throw): Call assemble_external for __empty, if we
19193         use it.
19195 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
19197         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
19198         NORMAL_RETURN_ADDR_OFFSET.
19199         (end_eh_unwinder): Likewise.
19201 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
19203         * gc.c (build_dynamic_cast): Make sure we don't cast away const
19204         when dealing with references, and make sure we handle dynamic
19205         casting to a cv qualified reference.
19207 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
19209         * except.c (struct eh_context): New structure top hold eh context
19210         information.
19211         (push_eh_context): New routine.
19212         (pop_eh_context): Likewise.
19213         * decl.c (push_cp_function_context): Use them.
19214         (pop_cp_function_context): Likewise.
19216 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
19218         * decl2.c (finish_file): Also prune uninteresting functions in the
19219         inline emission loop.
19221 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
19223         * sig.c (build_signature_table_constructor): Mark functions
19224         in the signature as referenced.
19226 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
19228         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
19229         the inline emission stuff.
19231 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
19233         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
19234         weak symbols.
19235         * lang-options.h: Add -f{no-,}weak.
19236         * decl.c (init_decl_processing): If the target does not support weak
19237         symbols, don't use them.
19238         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
19240 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
19242         * init.c (expand_member_init): warning for base init after members.
19244 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
19246         * cvt.c (build_expr_type_conversion): Don't convert to a reference
19247         type.
19249 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
19251         * method.c (report_type_mismatch): Improve wording for volatile
19252         mismatches.
19254 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
19256         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
19257         expand_assignment, as the later doesn't handle things that have
19258         copy constructors well.  The compiler would do bitwise copying,
19259         instead of ctor calling in some cases.
19261 Wed Dec 13 17:05:54 1995  Paul Eggert  <eggert@twinsun.com>
19263         * g++.c (my_strerror): Return "cannot access" if errno is 0.
19264         (pfatal_with_name, perror_exec): Don't assume that
19265         the returned value from my_strerror contains no '%'s.
19266         (concat): Remove.
19267         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
19269 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
19271         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
19272         TYPE_METHODS/TREE_CHAIN mean what they used to.
19273         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
19274         instead of TYPE_METHODS.
19275         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
19276         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
19277         * cp-tree.h (CLASSTYPE_METHODS): Lose.
19278         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
19279         TYPE_METHODS.
19280         (struct lang_decl): Lose next_method field.
19281         (DECL_NEXT_METHOD): Lose.
19282         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
19283         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
19284         anymore.
19285         (finish_struct_methods): Don't mess with the TREE_CHAINs in
19286         fn_fields.
19288         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
19289         vector.
19291         * call.c (build_method_call): Synthesize here even when not inlining.
19292         * typeck.c (build_function_call_real): Likewise.
19294 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
19296         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
19297         == DBX_DEBUG, call dbxout_start_new_source_file and
19298         dbxout_resume_previous_source_file when appropriate.
19300 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
19302         * except.c (start_anon_func): Push to the top level.
19303         (end_anon_func): Pop from the top level.
19305 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
19307         * cp-tree.h (build_cleanup): New routine to build cleanups.
19308         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
19309         call at ctor time and use atexit to run it later.
19310         * decl2.c (build_cleanup): New routine, taken from finish_file.
19311         (finish_file): Use build_cleanup instead, and don't put function
19312         local statics in global dtor list.
19314 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
19316         * except.c (expand_throw): Ensure that we have cleanups, if we try
19317         and expand cleanups.
19319 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
19321         * except.c (expand_throw): Add logic to manage dynamic cleanups for
19322         the EH object.
19323         (expand_end_catch_block): Use the magic of expand_goto, instead of
19324         emit_jump so that we get the cleanup for any catch clause parameter
19325         and the cleanup for the exception object.  Update to reflect label
19326         changes.
19327         (push_eh_cleanup): New routine to register a cleanup for an
19328         exception object.
19329         (empty_fndecl): Used to default cleanup actions to
19330         nothing.
19331         (init_exception_processing): Setup empty_fndecl.  Setup
19332         saved_cleanup.
19333         (expand_start_catch_block): Update to reflect label changes.  Call
19334         push_eh_object to register the cleanup for the EH object.
19335         (start_anon_func): New routine to start building lambda expressions
19336         from trees.
19337         (end_anon_func): New routine to end them.
19338         (struct labelNode): Change so that we can use tree labels, or rtx
19339         labels.
19340         (saved_cleanup): Object to check for dynamic cleanups for the
19341         exception handling object.
19342         (push_label_entry): Change so that we can use tree labels, or rtx
19343         labels.
19344         (pop_label_entry): Likewise.
19345         (top_label_entry): Likewise.
19346         (expand_start_all_catch): Use tree label instead of rtx label, so
19347         that we can get the magic of expand_goto.
19348         (expand_end_all_catch): Update to reflect label changes.
19350         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
19351         use UNSAVE_EXPRs.
19352         * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
19353         building_cleanup logic, as we now use UNSAVE_EXPRs.
19354         * cp-tree.h (unsave_expr): Declare it.
19355         * decl.c (building_cleanup): Remove.
19356         (maybe_build_cleanup): Remove building_cleanup logic, and use
19357         UNSAVE_EXPR instead.
19359 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
19361         * gc.c (build_t_desc): Update error message to say <typeinfo>.
19363 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19365         * decl.c (pushdecl): Only warn about shadowing a local variable if
19366         warn_shadow is true.
19368 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
19370         * typeck.c (build_binary_op_nodefault): Added warning about
19371         comparisons between different enum types with -Wall, unless
19372         -fenum-int-equiv set.
19374 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
19376         * class.c (finish_struct_1): Skip down to the inner type in
19377         multidimensional arrays.  Ensures ctors will be made for types that
19378         need constructing.
19380 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
19382         * decl.c (last_dtor_insn): New to track the last compiler generated
19383         insn in a dtor.
19384         (store_parm_decls): Set it.
19385         (finish_function): Use it to see if the dtor is empty.  Avoid doing
19386         vtable setup all the time, if we can.
19387         (struct cp_function): Add last_dtor_insn.
19388         (push_cp_function_context): Save it.
19389         (pop_cp_function_context): Restore it.
19391 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
19393         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
19394         warnings.
19396 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
19398         * typeck.c (expand_target_expr): Make sure targets get put into the
19399         current temp_slot_level, so that the free_temp_slots call will reuse
19400         them.
19402 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
19404         * class.c (finish_struct_1): Delay delta fixups for virtual bases
19405         until after we have done the hard virtuals, to avoid a bogus `every
19406         virtual function must have a unique final overrider' for virtual
19407         functions that are only overridden by hard virtuals.
19409 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
19411         * pt.c (do_function_instantiation): Don't try to find a file-scope
19412         template for a member function.
19414 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
19416         * g++.c (main): Add handling of -nodefaultlibs.
19418 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
19420         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
19421         distinguish between direct bindings of reference variables, and
19422         indirect bindings of reference variables.
19423         * cvt.c (build_up_reference): Use it.
19424         * typeck.c (convert_arguments): Use it to indicate this is an
19425         indirect binding.
19426         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
19427         as they are unused.
19428         (expand_static_init): Likewise.
19429         (cplus_expand_expr_stmt): Likewise.
19430         * decl2.c (finish_file): Likewise.
19431         * init.c (perform_member_init): Likewise.
19432         (emit_base_init): Likewise.
19433         (expand_aggr_vbase_init_1): Likewise.
19435 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19437         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
19438         get a DECL_LANG_SPECIFIC node.
19439         * cp-tree.h (lang_decl_flags): Add new member `level'.
19440         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
19441         decl_flags level member.
19443 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19445         * call.c (build_method_call): Make sure instance has a
19446         TYPE_LANG_SPECIFIC node before we dive into it.
19448 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
19450         * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
19452 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
19454         * decl.c (duplicate_decls): When smashing decls, smash staticness in
19455         the usual way.
19457 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
19459         * decl.c (poplevel): Handle the merging of subblocks of cleanups
19460         when finishing blocks that have already been created (usually due to
19461         the fixup goto code).  Fixes bad debugging information.
19463 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
19465         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
19466         that's not a list of overloaded functions.
19468 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19470         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
19471         before trying to use DECL_ABSTRACT_VIRTUAL_P.
19473 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
19475         * decl2.c (mark_used): New function for hooking into setting of
19476         TREE_USED on decls.
19477         * call.c (build_method_call): Use it.
19478         * class.c (instantiate_type): Likewise.
19479         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
19480         for all like-named functions.
19481         * method.c (hack_identifier): Likewise.
19482         (emit_thunk): Don't call assemble_external.
19483         (make_thunk): Create thunk as a FUNCTION_DECL so that it
19484         gets the right mode and ENCODE_SECTION_INFO works.
19486         * parse.y: Use mark_used.  Pass operator names to do_identifier.
19487         * lex.c (do_identifier): Handle operator names.
19489         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
19491 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19493         * errfn.c: Include stdio.h.
19494         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
19496 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
19498         * typeck2.c (digest_init): Always convert initializers to the
19499         right type.
19501 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
19503         * init.c (member_init_ok_or_else): Don't allow member initializers
19504         for indirect members, as it is invalid.
19506 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19508         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
19510 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
19512         * parse.y (for.init.statement): Catch compound statements inside for
19513         initializations, if we're being pedantic.
19515 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
19517         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
19518         looking for.
19520 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
19522         * error.c (dump_expr): Don't core dump when a boolean expression is
19523         used as a default argument.
19525 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
19527         * class.c (finish_struct_bits): Check aggregate_value_p instead of
19528         RETURN_IN_MEMORY.
19530 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
19532         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
19533         BLKmode type that would otherwise be returned in registers.
19535 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19537         * g++.c (WITHLIBC): New macro.
19538         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
19539         saw_libc and pass it at the end if it was set.
19541 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
19543         * parse.y (fn.def1): Call split_specs_attrs in
19544         declmods notype_declarator case.