* class.c (create_vtable_ptr): Put the vtable at the beginning of
[official-gcc.git] / gcc / cp / ChangeLog
blob31ea825832969f73a871fa9c69cf66dc038f338a
1 1999-12-21  Mark Mitchell  <mark@codesourcery.com>
3         * class.c (create_vtable_ptr): Put the vtable at the beginning of
4         the class, not the end, in the new ABI.
5         * decl2.c (flag_new_ab): Initialize it to one.
6         * tree.c (propagate_binfo_offsets): Do the right thing for the new
7         ABI.
9 1999-12-20  Mark Mitchell  <mark@codesourcery.com>
11         * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
12         (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
13         (CLASSTYPE_PRIMARY_BINFO): Likewise.
14         * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
15         TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
16         (check_bases_and_members): Set them here instead.
17         (create_vtable_ptr): New function, split out from ...
18         (finish_struct_1): ... here.  Use it.  Tidy.  Use
19         CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
20         * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
21         the first field in the class.
22         * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES.  Handle
23         seeing TYPE_VFIELD as the first field in the class.
24         
25         * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
26         (TYPE_POLYMORPHIC_P): ... this.
27         (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
28         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
29         (TREE_CALLS_NEW): Remove.
30         (TREE_MANGLED): Likewise.
31         * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
32         and TYPE_POLYMORPHIC_P.
33         * class.c (check_bases): Likewise.
34         (finish_base_struct): Likewise.
35         (finish_struct_bits): Likewise.
36         (check_for_override): Likewise.
37         (finish_struct_1): Likewise.
38         (get_vfield_name): Likewise.
39         * decl.c (xref_basetypes): Likewise.
40         * decl2.c (import_export_class): Likewise.
41         (import_export_decl): Likewise.
42         * error.c (dump_function_decl): Likewise.
43         * pt.c (instantiate_class_template): Likewise.
44         * repo.c (repo_inline_used): Likewise.
45         * rtti.c (build_headof): Likewise.
46         (get_tinfo_fn_dynamic): Likewise.
47         (build_x_typeid): Likewise.
48         (get_tinfo_var): Likewise.
49         (build_dynamic_cast_1): Likewise.
50         (synthesize_tinfo_fn): Likewise.
51         * search.c (lookup_field_1): Likewise.
52         (dfs_debug_mark): Likewise.
53         (maybe_suppress_debug_info): Likewise.
54         * typeck.c (build_component_ref): Likewise.
55         (build_component_addr): Likewise.
56         * typeck2.c (process_init_constructor): Likewise.
57         
58 1999-12-20  Nathan Sidwell  <nathan@acm.org>
60         * typeck.c (strip_all_pointer_quals): New static function.
61         (build_static_cast): Use it. Don't use at_least_as_qualified_p.
63 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
65         * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
66         (dso_handle_node): New macro.
67         (flag_use_cxa_atexit): New variable.
68         (declare_global_var): New function.
69         (start_anon_func): Remove declaration.
70         (end_anon_func): Likewise.
71         * decl.c (get_atexit_node): New function, split out from
72         destroy_local_static.  Handle flag_use_cxa_atexit.
73         (get_dso_handle_node): Likewise.
74         (start_cleanup_fn): Renamed from start_anon_func.  Moved here from
75         except.c.  Handle flag_use_cxa_atexit.
76         (end_cleanup_fn): Renamed from end_anon_func.  Moved here from
77         except.c.
78         (declare_global_var): New variable.
79         (destroy_local_static): Handle flag_use_cxa_atexit.
80         * decl2.c (flag_use_cxa_atexit): New variable.
81         (lang_f_options): Likewise.
82         * except.c (start_anon_func): Remove.
83         (end_anon_func): Liekwise.
84         * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
85         * rtti.c (get_tinfo_var): Use declare_global_var.
87 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
89         * class.c (check_field_decls): Don't return a value.
90         (avoid_overlap): Moved here from tree.c.
91         (build_base_fields): Likewise.
92         (check_bases): New function, split out from finish_base_struct.
93         (check_bases_and_members): New function, split out from finish_struct_1.
94         (struct base_info): Remove cant_have_default_ctor,
95         cant_have_const_ctor, cant_have_asn_ref.
96         (finish_base_struct): Split semantic analysis into check_bases.
97         (finish_struct_methods): Fix bogus assertion.
98         (check_field_decls): Call finish_struct_anon here.
99         (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
100         (finish_struct_1): Use check_bases_and_members.  Reorganize.
101         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
102         (build_base_fields): Don't declare.
103         * tree.c (avoid_overlap): Remove.
104         (build_base_fields): Likewise.
105         
106         * optimize.c (struct inline_data): Remove scope_stmt.
107         (remap_block): Don't use insert_block_after_note.  Don't update
108         scope_stmt.
109         (expand_call_inline): Don't update scope_stmt.
110         (optimize_function): Don't initialize scope_stmt.
111         * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
112         NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
114 1999-12-15  Mark Mitchell  <mark@codesourcery.com>
116         * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
117         out of the class, rather than taking them as parameters.
118         (build_vbase_pointer_fields): Move here from tree.c.
119         (build_vtbl_or_vbase_field): New function.
120         (check_methods): Likewise.
121         (remove_zero_width_bitfields): Likewise.
122         (add_virtual_function): Use tree_cons instead of temp_tree_cons.
123         (delete_duplicate_fields_1): Tidy.  Don't delete duplicate
124         USING_DECLs here.
125         (finish_struct_methods): Handle the case where there are no
126         methods here.
127         (get_basefndecls): Use tree_cons instead of temp_tree_cons.
128         (check_field_decls): Call delete_duplicate_fields here.
129         (finish_struct_1): Tidy.  Use check_methods and
130         remove_zero_width_bitfields.
131         * cp-tree.h (build_vbase_pointer_fields): Remove.
132         * decl.c (grokdeclarator): Use tree_cons instead of
133         temp_tree_cons.
134         * decl2.c (qualified_lookup_using_namespace): Use tree_cons
135         instead of temp_tree_cons.
136         * lex.c (cons_up_default_function): Remove dead code.
137         * method.c (fixup_pending_inline): New function, split out from ...
138         (do_inline_function_hair): ... here.
139         * tree.c (build_vbase_pointer_fields): Remove.
140         
141 1999-12-15  Jason Merrill  <jason@casey.cygnus.com>
143         * tree.c (walk_tree): Walk operand subtrees in forward order.
144         * optimize.c (expand_call_inline): Likewise.
145         (optimize_function): Initialize id->scope_stmt to something useful.
146         (remap_block): Assume id->scope_stmt has a useful value.
148 1999-12-15  Nathan Sidwell  <nathan@acm.org>
150         * typeck.c (build_c_cast): Expand warning message. Move pointer
151         alignment warning to after the cast. Don't warn about pointer
152         alignment when given a pointer to incomplete.
154 1999-12-15  Richard Henderson  <rth@cygnus.com>
156         * cp-tree.h (make_aggr_type): Declare.
157         * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
158         (make_aggr_type): New.
160         * decl.c (build_typename_type, init_decl_processing): Use it.
161         (build_ptrmemfunc_type, xref_tag): Likewise.
162         * except.c (call_eh_info): Likewise.
163         * init.c (init_init_processing): Likewise.
164         * pt.c (process_template_parm, lookup_template_class): Likewise.
165         * rtti.c (expand_class_desc): Likewise.
166         * semantics.c (begin_class_definition, finish_typeof): Likewise.
167         * tree.c (copy_template_template_parm): Likewise.
169 1999-12-15  Jason Merrill  <jason@yorick.cygnus.com>
171         * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
172         sizeof (struct tree_common).
174 1999-12-14  Jason Merrill  <jason@casey.cygnus.com>
176         * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
177         outermost block to point to the inlined function decl.
179         * error.c (dump_decl): operator==, not operator ==.
180         (op_to_string): Likewise.
182         * decl.c (compute_array_index_type): Handle null name.
184         * decl2.c (ambiguous_decl): Fix to match comment.
185         (lookup_using_namespace): Adjust.
187         * decl2.c (import_export_class): Don't ignore dllimport.
189 1999-12-14  Mark Mitchell  <mark@codesourcery.com>
191         * class.c (check_field_decls): Split out from ...
192         (finish_struct_1): ... here.  Use it.  Tidy.
194         * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
195         * optimize.c (copy_body_r): Pass it.
196         * tree.c (remap_save_expr): Clear walk_subtrees for an
197         already-handled SAVE_EXPR.
198         (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
200         * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
201         * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
203         * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
205 1999-12-14  Mumit Khan  <khan@xraylith.wisc.edu>
207         * class.c (finish_base_struct): Allow multiple COM base classes
208         as well as non-COM bases as long as it's not the leftmost.
210 1999-12-13  Mumit Khan  <khan@xraylith.wisc.edu>
212         * lex.c (saving_parse_to_obstack): New global.
213         (reinit_parse_for_block): Use.
214         (reinit_parse_for_expr): Use.
215         (check_newline): Use.
217 1999-12-13  Mark Mitchell  <mark@codesourcery.com>
219         * optimize.c (initialize_inlined_parameters): Take FN to which the
220         parameters belong as an argument.
221         (expand_call_inline): Expand calls into the parameter
222         initializations before pushing the function onto the list of
223         functions we are presently expanding.
225 1999-12-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
227         * class.c (get_vtable_name): Use a literal format string and
228         VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
229         (prepare_fresh_vtable): Likewise.
231         * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
232         VTABLE_NAME_FORMAT.
234         * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
236         * init.c (build_vec_init): Initialize variable `try_body'.
238         * lex.c (yyerror): Don't call a variadic function with a
239         non-literal format string.
241         * optimize.c (optimize_function): Call memset, not bzero.
243         * pt.c (for_each_template_parm_r): Add static prototype.
245 1999-12-09  Andreas Jaeger  <aj@suse.de>
247         * except.c (expand_throw): Add static attribute to match
248         prototype.
250         * Makefile.in (semantics.o): Add dependency on output.h.
251         * semantics.c: Include output.h for declaration of
252         make_function_rtl.
254 1999-12-09  Mark Mitchell  <mark@codesourcery.com>
256         * decl.c (init_decl_processing): Reenable inlining on trees.
257         (finish_function): Likewise.
258         * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
259         * semantics.c (simplify_aggr_init_exprs): New function.
260         (expand_body): Use it.
261         * tree.c (walk_tree): Special-case TARGET_EXPRs since they
262         sometimes present the same sub-tree twice.
263         
264         * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
265         `csl'.
267         * semantics.c (finish_switch_cond): Do conversions here, not ...
268         * typeck.c (c_expand_start_case): Here.
270         * semantics.c (do_poplevel): Remove unused variable.
271         
272 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
274         * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
275         unless we're declaring the variable in question.
277 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
279         * decl.c (init_decl_processing): #if 0 last patch.
280         (finish_function): Likewise.
282 1999-12-05  Mark Mitchell  <mark@codesourcery.com>
284         * decl.c (init_decl_processing): Set flag_inline_trees if
285         !flag_no_inline.
287         * cp-tree.h (calls_setjmp_p): Declare.
288         * decl.c (finish_function): Mark functions that call setjmp as
289         uninlinable.
290         * optimize.c (calls_setjmp_r): New function.
291         (calls_setjmp_p): Likewise.
293 1999-12-04  Mark Mitchell  <mark@codesourcery.com>
295         * optimize.c (expand_call_inline): Wrap the expanded call in an
296         EXPR_WITH_FILE_LOCATION node to get correct line numbers for
297         inlined functions.
299         * optimize.c (inline_data): Remove fns_top.  Add scope_stmt.  Add
300         in_target_cleanup_p.
301         (remap_decl): New function.
302         (remap_block): Likewise.
303         (copy_scope_stmt): Likewise.
304         (copy_body_r): Use remap_decl and copy_scope_stmt.
305         (copy_body): Use VARRAY_TOP_TREE.
306         (initialize_inlined_parameters): Likewise.
307         (declare_return_variable): Likewise.
308         (inlinable_function_p): Check flag_inline_trees.
309         (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
310         specially.  Use VARRAY_PUSH_TREE.  Create a BLOCK for the
311         parameters of the inlined function.
312         (optimize_function): Prevent recursion into partially complete
313         functions.
314         
315         * cp-tree.def (SCOPE_STMT): Take one operand.
316         * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
317         (SCOPE_NULLIFIED_P): Redefine.
318         (SCOPE_NO_CLEANUPS_P): New macro.
319         (add_scope_stmt): Change prototype.
320         * decl.c (poplevel): Tidy.  Warn about unused variables here.
321         Record SCOPE_STMT_BLOCKs.
322         (finish_function): Keep DECL_INITIAL for functions that might be
323         inlined.
324         * ir.texi: Document SCOPE_NO_CLEANUPS_P.
325         * semantics.c: Include rtl.h.
326         (add_scope_stmt): Return the new scope statement and, for an
327         end-of-scope statement, its matching begin statement.  Don't set
328         SCOPE_NULLIFIED_P.
329         (do_pushlevel): Simplify, now that we are always
330         function-at-a-time.
331         (do_poplevel): Likewise.  Record SCOPE_STMT_BLOCKs.
332         (expand_stmt): Don't call expand_start_bindings or
333         expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
334         * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
335         SCOPE_NULLIFIED_P.
336         * Makefile.in (semantics.o): Depend on RTL_H.
337         
338         * decl2.c (pending_statics_used): Make it a macro.
339         (saved_inlines_used): Likewise.
340         (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
341         (mark_inline_for_output): Likewise.
342         (ssdf_decls_used): Remove.
343         (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
344         (generate_ctor_or_dtor_function): Adjust accordingly.
345         
346 1999-11-24  Geoffrey Keating  <geoffk@cygnus.com>
347             Greg McGary  <gkm@gnu.org>
349         * decl.c (duplicate_decls): Merge
350         DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
351         DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
353 1999-12-02  Mike Stump  <mrs@wrs.com>
355         * init.c (perform_member_init): Handle parse errors better.
357 1999-12-01  Mark Mitchell  <mark@codesourcery.com>
359         * cp-tree.h (min_tree_cons): Remove.
360         (scratch_ovl_cons): Likewise.
361         * decl.c (saveable_obstack): Don't declare.
362         (duplicate_decls): Tweak error-message.
363         (initialize_local_var): Explicitly mark the definition as static.
364         (finish_function): Call permanent_allocation, just so
365         that the middle-end sees the obstacks it expects.
366         (mark_cp_function_context): Likewise.
367         * init.c (build_new): Don't use min_tree_cons.
368         * lex.c (permanent_obstack): Don't declare.
369         (current_obstack, saveable_obstack): Likewise.
370         * spew.c (current_obstack, saveable_obstack): Likewise.
371         * tree.c (current_obstack, saveable_obstack): Likewise.
372         (scratch_ovl_cons): Remove.
373         (build_min_nt): Don't mess with obstacks.
374         (build_min): Likewise.
375         (min_tree_cons): Remove
376         * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
377         (build_x_function_call): Likewise.
378         (build_c_cast): Don't use min_tree_cons.
379         
380 1999-11-29  Mark Mitchell  <mark@codesourcery.com>
382         * pt.c (tsubst_decl): Robustify.
384 1999-11-27  Mark Mitchell  <mark@codesourcery.com>
386         * decl2.c (finish_file): Call expand_body for inline functions
387         that will be written out but that do not yet have RTL.
388         * semantics.c (expand_body): Do not generate RTL For inline
389         functions that do not yet need to be written out.
391 1999-11-25  Mark Mitchell  <mark@codesourcery.com>
393         * Make-lang.in (CXX_SRCS): Add optimize.c.  
394         * Makefile.in (CXX_OBJS): Add optimize.o.
395         (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
396         (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
397         (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
398         (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
399         (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
400         (dump.o): Likewise.
401         (optimize.o): New target.  
402         * class.c: Don't include splay-tree.h.
403         * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.  
404         * cp-tree.h: Include splay-tree.h.
405         (DECL_UNINLINABLE): New macro.
406         (CTOR_BEGIN_P, CTOR_END_P): New macros.
407         (flag_inline_trees): New variable.
408         (local_variable_p): New function.
409         (nonstatic_local_decl_p): Likewise.
410         (optimize_function): Likewise.
411         (cplus_unsave_expr_now): Remove.
412         (copy_tree_r): Declare.
413         (remap_save_expr): Likewise.  
414         * decl.c (local_variable_p): Don't
415         make it static.
416         (local_variable_p_walkfn): New function.
417         (make_rtl_for_local_static): Remove code to try to avoid writing
418         out static constants.
419         (emit_local_var): Fix indentation.
420         (nonstatic_local_decl_p): New function.
421         (check_default_argument): Use local_variable_p_walkfn, not
422         local_variable_p, when walking the tree.
423         (start_function): Set the DECL_CONTEXT for automatically generated
424         labels.
425         (finish_constructor_body): Use CTOR_STMT to mark the end of a
426         constructor.  
427         * decl2.c: Don't include splay-tree.h.
428         (flag_inline_trees): Define.  
429         * dump.c: Don't include
430         splay-tree.h.  
431         * except.c (expand_end_catch_block): Fix comment formatting.
432         (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
433         (expand_throw): Tidy comment.  
434         * init.c (build_vec_delete_1): Use create_temporary_var.  
435         * lex.c (cplus_tree_code_type): Make it static.
436         (cplus_tree_code_length): Likewise.
437         (cplus_tree_code_name): Likewise.  
438         * optimize.c: New file.  
439         * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
440         with computed gotos.
441         (setup_vtbl_ptr): Mark the beginnings of constructors with
442         CTOR_STMT.
443         (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
444         (expand_body): Call optimize_function.  Save bodies if we're doing
445         inlining on trees.
446         * tree.c: Don't include splay-tree.h.  Include insn-config.h and
447         integrate.h.
448         (copy_tree_r): Make it public.
449         (statement_code_p): New function.
450         (mark_local_for_remap_r): Likewise.
451         (cp_usave_r): Likewise.
452         (cp_unsave): Likewise.
453         (build_cplus_new): Set DECL_CONTEXT for temporary variables.
454         (walk_tree): Walk into `s' class nodes.  Walk statement chains.
455         (copy_tree_r): Handle 's' class nodes.  Restore chains for
456         statements.  Nullify scopes.  Don't copy types.
457         (init_tree): Set lang_unsave to cp_unsave.
458         (remap_save_expr): Define.
459         * ir.texi: Document CTOR_STMT.
460         
461 1999-11-24  Jason Merrill  <jason@casey.cygnus.com>
463         * search.c (note_debug_info_needed): Do perform this optimization
464         for dwarf2.  
465         (maybe_suppress_debug_info): Likewise.  Start by clearing
466         TYPE_DECL_SUPPRESS_DEBUG.
468 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
470         * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
472         * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
474 1999-11-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
476         * decl.c (pushdecl, grokdeclarator): Don't call a variadic
477         function with a non-literal format string.
479         * lex.c (do_identifier): Likewise.
481         * typeck.c (build_unary_op): Likewise.
483 1999-11-23  Mark Mitchell  <mark@codesourcery.com>
485         * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
487 1999-11-22  Mark Mitchell  <mark@codesourcery.com>
489         * cp-tree.def (CTOR_COMPLETE): New tree node.
490         * decl.c (finish_constructor_body): Add it, to mark the end of the
491         constructor.
492         (finish_function): Don't call end_protect_partials here.
493         * ir.texi (CTOR_COMPLETE): Document it.
494         * semantics.c (expand_stmt): Handle it.
495         
496         * cp-tree.def (FUNCTION_NAME): New tree node.
497         * cp-tree.h (current_function_name_declared): Tweak documentation.
498         (lang_decl_flags): Add pretty_function_p, adjust dummy.
499         (DECL_PRETTY_FUNCTION_P): New macro.
500         * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
501         etc., in a template function.  Use at_function_scope_p instead of
502         expanding it inline.
503         * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
504         specially.
505         (tsubst): Handle FUNCTION_NAME.
506         (tsubst_copy): Likewise.
507         (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
508         etc. in instantiation.
509         * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
510         even in template functions.
511         (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
512         conditional scope at the top of a destructor.
513         
514         * error.c (dump_function_decl): Use `[ with ... ]' syntax for
515         specializations too.
517 1999-11-22  Nathan Sidwell  <nathan@acm.org>
519         * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
520         when actually negative.
522         * typeck.c (convert_for_assignment): Expand comment about
523         strange NULL check, moved from ...
524         (convert_for_initialization): ... here. Remove unneeded
525         code.
527 1999-11-21  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
529         * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
530         * init.c (build_vec_delete, build_vec_delete_1): Likewise.
531         Always destruct virtual bases of array components, but never
532         delete them.
533         (build_vec_init): Adjust invocations.
534         (build_delete): Likewise.
535         * decl2.c (delete_sanity): Likewise.
537 1999-11-19  Nathan Sidwell  <nathan@acm.org>
539         * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
540         * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
541         * decl2.c (grok_method_quals): Accept `restrict' as applying to
542         the object pointer. Return such qualifiers.
543         (grokclassfn): Apply this pointer qualifiers. Cleanup unused
544         variables.
546 1999-11-18  Mark Mitchell  <mark@codesourcery.com>
548         * except.c (expand_end_catch_block): Fix typo.
549         (expand_exception_blocks): Simplify.  Don't call
550         expand_leftover_cleanups.
552 1999-11-15  Jason Merrill  <jason@casey.cygnus.com>
554         * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
555         * pt.c (tsubst, case INTEGER_TYPE): Call it.  
556         Check uses_template_parms.
558         * class.c (finish_struct): If we're a local class in a template
559         function, add a TAG_DEFN.
560         * pt.c (lookup_template_class): If this is a local class in a
561         template function, call pushtag.
562         (tsubst_expr, case TAG_DEFN): Handle classes, too.
564         Emit debug info with the vtable.
565         * search.c (maybe_suppress_debug_info): New function...
566         * class.c (finish_struct_1): ...split out from here.
567         * cp-tree.h: Declare it.
568         * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
569         if we're writing out the vtable.
570         * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p, 
571         note_debug_info_needed): #if 0 out.
573 1999-11-14  Mark Mitchell  <mark@codesourcery.com>
575         * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
576         * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
577         TREE_PERMANENT.
578         * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
579         * decl2.c (lookup_arg_dependent): Use it.
580         
581         * cp-tree.h (cp_finish_decl): Change prototype.
582         (finish_static_data_member_decl): Likewise.
583         (push_permanent_obstack): Remove declaration.
584         (push_expression_obstack): Likewise.
585         (push_scratch_obstack): Likewise.
586         (DECL_TEMPLATE_PARM_P): Robustify.
587         (SET_DECL_TEMPLATE_PARM_P): New macro.
588         * class.c (add_method): Don't manipulate obstacks.
589         (finish_vtbls): Likewise.
590         * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
591         * decl.c (binding_for_name): Don't manipulate obstacks.
592         (maybe_push_to_top_level): Likewise.
593         (pop_from_top_level): Likewise.
594         (duplicate_decls): Likewise.
595         (pushdecl): Likewise.
596         (implicitly_declare): Likewise.
597         (build_typename_type): Likewise.
598         (start_decl): Likewise.
599         (cp_finish_decl): Likewise.
600         (finish_decl): Likewise.
601         (destroy_local_static): Likewise.
602         (expand_static_init): Likewise.
603         (complete_array_type): Likewise.
604         (grokvardecl): Likewise.
605         (build_ptrmemfnc_type): Likewise.
606         (grokdeclarator): Likewise.
607         (xref_tag): Likewise.
608         (xref_basetypes): Likewise.
609         (start_enum): Likewise.
610         (finish_enum): Likewise.
611         (start_function): Likewise.
612         (finish_function): Likewise.
613         (start_method): Adjust call to cp_finish_decl.
614         * decl2.c (finish_static_data_member_decl): Don't manipulate
615         obstacks.
616         (grokfield): Likewise.
617         (grokbitfield): Likewise.
618         (get_temp_name): Likewise.
619         (get_sentry): Likewise.
620         (fnish_file): Likewise.
621         (lookup_arg_dependent): Likewise.
622         * except.c (call_eh_info): Likewise.
623         (push_eh_info): Likewise.
624         (do_pop_exception): Likewise.
625         (initialize_handler_parm): Likewise.
626         (expand_end_eh_spec): Likewise.
627         (alloc_eh_object): Likewise.
628         (expand_throw): Likewise.
629         * expr.c (extract_scalar_init): Likewise.
630         * init.c (build_java_class_ref): Likewise.
631         * lex.c (get_time_identifier): Likewise.
632         (snarf_defarg): Likewise.
633         (add_defarg_fn): Likewise.
634         (is_global): Simplify.
635         (do_identifier): Don't check TREE_PERMANENT.
636         * method.c (emit_thunk): Don't manipulate obstacks.
637         * parse.y (condition): Adjust call to cp_finish_decl.
638         (primary): Likewise.
639         (initdcl): Likewise.
640         (initdcl0_innards): Likewise.
641         (nomods_initdcl0): Likewise.
642         * pt.c (push_inline_template_parms_recursive): Use
643         SET_DECL_TEMPLATE_PARM_P.
644         (process_template_parm): Likewise.
645         (lookup_template_class): Don't manipulate obstacks.
646         (instantiate_class_template): Adjust call to
647         finish_static_data_member_decl.
648         (tsubst_decl): Don't manipulate obstacks.
649         (tsubst_expr): Likewise.
650         (instantiate_template): Likewise.
651         (instantiate_decl): Adjust calls to cp_finish_decl.
652         * rtti.c (call_void_fn): Don't manipulate obstacks.
653         (get_tinfo_var): Likewise.
654         (get_tinfo_fn_unused): Likewise.
655         (build_dynamic_cast_1): Likewise.
656         (expand_si_desc): Likewise.
657         (expand_class_desc): Likewise.
658         (expand_ptr_desc): Likewise.
659         (expand_attr_desc): Likewise.
660         (expand_generic_desc): Likewise.
661         (synthesize_tinfo_fn): Likewise.
662         * search.c (expand_upcast_fixups): Likewise.
663         * semantics.c (finish_asm_stmt): Likewise.
664         (finish_named_return_value): Likewise.
665         (begin_class_definition): Likewise.
666         (finish_class_definition): Likewise.
667         (finish_typeof): Likewise.
668         * tree.c (build_cplus_method_type): Likewise.
669         (reverse_path): Likewise.
670         (copy_template_template_parm): Likewise.
671         (build_expr_ptr_wrapper): Likewise.
672         (push_expression_obstack): Remove.
673         (push_permanent_obstack): Likewise.
674         * typeck.c (mark_addressable): Likewise.
675         
676 1999-11-13  Mark Mitchell  <mark@codesourcery.com>
678         * call.c (build_conditional_expr): Use build_target_expr_with_type.
679         (convert_like): Likewise.
680         (build_over_call): Likewise.
681         * cp-tree.h (build_target_expr): Remove.
682         (build_target_expr_with_type): New function.
683         * cvt.c (build_up_reference): Use get_target_expr.
684         * decl.c (build_target_expr): Move to ...
685         * tree.c (build_target_expr): Here.  Make it static.
686         (build_target_expr_with_type): New function.  Set DECL_CONTEXT on
687         the temporary VAR_DECLs.
688         (get_target_expr): Use it.
690 1999-11-13  Jason Merrill  <jason@yorick.cygnus.com>
692         * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
693         * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
694         * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
695         * class.c (set_rtti_entry): Use it.
697 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
699         * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
700         here.
701         * semantics.c (finish_expr_stmt): Call it here instead.  Move
702         default_conversion logic to semantic-analysis time.
704 1999-11-12  Jason Merrill  <jason@yorick.cygnus.com>
706         * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
708 Fri Nov 12 12:56:32 MST 1999    Diego Novillo <dnovillo@cygnus.com>
710         * init.c (init_init_processing): Re-instated Nov 11 patch after
711         approval.
713 Fri Nov 12 10:42:02 MST 1999    Diego Novillo <dnovillo@cygnus.com>
715         * init.c (init_init_processing): Undo patch from Nov 11, 1999.
716         Patch had not been approved yet.
718 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
720         * decl.c (compute_array_index_type): New function, split out from
721         grokdeclarator.
722         (create_array_type_for_decl): Likewise.
723         (grokdeclarator): Use them.
725         * semantics.c (expand_stmt): Don't suspend_momentary or
726         resume_momentary.
728 Thu Nov 11 12:42:11 MST 1999    Diego Novillo <dnovillo@cygnus.com>
730         * init.c (init_init_processing): Header information for
731         arrays allocated via `new' should have the same alignment used by
732         malloc.
734 1999-11-10  Mark Mitchell  <mark@codesourcery.com>
736         * error.c (dump_function_name): Don't crash if given a friend
737         pseudo-instantiation.
739         * cp-tree.h (build_enumerator): Change prototype.
740         * decl.c (enum_next_value): Remove.
741         (enum_overflow): Likewise.
742         (init_decl_processing): Don't register enum_next_value as a root.
743         (start_enum): Clear TYPE_VALUES for a redefined enum.
744         (finish_enum): Reset the type of enumeration constants.
745         (build_enumerator): Fix indentation.  Don't copy CONST_DECLs when
746         we don't need to.  Maintain the TYPE_VALUES list and look there
747         for the previously defined enumeration constant.  Let enumeration
748         constants have the type of their values until the enumeration type
749         is complete.
750         * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
751         (structsp): Adjust.
752         * parse.c: Regenerated.
753         * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
754         
755 Wed Nov 10 12:43:21 1999  Philippe De Muyter  <phdm@macqel.be>
756                           Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
758         * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
760 1999-11-09  Mark Mitchell  <mark@codesourcery.com>
762         * cp-tree.h (language_function): Remove x_last_dtor_insn and
763         x_last_parm_cleanup_insn.
764         * decl.c (last_dtor_insn): Remove.
765         (last_parm_cleanup_insn): Likewise.
766         (expand_start_early_try_stmts): Don't set them.
767         (store_parm_decls): Likewise.
768         (save_function_data): Or save them.
769         (mark_lang_function): Or mark them.
771 1999-11-08  Mark Mitchell  <mark@codesourcery.com>
773         * decl.c (store_parm_decls): Generate cleanup code at
774         semantic-analysis time.  Destroy objects in the correct order.
776 1999-11-07  Mark Mitchell  <mark@codesourcery.com>
778         * cp-tree.h (begin_new_placement): Remove.
779         (finish_new_placement): Likewise.
780         * class.c (finish_struct_1): Don't suspend_momentary or
781         resume_momentary.
782         * decl.c (grokdeclarator): Likewise.
783         (maybe_build_cleanup_1): Likewise.
784         * except.c (push_eh_cleanup): Likewise.
785         (build_terminate_handler): Likewise.
786         * init.c (build_new_1): Likewise.
787         * parse.y (parse_decl): Change prototype.
788         (initdecls, notype_initdecls, initdcl): Don't return int.
789         (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
790         (.begin_new_placement): Remove.
791         (.finish_new_placement): Likewise.
792         (nonmomentary_expr): Likewise.
793         (suspend_mom): Likewise.
794         (condition): Don't suspend_momentary, resume_momentary, or keep
795         track of need to resume.
796         (unary_expr): Likewise.
797         (new_placement): Likewise.
798         (decl): Likewise.
799         (structsp): Likewise.
800         (new_type_id): Likewise.
801         (maybe_parmlist): Likewise.
802         (direct_after_type_declaration): Likewise.
803         (direct_new_declarator): Likewise.
804         (direct_abstract_declaration): Likewise.
805         * parse.c: Regenerated.
806         * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
807         * semantics.c (begin_new_placement): Remove.
808         (finish_new_placement): Likewise.
809         
810 1999-11-05  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
812         * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
813         (DECL_TEMPLATE_INFO): Use it.
814         * decl.c (warn_extern_redeclared_static): Do nothing for
815         TEMPLATE_DECLs.
816         * decl2.c (mark_used): Explicitly check for function or variable.
817         * semantics.c (finish_unary_op_expr): Check whether result is also
818         an INTEGER_CST.
820 1999-11-05  Mark Mitchell  <mark@codesourcery.com>
822         * Makefile.in (typeck2.o): Depend on output.h.
823         * typeck2.c: Include output.h.
825         * decl.c (flag_ansi): Remove declaration.
827         * pt.c (tinst_level_tick): Make it static.
828         (last_template_error_tick): Likewise.
829         
830         * cp-tree.h (mapcar): Remove declaration.
831         (search_tree): Likewise.
832         (walk_tree_fn): New typedef.
833         (walk_tree): New function.
834         * tree.c (bot_manip): Change prototype.  Adjust to be called via
835         walk_tree.
836         (bot_replace): Likewise.
837         (no_linkage_helper): Likewise.
838         (copy_tree_r): New function.
839         (search_tree): Rename, and adjust, to become ...
840         (walk_tree): New function.
841         (mapcar): Remove.
842         (target_remap): Remove.
843         (target_remap_count): Likewise.
844         (break_out_target_exprs): Use walk_tree.
845         * decl.c (local_variable_p): Change prototype.
846         (check_default_argument): Use walk_tree.
847         * pt.c (for_each_template_parm_r): New function, split out from ...
848         (for_each_template_parm): Here.  Use it, via walk_tree.
849         
850 1999-11-03  Mark Mitchell  <mark@codesourcery.com>
852         * class.c (check_bitfield_decl): New function, split out from
853         finish_stuct_1.
854         (check_field_decl): Likewise.  Recursively examine members of
855         anonymous structs.
856         (finish_struct_1): Use them.
857         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
858         
859 1999-11-02  Mark Mitchell  <mark@codesourcery.com>
861         * decl.c (grokfndecl): Remove dead code.
863         * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
865 1999-11-02  Scott Snyder  <snyder@fnal.gov>
867         * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
868         IMAGPART_EXPR.
869         * pt.c (tsubst_copy): Likewise.
871 1999-11-01  Jason Merrill  <jason@yorick.cygnus.com>
873         * decl2.c (maybe_make_one_only): Always make things comdat on
874         ELF targets, too.
876 1999-10-31  Mark Mitchell  <mark@codesourcery.com>
878         * decl.c (finish_function): Call free_after_parsing for functions
879         we are not immediately turning into RTL.
881 1999-10-31  Brendan Kehoe  <brendan@cygnus.com>
883         * cp-tree.h (flag_dump_translation_unit): Add decl.
885 Sat Oct 30 22:42:50 1999  Stephen L Moshier <moshier@mediaone.net>
887         * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
889 1999-10-30  Mark Mitchell  <mark@codesourcery.com>
891         * decl.c (pop_cp_function_context): Don't call free on a NULL
892         pointer.
893         * semantics.c: Include ggc.h.
894         (expand_body): Do garbage-collection after processing a template
895         function.  Clear DECL_SAVED_TREE after generating RTL for a
896         function.
897         * Makefile.in (semantics.o): Depend on ggc.h.
898         
899 1999-10-29  Mark Mitchell  <mark@codesourcery.com>
901         * cp-tree.h (make_typename_type): Change prototype.
902         * decl.c (make_typename_type): Only complain if so requested.
903         * parse.y (nested_name_specifier): Adjust calls.
904         (typename_sub0): Likewise.
905         (typename_sub1): Likewise.
906         * parse.c: Regenerated.
907         * pt.c (convert_template_argument): Pass complain to
908         make_typename_type.
909         (tsubst): Likewise.
910         
911 1999-10-28  Mark Mitchell  <mark@codesourcery.com>
913         * semantics.c (finish_handler): End the scope of the handler
914         before attaching it to the statement-tree.
916 1999-10-28  Ian Lance Taylor  <ian@zembu.com>
918         * rtti.c (build_dynamic_cast_1): Give a better error message for
919         an attempt to dynamic_cast from a non-polymorphic type.
921 1999-10-27  Mark Mitchell  <mark@codesourcery.com>
923         * cp-tree.h (make_temp_vec): Remove.
924         (make_scratch_vec): Likewise.
925         * call.c (add_function_candidate): Use make_tree_vec.
926         (add_conv_candidate): Likewise.
927         (build_builtin_candidate): Likewise.
928         (add_template_candidate_real): Likewise.
929         * class.c (resolve_address_of_overloaded_function): Likewise.
930         * decl.c (start_function): Don't fool with the momentary obstack.
931         (finish_function): Likewise.
932         * init.c (expand_direct_vtbls_init): Likewise.
933         (begin_init_stmts): Likewise.
934         (finish_init_stmts): Likewise.
935         * pt.c (add_to_template_args): Use make_tree_vec.
936         (check_explicit_specialization): Likewise.
937         (coerce_template_parms): Likewise.
938         (lookup_template_class): Don't fool with the momentary obstack.
939         (instantiate_class_template): Likewise.
940         (tsubst_template_arg_vector): Use make_tree_vec.
941         (tsubst_aggr_type): Don't fool with the momentary obstack.
942         (tsubst_decl): Likewise.  Use make_tree_vec.
943         (try_one_overload): Likewise.
944         (try_class_unification):  Don't fool with the momentary obstack.
945         (get_bindings_real): Use make_tree_vec.
946         (set_mangled_name_for_template_decl): Likewise.
947         * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
948         * semantics.c (finish_expr_stmt): Likewise.
949         (finish_do_stmt): Likewise.
950         (finish_for_expr): Likewise.
951         (finish_switch_cond): Likewise.
952         (do_pushlevel): Likewise.
953         (do_poplevel): Likewise.
954         * tree.c (make_temp_vec): Remove.
955         
956         * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs.  Dump
957         CLEANUP_P for a TRY_BLOCK.
958         * ir.texi: Document SAVE_EXPR.
960 Tue Oct 26 23:29:56 1999  Jeffrey A Law  (law@cygnus.com)
962         * call.c (build_over_call):  Check that the built-in function is
963         of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
964         * typeck.c (build_function_call_real): Similarly. 
966 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
968         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS.  Don't call
969         remember_end_note.
971 1999-10-24  Mark Mitchell  <mark@codesourcery.com>
973         * decl.c (push_overloaded_decl_1): Use pushdecl.
974         
975         * decl.c (auto_function): Replace #ifdef'd __inline with just
976         plain inline.
977         * lex.c (my_get_run_time): Likeise.
978         (yyprint): Likewise.
979         (identifier_type): Likewise.
980         * method.c (start_squangling): Likewise.
981         (end_squangling): Likewise.
982         (icat): Likewise.
983         (old_backref_index): Likewise.
984         (flush_repeats): Likewise.
985         (issue_ktype): Likewise.
986         * parse.y (empty_parms): Likewise.
987         * parse.c: Regenerated.
988         
989 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
991         * dump.c (dequeue_and_dump): Replace several uses of
992         queue_and_dump_index with dump_child.
994 1999-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
996         * expr.c: Include tm_p.h.
998 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
1000         * cp-tree.h (SCOPE_PARTIAL_P): New macro.
1001         (pushlevel_temporary): Remove.
1002         (add_scope_stmt): New function.
1003         * decl.c (pushlevel_temporary): Remove.
1004         (poplevel): Use add_scope_stmt.
1005         (start_decl_1): Likewise.
1006         * semantics.c (add_scope_stmt): New function.
1007         (do_pushlevel): Use it.
1008         (do_poplevel): Use it.
1009         (expand_stmt): Check SCOPE_PARTIAL_P.
1010         
1011         * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
1012         * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
1013         * expr.c (cplus_expand_expr): Expand it.
1014         * ir.texi: Document EMPTY_CLASS_EXPR.
1015         
1016 1999-10-20  Mark Mitchell  <mark@codesourcery.com>
1018         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
1019         parameters as having namespace scope.
1021 1999-10-19  Mark Mitchell  <mark@codesourcery.com>
1023         * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
1024         (mangling_flags): New type.
1025         (build_overload_int): Change prototype.
1026         (build_overload_value): Likewise.
1027         (numeric_output_need_bar): Improve comment.
1028         (mangle_expression): New function, broken out from ...
1029         (build_overload_int): Here.
1030         (build_overload_value): Adjust for use of mangling flags.  Don't
1031         warn about real-valued template parameters here.  Do handle
1032         complex expressions involving real-valued template parameters.
1033         (build_template_parm_names): Encase non-type template parameters
1034         in underscores, if necessary.
1035         (process_overload_item): Remove conditional on
1036         PARM_CAN_BE_ARRAY_TYPE.
1038 1999-10-17  Mark Mitchell  <mark@codesourcery.com>
1040         * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
1042         * ir.texi: Clean up documentation of RETURN_INIT.
1043         
1044 1999-10-15  Greg McGary  <gkm@gnu.org>
1046         * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
1047         (lang_init): Set default for flag_bounds_check if still "unspecified".
1049 1999-10-13  Andrew Haley  <aph@cygnus.com>
1051         * class.c (finish_struct_1): Force alignment of non-bitfields to
1052         BITS_PER_UNIT.
1054 Wed Oct 13 22:01:35 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
1056         * typeck2.c (process_init_constructor): Handle empty constructors.
1058 1999-10-13  Jason Merrill  <jason@yorick.cygnus.com>
1060         * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
1062         * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
1063         array error.
1065 1999-10-13  Mark Mitchell  <mark@codesourcery.com>
1067         * decl.c (make_rtl_for_local_static): Don't create register RTL
1068         for addressable constants.
1070 1999-10-13  Nathan Sidwell  <nathan@acm.org>
1072         * cp-tree.h (build_x_va_arg): Prototype new function.
1073         * call.c (build_x_va_arg): Define it.
1074         * parse.y (unary_expr): Call build_x_va_arg.
1075         
1076         * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
1077         * call.c (convert_type_from_ellipsis): Define it.
1078         * decl.c (init_decl_processing): Set lang_type_promotes_to.
1080         * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
1082 1999-10-11  Jason Merrill  <jason@yorick.cygnus.com>
1084         * class.c (fixed_type_or_null): Always set *nonnull.
1086 1999-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1088         * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
1089         __GNUC__ and __GNUC_MINOR__.
1091 1999-10-09  Mark Mitchell  <mark@codesourcery.com>
1093         * cp-tree.h (make_rtl_for_local_static): New function.  
1094         * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
1095         local statics ...
1096         (make_rtl_for_local_static): Here.
1097         * semantics.c (expand_stmt): Use make_rtl_for_local_static.
1098         
1099 1999-10-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1101         * method.c: Include tm_p.h.
1103 1999-10-7   Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1105         * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
1106         * lex.c (cp_make_lake_type): Likewise.
1107         * tree.c (init_tree): Init make_lang_type_fn.
1108         
1109 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
1111         * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
1112         paramter.
1113         
1114         * semantics.c (expand_stmt): Don't pretend to have asmspecs for
1115         local statics if we don't really have them.
1117         * ir.texi: Improve documentation for STMT_EXPR.  Describe
1118         CLEANUP_POINT_EXPR.
1120 1999-10-07  Jason Merrill  <jason@yorick.cygnus.com>
1122         * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
1124 1999-10-07  Greg McGary  <gkm@gnu.org>
1126         * class.c (finish_struct_1): Use simpler method of
1127         removing elements of a singly-linked list which doesn't
1128         lose for classes without data members.
1130 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
1132         * friend.c (make_friend_class): Robustify.
1134         * semantics.c (finish_object_call_expr): Reject calls to template
1135         types.
1137 1999-10-06  Mark Mitchell  <mark@codesourcery.com>
1139         * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
1141         * cp-tree.h (CLASSTYPE_VFIELD): Remove.
1142         * call.c (build_vfield_ref): Use TYPE_VFIELD, not
1143         CLASSTYPE_VFIELD.
1144         * class.c (get_vfield_offset): Likewise.
1145         (finish_base_struct): Likewise.
1146         (modify_one_vtable): Likewise.
1147         (fixup_vtable_deltas): Likewise.
1148         (finish_struct_1): Likewise.
1149         * init.c (expand_virtual_init): Likewise.
1150         * search.c (lookup_field_1): Likewise.
1151         (expand_upcast_fixups): Likewise.
1152         * typeck.c (build_component_ref): Likewise.
1153         (build_binary_op_nodefault): Likewise.
1154         
1155         * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
1156         * ir.texi: Document TYPE_VFIELD.
1158 1999-10-06  Brendan Kehoe  <brendan@cygnus.com>
1160         * decl.c (grokdeclarator): Only warn about non-zero arrays if
1161         !in_system_header (linux socketbits.h can give this for
1162         __cmsg_data, which is using a GNU extension).
1164 1999-10-05  Mark Mitchell  <mark@codesourcery.com>
1166         * decl2.c (start_static_storage_duration_function): Push the
1167         function declaration so it ends up in namespace scope.
1169         * dump.c (DUMP_CHILDREN): Remove.
1170         (DUMP_BINFO): Adjust.
1171         (struct dump_node_info): Remove dump_children_p.
1172         (queue_and_dump_type): Remove dump_children_p parameter.
1173         (queue): Don't set dump_children_p.
1174         (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
1175         queue_and_dump_index.
1176         (dequeue_and_dump): Unconditionally print children.  Adjust calls
1177         to functions mentioned above.
1178         (dump_node):  Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
1179         
1180         * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
1181         * dump.c (dequeue_and_dump): Dump them.
1182         
1183         * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
1185         * decl.c (start_function): Set current_in_charge_parm for
1186         constructors, too, where appropriate.
1187         * search.c (fixup_all_virtual_upcast_offsets): New function.
1188         (expand_indirect_vtbls_init): Use it.
1189         
1190 1999-10-04  Nathan Sidwell  <nathan@acm.org>
1192         * decl2.c (grok_alignof): Don't decay lvalues.
1193         
1194         * init.c (build_new): Remove unused variable.
1196 1999-10-04  Mark Mitchell  <mark@codesourcery.com>
1198         * cp-tree.h (struct language_function): Remove static_labelno.
1199         (static_labelno): Remove macro.
1200         * method.c (build_overload_nested_name): Make static_labelno
1201         static here.
1202         
1203         * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
1204         to decide whether or not a function is defined.
1206         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
1207         situations where make_node will do it automatically.
1208         * decl.c (grok_reference_init): Likewise.
1209         (expand_static_init): Likewise.
1210         (do_static_initialization): Likewise.
1211         * init.c (perform_member_init): Likewise.
1212         (expand_aggr_init_1): Likewise.
1213         (build_new_1): Likewise.
1214         * method.c (do_build_copy_constructor): Likewise.
1215         (do_build_assign_ref): Likewise.
1216         * search.c (expand_upcast_fixups): Likewise.
1217         * semantics.c (finish_stmt_expr): Likewise.
1218         * typeck.c (build_unary_op): Likewise.
1219         (check_return_expr): Likewise.
1221 1999-10-04  Jason Merrill  <jason@yorick.cygnus.com>
1223         * init.c (build_vec_delete_1): Fold COND_EXPRs.
1225 1999-10-03  Mark Mitchell  <mark@codesourcery.com>
1227         * cp-tree.def (VEC_INIT_EXPR): Remove.
1228         * cp-tree.h (struct stmt_tree): New type.
1229         (struct saved_scope): Remove firstobj.  Add x_saved_tree,
1230         x_stmt_tree.
1231         (class_cache_firstobj): Remove.
1232         (struct language_function): Remove stmts_are_full_exprs_p,
1233         x_last_tree, and x_last_expr_type.  Add x_stmt_tree.
1234         (current_stmt_tree): New macro.
1235         (last_tree): Adjust.
1236         (last_expr_type): Likewise.
1237         (doing_semantic_analysis_p): Simplify.
1238         (stmts_are_full_exprs_p): Adjust.
1239         (begin_tree): Remove prototype.
1240         (end_tree): Likewise.
1241         (begin_stmt_tree): Change prototype.
1242         (finish_stmt_tree): Likewise.
1243         (building_stmt_tree): Simplify.
1244         * decl.c (mark_stmt_tree): New function.
1245         (mark_saved_scope): Use it.
1246         (start_function): Rearrange slightly to call begin_stmt_tree 
1247         earlier.
1248         (save_function_data): Tweak.
1249         (finish_function): Adjust call to finish_stmt_tree.
1250         (mark_lang_function): Use mark_stmt_tree.
1251         * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
1252         * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
1253         (build_vec_init): Remove creation of stand-in intializer.
1254         * pt.c (begin_tree): Remove.
1255         (end_tree): Likewise.
1256         * semantics.c (SET_LAST_STMT): New macro.  Use it throughout.
1257         (begin_compound_stmt): Handle a compound-statement outside of a
1258         function.
1259         (begin_stmt_expr): Handle a statement-expression outsidef of a
1260         function.
1261         (finish_stmt_expr): Likewise.
1262         (begin_class_definition): Don't call begin_tree.
1263         (finish_inline_definitions): Don't call end_tree.
1264         (begin_stmt_tree): Take a pointer to tree, not a function as input.
1265         (finish_stmt_tree): Likewise.
1266         * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
1267         (mapcar): Likewise.
1268         
1269         * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
1270         * parse.c: Regenerated.
1271         
1272         * dump.c (dqueue_and_dump): Dump bitfieldness.
1273         
1274         * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
1275         bitfields, rather than DECL_BIT_FIELD.
1276         * ir.texi: Document how to tell whether or not a field is a
1277         bitfield.
1278         
1279         * lex.c (make_lang_type): Fix typo in comment.
1281 1999-10-01  Jason Merrill  <jason@yorick.cygnus.com>
1283         * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
1285 1999-10-01  Mark Mitchell  <mark@codesourcery.com>
1287         * pt.c (tsubst_decl): If the type of a template instantiation is
1288         bogus, so is the whole instantiation.
1290 1999-09-30  Mark Mitchell  <mark@codesourcery.com>
1292         * decl.c (initialize_local_var): Handle static variables here.
1293         (cp_finish_decl): Tweak handling of function-scope static
1294         variables.
1295         * semantics.c (expand_stmt): Handle DECL_STMTs for static
1296         variables.
1298         * method.c (emit_thunk): Don't crash when -fsyntax-only.
1300         * cp-tree.h (lang_decl_flags): Add global_ctor_p and
1301         global_dtor_p.  Add init_priority.
1302         (DECL_ACCESS): Adjust accordingly.
1303         (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
1304         (GLOBAL_INIT_PRIORITY): Likewise.
1305         * decl.c (lang_mark_tree): Adjust accordingly.
1306         (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 
1307         and GLOBAL_INIT_PRIORITY.
1308         * dump.c (dequeue_and_dump): Print them.
1309         * ir.texi: Document them.
1311         * decl2.c (struct priority_info_s): Remove initialization_sequence
1312         and destruction_sequence.
1313         (start_static_storage_duration_function): Return the body of the
1314         function.  Convert for function-at-a-time mode.
1315         (generate_inits_for_priority): Remove.
1316         (finish_static_storage_duration_function): Change prototype.
1317         Adjust for function-at-a-time mode.
1318         (do_static_initialization): Likewise.
1319         (do_static_destruction): Likewise.
1320         (do_static_initialization_and_destruction): Remove.
1321         (start_static_initialization_or_destruction): New function.
1322         (finish_static_initialization_or_destruction): Likewise.
1323         (get_priority_info): Don't manipulation initialization_sequence or
1324         destruction_sequence.
1325         (prune_vars_needing_no_initialization): New function.
1326         (write_out_vars): Likewise.
1327         (finish_file): Use the various new functions instead of the old.
1328         
1329 Thu Sep 30 00:13:27 1999  Dirk Zoller  <duz@rtsffm.com>
1331         * cp-tree.h (warn_float_equal): Declare.
1332         * decl2.c (warn_float_equal): Define.
1333         (lang_decode_option): Recognize -W[no-]float-equal.
1334         * typeck.c (build_binary_op_nodefault): Conditionally warn
1335         about equality tests of floating point types.
1337 1999-09-29  Jason Merrill  <jason@yorick.cygnus.com>
1339         Support normal type_info-based EH mechanisms with -fno-rtti.
1340         * except.c (build_eh_type_type): Remove special -fno-rtti handling.
1341         (build_eh_type_type_ref): Likewise.
1342         (build_eh_type): Remove.
1343         (expand_throw): Call build_eh_type_type, not build_eh_type.
1344         * decl2.c (import_export_decl): Don't associate the tinfo fn with
1345         the vtable if -fno-rtti.
1346         * decl.c (init_decl_processing): Always init_rtti_processing.
1348         * rtti.c (get_typeid): Don't complain about -fno-rtti.
1350         * class.c (class_cache_obstack, class_obstack): Remove.
1351         (init_class_processing): Don't initialize class_obstack.
1352         (push_cache_obstack): Remove.
1353         (pushclass): Don't call it.
1354         * cp-tree.h: Remove prototype for push_cache_obstack.
1355         * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
1356         (pushlevel_class): Don't push_decl_level.
1357         (poplevel_class): Don't pop_stack_level.
1358         (push_class_level_binding): Don't push_cache_obstack.
1359         (init_decl_processing): Don't intialize decl_obstack.
1360         * search.c (push_class_decls): Don't push_cache_obstack.
1361         * tree.c (list_hash_add): Put hash node on permanent_obstack.
1362         (hash_tree_cons): Don't mess with obstacks.
1363         (print_lang_statistics): Don't print stats for class_obstack and
1364         decl_obstack.
1366 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
1368         * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
1369         * ir.texi: Document DECL_EXTERNAL.
1371         * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
1372         * ir.texi: Document THUNK_DECLs.
1374         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
1375         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
1376         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
1377         * error.c (dump_template_bindings): Remove unused parameter.
1378         Handle multiple levels of template parameters.
1379         (dump_template_decl): Use `parms', not `args', for template
1380         parameters.  Fix thinko.
1381         (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION.  Don't pass
1382         flags to dump_template_bindings.
1383         * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
1384         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
1385         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
1386         (tsubst_copy): Clarify variable name.
1387         (most_general_template): Robustify.
1388         
1389 1999-09-29  Nathan Sidwell  <nathan@acm.org>
1391         * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
1392         to change primary template rendering.
1394 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
1396         * cp-tree.h (UPT_TEMPLATE): Remove.
1397         (UPT_PARMS): Likewise.
1398         (DECL_NEEDED_P): New macro.
1399         * decl2.c (finish_vtable_vardecl): Use it.
1400         (finish_objects): Don't crash with -fsyntax-only.
1401         (finish_file): Use DECL_NEEDED_P.  Don't prune vtables when
1402         -fsyntax-only.
1403         * pt.c (tsubst_friend_function): Remove FIXME that talks about
1404         obstacks.
1405         (tsubst_expr): Correct handling of function try-blocks.
1406         * semantics.c: Include flags.h.
1407         (expand_body): Don't do RTL generation if -fsyntax-only.
1408         * Makefile.in (semantics.o): Depends on flags.h.
1409         
1410 1999-09-28  Gabriel Dos Reis  <gdr@codesourcery.com>
1412         * pt.c (most_general_template): Adjust declaration.
1414         * cp-tree.h: (most_general_template): Declare.
1416         * error.c (dump_template_value): Rename to ...
1417         (dump_template_argument): This.
1418         (dump_template_argument_list): New function.
1419         (dump_type): Use it.
1420         (dump_template_parameter): New function.
1421         (dump_template_decl): Use it.
1422         (dump_template_bindings): New function.
1423         (dump_function_decl): Use it. Pretty print function template
1424         instantiations.
1426 1999-09-28  Nathan Sidwell  <nathan@acm.org>
1428         * decl.c (grokdeclarator): Distinguish parameter context for
1429         diagnostics. Tidy up missing type diagnostic.
1430         Diagnose `explicit' in one place. Diagnose `mutable' in one place.
1432 1999-09-28  Mark Mitchell  <mark@codesourcery.com>
1434         * ir.texi: Improve documentation for TARGET_EXPR.
1436 1999-09-27  Nathan Sidwell  <nathan@acm.org>
1438         Augment stringification of trees.
1439         * cp-tree.h (tree_string_flags): New error stringifying enumeration.
1440         (fndecl_as_string, type_as_string_real, args_as_string,
1441         code_as_string, language_as_string, parm_as_string,
1442         op_as_string, assop_as_string, cv_as_string): Remove.
1443         (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
1444         (context_as_string): Declare new function.
1445         * error.c (cp_printers): Move definition.
1446         (OB_UNPUT): Remove.
1447         (OB_END_TEMPLATE_ID): Adjust.
1448         (interesting_scope_p): Remove.
1449         (dump_scope): New static function.
1450         (dump_qualifiers): Adjust prototype, reimplement.
1451         (dump_template_value): Use tree_string_flags.
1452         (dump_type_real): Move back to dump_type.
1453         (dump_type): Adjust prototype. Use tree_string_flags.
1454         (dump_aggr_type): Likewise. Use dump_template_parms.
1455         (dump_type_prefix): Adjust prototype. Use tree_string_flags.
1456         Return pad flag.
1457         (dump_type_suffix): Adjust prototype. Use tree_string_flags.
1458         (dump_simple_decl): Likewise.
1459         (dump_decl): Likewise. Use dump_template_decl.
1460         (dump_template_decl): New static function broken out of dump_decl.
1461         (dump_function_decl): Adjust prototype. Use tree_string_flags.
1462         (dump_parameters): Likewise. Prefix space.
1463         (dump_exception_spec): Adjust prototype. Use tree_string_flags.
1464         (dump_function_name): Likewise. Use dump_template_parms.
1465         (dump_template_parms): New static function broken out of
1466         dump_function_name.
1467         (dump_expr_list): Adjust prototype. Use tree_string_flags.
1468         (dump_expr): Likewise.
1469         (fndecl_as_string): Removed
1470         (type_as_string_real): Removed
1471         (dump_binary_op): Adjust prototype. Use tree_string_flags.
1472         (dump_unary_op): Likewise.
1473         (type_as_string): Likewise.
1474         (expr_as_string): Likewise.
1475         (decl_as_string): Likewise.
1476         (context_as_string): New function.
1477         (lang_decl_name): Adjust.
1478         (decl_to_string): New static print callback.
1479         (expr_to_string): Likewise.
1480         (fndecl_to_string): Likewise.
1481         (code_as_string): Renamed to ...
1482         (code_to_string): ... here. Adjust.
1483         (language_as_string): Renamed to ...
1484         (language_to_string): ... here. Adjust.
1485         (parm_as_string): Renamed to ...
1486         (parm_to_string): ... here.
1487         (op_as_string): Renamed to ...
1488         (op_to_string): ... here.
1489         (assop_as_string): Renamed to ...
1490         (assop_to_string): ... here.
1491         (type_to_string): New static print callback.
1492         (args_as_string): Renamed to ...
1493         (args_to_string): ... here. Adjust.
1494         (cv_as_string): Renamed to ...
1495         (cv_to_string): ... here. Adjust.
1496         * pt.c (mangle_class_name_for_template): Use tree_string_flags.
1497         (print_template_context): Likewise.
1499 1999-09-26  Mark Mitchell  <mark@codesourcery.com>
1501         * cp-tree.h (expand_throw): Remove prototype.
1502         * except.c (expand_throw): Make it static.  Use tree-generation
1503         functions, rather than RTL-generation functions.
1504         (build_throw): Use it.
1505         * expr.c: Include except.h.
1506         (cplus_expand_expr): Don't call expand_throw here.
1507         * Makefile.in (expr.o): Depend on except.h.
1508         * ir.texi: Update documentation for THROW_EXPR.
1509         
1510         * decl.c (start_function): Set x_dont_save_pending_sizes rather
1511         than calling get_pending_sizes.
1512         * init.c (build_new): Don't save and restore
1513         immediate_size_expand; instead, assert that it has the expected
1514         value already.
1516 1999-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1518         * lex.c (compiler_error): Add missing call to va_end().
1520 1999-09-25  Mark Mitchell  <mark@codesourcery.com>
1522         * dump.c (dequeue_and_dump): Handle RESULT_DECL.
1523         * ir.texi: Document RESULT_DECL and DECL_RESULT.
1525         * cp-tree.h (check_return_expr): New function.
1526         * decl.c (finish_constructor_body): New function.
1527         (pushdecl): Put global friend functions in namespace binding
1528         level, not the class binding level.
1529         (finish_destructor_body): Make sure the dtor_label is always
1530         defined.  Fix typo in comment.
1531         (finish_function): Move generation of constructor-termination code
1532         to semantic-analysis time.  Move generation of implicit `main'
1533         return value to semantic-analysis time.
1534         * semantics.c (finish_return_stmt): Generate goto's to
1535         ctor_label/dtor_label here.  Use check_return_expr to do semantic
1536         analysis on the returned expression.
1537         * typeck.c (maybe_warn_about_returning_address_of_local): New
1538         function split out from c_expand_return.
1539         (check_return_expr): Likewise.
1540         (c_expand_return): Just generate the RTL for the return.
1541         
1542 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
1544         * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
1545         (cleanup_type): Likewise.
1546         (search_tree): Change prototype.
1547         * decl.c (local_variable_p): Adjust for new interface to
1548         search_tree.
1549         (check_default_argument): Likewise.
1550         * error.c (dump_expr): Handle INIT_EXPR.
1551         * except.c (expand_throw): Don't make cleanup_type a local static.
1552         * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
1553         * init.c (build_new): Call build_new_1 directly, rather than
1554         building a NEW_EXPR.
1555         (build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
1556         processing file-scope initializers.
1557         * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
1558         * tree.c: Include splay-tree.h
1559         (no_linkage_helper): Adjust for new interface to search_tree.
1560         (search_tree): Pass around pointers to tree nodes, rather than the
1561         nodes themselves.  Handle VEC_INIT_EXPR.
1562         (no_linkage_check): Adjust for new interface to search_tree.
1563         (mapcar): Handle VEC_INIT_EXPR.
1564         (target_remap): New variable.
1565         (bot_manip): Use it.
1566         (bot_replace): New function.
1567         (break_out_target_exprs): Use it to remap all variables used in a
1568         default argument expression.
1569         * typeck.c (build_modify_expr): Don't crash when outside a
1570         function and presented with an INIT_EXPR assignment
1571         * Makefile.in (tree.o): Depend on splay-tree.h.
1573 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
1575         * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
1576         DECL_BUILT_IN.
1577         (builtin_function): New arg CLASS.  Arg CODE now of type int.  All
1578         callers changed.
1579         Set the builtin's DECL_BUILT_IN_CLASS.
1581 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
1583         * decl.c (pushdecl): Don't make local declarations of extern
1584         variables give the variable a DECL_CONTEXT for the function.
1585         (make_rtl_for_nonlocal_decl): Don't fuss with obstacks.  Simplify.
1586         Don't accidentally make RTL for local declarations.
1587         (emit_local_var): Handle declarations with asm-specifiers here.
1588         
1589 1999-09-23  Mark Mitchell  <mark@codesourcery.com>
1591         * ir.texi: Improve documentation for TARGET_EXPRs.  Discuss
1592         STMT_IS_FULL_EXPR_P.
1594         * cp-tree.h (language_function): Add cannot_inline.
1595         * decl.c (start_function): Restore current_function_cannot_inline
1596         from the saved value.
1597         (save_function_data): Save current_function_cannot_inline.
1598         * decl2.c (start_objects): Change prototype.  Build the function
1599         in function-at-a-time mode.
1600         (finish_objects): Likewise.
1601         (generate_ctor_or_dtor_function): Adjust accordingly.
1602         
1603         * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
1604         * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
1605         Don't call expand_anon_union_decl here
1606         * semantics.c (exapnd_stmt): Call it here, instead.
1607         * typeck.c (mark_addressable): Addressed variables are implicitly
1608         used.
1609         
1610 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1612         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
1613         (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
1614         (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
1615         * cp-tree.h: Add tree checking macros to various tree access
1616         macros. 
1617         * ptree.c (print_lang_decl): Test for function or variable
1618         before accessing template info.
1620 1999-09-23  Jason Merrill  <jason@yorick.cygnus.com>
1622         * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
1623         * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
1624         * decl2.c (lang_f_options): Add -fshort-wchar.
1625         * cp-tree.h: Declare flag_short_wchar.
1626         * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 
1627         int' for wchar_t.
1629 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1631         * ir.texi: Fix formatting errors and typos.
1633 1999-09-22  Mark Mitchell  <mark@codesourcery.com>
1635         * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
1637         * decl.c (pushdecl): Do create a binding for extern "C" functions,
1638         but not for their DECL_ASSEMBLER_NAMEs.
1639         (lookup_name_current_level): Fix formatting.
1640         (xref_tag): Likewise.
1641         * decl2.c (start_objects): Mark static constructors and
1642         destructors as used.
1644 1999-09-22  Jason Merrill  <jason@yorick.cygnus.com>
1646         * decl.c (define_case_label): Don't crash if we're not in a switch.
1648         * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
1649         * lang-options.h: Restore -fthis-is-variable.  Remove help strings
1650         for unsupported flags.
1652 1999-09-21  Jason Merrill  <jason@yorick.cygnus.com>
1654         * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
1655         Accept and warn about -fthis-is-variable.
1657 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
1659         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
1660         CLEANUP_STMT, and SCOPE_STMT.
1662         * decl2.c (lang_decode_option): Adjust, in the wake of recent
1663         changes to option processing.
1665 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1667         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
1668         function pointer from pmfs with no object given.
1669         (convert_for_assignment): Do not return error when converting
1670         pmfs.
1672 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
1674         * lex.c (internal_filename): New variable.
1675         (INTERNAL_FILENAME): New macro.
1676         (init_parse): Allocate internal_filename and mark as root.  Use it
1677         instead of a string constant.
1679 1999-09-21  Nathan Sidwell  <nathan@acm.org>
1681         Reimplement dynamic cast and catch matching.
1682         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
1683         * search.c (dynamic_cast_base_recurse): New function.
1684         (get_dynamic_cast_base_type): New function for dynamic cast.
1685         * rtti.c (build_dynamic_cast_1): Determine source and target
1686         class relationship. Call __dynamic_cast_2.
1687         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
1688         (__user_type_info::dyncast): New dynamic cast dispatcher.
1689         (__user_type_info::sub_kind): New nested enumeration.
1690         (__user_type_info::contained_p): sub_kind predicate.
1691         (__user_type_info::contained_public_p): Likewise.
1692         (__user_type_info::contained_nonpublic_p): Likewise.
1693         (__user_type_info::contained_nonvirtual_p: Likewise.
1694         (__user_type_info::upcast_result): New nested struct.
1695         (__user_type_info::dyncast_result): New nested struct.
1696         (*::do_upcast): New catch function.
1697         (*::do_dyncast): New dynamic cast function.
1698         (__user_type_info::find_public_subobj): New dynamic cast
1699         helper dispatcher.
1700         (*::do_find_public_subobj): New dynamic cast helper function.
1701         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
1702         (__user_type_info::dyncast): Define dynamic cast dispatcher.
1703         (*::do_upcast): Define catch function.
1704         (*::do_dyncast): Define dynamic cast function.
1705         (*::do_find_public_subobj): Define dynamic cast helper function.
1706         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
1707         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
1708         (__dynamic_cast_2): New dynamic cast runtime.
1710 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
1712         * cp-tree.h (finish_stmt_expr): Change prototype.
1713         * expr.c (cplus_expand_expr): Adjust call accordingly.
1714         * init.c (finish_init_stmts): Likewise.
1715         * parse.y (primary): Likewise.
1716         * pt.c (tsubst_copy): Likewise.
1717         * semantics.c (finish_stmt_expr): Don't take two parameters.
1718         Don't remove generated BLOCKs from the block-tree.
1720         Remove support for assigning to `this'.
1721         * NEWS: Note that fact.
1722         * class.c (build_vbase_path): Don't check flag_this_is_variable.
1723         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
1724         (language_function): Remove assigns_this, just_assigned_this, and
1725         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
1726         (base_init_expr): Remove.
1727         (current_vcalls_possible_p): New macro.
1728         (vtbls_set_up_p): Likewise.
1729         (emit_base_init): Change prototype.
1730         * decl.c (finish_destructor_body): New function, split out from
1731         finish_function.
1732         (current_function_assigns_this): Remove.
1733         (current_function_just_assigned_this): Likewise.
1734         (start_function): Don't set them.
1735         (finish_function): Don't check them.  Don't emit
1736         base-initialization code here.  Generate code for destructors when
1737         doing semantic analysis.
1738         (finish_stmt): Don't check current_function_just_assigned_this.
1739         * decl2.c (lang_f_options): Remove this-is-variable.
1740         (lang_decode_option): Likewise.
1741         (grokclassfn): Don't check flag_this_is_variable.
1742         * init.c (emit_base_init): Return the expression generated.
1743         (construct_virtual_bases): Don't push/pop obstacks.  Fix
1744         typo.
1745         (build_new_1): Don't check flag_this_is_variable.
1746         (get_temp_regvar): Don't set DECL_REGISTER.
1747         (build_vec_init): Don't call use_variable.
1748         * lang-options.h: Remove "-fthis-is-variable" and
1749         "-fno-this-is-variable".
1750         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
1751         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
1752         expand_expr_stmt.
1753         * semantics.c (finish_expr_stmt_real): Rename to ...
1754         (finish_expr_stmt): This.  Remove assigned_this parameter.
1755         (begin_if_stmt): Call do_pushlevel before starting the statement.
1756         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
1757         blocks.
1758         (setup_vtbl_ptr): Emit initialization code for bases and members
1759         at semantic-analysis time.  Emit code to initialize vtables in
1760         destructors here.
1761         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
1762         Don't handle CTOR_INITIALIZER any more.
1763         * typeck.c (build_modify_expr): Don't check for assignments to
1764         this.
1765         (c_expand_return): Don't suggest assigning to `this'.
1766         
1767         * Makefile.in (decl.o): Depend on RTL_H.
1768         (decl2.o): Likewise.
1769         (class.o): Likewise.
1770         (call.o): Likewise.
1771         (method.o): Likewise.
1772         (search.o): Likewise.
1773         (tree.o): Likewise.
1774         (pt.o): Likewise.
1776         * decl.c (duplicate_decls): When a builtin function is redeclared
1777         as static, make sure it is mangled correctly.
1779         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
1780         detail about the statement-tree.
1781         
1782 1999-09-20  Nathan Sidwell  <nathan@acm.org>
1784         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
1786 1999-09-20  Nick Clifton  <nickc@cygnus.com>
1788         * decl2.c (lang_decode_option): Extend comment.
1790 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
1792         * typeck.c: Include "tm_p.h".
1794 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
1796         * ir.texi: New file.
1798 1999-09-19  Paul Burchard <burchard@pobox.com>
1800         * semantics.c (expand_stmt): Initialize return value.
1802 1999-09-18  Paul Burchard <burchard@pobox.com>
1804         * gxxint.texi: G++ now implements namespaces.
1805         
1806 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
1808         * decl.c (pop_label): Don't warn about unused labels more than
1809         once.
1810         * semantics.c (finish_goto_stmt): Always marked used labels as
1811         used.
1813         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
1814         even when the declaration is external.
1815         (cp_finish_decl): Adjust call to layout_var_decl.
1816         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
1818 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
1820         * typeck.c (get_member_function_from_ptrfunc): Always consider
1821         virtuality inside member pointer.
1823 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
1825         Turn on function-at-a-time processing.  
1826         * cp-tree.h (doing_semantic_analysis_p): New macro.
1827         (SF_DEFAULT): Define to zero, not SF_EXPAND.
1828         (start_handler_parms): Change prototype.
1829         (expand_start_catch_block): Likewise.
1830         (expand_end_catch_block): Likewise.
1831         (expand_start_eh_spec): Likewise.
1832         (expand_end_eh_spec): Declare.
1833         (finish_handler_parms): Change prototype.
1834         (begin_catch_block): Declare.
1835         (finish_handler): Change prototype.
1836         (do_pushlevel): Declare.
1837         (do_poplevel): Likewise.  
1838         * decl.c (pushlevel): Don't create
1839         binding levels when not doing semantic analysis.
1840         (poplevel): Don't pop them.
1841         (pushdecl): Assert that we are never called when not doing
1842         semantic analysis.
1843         (pushdecl_top_level): Use push_to_top_level.
1844         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
1845         label when expanding.
1846         (cp_finish_decl): Only inject for-scope variables when doing
1847         semantic analysis.  Add comments.
1848         (start_handler_parms): Return the handler parm.
1849         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
1850         already set.  Reinitialize from saved function data if available.
1851         Don't pushlevel when not doing semantic analysis.
1852         (store_parm_decls): Only generate RTL when expanding.  Only
1853         pushdecl when doing semantic analysis.  Set
1854         current_eh_spec_try_block if appropriate.
1855         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
1856         Combine common code.  Don't poplevel when not doing semantic
1857         analysis.
1858         (push_cp_function_context): Don't expand functions without an
1859         explicit call to expand_body.
1860         (mark_lang_function): Make eh_spec_try_block and
1861         x_scope_stmt_stack.  
1862         * except.c (expand_end_eh_spec): Don't
1863         declare.
1864         (process_start_catch_block): Likewise.
1865         (push_eh_cleanup): Use finish_decl_cleanup.
1866         (initialize_handler_parm): New function.
1867         (expand_start_catch_block): Use it.
1868         (expand_end_catch_block): Use tree-generation functions, not
1869         RTL-generation functions.
1870         (expand_start_eh_spec): Likewise.
1871         (expand_end_eh_spec): Likewise.
1872         (expand_exception_blocks): Simplify.
1873         (start_anon_func): Use do_pushlevel.
1874         (end_anon_func): Use do_poplvel.  Call expand_body for the
1875         function.  
1876         * expr.c (do_case): Don't call define_case_label.  
1877         * init.c (create_temporary_var): Set DECL_CONTEXT for local
1878         variables.  
1879         * method.c (emit_thunk): Call expand_body for the
1880         thunk.
1881         (sythesize_method): Likewise.  
1882         * parse.y (handler_args): Give it ttype.
1883         (eat_saved_input): Call expand_body.
1884         (base_init): Use do_pushlevel.
1885         (pending_inline): Call expand_body.
1886         (handler): Adjust calls to finish_handler_parms and
1887         finish_handler.
1888         (handler_args): Don't call expand_start_catch_block.  Return the
1889         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
1890         * parse.c: Regenerated.
1891         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
1892         * semantics.c (do_pushlevel): Give it external linkage.  Build
1893         SCOPE_STMTs.
1894         (do_poplevel): Likewise.
1895         (finish_case_label): Call define_case_label when doing semantic
1896         analysis.
1897         (finish_goto_stmt): Create RTL for labels.
1898         (finish_function_try_block): Set in_function_try_handler
1899         unconditionally.
1900         (finish_function_handler_sequence): Unset it.
1901         (finish_handler_parms): Use expand_start_catch_block even when
1902         building a statement-tree.
1903         (begin_catch_block): New function.
1904         (finish_handler): Move a little RTL-generation logic here.
1905         (finish_decl_cleanup): Allow cleanups for empty declarations.
1906         (finish_named_return_value): Don't pushdecl when not doing
1907         semantic analysis.
1908         (expand_stmt): Don't do semantic analysis for variable
1909         declarations.  Handle START_CATCH_STMT.  Call expand_label
1910         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
1911         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
1912         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
1913         RETURN_INIT and function try blocks.
1914         
1915         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
1916         x_scope_stmt_stack.  Add x_in_charge_parm.
1917         (current_eh_spec_try_block): New macro.
1918         (current_scope_stmt_stack): Likewise.
1919         (current_in_charge_parm): Likewise.
1920         * decl.c (start_function): Initialize current_in_charge_parm.
1921         (finish_function): Use current_in_charge_parm rather than looking
1922         up __in_chrg.
1923         * search.c (expand_indirect_vtbls_init): Likewise.
1925         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
1926         (TRY_BLOCK): Likewise.
1927         (HANDLER): Likewise.
1928         (START_CATCH_STMT): New tree node.
1929         (SCOPE_STMT): Likewise.
1930         * cp-tree.h (SCOPE_BEGIN_P): New macro.
1931         (SCOPE_NULLIFIED_P): Likewise.
1932         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
1933         (struct lang_decl): Add saved_language_function.
1934         (DECL_PENDING_INLINE_INFO): Adjust documentation.
1935         (DECL_PENDING_INLINE_P): New macro.
1936         (TYPE_TI_ARGS): Fix typo in comment.
1937         (DECL_SAVED_TREE): Add to documentation.
1938         (DECL_SAVED_FUNCTION_DATA): New macro.
1939         (START_CATCH_TYPE): Likewise.
1940         (SCOPE_END_P): New macro.
1941         (declare_parm_level): Don't declare.
1942         * decl.c (mark_lang_function): New function, split out from
1943         mark_cp_function_context.
1944         (save_function_data): New function.
1945         (declare_parm_level): Remove.
1946         (finish_function): Use save_function_data to squirrel away
1947         important stuff for later use.
1948         (mark_cp_function_context): Use mark_function_data.
1949         (lang_mark_tree): Likewise.
1950         * lex.c (begin_definition_of_inclass_inline): Set
1951         DECL_PENDING_INLINE_P.
1952         (store_pending_inline): Clear it.
1953         * pt.c (tsubst_decl): Likewise.
1955 1999-09-17  Nathan Sidwell  <nathan@acm.org>
1957         * call.c (perform_implicit_conversion): Deal with error_mark_node.
1959 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
1961         * decl.c (warn_extern_redeclared_static): Don't get confused by
1962         static member functions.
1963         (duplicate_decls): Merge DECL_THIS_STATIC.
1965         * decl.c (expand_static_init): Make sure assignments to local
1966         statics actually occur.
1968 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
1970         * cp-tree.h (poplevel_class): Declare.
1971         * class.c (popclass): Use poplevel_class, not poplevel.
1972         * decl.c (poplevel_class): Don't make it static.  Don't return a
1973         value.
1974         (poplevel): Don't call poplevel_class; abort in a class
1975         binding level is seen.
1976         * semantics.c (finish_translation_unit): Use pop_everything.
1977         * parse.y (member_init): Allow errors.
1978         (pending_inline): Call finish_function.
1979         * parse.c: Regenerated.
1980         * Makefile.in (CONFLICTS): Adjust.
1982 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
1983         
1984         * error.c: Reduce code duplication.
1985         (dump_template_value): New function.
1986         (dump_type_real): Use it.
1987         (dump_decl): Likewise.
1988         (dump_function_name): Likewise.
1989         (dump_function_decl): Don't be too talkative about function return
1990         type variety.
1992 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1994         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
1996         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
1998 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
2000         * decl2.c (finish_file): Also call check_global_declarations for
2001         the pending_statics list.
2003 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
2005         * lex.c (cp_pragma_implementation): Allow #pragma implementation
2006         in header files.
2008 1999-09-15  Richard Henderson  <rth@cygnus.com>
2010         * lex.c (mark_impl_file_chain): Follow the next chain.
2012 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
2014         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
2015         problems with extern "C" functions redeclared as static.
2016         (duplicate_decls): When a builtin is redeclared static, make the
2017         new function have internal linkage.
2018         
2019 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
2021         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
2022         * pt.c (tsubst_copy): Likewise.
2023         * tree.c (search_tree): Likewise.
2024         (mapcar): Likewise.
2026 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2028         * typeck2.c (ack): Don't declare progname.
2030 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
2032         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
2033         filenames with ggc_alloc_string.
2035 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
2037         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
2038         TARGET_EXPR.
2039         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
2040         the TARGET_EXPR.
2041         * cvt.c (build_up_reference): Likewise.
2042         * tree.c (build_cplus_new): Likewise.
2043         (get_target_expr): Likewise.
2044         
2045 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
2047         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
2049 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
2051         * cp-tree.h (build_target_expr): New function.
2052         * call.c (build_conditional_expr): Use build_target_expr.
2053         (convert_like): Likewise.
2054         (build_over_call): Likewise.
2055         * cvt.c (build_up_reference): Likewise.
2056         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
2057         (destroy_local_var): Here.
2058         (build_target_expr): New function.
2059         * tree.c (build_cplus_new): Use it.
2060         (get_target_expr): Likewise.
2062 1999-09-13  Nathan Sidwell  <nathan@acm.org>
2064         * typeck.c (expr_sizeof): Don't decay arrays and functions.
2065         Remove misleading comment.
2066         (build_compound_expr): Don't decay arrays.
2068 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
2070         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
2071         class rvalues again.
2073 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2075         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
2077         * g++spec.c: Include gcc.h.
2078         (lang_specific_driver): Constify a char*.  Call xcalloc, not
2079         xmalloc/bzero.  All calls to the function pointer parameter now
2080         explicitly call `fatal'.
2082 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
2084         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
2085         * cvt.c (ocp_convert): Complete the from and destination types.
2086         Adjust warning about functions always being `true' in conditionals.
2087         * decl.c (duplicate_decls): Don't play funny games with abort.
2088         * error.c (dump_expr): Handle OVERLOADs.
2089         * spew.c (probe_obstack): Remove.
2090         * typeck.c (condition_conversion): Use perform_implicit_conversion.
2091         
2092 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
2094         * cp-tree.h (auto_function, define_function): Adjust prototypes.
2095         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
2096         changed.
2097         (auto_function): Likewise, for CODE arg.
2098         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
2099         (builtin_function): ... here.
2101 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
2103         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
2104         (init_decl_processing): Don't set TREE_PERMANENT for the
2105         error_mark_node.
2106         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
2107         (grokdeclarator): Likewise.
2108         (grokparms): Don't check TREE_PERMANENT when building up lists.
2109         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
2110         (mark_inline_for_output): Likewise.
2111         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
2112         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
2113         * lex.c (check_newline): Don't check ggc_p; it is always one.
2114         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
2115         * spew.c (yylex): Don't copy_node or probe_obstacks for
2116         non-permanent CONSTANTs and STRINGs.
2117         * tree.c (build_cplus_array_type_1): Don't fuss with
2118         TREE_PERMANENT on ARRAY_TYPEs.
2119         
2120         * cp-tree.def (CLEANUP_STMT): New node.
2121         * cp-tree.h (language_function): Add name_declared.
2122         (current_function_name_declared): New macro.
2123         (CLEANUP_DECL): New macro.
2124         (CLEANUP_EXPR): Likewise.
2125         (emit_local_var): Likewise.
2126         (finish_decl_cleanup): New function.
2127         * cvt.c (build_up_reference): Simplify.
2128         (ocp_convert): Remove dead code.
2129         * decl.c (start_decl): Remove call to add_decl_stmt.
2130         (grok_reference_init): Adjust, to handle bindings temporaries to
2131         references.  Remove dead code.
2132         (initialize_local_var): Don't generate RTL for
2133         declarations here, or build cleanups here.  Don't fuss with
2134         obstacks.  Replace expand_start_target_temps calls with explicit
2135         setting of stms_are_full_exprs_p.
2136         (destroy_local_var): New function.
2137         (emit_local_var): Likewise.
2138         (cp_finish_decl): Use them, as appropriate.
2139         (start_function): Announce template functions.
2140         (store_parm_decls): Don't call declare_function_name here.
2141         (finish_stmt): Don't start emit base-initialization code when just
2142         building the statement-tree.
2143         * init.c (create_temporary_var): Move add_decl_stmt call ...
2144         (get_temp_regvar): Here.
2145         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
2146         cp_finish_decl would expect.  Don't call add_decl_stmt.
2147         * semantics.c (begin_compound_stmt): Call declare_function_name,
2148         if appropriate.
2149         (finish_decl_cleanup): New function.
2150         (expand_stmt): Use emit_local_var to output variables.          
2151         (expand_body): Set current_funtion_name_declared.
2152         
2153 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
2155         * cp-tree.h (finish_cleanup_try_block): New function.
2156         * semantics.c (finish_cleanup_try_block): Add comment.
2158 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
2160         * cp-tree.h: Delete declarations for all tree nodes now moved to
2161         global_trees.
2162         * decl.c: Delete their definitions.
2163         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
2164         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
2165         provide defaults.
2166         (init_decl_processing): Call build_common_tree_nodes and
2167         build_common_tree_nodes_2 instead of building their nodes here.
2168         Don't add gc roots for them.
2170 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
2172         * cp-tree.h (language_function): Rename expanding_p to
2173         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
2174         (expanding_p): Adjust accordingly.
2175         (TREE_VIA_PRIVATE): Fix typo in comment.
2176         (DECL_REFERENCE_SLOT): Remove.
2177         (SET_DECL_REFERENCE_SLOT): Likewise.
2178         * decl.c (named_label_uses): Adjust. Remove chicken comment.
2179         (push_overloaded_decl): Don't truncate the chain of bindings when
2180         adding an overloaded function.
2181         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
2182         (initialize_local_var): Fix typo in comment.
2183         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
2184         * decl2.c (start_objects): Make the fact that we are expanding
2185         the generated function right away explicit.
2186         (start_static_storage_duration_function): Likewise.
2187         (finish_file): Fix typo in comment.
2188         * init.c (build_vec_init): Correct bugs in handling cleanups.
2189         * semantics.c (maybe_convert_cond): New function.
2190         (FINISH_COND): Always store the condition, even if there's
2191         a declaration.
2192         (finish_if_stmt_cond): Use maybe_convert_cond.
2193         (finish_while_stmt_cond): Likewise.
2194         (finish_do_stmt): Likewise.
2195         (finish_for_cond): Likewise.
2196         (expand_cond): Adjust.
2197         
2198         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
2199         * init.c (perform_member_init): Remove obstack machinations.
2200         (expand_cleanup_for_base): Likewise.
2201         (finish_init_stmts): Mark the statement-expression as used.
2202         * method.c (emit_thunk): Use tree-generating functions, not
2203         RTL.
2204         (do_build_copy_constructor): Likewise.
2205         (do_build_assign_ref): Likewise.
2206         (synthesize_method): Likewise.  Keep track of line numbers.
2207         * pt.c (tsubst_expr): Handle various kinds of try blocks.
2208         * semantics.c (expand_stmts): Remove.
2209         (begin_function_try_block): Set FN_TRY_BLOCK_P.
2210         (finish_function_try_block): Be careful rechaining 
2211         function try blocks.
2212         (expand_stmt): Loop through all the statements at a given level.
2213         (exapnd_body): Be careful with line-numbers here too.  Prepare for
2214         being called directly from the parser.
2216         * cp-tree.h (finish_function): Adjust prototype.
2217         * decl.c (finish_function): Return the function compiled.
2218         * pt.c (instantiate_decl): Don't play games with obstacks.
2219         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
2220         (search_tree): Likewise.
2221         * typeck.c: Fix typo in comment.
2222         * typeck2.c (store_init_value): Add comment.
2224         * cp-tree.h (CPTI_ATEXIT): New macro.
2225         (atexit_node): Likewise.
2226         * decl.c (destroy_local_static): New function, broken out from ...
2227         (expand_static_init): Here.
2229         * rtti.c (get_tinfo_var): These should always be global
2230         (expand_si_desc): Use tree, not RTL, functions to generate code.
2231         (expand_class_desc): Likewise.
2232         (expand_ptr_desc): Likewise.
2233         (expand_attr_desc): Likewise.
2234         (expand_generic_desc): Likewise.
2235         (synthesize_tinfo_fn): Likewise.
2237 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
2239         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
2240         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
2241         RECHAIN_STMTS. 
2242         (RECHAIN_STMST_FROM_CHAIN): Likewise.
2244         * parse.y (simple_stmt): Fix typo in last change.
2246         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
2247         (STMT_IS_FULL_EXPR_P): Likewise.
2248         (STMT_LINENO_FOR_FN_P): Likewise.
2249         (prep_stmt): New function.
2250         (building_stmt_tree): Tweak for safety.
2251         * pt.c (tsubst_expr): Use prep_stmt throughout.
2252         (add_tree): Move it to semantics.c
2253         * semantics.c (add_tree): Move it here.
2254         (finish_expr_stmt_real): New function.
2255         (finish_expr_stmt): Use it.
2256         (finish_if_stmt_cond): Use FINISH_COND.
2257         (finish_while_stmt_cond): Likewise.
2258         (finish_for_cond): Likewise.
2259         (finish_stmt_tree): Tweak line-number handling.
2260         (prep_stmt): New function.
2261         (expand_stmt): Use it.
2262         
2263         * cp-tree.h (begin_switch_stmt): Adjust prototype.
2264         (finish_switch_cond): Likewise.
2265         * parse.y (simple_stmt): Adjust accordingly.
2266         * parse.c: Regenerated.
2267         * pt.c (tsubst_expr): Adjust accordingly.
2268         * semantics.c (expand_cond): New function.
2269         (FINISH_COND): New macro.
2270         (begin_switch_stmt): Build the SWITCH_STMT here.
2271         (finish_switch_stmt_cond): Not here.
2272         (expand_stmt): Adjust calls to begin_switch_stmt and
2273         finish_switch_cond.  Use expand_cond throughout.
2275         * dump.c (dequeue_and_dump): Dump types for constants.
2276         Describe DECL_ARG_TYPE more intuitively.
2277         Handle ARRAY_REF.
2279         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
2280         (lang_cleanup_tree): Remove.
2281         * lex.c (make_lang_type): Use ggc_alloc to allocate
2282         TYPE_LANG_SPECIFIC.
2284         Reorganize per-function data.
2285         * cp-tree.h (saved_scope): Add function_decl, bindings.
2286         (language_function): Rename binding_level to bindings.
2287         (cp_function_chain): Use the current_function, not the
2288         outer_function_chain.
2289         (current_class_ptr): Make it work, even when there's no 
2290         current function.
2291         (current_class_ref): Likewise.
2292         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
2293         macros.
2294         (clear_temp_name): Remove.
2295         * decl.c (check_function_type): New function, broken out from
2296         start_function.
2297         (current_binding_level): Adjust definition.
2298         (pushlevel): Simplify.
2299         (poplevel): Don't use named_label_uses when we're outside
2300         a function scope.
2301         (mark_saved_scope): Mark function_decl and bindings.
2302         (maybe_push_to_top_level): Don't unconditionally push a new
2303         function context.  Save bindings and the current_function_decl.
2304         Don't clear named_labels.
2305         (pop_from_top_level): Pop function context if appropriate.
2306         (init_decl_processing): Set init_lang_status and free_lang_status,
2307         rather than save_lang_status and restore_lang_status.
2308         (start_function): Take SF_* flags.  Don't clear per-function data.
2309         Reorder and simplify to use new per-function data code.  Add
2310         asserts.
2311         (store_parm_decls): Don't call init_function_start here.
2312         (finish_function): Adjust for new handling of per-function data.
2313         (push_cp_function_context): Simplify.
2314         (mark_cp_function_context): Change binding_level to bindings.
2315         * decl2.c (clear_temp_name): Remove.
2316         (start_objects): Use SF flags to start_function.
2317         (start_static_storage_duration_function): Likewise.
2318         * except.c (start_anon_func): Remove redundant calls to 
2319         push_function_context_to.  Use SF flags to start function.
2320         (end_anon_func): Remove redundant call to pop_function_context
2321         from.
2322         * lex.c (reinit_parse_for_function): Don't initialize per-function 
2323         data.
2324         * method.c (emit_thunk): Clear current_function after calling
2325         assemble_end_function.  Use SF flags for start_function.
2326         (synthesize_method): Use SF flags for start_function.
2327         * parse.c: Regenerated.
2328         * parse.y (fn.defpen): Likewise.
2329         (pending_inline): Clear current_function, even if something goes
2330         wrong.
2331         * pt.c (instantiate_decl): Use SF flags to start_function.
2332         Don't save and restore expanding_p.
2333         (add_tree): Handle the case where we are outside any function.
2334         (end_tree): Likewise.
2335         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
2336         * semantics.c (begin_function_definition): Likewise.
2337         (expand_body): Likewise.
2338         
2339 1999-09-09  Nathan Sidwell  <nathan@acm.org>
2341         * cp-tree.h (convert_to_void): Prototype new function.
2342         (require_complete_type_in_void): Remove prototype.
2343         * cvt.c (convert_to_void): New function.
2344         (ocp_convert): Use convert_to_void.
2345         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
2346         expressions.
2347         * typeck.c (require_complete_type_in_void): Remove function.
2348         (build_compound_expr): Use convert_to_void.
2349         (build_static_cast): Likewise.
2350         (build_c_cast): Likewise.
2351         * semantics.c (finish_expr_stmt): Do not decay full expressions.
2352         
2353         * typeck.c (build_x_compound_expr): Add FIXME.
2355 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
2357         * cp-tree.h (scratch_tree_cons): Remove.
2358         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
2359         and perm_tree_cons with plain tree_cons.
2360         * class.c: Likewise.
2361         * decl.c: Likewise.
2362         * decl2.c: Likewise.
2363         * except.c: Likewise.
2364         * expr.c: Likewise.
2365         * init.c: Likewise.
2366         * lex.c: Likewise.
2367         * method.c: Likewise.
2368         * parse.y: Likewise.
2369         * pt.c: Likewise.
2370         * repo.c: Likewise.
2371         * rtti.c: Likewise.
2372         * search.c: Likewise.
2373         * typeck.c: Likewise.
2374         * parse.c: Regenerated.
2375         * tree.c (build_srcloc): Simplify.
2376         
2377 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
2379         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
2380         Remove next.
2381         (LANG_DECL_PERMANENT): Remove.
2382         * decl.c (duplicate_decls): Don't mess about with obstacks trying
2383         to free memory.
2384         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
2385         * lex.c (free_lang_decl_chain): Remove.
2386         (build_lang_decl): Don't use obstacks.
2387         (retrofit_lang_decl): Likewise.
2388         (copy_lang_decl): Likewise.
2390         * cp-tree.h (saved_scope): Remove old_binding_level and 
2391         function_decl.  Tidy up.
2392         * decl.c (mark_saved_scope): Don't set them.
2393         (maybe_push_to_top_level): Clear memory.
2395         * decl.c (layout_var_decl): Change prototype.  Don't complete
2396         types for external objects.
2397         (check_initializer): Likewise.  Tidy.
2398         (initialize_local_var): Complete types here.
2399         (cp_finish_decl): Not here.  Reorganize a little.
2400         (grokvardecl): Don't complete types here.
2402         * decl.c (start_function): Clear last_dtor_insn and
2403         last_parm_cleanup_insn. 
2404         (push_cp_function_context): Just copy over a little of
2405         the old context, not all of it.
2407         * cp-tree.h (copy_to_permanent): Remove.
2408         (permanent_p): Likewise.
2409         * decl.c (building_typename_type): Don't use copy_to_permanent.
2410         (start_decl): Likewise.
2411         (grok_reference_init): Likewise.
2412         (cp_finish_decl): Likewise.
2413         * init.c (build_new_1): Don't use mapcar.
2414         (build_vec_delete_1): Don't use copy_to_permanent.
2415         (build_vec_init): Likewise.
2416         * parse.y (primary): Likewise.
2417         * parse.c: Regenerated.
2418         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
2419         (lookup_template_class): Likewise.
2420         (tsubst_friend_function): Likewise.
2421         (instantiate_class_template): Likewise.
2422         (tsubst_decl): Likewise.
2423         (tsubst): Likewise.
2424         (instantiate_template): Likewise.
2425         (unify): Likewise.
2426         * rtti.c (get_tinfo_fn): Likewise.
2427         (build_dynamic_cast): Likewise.
2428         * semantics.c (finish_if_stmt_cond): Likewise.
2429         (finish_while_stmt_cond): Likewise.
2430         (finish_do_stmt): Likewise.
2431         (finish_for_cond): Likewise.
2432         (finish_for_expr): Likewise.
2433         (finish_cleanup): Likewise.
2434         (add_decl_stmt): Likewise.
2435         (finish_named_return_value): Likewise.
2436         (finish_qualified_call_expr): Likewise.
2437         * tree.c (perm_manip): Remove.
2438         (build_exception_variant): Don't use copy_to_permanent.
2439         (permanent_p): Remove.
2440         (copy_to_permament): Remove.
2441         (build_min_nt): Don't use copy_to_permanent.
2442         (build_min): Likewise.
2443         (min_tree_cons): Likewise.
2444         * typeckc.c (build_static_cast): Likewise.
2445         (build_reinterpret_cast): Likewise.
2446         (build_const_cast): Likewise.
2447         
2448 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
2450         * decl.c (ggc_p): Set it to 1.
2451         (mark_saved_scope): Add prototype.
2453 1999-09-07  Richard Henderson  <rth@cygnus.com>
2455         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
2456         * typeck.c (self_promoting_args_p): Delete.
2458 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
2460         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
2461         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
2463 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
2465         * Makefile.in (tree.o): Depend on ggc.h.
2466         * class.c (make_method_vec): Remove.
2467         (free_method_vec): Likewise.
2468         (free_method_vecs): Remove.
2469         (add_method): Don't use them.
2470         * cp-tree.def (PTRMEM_CST): Make it longer.
2471         (TEMPLATE_PARM_INDEX): Make it shorter.
2472         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
2473         (template_parm_index): Remove RTL field.
2474         (ptrmem_cst): Add RTL field.
2475         (finish_function): Removed parameter.
2476         (process_next_inline): Change prototype.
2477         (init_cplus_unsave): Rename to init_tree.
2478         (binding_init): Remove.
2479         * decl.c (free_binding_nodes): Remove.
2480         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
2481         (pop_binding): Don't use free_binding_nodes.
2482         (free_binding_vecs): Remove.
2483         (store_bindings): Don't use them.
2484         (pop_from_top_level): Likewise.
2485         (lookup_namespace_name): Simplify.
2486         (build_typename_type): Don't use obstack_free.
2487         (unqualified_namespace_lookup): Simplify.
2488         (lookup_name_real): Simplify.
2489         (start_function): Remove comment about leaks.
2490         (finish_function): Removed nested parameter.  Call
2491         expand_end_bindings even when building_stmt_tree.
2492         Call ggc_push_context and ggc_pop_context around
2493         rest_of_compilation, if necessary.
2494         (mark_cp_function_context): Handle a NULL language-context.
2495         (lang_mark_false_label_stack): Fix typo.
2496         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
2497         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
2498         pointer to method types.
2499         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
2500         * decl2.c (finish_objects): Adjust call to finish_function.
2501         (finish_static_store_duration_function): Likewise.
2502         (do_nonmember_using_decl): Remove call to binding_init.
2503         * except.c (end_anon_func): Adjust call to finish_function.
2504         * lex.c (mark_impl_file_chain): New function.
2505         (init_parse): Call init_tree, not init_cplus_unsave.
2506         Add GC roots.
2507         (cp_pramga_interface): Use xmalloc, not permalloc.
2508         (cp_pragma_implementation): Likewise.
2509         (begin_definition_of_inclass_inline): Simplify.
2510         (process_next_inline): Adjust prototype.
2511         (do_scoped_id): Don't call binding_init.
2512         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
2513         * method.c (emit_thunk): Adjust call to finish_function.
2514         (synthesize_method): Likewise.
2515         * parse.y (%union): Add a new `pi' variant.
2516         (PRE_PARSED_FUNCTION_DECL): Use it.
2517         (fn.defpen): Likewise.
2518         (fndef): Adjust call to finish_function.
2519         * pt.c (instantiate_decl): Likewise.
2520         * rtti.c (syntheisze_tinfo_fn): Likewise.
2521         * semantics.c (expand_body): Likewise.
2522         * tree.c: Include ggc.h.
2523         (mark_list_hash): New function.
2524         (binding_init): Remove.
2525         (init_cplus_unsave): Rename to ...
2526         (init_tree): This.  Add GC roots.
2527         
2528 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
2530         Get ready for garbage collection.
2531         * Makefile.in (CXX_TREE_H): Add varray.h
2532         (lex.o): Depend on ggc.h.
2533         (decl.o): Likewise.
2534         (decl2.o): Likewise.
2535         (method.o): Likewise.
2536         (search.o): Likewise.
2537         (pt.o): Likewise.
2538         (repo.o): Likewise.
2539         * class.c: Include ggc.h.
2540         (current_class_name): Remove.
2541         (current_class_type): Likewise.
2542         (current_access_specifier): Likewise.
2543         (previous_class_type): Likewise.
2544         (previous_class_values): Likewise.
2545         (class_cache_firstobj): Likewise.
2546         (current_lang_base): Likewise.
2547         (current_lang_stack): Likewise.
2548         (current_lang_stacksize): Likewise.
2549         (lang_name_c): Likewise.
2550         (lang_name_cplusplus): Likewise.
2551         (lang_name_java): Likewise.
2552         (current_lang_name): Likewise.
2553         (base_layout_decl): Likewise.
2554         (access_default_node): Likewise.
2555         (access_public_node): Likewise.
2556         (access_protected_node): Likewise.
2557         (access_private_node): Likewise.
2558         (access_default_virtual_node): Likewise.
2559         (access_public_virtual_node): Likewise.
2560         (access_protected_virtual_node): Likewise.
2561         (access_private_virtual_node): Likewise.
2562         (signed_zero_node): Likewise.
2563         (init_class_processing): Don't build base_layout_decl.
2564         (push_lang_context): Adjust now that current_lang_base is a varray.
2565         (pop_lang_context): Likewise.
2566         * cp-tree.h: Include varray.h.
2567         (cp_global_trees): Add access_default, access_public,
2568         access_protected, access_private, access_default_virtual,
2569         access_public_virtual, access_protected_virtual,
2570         access_private_virtual, ctor_identifier, delta2_identifier, 
2571         delta_identifier, dtor_identifier, in_charge_identifier,
2572         index_identifier, nelts_identifier, this_identifier,
2573         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
2574         lang_name_c, lang_name_cplusplus, lang_name_java,
2575         empty_except_spec, null, jclass, minus_one, terminate.
2576         (saved_scope): Move here from decl.c.  Define globals in terms of
2577         saved_scope: current_namespace, current_class_name,
2578         current_class_type, current_access_specifier, current_lang_stack,
2579         current_lang_base, current_lang_name, current_function_parms,
2580         current_template_parms, processing_template_decl,
2581         processing_specialization, processing_explicit_instantiation,
2582         previous_class_type, previous_class_values, class_cache_firstobj.
2583         (scope_chain): New variable.
2584         (init_pt): New function.
2585         * decl.c (current_namespace): Remove.
2586         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
2587         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
2588         (delta_identifier, delta2_identifier): Likewise.
2589         (pfn_or_delta2_identifier, tag_identifier): Likewise
2590         (vt_off_identifier, empty_except_spec, null_node): Likewise.
2591         (current_function_parms, current_lang_base): Remove.
2592         (current_lang_stack, previous_class_values): Remove.
2593         (class_binding_level): Macroize.
2594         (saved_scope): Remove.
2595         (current_saved_scope): Rename to scope_chain.
2596         (mark_saved_scope): Adjust for new scope structure.
2597         (maybe_push_to_top_level): Likewise.
2598         (pop_from_top_level): Likewise.
2599         (duplicate_decls): Adjust now that current_lang_base is a varray.
2600         (build_typename_type): Call ggc_add_tree_hash_table_root.
2601         (init_decl_processing): Call init_pt.  Call push_to_top_level to
2602         set up globals.  Add GC roots.
2603         (xref_basetypes): Adjust now that current_lang_base is a varray.
2604         * decl.h (this_identifier): Remove.
2605         (in_charge_identifier): Likewise.
2606         * decl2.c: Don't include varray.h.
2607         (current_namespace): Remove.
2608         (init_decl2): Add GC roots.
2609         * except.c (Terminate): Remove. 
2610         (init_exception_processing): Use terminate_node instead.
2611         (build_terminate_handler): Likewise.
2612         * init.c (nc_nelts_field_id): Remove.
2613         (minus_one): Likewise.
2614         (init_init_processing): Use minus_one_node and nelts_identifier
2615         instead.  Add GC roots.
2616         (jclass_node): Remove.
2617         (build_new_1): Use nelts_identifier.
2618         (build_vec_init): Likewise.
2619         (build_vec_delete): Likewise.
2620         * lex.c: Include ggc.h.
2621         (defarg_fn): Move declaration early.
2622         (defarg_parms): Likewise.
2623         (init_parse): Add GC roots.
2624         (handle_cp_pragma): Remove redundant declaration of
2625         pending_vtables.
2626         * method.c: Include ggc.h.
2627         (btypelist): Make it a varray.  All uses changed.
2628         (ktypelist): Likewise.
2629         (init_method): Add GC roots.
2630         * pt.c: Don't include varray.h.  Include ggc.h.
2631         (current_template_parms): Remove.
2632         (processing_template_decl): Likewise.
2633         (processing_specialization): Likewise.
2634         (processing_explicit_instantiation): Likewise.
2635         (init_pt): New function.
2636         * repo.c: Include ggc.h.
2637         (init_repo): Add GC roots.
2638         * search.c: Don't include varray.h.
2639         (_vptr_name): Remove.
2640         (lookup_field_1): Use vtpr_identifier instead.
2641         (expand_indirect_vtbls_init): Remove redundant declaration of
2642         in_charge_identifier.
2643         (init_search_processing): Use vptr_identifier.
2644         
2645 1999-09-05  Richard Henderson  <rth@cygnus.com>
2646             Bernd Schmidt <bernds@cygnus.co.uk>
2647             Mark Mitchell  <mark@codesourcery.com>
2649         * Makefile.in (parse.o): Depend on ggc.h.
2650         (decl2.o): Depend on ggc.h.
2651         (init.o): Depend on ggc.h.
2652         * cp-tree.h (init_decl2): Declare.
2653         (cp_parse_init): Likewise.
2654         * decl.c (ggc_p): Define to zero.
2655         (mark_saved_scope): New function.
2656         (init_decl_processing): Call cp_parse_init, and cp_decl2.
2657         Register GC roots.
2658         (expand_static_init): Add GC roots.
2659         * decl2.c: Include ggc.h.
2660         (init_decl2): New function.
2661         * init.c: Include ggc.h.
2662         (init_init_processing): Add GC roots.
2663         * parse.y: Include ggc.h.
2664         (cp_parse_init): New function.
2665         
2666 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
2668         * decl.c (init_decl_processing): Set mark_lang_status.
2669         (lang_mark_false_label_stack): Adjust prototype.
2670         * decl2.c (grok_function_init): Remove extraneous declaration of
2671         abort_fndecl.
2673         * Make-lang.in (cc1plus): Remove dependency on GGC.
2674         * Makefile.in (OBJS): Don't mention ggc-simple.o.
2675         (OBJDEPS): Don't mention ggc-simple.o.
2677         * Make-lang.in (cc1plus): Depend on $(GGC).
2678         * Makefile.in (OBJS): Add ggc-simple.o.
2679         (OBJDEPS): Likewise.
2680         * cp-tree.h (language_function): Rename members to `x_' versions;
2681         we now have x_named_labels, x_ctor_label, x_dtor_label,
2682         x_base_init_list, x_member_init_list, x_base_init_expr,
2683         x_current_class_ptr, x_current_class_ref, x_last_tree,
2684         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
2685         x_result_rtx. 
2686         (dtor_label, ctor_label, current_base_init_list,
2687         current_member_init_list, base_init_expr, current_class_ptr,
2688         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
2689         * decl.c: Include ggc.h.
2690         (last_dtor_insn): Adjust to use x_ names.
2691         (last_parm_cleanup_insn): Likewise.
2692         (original_result_rtx): Likewise.
2693         (named_labels): Likewise.
2694         (mark_binding_level): New function.
2695         (mark_cp_function_context): Likewise.
2696         (mark_false_label_stack): Likewise.
2697         (lang_mark_tree): Likewise.
2698         (lang_cleanup_tree): Likewise.
2699         
2700 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
2702         * Makefile.in (CXX_TREE_H): Include function.h.
2703         (decl.o): Don't depend on function.h.
2704         (decl2.o): Likewise.
2705         (typeck.o): Likewise.
2706         (init.o): Likewise.
2707         (method.o): Likewise.
2708         * cp-tree.h: Include function.h.
2709         (cp_function): Rename to language_function.  Remove next.
2710         (cp_function_chain): Make it a macro, not a variable.
2711         (push_cp_function_context): Don't declare.
2712         (pop_cp_function_context): Likewise.
2713         * decl.c: Don't include function.h.
2714         (push_cp_function_context): Make it static.  Make it suitable for
2715         a save_lang_status callback.
2716         (pop_cp_function_context): Likewise.
2717         (maybe_push_to_top_level): Call push_function_context_to, not
2718         push_cp_function_context.
2719         (pop_from_top_level): Call pop_function_context_from, not
2720         pop_cp_function_context.
2721         (init_decl_processing):  Set save_lang_status and
2722         restore_lang_status.  Call push_function_context_to, not
2723         push_cp_function_context.
2724         (cp_function_chain): Remove.
2725         * decl2.c: Don't include function.h.
2726         * except.c: Don't include function.h.
2727         (start_anon_func): Call push_function_context_to, not
2728         push_cp_function_context.
2729         (end_anon_func):  Call pop_function_context_from, not
2730         pop_cp_function_context.
2731         * init.c: Don't include function.h.
2732         * lex.c (begin_definition_of_inclass_inline): Call
2733         push_function_context_to, not push_cp_function_context. 
2734         (process_next_inline):  Call pop_function_context_from, not
2735         pop_cp_function_context.
2736         * method.c: Don't include function.h.
2737         (synthesize_method): Call push_function_context_to, not
2738         push_cp_function_context.  Call pop_function_context_from, not
2739         pop_cp_function_context.
2740         * typeck.c: Don't include function.h.
2741         
2742         * decl.c (expand_static_init): Tweak handling of static
2743         initializations for objects without constructors.
2745 1999-09-03  Nathan Sidwell  <nathan@acm.org>
2747         * typeck.c (build_indirect_ref): Reject dereference of pointer to
2748         void.
2750 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
2752         * cp-tree.h (cp_function): Move here, from decl.c.
2753         (cp_function_chain): Declare.
2754         (dtor_label): New macro, instead of variable.
2755         (ctor_label): Likewise.
2756         (current_base_init_list): Likewise.
2757         (current_member_init_list): Likewise.
2758         (base_init_expr): Likewise.
2759         (current_class_ptr): Likewise.
2760         (current_class_ref): Likewise.
2761         (last_tree): Likewise.
2762         (last_expr_type): Likewise.
2763         (current_function_returns_value): Likewise.
2764         (current_function_returns_null): Likewise.
2765         (current_function_just_assigned_this): Likewise.
2766         (current_function_parms_stored): Likewise.
2767         (temp_name_counter): Likewise.
2768         (static_labelno): Likewise.
2769         (expanding_p): Likewise.
2770         (stmts_are_full_exprs_p): Likewise.
2771         (in_function_try_handler): Likewise.
2772         (lang_type): Remove nested type_flags.  All uses changed.
2773         * call.c (ctor_label): Remove.
2774         (dtor_label): Likewise.
2775         * class.c (current_class_ptr): Remove.
2776         (current_class_ref): Likewise.
2777         * decl.c (static_labelno): Remove.
2778         (dtor_label): Likewise.
2779         (last_dtor_insn): New macro, instead of variable.
2780         (last_parm_cleanup_insn): Likewise.
2781         (original_result_rtx): Likewise.
2782         (in_function_try_handler): Remove.
2783         (named_label_uses): New macro, instead of variable.
2784         (named_labels): Likewise.
2785         (current_function_returns_value): Remove.
2786         (current_function_returns_null): Likewise.
2787         (current_function_assigns_this): New macro, instead of variable.
2788         (current_function_just_assigned_this): Likewise.
2789         (current_binding_level): Likewise.
2790         (init_decl_processing): Call push_cp_function_context.
2791         (cp_function): Move to cp-tree.h
2792         (cp_function_chain): Make it global.
2793         (temp_name_counter): Remove.
2794         (push_cp_function_context): Simplify.
2795         (pop_cp_function_context): Likewise.
2796         * decl2.c (temp_name_counter): Remove.
2797         * init_c (current_base_init_list): Likewise.
2798         (current_member_init_list): Likewise.
2799         (base_init_expr): Likewise.
2800         * method.c (static_labelno): Likewise.
2801         * pt.c (last_tree): Likewise.
2802         * semantics.c (expanding_p): Likewise.
2803         (stmts_are_full_exprs_p): Likewise.
2804         (last_expr_type): Likewise.
2805         * typeck.c (dtor_label): Likewise.
2806         (ctor_label): Likewise.
2807         
2808 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
2810         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
2811         (arg_assoc_class): Use arg_assoc_template_arg for template
2812         arguments. 
2813         (arg_assoc): Likewise.
2814         * pt.c (mangle_class_name_for_template): Allow member template
2815         template arguments.
2817 1999-09-02  Nathan Sidwell  <nathan@acm.org>
2819         * call.c (build_conditional_expr): Warn on enum mismatches.
2820         (convert_arg_to_ellipsis): Move non-pod check to after
2821         conversion.
2823 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2825         * gxx.gperf (hash, is_reserved_word): Add prototypes.
2827         * init.c (build_vec_init): Initialize variable `try_block'.
2829         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
2830         Likewise for bzero/memset.
2831         (token_getch, token_put_back): Add static prototypes.  Remove
2832         `inline' from the definitions.
2833         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
2835 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
2837         * cp-tree.h (lang_type): Move align into type_flags.
2838         (CLASSTYPE_ALIGN): Adjust accordingly.
2839         * call.c (direct_reference_binding): Remove misleading comment.
2841 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2843         * parse.y (language_string): Constify.
2845 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2847         * repo.c (getpwd): Don't prototype.
2848         * xref.c (getpwd): Likewise
2850 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2852         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
2853         Remove hacks for stuff which now comes from libiberty.
2855 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
2857         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
2859 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
2861         * cp-tree.h (begin_init_stmts): Declare.
2862         (finish_init_stmts): Likewise.
2863         * cvt.c (build_up_reference): Wrap the declaration of a temporary
2864         in a statement-expression so that we will see it when expanding
2865         tree structure later.
2866         * init.c (begin_init_stmts): Don't make it static.
2867         (finish_init_stmts): Likewise.
2869         * cp-tree.h (start_handler_parms): New function.
2870         (expand_start_catch_block): Take only one parameter.
2871         (start_handler_parms): New function.
2872         * decl.c (start_handler_parms): Define it.
2873         * except.c (process_start_catch_block): Take only one parameter.
2874         Don't call grokdeclarator here.
2875         (expand_start_catch_block): Don't call grokdeclarator here,
2876         either.
2877         * parse.y (handler_args): Adjust call to
2878         expand_start_catch_block.  Use start_handler_parms.
2879         * pt.c (push_template_decl_real): Make permanent lists have
2880         permanent elements.
2881         (tsubst_expr): Adjust calls to expand_start_catch_block
2882         appropriately.
2883         * semantics.c (expand_stmt): Likewise.
2884         
2885 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
2887         * pt.c (push_template_decl_real): Use template declaration from
2888         class type if it exists.
2890 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
2892         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
2893         (maybe_inject_for_scope_var): Declare it.
2894         (initialize_local_var): Likewise.
2895         * decl.c (maybe_inject_for_scope_var): Make it global.
2896         (initialize_local_var): Likewise.  Move cleanup handling here,
2897         from cp_finish_decl.
2898         (make_rtl_for_nonlocal_decl): Use
2899         push_obstacks_nochange/pop_obstacks, rather than
2900         end_temporary_allocation/resume_temporary_allocation.
2901         (cp_finish_decl): Try to complete the type of a variable when it
2902         is declared.  Move cleanup-handling to initialize_local_var.
2903         (expand_static_init): Use tree-building code, rather than
2904         RTL-building code.
2905         * decl2.c (get_temp_name): Assert non-initializedness of
2906         temporaries.
2907         * init.c (create_temporary_var): Move RTL-assigning code to ...
2908         (get_temp_regvar): Here.
2909         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
2910         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
2911         call initialize_local_var to generate initialization code.
2912         
2913 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2915         * cp-tree.h (fndecl_as_string, type_as_string,
2916         type_as_string_real, args_as_string, decl_as_string,
2917         expr_as_string, code_as_string, language_as_string,
2918         parm_as_string, op_as_string, assop_as_string, cv_as_string,
2919         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
2921         * errfn.c (cp_printer): Likewise.
2923         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
2924         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
2925         cp_file_of, code_as_string, language_as_string, parm_as_string,
2926         op_as_string, assop_as_string, args_as_string, cv_as_string):
2927         Likewise.
2929         * tree.c (lang_printable_name): Likewise.
2931 1999-08-28  Richard Henderson  <rth@cygnus.com>
2933         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
2935 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
2937         * cp-tree.h (strip_array_types): New function.
2938         * decl.c (maybe_deduce_size_from_array_init): New function, split
2939         out from cp_finish_decl.
2940         (layout_var_decl): Likewise.
2941         (maybe_commonize_var): Likewise.
2942         (maybe_inject_for_scope_var): Likewise.
2943         (initialize_local_var): Likewise.
2944         (build_cleanup_on_safe_obstack): Likewise.
2945         (check_initializer): Likewise.
2946         (make_rtl_for_nonlocal_decl): Likewise.
2947         (cp_finish_decl): Use them.
2948         * typeck.c (strip_array_types): New function.
2949         
2950         * cp-tree.def (LABEL_STMT): New tree node.
2951         * cp-tree.h (LABEL_STMT_LABEL): New macro.
2952         (shadow_label): Remove.
2953         (declare_local_label): New function.
2954         (finish_label_decl): Likewise.
2955         * decl.c (make_label_decl): New function, split out from
2956         lookup_label.
2957         (shadowed_labels): Remove.
2958         (binding_level): Add shadowed_labels.
2959         (clear_binding_level): Remove.
2960         (push_binding_level): Just bzero the new binding level.
2961         (pushlevel): Fix indentation.
2962         (pop_label): New function.
2963         (pop_labels): Likewise, split out from poplevel.
2964         (poplevel): Pop local labels.  Use pop_labels.
2965         (maybe_push_to_top_level): Don't clear shadowed_labels.
2966         (lookup_label): Use make_label_decl.
2967         (shadow_label): Remove.
2968         (declare_local_label): New function.
2969         (define_label): Simplify.
2970         (start_function): Don't clear shadowed_labels.
2971         (cp_function): Remove shadowed_labels.
2972         (push_cp_function_context): Don't save shadowed_labels.
2973         (pop_cp_function_context): Don't restore it.
2974         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
2975         * parse.y (label_decl): Use finish_label_decl.
2976         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
2977         declarations.
2978         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
2979         building_stmt_tree.
2980         (finish_label_decl): New function.
2981         (expand_stmt): Handle LABEL_STMTs and local label declarations.
2982         
2983 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
2985         * decl.c (lookup_label): Build labels on the permanent obstack
2986         when building statement trees.  Don't build RTL for labels when
2987         building statement trees.
2988         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
2989         building statement trees.
2990         (finish_label_stmt): Likewise.
2991         (expand_stmt): Adjust accordingly.
2992         * pt.c (tsubst_expr); Likewise.
2993         (do_decl_instantiation): Robustify.
2994         
2995         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
2996         * tree.c (build_cplus_new): Set it.
2997         * expr.c (cplus_expand_expr): Use it.
2998         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
2999         
3000         * decl.c (store_parm_decls): Reset immediate_size_expand.
3001         (finish_function): Likewise.
3002         
3003         * tree.c (cplus_unsave_expr_now): Don't return a value.
3005         * semantics.c (do_poplevel): Always initialize the return value.
3007 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
3009         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
3010         * tree.h (cplus_unsave_expr_now) : Same.
3012 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
3014         * decl.c (grokdeclarator): Amend comment.
3015         * except.c (expand_start_catch_block): Call push_template_decl for
3016         catch-block parameters.
3017         * method.c (synthesize_method): Build an empty compound statement
3018         for the body of a constructor.
3020 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
3022         * tree.c (cp_build_qualified_type_real): If we're asking for the
3023         same quals we already have, just return.
3025 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
3027         * cp-tree.def (SUBOBJECT): New tree node.
3028         * cp-tree.h (CLEANUP_P): New macro.
3029         (SUBOBJECT_CLEANUP): Likewise.
3030         (keep_next_level): Add parameter.
3031         (get_temp_regvar): Don't declare.
3032         (emit_base_init): Remove parameter.
3033         (expand_aggr_init): Rename to build_aggr_init.
3034         (expand_vec_init): Rename to build_vec_init.
3035         (do_pushlevel): Remove.
3036         (do_poplevel): Likewise.
3037         (finish_cleanup): New function.
3038         (finish_subobject): Likewise.
3039         (stmts_are_full_exprs_p): New variable.
3040         * decl.c (keep_next_level): Add parameter.
3041         (cp_finish_decl): Use build_aggr_init, not
3042         expand_aggr_init.  Use finish_expr_stmt to expand the code.
3043         (expand_static_init): Use tree-generating, not RTL-generating,
3044         functions to handle the initialization.
3045         (start_function): Remove dead code.  Always have a momentary
3046         obstack inside the function, even before hitting the first curly
3047         brace.
3048         (cplus_expand_expr_stmt): Move calls to
3049         expand_{start,end}_target_temps into semantics.c.
3050         (cp_function): Add stmts_are_full_exprs_p.
3051         (push_cp_function_context): Save it.
3052         (pop_cp_function_context): Restore it.
3053         * decl2.c (get_temp_regvar): Move to init.c.
3054         (do_static_initialization): Use build_{aggr,vec}_init.
3055         (do_static_destruction): Fix typo in comment.
3056         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
3057         * except.c (expand_throw): Use create_temporary_var.
3058         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
3059         * init.c (expand_vec_init_try_block): Remove.
3060         (expand_vec_init_catch_clause): Likewise.
3061         (get_temp_regvar): New function.
3062         (begin_init_stmts): Likewise.
3063         (finish_init_stmts): Likewise.
3064         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
3065         structure here.
3066         (emit_base_init): Likewise.  Remove unused parameter.
3067         (expand_virtual_init): Likewise.
3068         (expand_cleanup_for_base): Use finish_subobject.
3069         (expand_aggr_vbase_init_1): Simplify.
3070         (construct_virtual_bases): Use tree-generating functions to build
3071         up initialization.
3072         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
3073         (expand_default_init): Likewise.
3074         (expand_aggr_init_1): Likewise.
3075         (expand_vec_init): Rename to build_vec_init.
3076         * method.c (do_build_copy_constructor): Use tree-generating
3077         functions.  Don't call clear_last_expr.
3078         (do_build_assign_ref): Likewise.
3079         (synthesize_method): Call clear_last_expr here.
3080         * parse.y (base_init): Don't call clear_last_expr here.
3081         (nodecls): Likewise.
3082         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
3083         * semantics.c (do_pushlevel): Move to here.
3084         (do_poplevel): Likewise.
3085         (stmts_are_full_exprs_p): New variable.
3086         (finish_expr_stmt): Handle logic for temoprary cleanup here.
3087         (finish_for_stmt): Use finish_expr_stmt.
3088         (finish_cleanup): New function.
3089         (finish_function_try_block): Fix indentation.
3090         (finish_subobject): New function.
3091         (setup_vtbl_ptr): Call keep_next_level here.
3092         (finish_stmt_expr): Handle a block with no scope inside the
3093         statement-expression.
3094         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
3095         SUBOBJECT.
3096         * tree.c (search_tree): Handle INIT_EXPR.
3097         (mapcar): Likewise.
3098         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
3099         * typeck2.c (store_init_value): Change expand_aggr_init to
3100         build_aggr_init in comment.
3101         
3102 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
3104         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
3106 1999-08-25  Nathan Sidwell  <nathan@acm.org>
3108         * decl2.c (handle_class_head): Be graceful about additional
3109         scope qualifiers. Adjust comments to reflect reality.
3111 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
3113         * call.c (build_conditional_expr): Fix typo.
3114         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
3115         lvalue before trying to mess with the sides.
3117         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
3119 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
3121         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
3123 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
3125         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
3126         Return arbitrary pointer or NULL.
3127         (check_eh_spec): Call __throw_type_match_rtti_2.
3128         * tinfo.h (*::dcast): Return int.  Add valp parm.
3129         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
3130         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
3131         (__throw_type_match_rtti): Now just a wrapper.
3133         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
3134         (init_exception_processing): Don't initialize them.
3136 1999-08-23  Paul Burchard <burchard@pobox.com>
3138         * decl.c (check_default_argument): Fix typo.
3140 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
3142         * cp-tree.def (STMT_EXPR): Fix typo in node name.
3144         * dump.c (dump_next_stmt): New function.
3145         (dequeue_and_dump): Use it.
3146         
3147         * pt.c (tsubst_copy): Make sure to initialize return value for a
3148         STMT_EXPR, even when processing_template_decl.
3149         * semantics.c (finish_stmt_expr): A statement-expression whose
3150         last statement is not an expression-statement has type `void'.  
3151         
3152 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
3154         * semantics.c (finish_stmt_expr): Fix typo in comment.
3155         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
3156         (mapcar): Likewise.
3157         * init.c (build_vec_delete_1): Make the children of a permanent
3158         BIND_EXPR permanent.
3159         * pt.c (register_specialization): Don't register a specialization
3160         more than once.
3161         
3162 1999-08-18  Andrew Haley  <aph@cygnus.com>
3164         * method.c (process_overload_item): Call build_mangled_C9x_name ()
3165         for all integer parameter types larger than long long.
3167 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
3169         * pt.c (redeclare_class_template): Merge default template
3170         arguments in both directions.
3172         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
3173         compiler_error message.
3175 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
3177         * cp-tree.h: Declare flag_use_repository.
3178         * pt.c (do_decl_instantiation): Don't complain about duplicate
3179         instantiation with -frepo.
3180         (do_type_instantiation): Likewise.
3182         * pt.c (push_template_decl_real): Complain about everything
3183         that isn't a valid template.
3185         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
3186         affect inlines.
3188 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
3190         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
3191         * decl2.c (build_expr_from_tree): Handle it.
3192         * error.c (dump_expr): Likewise.
3193         * pt.c (for_each_template_parm): Likewise.
3194         (tsubst_copy): Likewise.
3195         * tree.c (search_tree): Likewise.
3196         * semantics.c (finish_pseudo_destructor_call): Create it.
3197         
3198 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
3200         * search.c (setup_class_bindings): Robustify.
3201         * typeck.c (common_type): Use same_type_p, not pointer equality,
3202         to compare types.
3204         * cp-tree.h (build_lang_field_decl): Remove.
3205         * class.c (build_vtable): Replace calls to build_lang_field_decl
3206         with build_lang_decl.
3207         (prepare_fresh_vtable): Likewise.
3208         (finish_struct_1): Likewise.
3209         (init_class_processing): Likewise.
3210         * decl.c (push_using_decl): Likewise.
3211         (init_decl_processsing): Likewise.
3212         (grokvardecl): Likewise.
3213         (build_ptrmemfunc_type): Likewise.
3214         (grokdeclarator): Likewise.
3215         (build_enumerator): Likewise.
3216         * decl2.c (grok_x_components): Likewise.
3217         (do_class_using_decl): Likewise.
3218         * except.c (call_eh_info): Likewise.
3219         * init.c (init_init_processing): Likewise.
3220         * rtti.c (expand_class_decl): Likewise.
3221         * tree.c (build_base_fields): Likewise.
3222         (build_vbase_pointer_fields): Likewise.
3223         * lex.c (build_lang_decl): Build declarations on the permanent
3224         obstack if we're building statmeent trees.
3225         (retrofit_lang_decl): Handle both the full lang_decl and also the
3226         smaller lang_decl_flags here.
3227         (build_lang_field_decl): Remove.
3228         * pt.c (push_template_decl_real): Issue errors for variable
3229         declarations that are not static members.
3231 1999-08-18  Richard Henderson  <rth@cygnus.com>
3233         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
3234         (mapcar): Likewise.
3236 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
3238         * cp-tree.h (back_end_hook): New variable.
3239         * decl2.c (back_end_hook): Define it.
3240         (finish_file): If it's non-NULL, call it.
3242         * decl.c (add_decl_to_level): New function.
3243         (push_local_binding): Use it.
3244         (find_binding): Fix typo in comment.
3245         (pushdecl): Use add_decl_to_level.  Put templates on the
3246         corresponding namespace-scope binding levels.
3247         * dump.c (dequeue_and_dump): Print the specializations of a
3248         template.
3249         * pt.c (push_template_decl_real): Don't push a template multiple
3250         times.
3252 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
3254         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
3255         (CALL_DECLARATOR_QUALS): Likewise.
3256         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
3257         * decl.c (grokdeclarator): Adjust to use them.
3258         * decl2.c (grokfield): Likewise.
3259         (reparse_absdcl_as_casts): Likewise.
3260         * lex.c (make_call_declarator): Likewise.
3261         (set_quals_and_spec): Likewise.
3262         * pt.c (tsubst): Likewise.
3263         * tree.c (mapcar): Remove special hack to handle third operand of
3264         a CALL_EXPR.
3266 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
3268         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
3269         * class.c (build_vtable): Use build_lang_field_decl to build the
3270         VAR_DECLs for vtables.
3271         (prepare_fresh_vtable): Likewise.
3272         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
3273         CAN_HAVE_FULL_LANG_DECL_P.
3274         (push_using_decl): Use build_lang_decl to build USING_DECLs.
3275         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
3276         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
3277         (build_lang_field_decl): Likewise.
3278         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
3279         to copy.
3280         
3281         * cp-tree.def (STMT_EXPR): New tree node.
3282         * cp-tree.h (STMT_EXPR_STMT): New macro.
3283         (store_return_init): Change prototype.
3284         (finish_named_return_value): New function.
3285         (expand_stmt): Likewise.
3286         (expand_body): Likewise.
3287         (begin_stmt_tree): Likewise.
3288         (finish_stmt_tree): Likewise.
3289         (expanding_p): New variable.
3290         (last_expr_type): Likewise.
3291         (building_stmt_tree): New macro.
3292         * decl.c (start_function): Use building_stmt_tree, not
3293         processing_template_decl, where appropriate.
3294         (store_parm_decls): Likewise.
3295         (store_return_init): Move most of the body to semantics.c.
3296         (finish_function): Use building_stmt_tree.
3297         (finish_stmt): Clear last_expr_type here.
3298         (cp_function): Add expanding_p, last_tree, last_expr_type.
3299         (push_cp_function_context): Save them.
3300         (pop_cp_function_context): Restore them.
3301         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
3302         * error.c (dump_expr): Handle STMT_EXPR.
3303         * except.c (expand_start_catch_block): Use building_stmt_tree.
3304         Use add_decl_stmt.
3305         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
3306         (do_case): Move add_tree call to semantics.c.
3307         * parse.y (return_init): Use finish_named_return_value.
3308         (for.init.statement): Use finish_expr_stmt.
3309         * parse.c: Regenerated.
3310         * pt.c (do_pushlevel): Move to semantics.c.
3311         (do_poplevel): Likewise.
3312         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
3313         (tsubst_expr): Don't expand all the way to RTL here.  Handle
3314         RETURN_INIT and CTOR_INITIALIZER.
3315         (instantiate_decl): Call expand_body after tsubst'ing into
3316         DECL_SAVED_TREE.
3317         * semantics.c (expand_stmts): New function.
3318         (expanding_p): New variable.
3319         (last_expr_type): Likewise.
3320         (finish_expr_stmt): Use building_stmt_tree.
3321         (begin_if_stmt): Likewise.
3322         (finish_if_stmt_cond): Likewise.
3323         (finish_then_clause): Likewise.
3324         (begin_else_clause): Likewise.
3325         (finish_else_clause): Likewise.
3326         (begin_while_stmt): Likewise.
3327         (finish_while_stmt_cond): Likewise.
3328         (finish_while_stmt): Likewise.
3329         (finish_do_body): Likewise.
3330         (finish_do_stmt): Likewise.
3331         (finish_return_stmt): Likewise.
3332         (begin_for_stmt): Likewise.
3333         (fnish_for_init_stmt): Likewise.
3334         (finish_for_cond): Likewise.
3335         (finish_for_expr): Likewise.
3336         (finish_for_stmt): Likewise.
3337         (finish_break_stmt): Likewise.
3338         (finish_continue_stmt): Likewise.
3339         (finish_switch_cond): Likewise.
3340         (finish_switch_stmt): Likewise.
3341         (finish_case_label): Call add_tree here if necessary.
3342         (finish_goto_statement): Use building_stmt_tree.
3343         (begin_try_block): Likewise.
3344         (begin_function_try_block): Likewise.
3345         (finish_try_block): Likewise.
3346         (finish_function_try_block): Likewise.
3347         (finish_handler_sequence): Likewise.
3348         (finish_function_handler_sequence): Likewise.
3349         (begin_handler): Likewise.
3350         (finish_handler_parms): Likewise.
3351         (finish_handler): Likewise.
3352         (begin_compound_stmt): Likewise.
3353         (finish_compound_stmt): Likewise.
3354         (finish_asm_stmt): Likewise.
3355         (finish_label_stmt): Likewise.
3356         (finish_named_return_value): New function.
3357         (setup_vtbl_ptr): Moved here from decl2.c.
3358         (do_pushlevel): Moved here from pt.c.
3359         (do_poplevel): Likewise.
3360         (begin_stmt_expr): Use building_stmt_tree.
3361         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
3362         when building_stmt_tree.
3363         (begin_stmt_tree): New function.
3364         (finish_stmt_tree): Likewise.
3365         (expand_stmt): Likewise.
3366         (expand_body): Likewise.
3367         * tree.c (build_cplus_method_type): Make sure the argument types
3368         end up on the same obstack as the METHOD_TYPE.
3369         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
3370         THROW_EXPR, STMT_EXPR.
3371         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
3372         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
3373         sorry, if an unsupported node is encountered.
3374         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
3375         (c_expand_return): Don't call add_tree here.
3376         
3377 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
3379         * pt.c (check_default_tmpl_args): Don't check in local scopes.
3380         (tsubst_decl): Make sure the declaration is on a saveable
3381         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
3382         variable.
3383         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
3384         
3385 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
3387         Speed up Koenig lookup.
3388         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
3389         to return namespaces we've looked at.
3390         * decl2.c (lookup_using_namespace): Likewise.
3391         (add_function): Don't call ovl_member.
3392         (lookup_arg_dependent): Initialize k.namespaces to the list of 
3393         namespaces seen in unqualified lookup.
3394         * call.c (equal_functions): Move here from tree.c.
3395         (joust): Use it to handle duplicate candidates.
3396         * tree.c (ovl_member): Use ==.
3398 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
3400         * cp-tree.def (DECL_STMT): Make it smaller.
3401         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
3402         (lang_decl): ... here.  Add next.
3403         (DECL_SAVED_TREE): Adjust accordingly.
3404         (DECL_IMPLICIT_TYPEDEF_P): New macro.
3405         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
3406         (DECL_STMT_DECL): Likewise.
3407         (create_implicit_typedef): New function.
3408         (maybe_push_decl): Likewise.
3409         (tsubst_default_argument): New function.
3410         (at_function_scope_p): Likewise.
3411         (add_decl_stmt): Likewise.
3412         (push_permanent_obstack): Likewise.
3413         * call.c (convert_default_arg): Use tsubst_default_argument.
3414         * class.c (add_method): Use push_permanent_obstack.
3415         (build_self_reference): Create a TEMPLATE_DECL for the
3416         self-reference, if necessary.
3417         * decl.c (pseudo_global_level_p): Only look at the current binding
3418         level.
3419         (push_binding): Use push_permanent_obstack.
3420         (create_implicit_typedef): New function.
3421         (pushtag): Use it.
3422         (duplicate_decls): Use push_permanent_obstack.
3423         (maybe_push_decl): New function.
3424         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
3425         (start_decl_1): Remove dead code.
3426         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
3427         pseudo_global_level_p.
3428         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
3429         template.
3430         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
3431         pseudo_global_level_p.
3432         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
3433         a template.
3434         (get_sentry): Use push_permanent_obstack.
3435         * dump.c (dequeue_and_dump): Enable DECL_STMT.
3436         * except.c (call_eh_info): Use push_permanent_obstack.
3437         (build_eh_type_ref): Likewise.
3438         (do_pop_exception): Likewise.
3439         (expand_eh_spec): Likewise.
3440         (alloc_eh_object): Likewise.
3441         (expand_throw): Likewise.
3442         * init.c (build_java_class_ref): Likewise.
3443         * lex.c (get_time_identifier): Likewise.
3444         (free_lang_decl_chain): Correct type.
3445         (retrofit_lang_decl): Adjust accordingly.
3446         (build_lang_field_decl): Likewise.
3447         * lex.h (free_lang_decl_chain): Likewise.
3448         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
3449         * parse.c: Regenerated.
3450         * pt.c (tsubst_default_arguments): New function.
3451         (retrieve_local_specialization): Likewise.
3452         (register_local_specialization): Likewise.
3453         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
3454         pseudo_global_level_p to determine whether or not a template is
3455         primary.
3456         (lookup_template_class): Likewise.  Use create_implicit_typedef.
3457         (instantiate_class_template): Call tsubst_default_arguments for
3458         member functions, if appropriate.
3459         (tsubst_default_argument): New function.
3460         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
3461         * search.c (at_function_scope_p): New function.
3462         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
3463         (finish_label_stmt): Likewise.
3464         (add_decl_stmt): New function.
3465         (begin_class_definition): Likewise.
3466         (finish_typeof): Likewise.
3467         * tree.c (copy_template_template_parm): Likewise.
3468         (copy_to_permanent): Likewise.
3469         (push_permanent_obstack): Define.
3470         (mark_addressable): Use it.
3471         * typeck.c (mark_addressable): Likewise.
3472         
3473 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
3475         * cp-tree.h (init_cplus_unsave): New.
3476         (cplus_unsave_expr_now): New.
3477         * lex.c (init_parse): Call init_cplus_unsave.
3478         * tree.c (init_cplus_unsave): New.
3479         (cplus_unsave_expr_now): New.
3481 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
3483         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
3484         decl_constant_value to simplify array bounds.
3486 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
3488         * lang-options.h: Add -fms-extensions.
3489         * cp-tree.h: Declare flag_ms_extensions.
3490         * decl2.c: Define it.
3491         * class.c (instantiate_type): Don't complain about taking the address
3492         of a bound member function if -fms-extensions.
3493         * typeck.c (build_unary_op): Likewise.
3494         * decl.c (grokdeclarator): Or about implicit int.
3495         * init.c (resolve_offset_ref): Or about implicit '&'.
3497 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
3499         * cp-tree.h (minimal_parse_mode): Remove.
3500         (finish_label_stmt): New function.
3501         * decl.c (saved_scope): Remove minimal parse mode.
3502         (maybe_push_to_top_level): Don't save it.
3503         (pop_from_top_level): Don't restore it.
3504         (define_label): Split out template-handling code to semantics.c.
3505         (start_decl): Don't use minimal_parse_mode.
3506         (cp_finish_decl): Likewise.
3507         (start_function): Don't increment it.
3508         (store_return_init): Don't use it.
3509         (finish_function): Don't decrement it.
3510         * parse.y (label_colon): Use finish_label_stmt throughout.
3511         * parse.c: Regenerated.
3512         * pt.c (minimal_parse_mode): Don't define it.
3513         (tsubst_expr): Use finish_label_stmt.
3514         * semantics.c (finish_label_stmt): New function.
3516         * dump.c (queue): Be careful when computing bitmasks.
3517         (dequeue_and_dump): Describe binfos as binfos, not as
3518         vectors.
3519         
3520         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
3521         throughout.     
3522         * parse.c: Regenerated.
3523         
3524         * Make-lang.in (CXX_SRCS): Remove sig.c.
3525         * Makefile.in (CXX_OBJS): Remove sig.o.
3526         (sig.o): Remove.
3527         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
3528         (CPTI_SIGNATURE_TYPE): Likewise.
3529         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
3530         (opaque_type_node): Likewise.
3531         (signature_type_node): Likewise.
3532         (sigtable_entry_type): Likewise.
3533         (flag_handle_signatures): Likewise.
3534         (lang_type): Remove is_signature, is_signature_pointer,
3535         is_signature_reference, has_opaque_typedecls,
3536         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
3537         signature_pointer_to, signature_reference_to.
3538         (IS_SIGNATURE): Remove.
3539         (SET_SIGNATURE): Remove.
3540         (CLEAR_SIGNATURE): Remove.
3541         (IS_SIGNATURE_POINTER): Remove.
3542         (IS_SIGNATURE_REFERENCE): Remove.
3543         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
3544         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
3545         (CLASSTYPE_SIGNATURE): Remove.
3546         (SIGNATURE_TYPE): Remove.
3547         (SIGNATURE_METHOD_VEC): Remove.
3548         (SIGNATURE_POINTER_TO): Remove.
3549         (SIGNATURE_REFERENCE_TO): Remove.
3550         (lang_decl_flags): Remove is_default_implementation.  Rename
3551         memfunc_pointer_to to saved_tree.
3552         (IS_DEFAULT_IMPLEMENTATION): Remove.
3553         (DECL_MEMFUNC_POINTER_TO): Remove.
3554         (DECL_MEMFUNC_POINTING_TO): Remove.
3555         (DECL_SAVED_TREE): Adjust definition.
3556         (tag_types): Remove signature_type_node.
3557         (SIGNATURE_FIELD_NAME): Remove.
3558         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
3559         (SIGNATURE_OPTR_NAME): Likewise.
3560         (SIGNATURE_SPTR_NAME): Likewise.
3561         (SIGNATURE_POINTER_NAME): Likewise.
3562         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
3563         (SIGNATURE_REFERENCE_NAME): Likewise.
3564         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
3565         (SIGTABLE_PTR_TYPE): Likewise.
3566         (SIGTABLE_NAME_FORMAT): Likewise.
3567         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
3568         (SIGTABLE_TAG_NAME): Likewise.
3569         (SIGTABLE_VB_OFF_NAME): Likewise.
3570         (SIGTABLE_VT_OFF_NAME): Likewise.
3571         (finish_base_specifiers): Change prototype.
3572         (build_signature_pointer_type): Remove.
3573         (build_signature_reference_type): Remove.
3574         (build_signature_pointer_constructor): Remove.
3575         (build_signature_method_call): Remove.
3576         (build_optr_ref): Likewise.
3577         (append_signature_fields): Likewise.
3578         (signature_error): Likewise.
3579         * call.c (build_this): Remove signature support.
3580         (build_over_call): Likewise.
3581         (build_new_method_call): Likewise.
3582         * class.c (add_implicitly_declared_members): Likewise.
3583         (finish_struct_1): Likewise.
3584         (finish_struct): Likewise.
3585         * cvt.c (cp_convert_to_pointer): Likewise.
3586         (convert_to_pointer_force): Likewise.
3587         (ocp_convert): Likewise.
3588         * decl.c (sigtable_decl_p): Remove.
3589         (init_decl_processing): Remove support for signatures.
3590         (cp_finish_decl): Likewise.
3591         (grokdeclarator): Likewise.
3592         (grokparms): Likewise.
3593         (xref_tag): Likewise.
3594         (start_function): Likewise.
3595         (start_method): Likewise.
3596         * decl2.c (finish_sigtable_vardecl): Remove.
3597         (flag_handle_signatures): Remove.
3598         (lang_f_options): Remove handle-signatures.
3599         (grokfield): Remove support for signatures.
3600         (grokbitfield): Likewise.
3601         (finish_file): Likewise.
3602         (reparse_absdcl_as_casts): Likewise.
3603         * error.c (dump_type_real): Likewise.
3604         (dump_function_decl): Likewise.
3605         * friend.c (make_friend_class): Likewise.
3606         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
3607         * hash.h: Regenerated.
3608         * init.c (build_new_1): Remove support for signatures.
3609         * lang-options.h: Remove -fhandle-signatures,
3610         -fno-handle-signatures. 
3611         * lex.c (init_parse): Remove support for signatures.
3612         (yyprint): Likewise.
3613         * lex.h (rid): Remove RID_SIGNATURE.
3614         * method.c (build_decl_overload_real): Remove support for
3615         signatures. 
3616         (hack_identifier): Likewise.
3617         * parse.y (base_class): Likewise.
3618         (base_class.1): Likewise.
3619         (access_specifier): Likewise.
3620         * search.c (lookup_member): Likewise.
3621         * semantics.c (finish_qualified_object_call_expr): Likewise.
3622         (finish_template_type_parm): Likewise.
3623         (begin_class_definition): Likewise.
3624         (finish_base_specifier): Likewise.
3625         * sig.c: Remove.
3626         * tree.c (build_cplus_method_type): Remove support for signatures.
3627         * typeck.c (require_complete_type): Likewise.
3628         (c_sizeof): Likewise.
3629         (c_alignof): Likewise.
3630         (build_object_ref): Likewise.
3631         (build_component_ref): Likewise.
3632         (build_indirect_ref): Likewise.
3633         (build_c_cast): Likewise.
3634         (build_modify_expr): Likewise.
3635         (convert_for_initialization): Likewise.
3636         * typeck2.c (signature_error): Remove.
3637         (store_init_value): Remove support for signatures.
3638         (digest_init): Likewise.
3639         (build_x_arrow): Likewise.
3640         (build_functional_cast): Likewise.
3641         * xref.c (GNU_xref_decl): Likewise.
3642         
3643 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
3645         * lex.c (do_identifier): Remove unnecessary lookup of class field.
3647 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
3649         * decl2.c (set_decl_namespace): Do not complain about non-matching
3650         decls if processing a template.
3652 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
3654         * decl.c (build_ptrmemfunc_type): Handle qualified
3655         pointer-to-member types here.
3656         * tree.c (cp_build_qualified_type_real): Simplify handling here.
3658 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3660         * lex.c (lang_identify): Likewise.
3662 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
3664         * Makefile.in: Update dependencies.
3665         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
3666         NULL_RTX.
3667         * decl.c: Include "function.h"
3668         (cleanup_label, return_label): Delete declarations.
3669         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
3670         (finish_function): Rename last_parm_insn variable to
3671         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
3672         * decl2.c: Include "function.h".
3673         (rtl_expr_chain): Delete declaration.
3674         * method.c: Include "function.h"
3675         * tree.c (build_vbase_pointer_fields): Don't initialize
3676         DECL_SAVED_INSNS with NULL_RTX.
3677         * typeck.c: Include "function.h"
3679 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
3681         * semantics.c (begin_function_try_block, finish_function_try_block,
3682         finish_function_handler_sequence): New fns.
3683         * parse.y (function_try_block): Use them.
3684         * pt.c (instantiate_decl): Likewise.
3686         * cp-tree.h: Declare in_function_try_handler.
3687         * decl.c: Define it.
3688         (start_function): Clear it.
3689         (struct cp_function, push_cp_function_context): Save it.
3690         (pop_cp_function_context): Restore it.
3691         * parse.y (function_try_block): Set and clear it.
3692         * except.c (expand_end_catch_block): Rethrow if we reach the end
3693         of a function-try-block handler in a ctor or dtor.
3694         * typeck.c (c_expand_return): Complain about returning from a
3695         function-try-block handler of a ctor.
3697         * parse.y (function_try_block): Call end_protect_partials
3698         before expand_start_all_catch.
3700 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
3702         * decl.c (struct binding_level): Add eh_region field.
3703         (push_binding_level): Set it.
3704         (define_label): Complain about jumping into an EH block.
3706         * ptree.c (print_lang_type): Print the real type of a PMF.
3707         Print what exceptions a fn type throws.
3709 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3711         * class.c (count_fields, add_fields_to_vec): Add static prototype.
3713         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
3714         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
3715         char*.
3717         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
3718         Constify a char*.
3720         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
3721         char*.
3723         * dump.c (queue_and_dump_index, dump_int, dump_string,
3724         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
3725         a char*.
3726         (dump_stmt): Add static prototype.
3728         * errfn.c (cp_thing): Constify a char*.
3730         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
3731         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
3732         dump_expr): Constify a char*.
3734         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
3735         read_line_number): Add static prototype.
3736         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
3737         (real_yylex): Move label `letter' into the scope where it is used.
3739         * method.c (build_mangled_template_parm_index, build_overload_int,
3740         build_decl_overload_real, get_id_2): Constify a char*.
3742         * search.c (check_final_overrider): Make static.
3744         * typeck.c (composite_pointer_type): Constify a char*.
3746 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
3748         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
3749         we're looking at a class.
3751         * decl.c (lookup_name_real): Set the complain flag if we're
3752         looking for a namespace member.
3754         * lex.c (real_yylex): We can have a number with no digits.
3756         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
3758         * search.c (binfo_from_vbase): New fn.
3759         * cp-tree.h: Declare it.
3760         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
3761         from pointer to member of virtual base.  
3762         * typeck.c (get_delta_difference): Likewise.
3764 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
3766         * pt.c (tsubst): Use build_index_type to build in-template array
3767         index type.  Fixes g++.oliva/dwarf1.C.
3768         * decl.c (grokdeclarator): Likewise, just for consistency, as it
3769         doesn't seem to trigger the bug without it.
3771 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
3773         * typeck2.c (add_exception_specifier): Use complete_type.
3775 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
3777         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
3778         (dump_binary_op): Bulletproof.
3779         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
3780         * tree.c (search_tree): Don't enumerate all the nodes of classes
3781         `1', `2', and `<'; handle them generically.  Don't be sorry about
3782         "unrecognized tree codes"; just abort.
3783         (no_linkage_check): Don't do linkage checks for templates.
3784         
3785         * tree.c (cp_build_qualified_type_real): Handle
3786         pointer-to-member-function types correctly.
3788 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
3790         * decl.c (pushdecl): Only give an error for shadowing a parm 
3791         from *this* function.
3793 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
3795         * typeck2.c: Update URLs and mail addresses.
3797 1999-08-04  Nathan Sidwell  <nathan@acm.org>
3799         * cp-tree.h (empty_except_spec): New global var.
3800         (compexcepttypes): Remove prototype.
3801         (comp_except_specs): Prototype new global function.
3802         (add_exception_specifier): Prototype new global function.
3803         * decl.c (empty_except_spec): Define new global var.
3804         (duplicate_decls): Use comp_except_specs, reword error message.
3805         (init_decl_processing): Initialize empty_except_spec.
3806         Adjust build_exception_variant calls.
3807         * parse.y (exception_specification_opt): Use empty_except_spec.
3808         (ansi_raise_identifier): Call check_for_new_type.
3809         (ansi_raise_identifiers): Use add_exception_specifier.
3810         * pt.c (tsubst): Use add_exception_specifier to build exception
3811         specifier.
3812         * search.c (check_final_overrider): New static function, broken
3813         out of get_matching_virtual. Check throw specifiers, reword
3814         diagnostics.
3815         (get_matching_virtual): Use check_final_overrider.
3816         * tree.c (build_exception_variant): Use comp_except_specs.
3817         * typeck.c (compexcepttypes): Remove.
3818         (comp_except_types): New static function, helper for
3819         comp_except_specs. Compare two types as exception specifiers.
3820         (comp_except_specs): New global function, compare two exception
3821         specifiers.
3822         (comptypes): Adjust for comp_except_specs.
3823         * typeck2.c (add_exception_specifier): New global function.
3824         
3825         * class.c (check_for_override): Reword error message.
3827 1999-08-03  Nathan Sidwell  <nathan@acm.org>
3829         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
3830         * cp-tree.h (struct lang_type): Added non_pod_class flag.
3831         (CLASSTYPE_NON_POD_P): New macro to access it.
3832         * class.c (finish_struct_1): Determine non-PODness.
3833         Check for arrays of pointers (-Weffc++).
3834         Remove array inspection duplicated code.
3835         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
3836         Use CLASSTYPE_NON_POD_P.
3838 1999-08-03  Nathan Sidwell  <nathan@acm.org>
3840         * class.c (duplicate_tag_error): Preserve template information.
3842 1999-08-03  Nathan Sidwell  <nathan@acm.org>
3844         * decl.c (start_enum): Show location of previous definition.
3845         * parse.y (enumlist_opt): New reduction.
3846         (structsp): Simplify enum rules to use enumlist_opt.
3848 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
3850         * lex.c (yyprint): Handle PFUNCNAME.
3852         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
3853         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
3855 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
3857         * decl.c (start_decl): Set attributes before duplicate_decls call.
3859 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
3861         * Make-lang.in (CXX_SRCS): Add dump.c.
3862         * Makefile.in (CXX_OBJS): Add dump.o.
3863         (dump.o): New target.
3864         * cp-tree.h (DECL_CONV_FN_P): Document.
3865         (DECL_OVERLOADED_OPERATOR_P): New function.
3866         (TYPE_PTRMEM_CLASS_TYPE): New macro.
3867         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
3868         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
3869         (ASM_VOLATILE_P): New macro.
3870         (STMT_LINENO): Likewise.
3871         (cp_namespace_decls): New function.
3872         (dump_node_to_file): New function.
3873         * decl.c (cp_namespace_decls): New function.
3874         (walk_namespaces_r): Use it.
3875         (wrapup_globals_for_namespace): Likewise.
3876         * decl2.c (flag_dump_translation_unit): New variable.
3877         (lang_decode_option): Handle -fdump-translation-unit.
3878         (finish_file): If flag_dump_translation_unit is set, dump the
3879         translation unit.
3880         * dump.c: New file.
3881         * lang-options.h: Add -fdump-translation-unit.
3882         * pt.c (tsubst_template_parms): Robustify.
3883         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
3884         (tsubst_expr): Use STMT_LINENO.
3885         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
3886         for invalid cv-qualifiers even while building templates.
3887         
3888 1999-08-02  Richard Henderson  <rth@cygnus.com>
3890         * call.c: Include defaults.h instead of expr.h.
3891         * decl.c: Likewise.
3892         * pt.c: Likewise.
3893         * typeck.c: Include defaults.h.
3895 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
3897         * lex.c (errorcount, sorrycount): Don't declare.
3898         * repo.c (errorcount, sorrycount): Likewise.
3899         * typeck2.c (errorcount, sorrycount): Likewise.
3901 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
3903         * call.c (convert_default_arg, build_over_call): Change all uses of
3904         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
3905         Ensure expr.h is included.
3906         * decl.c (grokparams): Ditto.
3907         * pt.c (tsubst_decl): Ditto.
3908         * typeck.c (convert_arguments): Ditto.
3910 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
3912         * class.c (mark_overriders): Fix order of args to overrides.
3913         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
3914         functions with the same name.
3916 1999-08-02  Richard Henderson  <rth@cygnus.com>
3918         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
3920 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
3922         * call.c (build_conditional_expr): Fix typo in comment.
3924 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
3926         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
3927         case_stack; use in_control_zone_p.
3928         * typeck.c (c_expand_return): Likewise.
3930 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
3932         * except.c (catch_clauses): Delete declaration.
3934 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
3936         * call.c (build_conditional_expr): Call convert_from_reference to
3937         avoid reference/non-reference type confusion.  Fix typo.
3939 1999-07-30  Richard Henderson  <rth@cygnus.com>
3941         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
3942         * cp-tree.h (initializer_constant_valid_p): Remove.
3944 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
3946         * call.c (conditional_conversion): Don't build BASE_CONVs for
3947         conversions between things that have the same type.
3948         (build_conditional_expr): Tweak.
3949         (convert_like): Some BASE_CONVs really do require the generation
3950         of code.
3951         
3952         * init.c (perform_member_init): Don't go through build_modify_expr
3953         for simple initializations.
3955 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
3957         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
3958         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
3959         virtual functions and MI.  Simplify.
3961         * method.c: Remove prototype for largest_union_member.
3962         * pt.c (determine_specialization): Fix uninitialized warning.
3963         * lex.c (real_yylex): Likewise.
3965 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
3967         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
3968         here too.
3970         * cp-tree.h (BINFO_VIRTUALS): Document new format.
3971         * class.c (modify_one_vtable): Change prototype accordingly.
3972         (modify_all_vtables): Likewise.
3973         (modify_all_direct_vtables): Likewise.
3974         (modify_all_indirect_vtables): Likewise.
3975         (build_vtable_entry_for_fn): New function.
3976         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
3977         (modify_vtable_entry): Likewise.
3978         (add_virtual_function): Likewise.
3979         (build_vtbl_initializer): New function.
3980         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
3981         (fixup_vtable_deltas1): Likewise.
3982         (fixup_vtable_deltas): Likewise.
3983         (override_one_vtable): Likewise.
3984         (finish_struct_1): Likewise.
3986         * error.c (dump_expr): Likewise.
3987         * search.c (get_abstract_virtuals_1): Likewise.
3988         (get_abstract_virtuals): Likewise.
3989         (expand_upcast_fixups): Likewise.
3990         * tree.c (debug_binfo): Likewise.
3991         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
3992         __pure_virtual here.
3993         
3994 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
3996         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
3997         as per 1999-07-26 change.
3999         * typeck.c (c_sizeof): Don't allow non-static data members.
4000         (expr_sizeof): Likewise.
4002 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
4004         * input.c (feed_input): Only touch lineno and input_filename
4005         if !USE_CPPLIB.  Save the old values before setting the new ones.
4007         * input.c (feed_input): Add file, line parms.
4008         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
4009         (real_yylex): Check linemode before input_redirected().
4011         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
4012         from op new to warning.
4014 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
4016         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
4017         * call.c: All uses changed.
4018         * typeck.c: Likewise.
4020 1999-07-26  Nathan Sidwell  <nathan@acm.org>
4022         * exception.cc (__cplus_type_matcher): Match __eh_matcher
4023         prototype.
4025 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
4027         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
4028         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
4029         (strip_top_quals): Declare.
4030         (ncp_convert): Likewise.
4031         (type_after_usual_arithmetic_converions): Likewise.
4032         (composite_pointer_type): Likewise.
4033         * call.c (strip_top_quals): Don't make it static.
4034         (promoted_arithmetic_type_p): New function.
4035         (conditional_conversion): Likewise.
4036         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
4037         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
4038         for converting a type to itself.
4039         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
4040         (implicit_conversion): Make sure the from and to types are
4041         complete.
4042         (add_builtin_candidate): Correct handling of ?: operator.
4043         (add_builtin_candidates): Improve documentation.
4044         (build_conditional_expr): New function.
4045         (can_convert): Implement in terms of can_convert_arg.
4046         (ncp_convert): New function.
4047         * typeck.c (type_after_usual_arithmetic_conversions): New
4048         function, split out from common_type.
4049         (composite_pointer_type): New function, split out from
4050         build_conditional_expr.
4051         (common_type): Use type_after_usual_arithmetic_conversions.
4052         Remove redundant attribute merging.
4053         (comptypes): Tidy.  Handle COMPLEX_TYPE.
4054         (build_binary_op_nodefault): Use null_ptr_cst_p.
4055         (build_conditional_expr): Remove.
4056         (convert_for_assignment): Use new conversion functions.
4057         
4058         * cp-tree.h (abstract_virtuals_error): Change declaration.
4059         * typeck2.c (abstract_virtuals_error): Check to see if an error
4060         ocurred, and return a boolean value accordingly.
4061         (build_functional_cast): Adjust accordingly.
4062         * class.c (finish_struct_1): Likewise.
4063         * cvt.c (ocp_convert): Likewise.
4064         * decl.c (cp_finish_decl): Likewise.
4065         (grokparams): Likewise.
4066         (grok_op_properties): Likewise.
4067         (start_function): Likewise.
4068         * init.c (build_new_1): Likewise.
4070         * pt.c (unify): Don't get confused by pointers-to-member functions.
4072         * search.c (build_cplus_new): Robustify.
4073         
4074 1999-07-24  Richard Henderson  <rth@cygnus.com>
4076         * gxx.gperf (__builtin_va_arg): New.
4077         * parse.y (VA_ARG): New token.
4078         (unary_expr): Recognize it.
4080 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
4082         * g++FAQ.texi: Deleted per Joe Buck's request.
4083         * Makefile.in: Corresponding changes.
4085 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
4087         * lex.c: Sync with C frontend.
4088         (whitespace_cr): New fn.
4089         (skip_white_space): Use it.
4090         (init_parse): Reorder.
4091         (yyprint): Support CONSTANT.
4092         (pragma_getc, pragma_ungetc): Bring back.
4093         (read_line_number): Change in_system_header directly.
4094         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
4095         (parse_float): Update to C version.
4096         (yylex): Handle '$' under the letter case.
4097         Remove looking_for_typename handling.
4098         Support hex floating point constants.
4099         Follow C's lead for choosing type of integer constants.
4100         Rearrange stuff to match C frontend.
4101         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
4102         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
4104 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
4106         * call.c (reference_binding): Tweak.
4107         (mayble_handle_implicit_object): Use direct_reference_binding to
4108         create the right implicit conversion sequence.
4110 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
4112         * pt.c (convert_nontype_argument): Don't call decl_constant_value
4113         if we're converting to a reference type.
4115         * call.c (NEED_TEMPORARY_P): New macro.
4116         (standard_conversion): Set it, for derived-to-base conversions.
4117         (reference_related_p): New function.
4118         (reference_compatible_p): Likewise.
4119         (convert_class_to_reference): Likewise.
4120         (direct_reference_binding): Likewise.
4121         (reference_binding): Rework for standards-compliance.
4122         (convert_like): Adjust accordingly.
4123         (maybe_handle_ref_bind): Simplify; the right conversion sequences
4124         are now built up in reference_binding.
4125         (initialize_reference): New function.
4126         * cp-tree.h (ICS_USER_FLAG): Document.
4127         (ICS_THIS_FLAG): Likewise.
4128         (ICS_BAD_FLAG): Likewise.
4129         (NEED_TEMPORARY_P): Likewise.
4130         (cp_lvalue_kind): New type.
4131         (real_lvalue_p): Return it.
4132         * error.c (dump_expr): Provide more accurate representation for
4133         AGGR_INIT_EXPRs.
4134         * init.c (expand_default_init): Do not try to perform implicit
4135         conversions for a brace-enclosed initializer.
4136         * search.c (lookup_conversions): Document.
4137         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
4138         appropriately.
4139         (real_lvalue_p): Adjust accordingly.
4140         (lvalue_p): Likewise.
4141         (build_cplus_new): Don't allow the creation of an abstract class.
4142         * typeck.c (convert_for_initialization): Use initialize_reference.
4143         
4144 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
4146         * lex.c (real_yylex) : Correct the test for overflow when lexing
4147         integer literals.
4149 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
4151         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
4152         not DECL_BUILT_IN, to determine if a function is internally declared.
4153         (duplicate_decls): Likewise.  Improve handling of builtins.
4154         (push_overloaded_decl): Remove special handling of builtins.
4156         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
4158         * decl.c (grokdeclarator): Pull out decl_constant_value in
4159         templates, too.
4161         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
4162         * cp-tree.h, pt.c, semantics.c: Adjust.
4163         * method.c (largest_union_member): Remove.
4165         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
4167         * lex.c (token_getch, token_put_back): New fns.
4168         (real_yylex): Use them.
4170         * lex.c (lang_init): Generalize.
4171         (lang_init_options): Tell cpplib this is C++.
4172         (nextchar): Remove.  Replace uses with put_back.
4173         (skip_white_space): Handle linemode here.  Optimize for cpplib.
4174         (extend_token_buffer_to): New fn.
4175         (extend_token_buffer): Use it.
4176         (read_line_number, check_newline): Just deal with tokens.
4177         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
4178         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
4179         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
4180         * parse.y (PAREN_STAR_PAREN): Remove.
4181         * input.c: Don't use the putback machinery with cpplib.
4182         (sub_getch): Fold back into getch.
4183         (getch): Don't handle linemode here.
4184         (feed_input): Unget any text in the token buffer.
4186         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
4187         nextyychar, nextyylval): Remove.
4189 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
4190             Jason Merrill  <jason@yorick.cygnus.com>
4192         * lex.c (indent_level): New variable.
4193         (init_parse): Set cpp_token to CPP_DIRECTIVE.
4194         (consume_string): Make this smart about USE_CPPLIB.
4195         (yyungetc): Use put_back function.
4196         (pragma_getc, pragma_ungetc): Functions deleted.
4197         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
4198         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
4199         pragma_ungetc.
4200         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
4201         Also, clean up cases where we redundantly set token_buffer[0].
4202         (read_line_number): New fn.
4203         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
4204         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
4205         (sub_getch): Conditionalize out code that's not appropriate if
4206         USE_CPPLIB.
4207         (put_back): Rewrite in case USE_CPPLIB is defined.
4208         (input_redirected): Ditto.
4210 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
4212         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
4213         c_global_trees and accessor macros defined in c-common.h.
4214         (cp_tree_index): New enumeration.
4215         (cp_global_trees): Declare new array.  Add accessor macros for it, and
4216         delete declarations of tree nodes replaced by it.
4217         (builtin_function): Delete macro, add declaration for new function.
4218         Include c-common.h.
4219         * decl.c: Delete definitions for tree nodes that were replaced by
4220         cp_global_trees and c_global_trees.
4221         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
4222         to generate the common builtins here.
4223         (builtin_function): New function.
4224         * decl2.c (abort_fndecl): Delete declaration.
4225         * except.c (expand_builtin_return_address): Delete declaration.
4226         (builtin_return_address_fndecl): Delete variable.
4227         (const_ptr_type_node): Delete declaration.
4228         * lex.c (cons_up_default_function): Delete declaration of
4229         void_list_node.
4230         * parse.y (void_list_node): Delete declaration.
4231         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
4232         Delete variables.
4233         (const_string_type_node): Delete declaration.
4234         * search.c (abort_fndecl): Delete declaration.
4235         * Makefile.in: Update dependencies.
4237 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
4239         * pt.c (check_default_tmpl_args): Move test for missing default
4240         arguments here, from ...
4241         (end_template_parm_list): Here.
4243 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
4245         * decl.c (lookup_nested_type): Remove.
4246         (pushtag): Don't call it.
4248 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
4250         * Makefile.in (INTERFACE): Bump to 2.
4252 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
4253         
4254         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
4255         instructions to gcc.gnu.org.  Removed e-mail address.
4257 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
4259         * pt.c (determine_specialization): Tighten error-checking.
4260         (end_template_parm_list): Likewise.
4262 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
4264         * pt.c (check_default_tmpl_args): Handle friends defined in the
4265         class just like member functions defined in the class.
4267 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
4268             Jason Merrill  <jason@yorick.cygnus.com>
4270         * cp-tree.h (struct lang_decl): Added field for storing sorted
4271         FIELD_DECLs (used in TYPE_DECLs).
4272         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
4273         (DECL_SORTED_FIELDS): New macro.
4274         * class.c (method_name_cmp): New function.
4275         (finish_struct_methods): Modified to support sorting and searching
4276         methods.
4277         (finish_struct_anon): Changed code in inner loop to use ELT rather 
4278         than UELT (which required an extra indirection for every reference).
4279         (field_decl_cmp): New function to support sorting FIELD_DECLs.
4280         (finish_struct_1): Sort fields.
4281         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
4282         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
4283         Also, switch to using array indexing rather than a changing pointer.
4284         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
4285         DECL_SORTED_FIELDS.
4287 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
4289         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
4290         casts in system headers or extern "C" blocks.
4292         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
4293         errors to pedwarn.
4295 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
4297         * decl2.c (write_virtuals): Deleted declaration.
4298         * cp-tree.h (write_virtuals): Deleted extern declaration.
4299         * class.c (finish_struct_1): Removed #if 0'd code that mentions
4300         write_virtuals.
4301         * semantics.c (begin_class_definition): Rewrite code to not depend
4302         on write_virtuals.
4304         * lex.c (cp_pragma_interface): New function.
4305         (cp_pragma_implementation): Likewise.
4306         (handle_cp_pragma): Call them.
4308         * typeck.c (comptypes): Simplify C code in look_hard.
4310         * xref.c (PALLOC): Use xcalloc, not calloc.
4311         (SALLOC): Use xmalloc, not malloc.
4313         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
4315         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
4316         is NO_DEBUG.
4318         * decl.c (duplicate_decls): If a redeclaration doesn't match the
4319         initial declaration, then don't save the inline info and by all
4320         means don't mark the function as a builtin function.
4322         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
4323         CURRENT_CLASS_TYPE is 0.
4325         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
4326         NULL_TREE.
4328         * ptree.c (print_lang_type): Added vtable-needs-writing.
4330 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
4332         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
4334 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
4336         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
4337         Merged into c-common.
4339 1999-07-05  Dave Brolley  <brolley@cygnus.com>
4341         * lex.c (errorcount): Declare it.
4342         (finish_parse): Update errorcount for when using CPPLIB.
4344 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
4346         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
4347         parameters.
4348         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
4349         * decl.c (push_class_binding): Use it.
4350         (lookup_name_real): Likewise.
4352 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
4354         * cp-tree.h (widest_integer_literal_type_node,
4355         widest_unsigned_literal_type) : New.
4356         * decl.c (widest_integer_literal_type_node,
4357         widest_unsigned_literal_type) : New.
4358         (init_decl_processing): Handle/use the two new types.
4359         * lex.c (real_yylex): Same.
4360         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
4361         Same. 
4363 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
4365         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
4366         to anonymous cv-qualified types.
4368 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
4370         * lex.c (real_yylex) : Change integer literal overflow handling to
4371         be like c-lex.c.
4373         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
4375 1999-06-28  Richard Henderson  <rth@cygnus.com>
4377         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
4379 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
4381         * error.c (dump_type_real): Handle TREE_LIST again.
4383         * typeck.c (comp_target_parms): Don't complain about 
4384         converting from () to (...) if !flag_strict_prototype.
4386         * decl.c (grokdeclarator): Update the names of all variants when
4387         de-anonymizing.
4389 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
4391         * init.c (expand_aggr_vbase_init): Rename to
4392         construct_virtual_bases.  Conditionalize construction here, 
4393         rather than ...
4394         (emit_base_init): Here.
4396 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
4398         * semantics.c (finish_asm_statement): Apply decay conversions to
4399         input operands.
4401         * decl.c (expand_static_init): When building an anonymous function
4402         for use with atexit, compute its body before and after entering
4403         the function.
4405         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
4406         EXIT_EXPR.
4407         
4408 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
4410         * init.c (expand_aggr_vbase_init): Add flag parameter.
4411         (build_partial_cleanup_for): Remove, inlining into ..
4412         (expand_cleanup_for_base): ... here.  Take flag parameter.
4413         (emit_base_init): Pass the in_chrg parameter to
4414         emit_aggr_vbase_init. 
4415         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
4416         
4417 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
4419         * decl2.c (import_export_decl): Use same_type_p, rather than
4420         relying on pointer-equality for types.
4422         * method.c (do_build_copy_constructor): Simplify.
4424         * call.c (build_method_call): Remove bogus code for two-argument
4425         delete.
4426         * init.c (build_new_1): Expand on comment, and remove dead code.
4428         * init.c (expand_cleanup_for_base): New function, split out
4429         from ...
4430         (emit_base_init): Here.
4431         (expand_aggr_vbase_init): Use it.
4433 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
4435         * cp-tree.h (class_cache_firstobj): Declare.
4436         (maybe_push_cache_obstack): Rename to push_cache_obstack.
4437         * class.c (permanent_obstack): Remove declaration.
4438         (class_cache_firstobj): Make it global.
4439         (add_method): Don't use permanent_obstack directly.
4440         (pushclass): Only free the class_cache_obstack if we know how far
4441         back to free it.
4442         (maybe_push_cache_obstack): Rename to push_cache_obstack.
4443         * decl.c: Remove dead comment.
4444         (saved_scope): Add class_cache_firstobj.
4445         (push_to_top_level): Save it.
4446         (pop_from_top_level): Restore it.
4447         (push_class_level_binding): Use push_cache_obstack, not
4448         maybe_push_cache_obstack.
4449         * search.c (push_class_decls): Likewise.
4450         
4451 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4453         * pt.c (tsubst_friend_function): Push into namespace of friend
4454         function before pushdecl'ing it.
4456 1999-06-14  Nathan Sidwell  <nathan@acm.org>
4458         * call.c (build_new_op): Remove REF_BIND from all operands.
4460 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
4462         * init.c (build_new_1): Look up operator delete even if there was
4463         no explicit new placement.
4465 1999-06-08  Nathan Sidwell  <nathan@acm.org>
4467         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
4468         of ...
4469         (build_throw): ... here. Call it.
4470         (process_start_catch_block): Call it.
4472 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
4474         * search.c (convert_pointer_to_single_level): Reimplement without
4475         using get_binfo.
4477 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
4479         * method.c (is_back_referenceable_type): Back-reference bools when
4480         not squangling.
4482 1999-06-07  Dave Brolley  <brolley@cygnus.com>
4484         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
4485         * input.c (putback_buffer): New structure type.
4486         (putback): Replaces putback_char member.
4487         (putback): Replaces putback_char static variable.
4488         (feed_input): Use putback.
4489         (end_input): Use putback.
4490         (sub_getch): Use putback.
4491         (put_back): Use putback.
4493 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
4495         * decl.c (grokdeclarator): Fix typo in last change.
4497 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
4499         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
4500         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
4502 1999-06-04  Nathan Sidwell  <nathan@acm.org>
4504         * except.c (build_throw): Check throw expression validity.
4506 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
4508         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
4509         just because flag_signed_bitfields is false.
4511 1999-06-03  Nathan Sidwell  <nathan@acm.org>
4513         * semantics.c (begin_class_definition): Update the struct's
4514         location here ...
4515         * class.c (finish_struct): ... rather than here.
4517         * decl.c (make_typename_type): Don't rely on uninitialized
4518         variable.
4520 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4522         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
4524 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
4526         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
4527         and friends rather than messing with current_obstack directly.
4528         (cp_build_qualified_type_real): Rework ARRAY_TYPE
4529         allocation to match practice throughout the rest of the 
4530         compiler.
4532 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
4534         * lex.c (make_lang_type): Create TYPE_BINFO for
4535         TEMPLATE_TYPE_PARMs just like for non-template types.
4537         * decl.c (start_decl): Move checks on initialization to ...
4538         (cp_finish_decl): Here.  Tidy formatting slightly.
4540 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
4542         * decl.c (add_binding): Don't complain about a redeclaration of a
4543         semantically identical typedef in a local scope.
4545 1999-05-28  Nathan Sidwell  <nathan@acm.org>
4547         * decl.c (complete_array_type): Allocate off same obstack. Fix
4548         DO_DEFAULT comment to match reality.
4550         * friend.c (make_friend_class): Fix diagnostic typo.
4552 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
4554         * decl.c (lookup_namespace_name): Handle getting a
4555         TEMPLATE_ID_EXPR.
4556         (expand_static_init): Don't call pushdecl for implicitly declared
4557         `atexit' used to register destructors.
4559 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
4561         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
4562         intialize a vtable.
4564         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
4565         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
4566         by combining TEMPLATE_INFO and LEVEL into a single union.
4567         (DECL_TEMPLATE_INFO): Reformat.
4568         (DECL_SAVED_TREE): Document.
4569         (DECL_TEMPLATE_INJECT): Remove.
4570         * class.c (finish_struct): Remove code to deal with
4571         DECL_TEMPLATE_INJECT. 
4573         * decl.c (maybe_process_template_type_declaration): Handle all new
4574         types in templates uniformly.
4575         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
4576         DECL_CONTEXT.
4577         * pt.c (lookup_template_class): Inject template instantiations of
4578         forward-declarations.
4579         (instantiate_class_template): Remove code processing
4580         DECL_TEMPLATE_INJECT.
4581         
4582         * pt.c (lookup_template_class): Tweak lookup to find member
4583         templates.
4585         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
4586         ASM_CV_QUAL.
4587         * semantics.c (finish_asm_stmt): Make strings permanent if they're
4588         used in a template.
4589         
4590 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
4592         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
4593         parts of pointer to data member types.
4595 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
4597         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
4598         and then make it look like `abort'.  Just use `abort' instead.
4599         
4600         * typeck.c (build_static_cast): Don't allow static_casts that cast
4601         away constness.
4602         (casts_away_constness_r): New function.
4603         (casts_away_constness): Likewise.
4605         * decl.c (lookup_tag): Remove code no longer needed after
4606         name-lookup improvements.
4607         * decl2.c (handle_class_head): Make error-recovery more robust.
4608         * friend.c (make_friend_class): Reject templated typename types.
4609         * lex.c (is_global): A template parameter isn't global.
4610         * parse.y (class_head): Robustify.
4611         * parse.c: Regenerated.
4612         
4613 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
4615         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
4616         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
4617         
4618         * cp-tree.h (push_nested_namespace): Declare.
4619         (pop_nested_namespace): Likewise.
4620         * decl.c (push_nested_namespace): New function.
4621         (pop_nested_namespace): Likewise.
4622         * pt.c (instantiate_class_template): Use them.
4624         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
4626         * cp-tree.h (cplus_expand_constant): Declare.
4627         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
4628         converted from one pointer-to-object type to another.
4629         * expr.c (cplus_expand_constant): Don't make it static.
4630         * typeck.c (build_component_ref): Don't crash when presented with
4631         a component which is a TEMPLATE_DECL.
4632         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
4633         cast from a pointer-to-member constant to its own type does not
4634         result in a valid non-type template argument.
4636 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
4637             Nathan Sidwell  <nathan@acm.org>
4638         
4639         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
4640         * cp-tree.h: Fix typo in documentation on pointers-to-members.
4641         (cp_build_qualified_type): Make it a macro.
4642         (cp_build_qualified_type_real): Declare.
4643         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
4644         problem with template parameters and restrict-qualification.
4645         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
4646         * hash.h: Regenerated.
4647         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
4648         the enumeration.
4649         (NORID): Remove definition.
4650         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
4651         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
4652         (fn_type_unification): Check that the function type resulting from
4653         the deduction is legal.
4654         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
4655         (unify): Use cp_build_qualified_type_real.
4656         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
4657         (cp_build_qualified_type): Rename to ...
4658         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
4659         and modify appropriately.
4660         
4661         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
4662         reveal optimization opportunities.
4664         * pt.c (tsubst): Don't issue error messages when we're not
4665         complaining, even if we see a qualified function type.
4666         (check_cv_quals_for_unify): Don't allow a qualified function
4667         type.
4669 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
4671         * class.c (instantiate_type): Downgrade errors for object-dependent
4672         memfn refs to pedwarn.
4674 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
4676         * decl.c (grokdeclarator): Don't treat [] as indicating a
4677         zero-sized array in a typedef.
4679         * call.c (build_object_call): Don't look at DECL_NAME for a type.
4680         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
4681         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
4683         * pt.c (for_each_template_parm): Rework to match documentation.
4684         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
4686 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
4688         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
4690         * class.c (finish_base_struct): Allow non-COM bases for COM classes
4691         except at the leftmost position.
4692         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
4693         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
4694         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
4696         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
4697         (build_cplus_new): Make sure that what we return is of the right type.
4699 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
4701         * cp-tree.h (make_ptrmem_cst): New function.
4702         * expr.c (cplus_expand_constant): Split out from ...
4703         (cplus_expand_expr): Here.  Use cplus_expand_constant.
4704         (init_cplus_expand): Set lang_expand_constant.
4705         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
4707         * tree.c (make_ptrmem_cst): Define.
4708         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
4709         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
4711 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
4713         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
4715         * decl2.c (start_static_storage_duration_function): Fix comment.
4716         (finish_file): Create static storage duration functions lazily.
4718 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
4720         Implement anonymous structs.
4721         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
4722         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
4723         * class.c (finish_struct_1): Remove redundant check for anon struct.
4724         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
4725         (check_tag_decl): Check for anonymous struct here.
4726         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
4727         * init.c (sort_member_init, emit_base_init): Handle getting fields
4728         as well as names in current_member_init_list.
4729         (perform_member_init): Handle getting an anon aggr.
4730         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
4731         (do_build_copy_constructor): Likewise.
4733 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
4735         * tree.c (cp_build_qualified_type): Don't allow qualified function
4736         types.
4738 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
4740         * gxxint.texi: Fix typo.
4742 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
4744         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
4745         * class.c (finish_struct_1): Use CLASS_TYPE_P.
4746         * ptree.c (print_lang_type): Likewise.
4747         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
4748         IS_AGGR_TYPE_CODE.
4749         * typeck2.c (digest_init): Likewise.
4751 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
4753         * call.c (joust): Compare the types of the conv ops, not the
4754         target types of the conversions.
4756 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
4758         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
4759         was not given.
4761 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
4763         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
4764         * decl.c (grokfndecl): Don't allow inline declarations of friend
4765         template specializations, or friend template specializations with
4766         default arguments.
4767         * pt.c (tsubst): Handle substitution into array types that does
4768         not yield a fixed upper bound, even when not processing a
4769         template.
4770         (tsubst_copy): Deal with the fact that the second operand to a
4771         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
4772         * search.c (marked_pushdecls_p): Don't descend into
4773         TEMPLATE_TYPE_PARMs and the like.
4774         (unmarked_pushdecls_p): Likewise.
4775         
4776         * call.c (build_over_call): Don't throw away
4777         initializations/copies of empty classes; use MODIFY_EXPR and
4778         INIT_EXPR as for non-empty classes.
4779         * class.c (finish_struct_1): Put the padding byte for an empty
4780         class on the TYPE_NONCOPIED_PARTS list for the class.
4782 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
4784         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
4785         indicate a reference to a field that is a qualified name.
4787 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
4789         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
4790         ASM_OUTPUT_CONSTRUCTOR.
4792         * friend.c (do_friend): Add attrlist arg.  Remove support for
4793         getting a non-decl as 'decl'.
4794         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
4795         rtl.
4796         (grokdeclarator): Adjust.
4797         * cp-tree.h: Adjust.
4799 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
4801         * cp-tree.h (permanent_p): New function.
4802         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
4803         possibly complex tree node.
4804         * tree.c (mapcar): Adjust comments, and follow coding standards in
4805         conditional.
4806         (permanent_p): New function.
4808 1999-05-13  Per Bothner  <bothner@cygnus.com>
4810         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
4811         primitive Java types, if we actually see `extern "Java"'.
4813 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
4815         * lang-specs.h: Pass -$ to the preprocessor.
4817 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
4819         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
4820         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
4821         (resolve_offset_ref): Don't handle a raw baselink.
4822         * cvt.c (build_expr_type_conversion): Likewise.
4823         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
4824         convert_for_initialization): Likewise.
4825         * class.c (instantiate_type): Handle seeing a baselink under an
4826         OFFSET_REF.
4827         * error.c (dump_expr): Likewise.        
4828         * pt.c (for_each_template_parm): Likewise.
4829         (resolve_overloaded_unification): Likewise.
4830         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
4831         * typeck.c (expr_sizeof): Also complain about other permutations
4832         of overloaded functions.
4834 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
4836         * init.c (resolve_offset_ref): Don't return a raw method.
4837         Use BASELINK_P.
4838         * typeck.c (decay_conversion): Don't handle a raw method.
4839         Resolve all OFFSET_REFs.
4840         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
4841         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
4842         same_type_p for pmf bits.  Don't use build_binary_op to compare
4843         raw pointers to methods.
4844         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
4845         to decide when to call resolve_offset_ref.
4846         (build_c_cast, convert_for_initialization): Likewise.
4847         * cvt.c (build_expr_type_conversion): Likewise.
4849 1999-05-06  Nathan Sidwell  <nathan@acm.org>
4851         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
4853 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
4855         * decl2.c (start_objects): Don't let static constructors and
4856         destructors get inlined.
4858         * parse.y (nested_name_specifier): Make sure ordinary types are
4859         complete, just like template types.
4860         * parse.c: Regenerated.
4862         * pt.c (check_explicit_specialization): Improve error messages.
4864 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4866         * typeck.c (string_conv_p): Use same_type_p to check whether we
4867         try to convert between char and wchar_t.
4869 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
4871         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
4872         lookup to error_mark_node here.
4873         (lookup_member): Revise documentation.  Add comments.  Don't set
4874         the TREE_TYPE to error_mark_node here, and don't build up an extra
4875         TREE_LIST for ambiguous lookups.
4876         (setup_class_bindings): Adjust accordingly.
4877         (push_class_decls): Revise out-of-date comments.
4878         
4879         * typeck.c (build_const_cast): Tighten checks for legality.
4881 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4883         * init.c (build_member_call): Lookup names coming from
4884         namespace-scoped LOOKUP_EXPR.
4886 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
4888         * gxxint.texi: Add documentation for 'I'.
4890 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4892         * tinfo.cc (operator==): Qualify type_info with std::.
4894 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
4896         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
4897         (DECL_COMDAT): Remove definition.
4899 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
4901         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
4902         change.
4904 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
4906         * class.c (build_vtable): Use build_lang_decl when building
4907         vtables, not just build_decl.
4908         (prepare_fresh_vtable): Likewise.
4909         * decl.c (wrapup_globals_for_namespace): Mark vtables as
4910         DECL_EXTERNAL when calling wrapup_global_declarations.
4911         * decl2.c (priority_info_s): Add initializations_p and
4912         destructions_p members.
4913         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
4914         when deciding what vtables to write out.
4915         (ssdf_decls): New variable.
4916         (ssdf_decls_used): Likewise.
4917         (start_static_storage_duration_function): Deal with being called
4918         multiple times.  Avoid inlining this function.
4919         (generate_inits_for_priority): Deal with reuse of priority map.
4920         (get_priority_info): Clear initializations_p and destructions_p.
4921         (do_static_initialization): Tweak comment.
4922         (do_static_destruction): Likewise.  Fix condition on sentries for
4923         destruction.
4924         (generate_ctor_or_dtor_function): Call all of the static storage
4925         duration functions.
4926         (generate_ctor_or_dtor_function_for_priority): Check
4927         initializations_p and destructions_p to see what priorities need
4928         initialization functions.
4929         (finish_file): Rework to generate multiple static storage duration
4930         functions, rather than just one.
4932         * typeck.c (build_const_cast): Tweak last change to handle
4933         templates correctly.
4935         * typeck.c (build_const_cast): Disallow use of const_cast to
4936         anything but a pointer or reference type.
4938 1999-04-30  Nathan Sidwell  <nathan@acm.org>
4940         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
4941         signature type.
4943 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
4945         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
4946         (finish_file): Indent comments properly.
4948 1999-04-29  Richard Henderson  <rth@cygnus.com>
4950         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
4951         (do_static_destruction): Likewise.
4953 1999-04-29  Nathan Sidwell  <nathan@acm.org>
4955         * cp-tree.h (TYPE_NOTHROW_P): New macro.
4956         * decl2.c (delete_sanity): Warn on deleting void *.
4957         * init.c (build_new_1): Use TYPE_NOTHROW_P.
4958         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
4959         throwing operator new.
4961 1999-04-28  Nathan Sidwell  <nathan@acm.org>
4963         * cp-tree.h (build_component_addr): Remove prototype.
4964         * typeck.c (build_component_addr): Make static. Remove MSG
4965         argument.
4966         (build_component_addr): Remove MSG parameter, clean up
4967         comment.
4968         (build_x_function_call): Use cp_error.
4969         (build_unary_op): Adjust call of build_component_addr.
4971 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
4973         * pt.c (tsubst_friend_class): Check for NULL.
4975 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
4977         * search.c (binfo_for_vtable): Initialize bfvi.var.
4979 1999-04-27  Nathan Sidwell  <nathan@acm.org>
4981         * rtti.c (build_x_typeid): Check rtti is enabled.
4983 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
4985         * search.c (is_subobject_of_p): Make sure we're looking at the
4986         right baseclasses.
4988 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
4990         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
4992 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
4994         * decl2.c (finish_file): Tweak handling of extern inlines so that
4995         they are not unnecessarily put out.
4997         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
4998         such as base classes.
5000 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
5002         * tree.c (build_exception_variant): Fix typo: use the chain of U,
5003         not trying V, while cycling through U.
5005 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
5007         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
5008         preserves_first_arg.  Enlarge dummy accordingly.
5009         (DECL_TINFO_FN_P): New macro.
5010         (SET_DECL_TINFO_FN_P): Likeiwse.
5011         (DECL_RETURNS_FIRST_ARG): Remove.
5012         (DECL_PRESERVES_THIS): Likewise.
5013         (DECL_INIT_PRIORITY): New macro.
5014         (finish_struct_1): Change prototype.
5015         (cat_namespace_levels): Remove prototype.
5016         (vtable_decl_p): New prototype.
5017         (vtype_decl_p): Likewise.
5018         (sigtable_decl_p): Likewise.
5019         (walk_globals_pred): New typedef.
5020         (walk_globals_fn): Likewise.
5021         (walk_globals): New prototype.
5022         (walk_namespaces_fn): New typedef.
5023         (walk_namespaces): New prototype.
5024         (wrapup_globals_for_namespace): Likewise.
5025         (walk_vtables): Remove prototype.
5026         (walk_sigtables): Likewise.
5027         (instantiate_pending_templates): New prototype.
5028         * class.c (finish_struct_1): Don't return a value.
5029         * decl.h (pending_statics): Remove declaration.
5030         * decl.c (walk_namespaces_r): New function.
5031         (walk_globals_r): Likewise.
5032         (vtable_decl_p): Likewise.
5033         (vtype_decl_p): Likewise.
5034         (sigtable_decl_p): Likewise.
5035         (walk_namespaces): Likewise.
5036         (walk_globals_data): New type.
5037         (walk_globals): New function.
5038         (wrapup_globals_for_namespace): Likewise.
5039         (expand_static_init): Remove assertion.  Remove redundancy in
5040         conditional.  Don't put static data members in static_aggregates
5041         Tidy.
5042         (finish_function): Remove redundancy in conditional.  Don't set
5043         DECL_RETURNS_FIRST_ARG.
5044         (cat_namespace_levels): Remove.
5045         * decl2.c: Include splay-tree.h and varray.h.
5046         (priority_info_s): New structure.
5047         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
5048         conventions.
5049         (prune_vtable_vardecl): Likewise.
5050         (finish_sigtable_vardecl): Likewise.
5051         (setup_initp): Remove.
5052         (do_dtors): Remove.
5053         (do_ctors): Remove.
5054         (start_static_storage_duration_function): New function.
5055         (generate_inits_for_priority): Likewise.
5056         (finish_static_storage_duration_function): Likewise.
5057         (get_priority_info): Likewise.
5058         (do_static_initialization): Likewise.
5059         (do_static_destruction): Likewise.
5060         (do_static_initialization_and_destruction): Likewise.
5061         (generate_ctor_or_dtor_function): Likewise.
5062         (generate_ctor_and_dtor_functions_for_priority): Likewise.
5063         (pending_statics): Make it a varray.
5064         (pending_statics_used): New variable.
5065         (saved_inlines): Make it a varray.
5066         (saved_inlines_used): New variable.
5067         (finish_static_data_member): Change method of updating
5068         pending_statics.
5069         (mark_inline_for_output): Remove #if 0'd code.  Change method of
5070         updating saved_inlines.
5071         (walk_vtables): Remove.
5072         (walk_sigtables): Likewise.
5073         (import_export_decl): Use DECL_TINFO_FN_P.
5074         (pending_templates): Remove declaration.
5075         (maybe_templates): Likewise.
5076         (static_aggregates_initp): Likewise.
5077         (setup_initp): Likewise.
5078         (finish_objects): Simplify.
5079         (INITIALIZE_P_IDENTIFIER): New macro.
5080         (PRIORITY_IDENTIFIER): New macro.
5081         (SSDF_IDENTIFIER): New macro.
5082         (initialize_p_decl): New variable.
5083         (priority_decl): Likewise.
5084         (ssdf_decl): Likewise.
5085         (priority_info_map): Likewise.
5086         (finish_file): Recode output of static intializers and other
5087         file-scope finalization tasks.
5088         * error.c (OB_END_TEMPLATE_ID): New macro.
5089         (dump_type_real): Use it.
5090         (dump_decl): Likewise.
5091         (dump_function_name): Likewise.
5092         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
5093         interface.
5094         (check_newline): Use walk_globals, not walk_vtables.
5095         * pt.c (pending_tempalte_expansions): Remove.
5096         (set_vardecl_interface_info): Likewise.
5097         (pending_templates): Make static.
5098         (maybe_templates): Likewise.
5099         (instantiate_class_template): Adjust call to finish_struct_1.
5100         (instantiate_pending_templates): New function.
5101         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
5102         * tree.c (static_aggregates_initp): Remove.
5103         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
5104         instead.
5105         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
5107         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
5108         with the RTL code RETURN.
5109         * hash.h: Regenerated.
5110         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
5111         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
5112         * parse.c: Regenerated.
5113         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
5114         it.
5115         (inline_parm_levels): New variable.
5116         (inline_parm_levels_used): Likewise.
5117         (maybe_begin_member_template_processing): Update them.
5118         (maybe_end_member_template_processing): Use them, rather than
5119         guessing how many levels to pop.
5121         * decl.c (make_typename_type): Tighten error-checking.
5123 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
5125         * cp-tree.h (build_binary_op): Remove unneeded parameter.
5126         * class.c (build_vrable_entry_ref): Adjust call to
5127         build_binary_op.
5128         * decl.c (expand_static_init): Likewise.
5129         (grokdeclarator): Likewise.
5130         (finish_function): Likewise.
5131         * decl2.c (delete_sanity): Likewise.
5132         (do_dtors): Likewise.
5133         (do_ctors): Likewise.
5134         * error.c (dump_type_suffix): Likewise.
5135         * expr.c (cplus_expand_expr): Likewise.
5136         * init.c (resolve_offset_ref): Likewise.
5137         (build_new): Likewise.
5138         (build_new_1): Likewise.
5139         (build_vec_delete_1): Likewise.
5140         (expand_vec_init_catch_clause): Likewise.
5141         (build_delete): Likewise.
5142         * pt.c (tsubst): Likewise.
5143         * rtti.c (synthesize_tinfo_fn): Likewise.
5144         * search.c (expand_upcast_fixups): Likewise.
5145         (expand_direct_vtbls_init): Likewise.
5146         * typeck.c (get_member_function_from_ptrfunc): Likewise.
5147         (build_binary_op_nodefault): Likewise.
5148         (point_int_sum): Likewise.
5149         (pointer_diff): Likewise.
5150         (build_unary_op): Likewise.
5151         (build_modify_expr): Likewise.
5152         (get_delta_difference): Likewise.
5153         (build_ptrmemfunc): Likewise.
5154         (expand_ptrmemfunc_cst): Likewise.
5156 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
5158         * decl.c (grokfndecl): Always call cplus_decl_attributes.
5159         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
5161 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
5163         * cp-tree.h (finish_static_data_member_decl): New function.
5164         * decl2.c (finish_static_data_member_decl): Split out from ...
5165         (grokfield): Here.
5166         * pt.c (instantiate_class_template): Use it here instead of
5167         trying to fake it.
5168         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
5169         finish_static_data_member_decl will do that.  Explicit set
5170         DECL_EXTERNAL to match non-template processing.
5172 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
5174         * cp-tree.h (finish_class_definition): Add parameter.
5175         * parse.y (structsp): Use it.  Don't call pop_scope here.
5176         * parse.c: Regenerated.
5177         * semantics.c (finish_class_definition): Pop it here.
5179 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
5181         * decl.c (xref_tag): Revise handling of nested template
5182         declarations.
5183         * pt.c (check_explicit_specialization): Tweak handling of friend
5184         templates in template classes.
5185         (tsubst_friend_class): Handle friend declarations for nested
5186         member template classes.
5188 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
5190         * class.c (finish_struct): Remove unused variable.
5191         (pushclass): Likewise.
5192         (invalidate_class_lookup_cache): Likewise.
5193         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
5194         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
5195         doesn't get obliterated.
5196         (make_typename_type): Handle template classes correctly.
5198         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
5199         (storetags): Declare.
5200         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
5201         (pushclass): Likewise.  Use storetags to install tag declarations,
5202         not pushtag.
5203         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
5204         * decl.c (storetags): Make it global.
5205         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
5206         implicit typename declaration.
5207         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
5208         * method.c (hack_identifier): Likewise.
5209         * search.c (lookup_member): Likewise.
5211         * decl.c (warn_about_implicit_typename_lookup): New function.
5212         (lookup_name_real): Use it.  Rework handling of implicit typename
5213         extension.
5215 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
5217         * cp-tree.h (lookup_nested_field): Remove.
5218         * class.c (push_nested_class): Handle UNION_TYPEs.
5219         (pop_nested_class): Likewise.
5220         * decl.c (lookup_name_real): Don't call lookup_nested_field.
5221         (start_decl): Use push_nested_class, not just pushclass.
5222         (cp_finish_decl): Use pop_nested_class, not just popclass.
5223         * search.c (lookup_nested_field): Remove.
5225         * cp-tree.h (lang_type): Add documentation.
5226         * decl2.c (handle_class_head): Create template declarations here,
5227         as appropriate.
5228         * parse.y (class_head): Return whether or not we entered a new
5229         scope, as well as the type named.
5230         (named_class_head): Likewise.
5231         (named_complex_class_head_sans_basetype): Likewise.
5232         (structsp): Adjust accordingly.  Pop scope when required.
5233         * parse.c: Regenerated.
5234         * pt.c (check_default_tmpl_args): Robustify.
5235         (redeclare_class_template): Likewise.
5236         (instantiate_class_template): An instantiation of an
5237         anonymous union is itself an anonymous union.
5238         * semantics.c (begin_class_definition): Don't create template
5239         declarations here.
5241 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
5243         * parse.y (after_type_declarator_intern): New nonterminal.
5244         (after_type_declarator): Use it.
5245         (direct_after_type_declarator): Likewise.  Move above
5246         nonnested_type to fix reduce/reduce conflict resolution.
5247         (declmods): Reducing from just 'attributes' has EMPTY precedence.
5248         * Makefile.in (CONFLICTS): Update.
5250         * decl.c (define_label): Downgrade error for jumping over a
5251         non-POD decl to pedwarn.
5253 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
5255         * cp-tree.h (popclass): Change declaration.
5256         (pop_nested_class): Likewise.
5257         (poplevel_class): Remove declaration.
5258         * call.c (convert_default_argument): Pass no arguments to
5259         popclass.
5260         * class.c (finish_struct_1): Likewise.
5261         (finish_struct): Likewise.
5262         (popclass): Remove argument.  Simplify code accordingly.
5263         (pop_nested_class): Likewise.
5264         * decl.c (poplevel_class): Declare it here, and make it static.
5265         (poplevel): Handle class scopes.
5266         (poplevel_class): Don't take an rgument.  Simplify.
5267         (pop_everything): Pass no arguments to pop_nested_class.
5268         (cp_finish_decl): Pass no arguments to popclass.
5269         (grokdeclarator): Pass no arguments to pop_nested_class.
5270         (finish_function): Likewise.
5271         * decl2.c (grokfield): Likewise.
5272         (pop_scope): Pass no arguments to popclass.
5273         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
5274         * pt.c (instantiate_class_template): Move call to pushclass, and
5275         document.  Pass no arguments to popclass.
5276         (regenerate_decl_from_template): Likewise.
5278 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
5280         * typeck.c (build_unary_op): Handle taking the address of a unique
5281         bound non-static member function.
5283 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
5285         * lang-options.h (-Wdeprecated): New flag.
5286         * decl2.c (warn_deprecated): New flag.
5287         (lang_decode_option): Deprecated this-is-variable,
5288         external-templates, alt-external-templates.
5289         Support -Wdeprecated.
5290         * errfn.c (cp_deprecated): New function.
5292 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
5294         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
5295         of the decls themselves.
5297         * pt.c (tsubst_function_type): Copy attributes over.
5299         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
5300         and com_interface.
5301         * cp-tree.h: Add prototype.
5302         * decl.c (init_decl_processing): Set valid_lang_attribute.
5304 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
5306         * class.c (finish_struct_1): Look at the const-ness of the field's
5307         type, not the TREE_READONLY-ness of the declaration.
5308         * method.c (synthesize_method): Likewise.
5309         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
5310         creating new declarations.
5312 1999-04-13  Mike Stump  <mrs@wrs.com>
5314         * decl2.c (import_export_decl): Because vtables always reference
5315         virtual functions, even if they are inlined, don't allow
5316         -fno-implement-inlines to not emit them, instead, emit them with
5317         the vtable.
5318         * decl.c (start_function): Likewise.
5320 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
5322         * cp-tree.h (struct lang_type): Add com_interface.
5323         (CLASSTYPE_COM_INTERFACE): New macro.
5324         * class.c (set_rtti_entry): COM interface classes have no RTTI
5325         entries in their vtables; adjust.
5326         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
5327         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
5328         finish_struct_1): Likewise.
5329         * decl2.c (mark_vtable_entries): Likewise.
5330         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
5331         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
5332         expand_upcast_fixups): Likewise.
5333         * tree.c (debug_binfo): Likewise.
5335         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
5336         * typeck.c (comptypes): If we get it, ignore attributes.
5337         * class.c (instantiate_type): Use BASELINK_P.  Change complain
5338         parameter to flags; 2 means ignore attributes.
5339         * call.c (build_op_delete_call): Pass it.
5341         * decl.c (xref_tag): Only complain once about using a typedef-name
5342         with 'struct'.  Downgrade to pedwarn.
5344         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
5346         * parse.y (absdcl_intern): New nonterminal.
5347         (absdcl, direct_abstract_declarator): Use it.
5349         * pt.c (lookup_template_class): Look through implict typename.
5351 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
5353         * friend.c (add_friend): Deal gracefully with error_mark_node.
5354         * method.c (build_overload_value): Handle pointers-to-members as
5355         template parameters.
5357         * decl.c (push_binding): Fix typo in comment.
5359 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
5361         * error.c (dump_type_real): If a typename is a template-id, put
5362         out the template arguments.
5363         (dump_expr): Handle TEMPLATE_ID_EXPR.
5364         * pt.c (lookup_template_class): Now that full arguments are
5365         available everywhere, remove code that tried to guess them.
5367 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
5369         * decl.c (make_typename_type): Complain if we don't find a type
5370         when trying to make a typename type for a non-template type.
5372 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
5374         * decl.c (start_decl): Pass attributes to grokdeclarator.
5375         (grokdeclarator): Handle attributes on constructor-syntax
5376         initializers.
5378 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
5380         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
5381         don't have types.
5383         * search.c (template_self_reference_p): Tweak.
5385 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
5387         * init.c (build_offset_ref): Don't build yet another weird data
5388         structure to describe overloaded functions.
5390 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
5392         * cp-tree.h (BASELINK_P): New macro.
5393         (SET_BASELINK_P): Likewise.
5394         * init.c (build_member_call): Remove needless assignment in if
5395         statement.
5396         * search.c (lookup_field_r): Fix handling when we are looking
5397         specifically for a type; these are not hidden by functions and
5398         variables.
5399         (lookup_member): Use SET_BASELINK_P.
5400         * tree.c (is_overloaded_fn): Use BASELINK_P.
5401         (really_overloaed_fn): Likewise.
5402         (get_first_fn): Likewise.
5404 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
5406         * decl.c (lookup_name_current_level): Tweak, and improve
5407         documentation.
5409         * class.c (maybe_fixup_vptrs): Remove declaration.
5410         (build_class_init_list): Likewise.
5411         * decl.c (pushdecl_class_level): Call check_template_shadow here
5412         ...
5413         (push_class_level_binding): ... not here.
5414         * search.c (dfs_push_type_decls): Only avoid
5415         template-self-reference TYPE_DECLs if they are from base classes.
5417 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
5419         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
5420         nodes.  Tidy.
5422 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
5424         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
5425         (finish_struct_1): Don't call build_class_init_list.
5427 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
5429         * tinfo.h (__class_type_info): Fix illegal declaration.
5431         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
5432         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
5433         (IDENTIFIER_CLASS_VALUE): Improve documentation.
5434         (is_properly_derived_from): Declare.
5435         (invalidate_class_lookup_cache): Likewise.
5436         (maybe_maybe_note_name_used_in_class): Likewise.
5437         (note_name_declared_in_class): Likewise.
5438         (push_using_decl): Remove duplicate declaration.
5439         (id_in_current_class): Remove declaration.
5440         (push_class_binding): Change prototype.
5441         (clear_identitifer_class_values): Declare.
5442         * call.c (is_properly_derived_from): Make it global.
5443         (build_new_function_call): Be careful about updating candidates.
5444         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
5445         asked to make illegal calls.
5446         * class.c: Include splay-tree.h.
5447         (class_stack_node): Add names_used slot.
5448         (check_member_decl_is_same_in_complete_scope): Remove.
5449         (add_method): Fix comment.  Push the declaration into class
5450         scope.
5451         (finish_struct_1): When popping the class, pop the bindings too.
5452         Remove check for data member/function member conflict.
5453         (finish_struct): Remove calls to
5454         check_member_decl_is_same_in_complete_scope.  Change calls to
5455         popclass.
5456         (pushclass): Clear names_used in the class stack entry.
5457         Use invalidate_class_lookup_cache to remove cached entries, rather
5458         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
5459         before entering a new class.  Remove dead code.  Don't mess with
5460         current_function_decl when pushing declarations.
5461         (invalidate_class_lookup_cache): New function, split out from ...
5462         (popclass): Here.  Clean up names_used on our way out.
5463         (instantiate_type): Adjust.
5464         (build_self_reference): Don't push the declaration here.
5465         (maybe_note_name_used_in_class): New function.
5466         (note_name_declared_in_class): Likewise.
5467         * decl.c (add_binding): Change prototype.
5468         (find_class_binding_level): New function.
5469         (innermost_nonclass_level): Likewise.
5470         (current_binding_level): Update documentation.
5471         (inner_binding_level): Remove.  Replace with current_binding_level
5472         throughout.
5473         (push_binding_level): Remove special handling of
5474         class_binding_level.
5475         (pop_binding_level): Likewise.  Use find_class_binding_level.
5476         (suspend_binding_level): Likewise.
5477         (global_bindings_p): Use innermost_nonclass_level.
5478         (toplevel_bindings_p): Likewise.
5479         (namespace_bindings_p): Likewise.
5480         (pseudo_global_level_p): Likewise.
5481         (push_binding): Clear INHERITED_VALUE_BINDING_P.
5482         (add_binding): Check for illegal multiple declarations.  Return a
5483         value indicating whether or not the new binding was legal.
5484         (push_local_binding): Skip over class binding levels.  Check
5485         return value from add_binding.
5486         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
5487         note_name_declared_in_class.
5488         (pushlevel_class): Remove "fake out the rest of the compiler"
5489         code.
5490         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
5491         (clear_identifier_class_values): New function.
5492         (pop_from_top_level): Use it.
5493         (pop_everything): Tweak.
5494         (maybe_process_template_type_declaration): Don't push the
5495         declaration for the template here.
5496         (pushtag): Don't push tag declarations into class scope here.
5497         (pushdecl): Apply DeMorgan's law for readability.
5498         (pushdecl_class_level): Remove special-case code for
5499         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
5500         (push_class_level_bindng): Deal with inherited bindings.
5501         (lookup_name_real): Remove special-case code for
5502         TYPE_BEING_DEFINED, and some implicit typename magic.
5503         (grokdeclarator): Handle COMPONENT_REF for a template function.
5504         (build_enumerator): Don't call pushdecl_class_level here.
5505         (id_in_current_class): Remove.
5506         * decl2.c (grokfield): Don't call pushdecl_class_level or
5507         check_template_shadow.
5508         * errfn.c (cp_file_of): Don't declare.
5509         (cp_line_of): Likewise.
5510         * error.c (dump_decl): Handle an OVERLOAD.
5511         (cp_file_of): Likewise.
5512         (cp_line_of): Likewise.
5513         * init.c (build_member_call): Handle a COMPONENT_REF.
5514         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
5515         pushdecl_class_level.
5516         * method.c (hack_identifier): Build COMPONENT_REFs for references
5517         to member templates as well as member functions.  Remove dead
5518         code.
5519         * parse.y (left_curly): Remove.
5520         (nonnested_type): Call maybe_note_name_used_in_class, not
5521         pushdecl_class_level.
5522         * parse.c: Regenerated.
5523         (nested_name_specifier_1): Likewise.
5524         * pt.c (check_explicit_specialization): Adjust, for robustness.
5525         (check_template_shadow): Handle OVERLOADs.
5526         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
5527         TEMPLATE_DECL, if appropriate.
5528         * search.c (envelope_add_decl): Remove.
5529         (dfs_pushdecls): Likewise.
5530         (dfs_compress_decls): Likewise.
5531         (dfs_push_decls): New function.
5532         (dfs_push_type_decls): Likewise.
5533         (setup_class_bindings): Likewise.
5534         (template_self_reference_p): Likewise.
5535         (lookup_field_r): Use it.
5536         (looup_member): Remove old comment.  Deal with ambiguity.
5537         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
5538         and remove envelope processing.
5539         * semantics.c (begin_class_definition): Let pushclass push
5540         declarations for base classes.
5541         (finish_member_declaration): Push declarations into class scope.
5542         * typeck.c (build_component_ref): Just put an OVERLOAD into the
5543         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
5544         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
5545         * Makefile.in (class.o): Depend on splay-tree.h.
5547 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
5549         * cvt.c (convert_pointer_to_real): Use same_type_p.
5550         * typeck.c (comp_target_types): Use same_type_p.
5552 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
5554         * semantics.c (begin_inline_definitions,
5555         finish_inline_definitions): Rename from finish_default_args and
5556         begin_inline_definitions, respectively, to something that isn't a
5557         total lie.  :)
5558         * parse.y (structsp): Adjust.
5560         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
5561         (list_hash_lookup): Likewise.
5562         (hash_tree_chain): Adjust.
5563         * pt.c (tsubst): Adjust.
5564         (tsubst_arg_types): Use plain hash_tree_cons.
5565         * cp-tree.h (hash_tree_cons_simple): Lose.
5566         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
5568 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5570         * Makefile.in (hash.h): Generate using gperf language 'C', not
5571         'KR-C', so gperf uses the `const' keyword on strings.
5573         * gxx.gperf (resword): Const-ify a char*.
5575 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
5577         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
5578         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
5579         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
5580         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
5581         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
5582         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
5583         tree.c: Adjust.
5585 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
5587         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
5589 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
5591         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
5593 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
5595         * cp-tree.h (add_friend): Declare.
5596         (add_friends): Likewise.
5597         * friend.c (add_friend): Make it global.  Don't add to
5598         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
5599         (add_friends): Make it global.
5600         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
5601         befriending class is a template.
5602         * parse.y (component_decl_1): Fix typo in comment.
5603         * parse.c: Regenerated.
5604         * pt.c (instantiate_class_template): Use add_friend and
5605         add_friends rather that duplicating some of their functionality
5606         here.
5608 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
5610         * call.c (build_field_call): Unify 'this' and non-'this' cases.
5612         * typeck.c (build_indirect_ref): Check for 'this' sooner.
5614 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5616         * call.c (op_error): Const-ify a char*.
5617         (add_candidate, source_type, add_warning): Add static prototype.
5618         (print_z_candidates): Const-ify a char*.
5620         * class.c (resolve_address_of_overloaded_function,
5621         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
5622         (get_vtable_name, finish_struct_1): Const-ify a char*.
5624         * cvt.c (convert_to_reference): Likewise.
5626         * decl.c (redeclaration_error_message, record_builtin_type,
5627         record_unknown_type, member_function_or_else, bad_specifiers):
5628         Likewise.
5629         (find_binding, select_decl, unqualified_namespace_lookup,
5630         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
5631         Add static prototype.
5632         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
5633         implicitly_declare, record_builtin_java_type, define_function,
5634         grok_op_properties, tag_name): Const-ify a char*.
5636         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
5637         (define_function, finish_builtin_type): Const-ify a char*.
5638         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
5639         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
5640         (file_name_nondirectory): Const-ify a char*.
5641         (init_filename_times): Don't prototype.
5642         (compiler_error): Prototype.
5643         (yyerror, init_repo): Const-ify a char*.
5644         (build_srcloc): Don't prototype.
5645         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
5646         Const-ify a char*.
5647         (warn_for_assignment): Don't prototype.
5648         (convert_for_initialization, readonly_error, check_for_new_type,
5649         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
5650         Const-ify a char*.
5652         * decl2.c (acceptable_java_type, output_vtable_inherit,
5653         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
5654         merge_functions, decl_namespace, validate_nonmember_using_decl,
5655         do_nonmember_using_decl): Add static prototype.
5656         (lang_f_options): Const-ify a char*.
5657         (finish_builtin_type): Likewise.
5658         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
5659         prototype.
5661         * errfn.c: Include cp-tree.h.
5662         (cp_thing): Add static prototype.
5663         (compiler_error): Don't protoptype.
5664         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
5665         passing it to `cp_thing'.
5667         * error.c (interesting_scope_p): Add static prototype.
5669         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
5670         a char*.
5672         * init.c (compiler_error): Don't prototype.
5673         (member_init_ok_or_else): Const-ify a char*.
5674         (build_java_class_ref): Add static prototype.
5676         * lex.c (compiler_error): Don't prototype.
5677         (get_time_identifier, interface_strcmp, extend_token_buffer,
5678         handle_cp_pragma): Const-ify a char*.
5679         (is_global, init_filename_times): Add static prototype.
5680         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
5681         (compiler_error): Change from fixed args to variable args.
5682         (yyerror): Const-ify a char*.
5684         * parse.y (cond_stmt_keyword): Const-ify a char*.
5685         (parse_decl): Add static prototype.
5687         * pt.c (template_args_equal, print_template_context): Likewise.
5688         (print_candidates, check_default_tmpl_args): Const-ify a char*.
5689         (instantiate_class_template): Likewise.
5691         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
5693         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
5694         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
5696         * search.c (lookup_field_info, lookup_member): Likewise.
5697         (lookup_member): Cast the first argument of `bzero' to a PTR.
5699         * sig.c (compiler_error): Don't prototype.
5700         (build_signature_pointer_or_reference_nam): Const-ify a char*.
5701         (get_sigtable_name, build_member_function_pointer): Likewise.
5703         * tree.c (compiler_error): Don't prototype.
5704         (no_linkage_helper, build_srcloc): Add static prototype.
5705         (build_vbase_pointer_fields): Const-ify a char*.
5706         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
5708         * typeck.c (compiler_error): Don't prototype.
5709         (convert_for_assignment): Const-ify a char*.
5710         (comp_cv_target_types): Add static prototype.
5711         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
5712         build_component_addr, build_unary_op, convert_for_initialization):
5713         Const-ify a char*.
5715         * typeck2.c (ack): Add static prototype and change from fixed args
5716         to variable args.
5717         (readonly_error, check_for_new_type): Const-ify a char*.
5719         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
5720         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
5721         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
5722         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
5723         gen_assign, GNU_xref_member): Const-ify a char*.
5725 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5727         * gxxint.texi: Remove old discussion on copying virtual bases.
5729 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
5731         * Make-lang.in: Remove all references to g++.o/g++.c.
5732         Link g++ from gcc.o.
5734 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
5736         * decl2.c (comdat_linkage): Treat vtables like functions.
5738 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
5740         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
5742 1999-03-25  Nathan Sidwell  <nathan@acm.org>
5744         * decl.c (init_decl_processing): Add `signed' type as a synonym
5745         for `int'.
5747 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
5749         * typeck.c (common_type): Handle cv-qual unification for pointers
5750         to members.
5752         * decl.c (unqualified_namespace_lookup): Return error_mark_node
5753         on error.
5754         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
5755         * lex.c (do_identifier): If we got error_mark_node, call
5756         lookup_name again.
5758 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5760         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
5761         classes.
5763 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
5765         * decl.c (lookup_name_real): Do nested field lookup regardless of
5766         TYPE_BEING_DEFINED.
5768 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
5770         * cp-tree.h (lang_type): Remove has_assignment and
5771         has_real_assignment.  Add befriending_classes.
5772         (TYPE_HAS_ASSIGNMENT): Remove.
5773         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
5774         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
5775         (lang_decl): Document.
5776         (DECL_BEFRIENDING_CLASSES): New macro.
5777         (FRIEND_NAME): Move declaration to more obvious location.
5778         (FRIEND_DECLS): Likewise.
5779         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
5780         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
5781         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
5782         (grok_op_properties): Likewise.
5783         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
5784         (add_friend): Likewise.  Don't do weird things with assignment
5785         operators.  Update DECL_BEFRIENDING_CLASSES.
5786         (add_friends): Don't do weird things with assignment operators.
5787         (make_friend_class): Likewise.  Update
5788         CLASSTYPE_BEFRIENDING_CLASSES.
5789         * pt.c (instantiate_class_template): Don't set
5790         TYPE_HAS_ASSIGNMENT.
5791         (tsubst_copy): Substitute the TREE_TYPE for more unary
5792         expressions.
5793         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
5794         * search.c (protected_accessible_p): New function.
5795         (friend_accessible_p): Likewise.
5796         (accessible_p): Use them.
5798 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
5800         * pt.c (convert_nontype_argument): Don't create things that aren't
5801         PTRMEM_CSTs when applying a qualification conversion to a
5802         PTRMEM_CST.
5804 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
5806         * Makefile.in (OBJS): Don't mention hash.o.
5807         (OBJDEPS): Likewise.
5809 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
5811         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
5812         * decl.c (expand_static_init): Make sure we don't add any after
5813         then.
5815         * decl.c (cp_finish_decl): Move intelligence about handling
5816         DECL_COMDAT for variables from here...
5817         * decl2.c (comdat_linkage): ...to here.
5818         (maybe_make_one_only): Tweak.
5819         (import_export_decl): Call comdat_linkage for variables, too.
5820         (finish_file): Handle template statics properly.
5822 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
5824         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
5825         Document internals of pointer-to-member-functions.
5826         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
5827         (PFN_FROM_PTRMEMFUNC): Likewise.
5828         (build_type_conversion): Remove unused parameter.
5829         (build_ptrmemfunc1): Declare.
5830         (expand_ptrmemfunc_cst): New function.
5831         (delta2_from_ptrmemfunc): Likewise.
5832         (pfn_from_ptrmemfunc): Likewise.
5833         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
5834         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
5835         (convert_to_reference): Remove unused parameter to
5836         build_type_conversion.
5837         (ocp_convert): Likewise.
5838         (build_user_type_conversion): Likewise.
5839         * error.c (dump_expr): Handle NULL pointer-to-member functions.
5840         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
5841         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
5842         open when handling pointer-to-member functions.
5843         * pt.c (convert_nontype_argument): Clean up error messages.  Be
5844         more stringent with pointers-to-members.
5845         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
5846         (build_unary_op): Tidy ever-so-slightly.
5847         (build_conditional_expr): Remove extra parameter to
5848         build_type_conversion.
5849         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
5850         we're using.
5851         (expand_ptrmemfunc_cst): Define.
5852         (delta2_from_ptrmemfunc): Likewise.
5853         (pfn_from_ptrmemfunc): Likewise.
5855 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
5857         * init.c (build_member_call): Handle template-id expressions
5858         correctly.
5859         * typeck.c (build_x_function_call): Likewise.
5861 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
5863         * friend.c (make_friend_class): Avoid core dump when
5864         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
5866 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
5868         * decl.c (start_function): Suppress normal linkage heuristics
5869         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
5871 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
5873         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
5874         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
5876 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5878         * parse.y (named_complex_class_head_sans_basetype):
5879         Do not push a scope for error_mark_node.
5880         (maybe_base_class_list): Likewise.
5882         * decl.c (start_decl): Check for error_mark_node as a type.
5883         Detected by g++.brendan/array-refs.C.
5884         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
5885         (maybe_build_cleanup_1): Likewise.  Detected by
5886         g++.jason/incomplete1.C.
5888         * tree.c (build_dummy_object): Use void_zero_node instead of the
5889         error_mark_node.
5890         (is_dummy_object): Check for such a node.
5891         Detected by g++.bob/inherit1.C
5893 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
5895         * method.c (old_backref_index): Split out...
5896         (flush_repeats): From here.  Rename back from try_old_backref.
5897         (build_mangled_name): Put back some old-style repeat handling.
5899 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5901         * lex.c: Don't include setjmp.h.
5902         (parse_float): New static function.
5903         (pf_args): New struct.
5904         (real_yylex): Use them in call to `do_float_handler'.
5906 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
5908         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
5909         * tree.c (layout_basetypes): Not here.
5910         * search.c (dfs_search): Remove; no longer used.
5912 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
5914         * decl2.c (validate_nonmember_using_decl): Issue sensible
5915         error-messages on bogus qualifiers.
5917 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
5919         * call.c (add_function_candidate): Fix uninitialized variable.
5921         * Makefile.in (search.o): Add dependency on varray.h.
5923 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
5925         * decl.c (duplicate_decls): Use same_type_p.
5926         * method.c (try_old_backref): Renamed from flush_repeats.  Use
5927         same_type_p.  Don't try to handle repeats.  Return success.
5928         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
5929         calls from old-style code, too.
5930         (check_ktype): Use same_type_p.
5931         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
5932         (build_qualified_name): Simplify logic.
5933         (process_overload_item): Strip typedefs and quals at the top.
5934         (build_mangled_name_for_type_with_Gcode): Remove call to
5935         type_canonical_variant.
5936         (build_mangled_name): Likewise.  Remove support for old-style
5937         repeats, which have been disabled since 2.7.2.  Don't mess with
5938         TREE_USED.
5939         (build_decl_overload_real): Don't mess with TREE_USED.
5941 1999-03-13  Nathan Sidwell  <nathan@acm.org>
5943         * error.c (cp_printers): Add 'F' escape character.
5944         (dump_type_real): Remove TREE_LIST (fnargs) printing.
5945         Functionality moved to dump_parameters.
5946         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
5947         (dump_function_decl): Extend meaning of V parameter.  Use
5948         dump_parameters and dump_exception_spec.
5949         (dump_parameters): New static function.
5950         (dump_exception_spec): New static function.
5951         (fndecl_as_string): Change argument semantics.  Use
5952         dump_function_decl directly.
5954         * sig.c (build_signature_table_constructor): Use cp_error.
5956 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5958         * semantics.c (finish_switch_cond): Handle error cases gracefully.
5959         Detected by g++.law/enum5.C.
5961         * typeck.c (build_modify_expr): Check for errors after resolving
5962         offsets.  Detected by g++.brendan/static1.C.
5964         * decl.c (complete_array_type): Ignore initial_value if it is an
5965         error.  Detected by g++.benjamin/17930.C.
5967         * typeck2.c (process_init_constructor): Return error if one argument
5968         is in error.  Detected by g++.benjamin/13478.C.
5970 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5972         * decl.c (select_decl): Allow class templates when we need types.
5973         * decl2.c (ambiguous_decl): Likewise.
5975 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
5977         * lex.c (do_identifier): Correct call to enforce_access.
5978         * search.c (accessible_p): Tweak comment.
5980 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
5982         * semantics.c (begin_class_definition): Call build_self_reference.
5983         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
5985         * search.c (assert_canonical_unmarked): Fix typo in prototype.
5987         * search.c (dfs_canonical_queue): New function.
5988         (dfs_assert_unmarked_p): Likewise.
5989         (assert_canonical_unmarked): Likewise.
5990         (access_in_type): Use it.
5991         (accessible_p): Likewise.  Walk the whole tree when umarking.
5993         * sig.c (build_signature_table_constructor): Use accessible_p
5994         instead of compute_access.
5996 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
5998         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
6000 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
6002         * cp-tree.h (flag_access_control): Declare.
6003         (TREE_VIA_PPUBLIC): Document.
6004         (DECL_NONSTATIC_MEMBER_P): New macro.
6005         (enforce_access): Return an indication of whether or not access
6006         was permitted.
6007         (build_self_reference): Change prototype.
6008         (compute_access): Replace with ...
6009         (accessible_p): New function.
6010         (dfs_walk): Change prototype.
6011         (dfs_unmark): Likewise.
6012         (markedp): Likewise.
6013         * call.c (enforce_access): Use accessible_p.
6014         * class.c (build_self_reference): Insert the declaration into the
6015         list of members for this type, and make it public.
6016         * decl.c (xref_basetypes): Avoid ill-timed recursion.
6017         * init.c (build_offset_ref): Use lookup_member, not three separate
6018         name-lookups.  Call enforce_access rather than checking for
6019         illegal accesses here.
6020         (resolve_offset_ref): Likewise.
6021         * lex.c (do_identifier): Likewise.
6022         * method.c (hack_identifier): Likewise.
6023         * parse.y (self_reference): Remove.
6024         (opt_component_decl_list): Don't use it.
6025         * parse.c: Regenerated.
6026         * pt.c (print_candidates): Generalize to handle lists of
6027         overloaded functions.
6028         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
6029         not set.
6030         (get_template_base): Use new calling convention for dfs_walk.
6031         * search.c: Include varray.h.  Add prototypes.
6032         (dfs_walk): Accept a data pointer to pass to the work functions.
6033         All callers changed.  All work functions changed.
6034         (breadth_first_search): Rename to bfs_walk, and make consistent
6035         with dfs_walk.
6036         (dfs_walk_real): New function.
6037         (canonical_binfo): New function.
6038         (context_for_name_lookup): Likewise.
6039         (shared_marked_p): Likewise.
6040         (shared_unmarked_p): Likewise.
6041         (lokup_field_queue_p): Likewise.
6042         (lookup_field_r): Generalize to handle both functions and fields.
6043         (lookup_field): Just call lookup_member.
6044         (lookup_fnfields): Likewise.
6045         (lookup_member): Move body of lookup_field here and generalize.
6046         (dfs_accessible_queue_p): Likewise.
6047         (dfs_accessible_p): Likewise.
6048         (dfs_access_in_type): Likewise.
6049         (access_in_type): Likewise.
6050         (compute_access): Remove, and replace with ...
6051         (accessible_p): New function.
6052         (vbase_types): Remove.
6053         (vbase_decl_ptr_intermediate): Likewise.
6054         (vbase_decl_ptr): Likewise.
6055         (vbase_init_result): Likewise.
6056         (closed_envelopes): Likewise.
6057         (bvtable): Likewise.
6059 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
6061         * call.c (add_function_candidate): Check for proper number of args
6062         before checking the validity of those args.
6064 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
6066         * cp-tree.h (struct lang_type): Add anon_union field.
6067         (ANON_UNION_TYPE_P): Use it instead of examining type.
6068         (SET_ANON_UNION_TYPE_P): New macro.
6069         * decl.c (check_tag_decl): Use it.
6071         * search.c (compute_access): Handle non-type contexts earlier, and
6072         handle NULL_TREE.
6074         * tree.c (build_exception_variant): Use copy_to_permanent.
6076         * decl2.c (setup_initp): Give statics with no priority the default
6077         priority here.
6078         (do_dtors, do_ctors, finish_file): Remove special handling of
6079         non-prioritized statics.
6081 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
6083         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
6084         * decl.c (make_typename_type): Don't issue an error if an
6085         immediate lookup fails; it migt be resolved later.
6086         * friend.c (is_friend): Add comment.
6087         * search.c (breadth_first_search): Add POSTFN and DATA
6088         parameters.  Tidy.  All callers changed.
6089         (lookup_field_queue_p): New function.
6090         (lookup_field_r): Likewise.
6091         (lookup_field_post): Likewise.
6092         (lookup_field): Use them, via breadth_first_search, instead of
6093         duplicating logic.
6094         (compute_access): Robustify.
6095         (lookup_fnfield_info): New structure.
6097 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
6099         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
6101 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
6103         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
6104         cc happy.
6106         * decl2.c (import_export_class): Also return if
6107         CLASSTYPE_INTERFACE_ONLY is set.
6109 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6111         * decl.c (push_overloaded_decl): Only overwrite the old binding if
6112         there was one.
6113         * decl2.c (do_local_using_decl): Fix loop termination.
6115 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
6117         * cp-tree.h (determine_specialization): Don't declare.
6118         * pt.c (determine_specialization): Make it static.  Eliminate
6119         complain parameter.  Note that decl is always non-NULL now, and
6120         simplify accordingly.
6122         * decl.c (maybe_push_to_top_level): Always call
6123         push_cp_function_context.
6124         (pop_from_top_level): Always call pop_cp_function_context.
6126 1999-02-26  Nathan Sidwell  <nathan@acm.org>
6128         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
6129         diagnostics.
6130         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
6131         * init.c (build_new_1): Extra arg to complete_type_or_else.
6132         (build_delete): Likewise.
6133         * typeck.c (require_complete_type): Likewise.
6134         (pointer_int_sum): Likewise.
6135         (pointer_diff): Likewise.
6136         (build_component_ref): Likewise.
6138         * typeck2.c (incomplete_type_error): Always use cp_error.
6139         Show declaration of undefined type, if appropriate.
6140         Deal with UNKNOWN_TYPE nodes.
6142         * typeck.c (require_complete_type): Use TYPE_SIZE as
6143         size_zero_node to mean incomplete type.
6144         (require_complete_type_in_void): New function.
6145         (build_compound_expr): Call complete_type_in_void for LHS.
6146         (build_c_cast): Call complete_type_in_void for void cast.
6147         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
6148         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
6149         require_complete_type_in_void.  Call it.
6150         * cp-tree.h (require_complete_type_in_void): Prototype new function.
6152         * typeck.c (convert_arguments): Use alternative format for
6153         function decls.  Don't require_complete_type here.  Simplify
6154         diagnostic printing.
6155         (convert_for_initialization): Don't require_complete_type on RHS yet.
6156         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
6158         * call.c (build_over_call): Cope with qualified void return type.
6159         * semantics.c (finish_call_expr): Likewise.
6160         * typeck.c (build_function_call_real): Likewise.
6161         (c_expand_return): Likewise.
6162         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
6164         * call.c (print_z_candidates): Use alternate print format, to be
6165         consistent with (pt.c) print_candidates.
6166         * method.c (hack_identifier): List candidate members.
6167         * search.c (lookup_field): Build ambiguous list, and show it, if
6168         ambiguous.
6170 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
6172         * typeck.c (decay_conversion): Don't confuse constant array
6173         variables with their initializers.
6175         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
6176         merging decls.
6177         * pt.c (regenerate_decl_from_template): Tweak for clarity.
6178         (instantiate_decl): Mark a decl instantiated before regenerating
6179         it to avoid recursion.
6180         * tree.c (mapcar): Don't call decl_constant_value unless we know
6181         something is TREE_READONLY_DECL_P.
6183         * class.c (check_for_override): Don't stop checking when we find
6184         the first overridden function.  Delete #if 0'd code.
6185         * search.c (get_matching_virtual): Likewise.
6187 1999-02-25  Richard Henderson  <rth@cygnus.com>
6189         * lang-specs.h: Define __FAST_MATH__ when appropriate.
6191 1999-02-24  Mike Stump  <mrs@wrs.com>
6193         * typeck.c (convert_for_assignment): Allow boolean integral constant
6194         expressions to convert to null pointer.
6196 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6198         * decl.c (lookup_namespace_name): Resolve namespace aliases.
6200         * class.c (push_nested_class): Allow namespaces.
6202         * decl2.c (set_decl_namespace): Add friendp parameter.
6203         * decl.c (grokfndecl): Pass it.
6204         (grokvardecl): Likewise.
6205         * cp-tree.h: Change declaration.
6207 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
6209         * pt.c (tsubst): Allow an array of explicit size zero.
6211 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
6213         * errfn.c: Change varargs code to look like toplev.c.
6215         * method.c (process_modifiers): Don't prepend 'U' for char or
6216         wchar_t.
6218 1999-02-20  Craig Burley  <craig@jcb-sc.com>
6220         * Make-lang.in (cplib2.ready): Don't consider updating
6221         cplib2 stuff if the current directory isn't writable, as
6222         it won't work (such as during a `make install').
6224 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
6226         * decl2.c (start_objects): Make file scope constructors and
6227         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
6228         ASM_OUTPUT_DESTRUCTOR are defined.
6230 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
6232         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
6233         (fn_type_unification): Adjust prototype.
6234         (lookup_fnfields_1): Declare.
6235         * call.c (add_template_candidate_real): Adjust call to
6236         fn_type_unification.
6237         * class.c (add_method): Don't allow duplicate declarations of
6238         constructors or destructors.
6239         (resolve_address_of_overloaded_function): Remove unused variable.
6240         Adjust call to fn_type_unification.
6241         * decl.c (grokfndecl): Be more robust in the face of illegal
6242         specializations.
6243         * decl2.c (check_classfn): Remove hokey handling of member
6244         templates.
6245         * pt.c (determine_specialization): Improve comments.  Adjust to
6246         handle template argument deduction as per the standard.
6247         (check_explicit_specialization): Fix comment spacing.  Handle
6248         type-conversion operators correctly.  Improve error-recovery.
6249         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
6250         (get_bindings_real): Simplify handling of static members.
6251         * search.c (lookup_fnfields_1): Make it have external linkage.
6252         * typeck.c (compparms): Fix comment.
6253         (build_unary_op): Don't try to figure out which template
6254         specialization is being referred to when when the address-of
6255         operator is used with a template function.
6257 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6259         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
6260         keyword to match an analogous change at the top level.
6262         * tree.c (lvalue_or_else): Likewise.
6264 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
6266         * decl.c (xref_basetypes): Comment.
6267         * pt.c (instantiate_class_template): Use xref_basetypes.
6269 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
6271         * cp-tree.h (tsubst): Change prototype.
6272         (tsubst_expr): Likewise.
6273         (tsubst_copy): Likewise.
6274         (type_unification): Remove prototype.
6275         * call.c (convert_default_arg): Adjust call to tsubst_expr.
6276         * class.c (resolve_address_of_overloaded_function): Just use
6277         fn_type_unification.
6278         * decl.c (grokdeclarator): Adjust call to tsubst.
6279         * method.c (build_template_parm_names): Likewise.
6280         * pt.c (GTB_VIA_VIRTUAL): New macro.
6281         (GTB_IGNORE_TYPE): Likewise.
6282         (resolve_overloaded_unification): Add `complain' parameter.
6283         (try_one_overload): Likewise.
6284         (tsubst_template_arg_vector): Likewise.
6285         (tsubst_template_parms): Likewise.
6286         (tsubst_aggr_type): Likewise.
6287         (tsubst_arg_types): Likewise.
6288         (tsubst_call_declarator_parms): Likewise.
6289         (unify): Remove explicit_mask.
6290         (type_unification_real): Likewise.
6291         (get_template_base_recursive): Likewise.
6292         (coerce_template_template_parms): Provide prototype.
6293         (tsubst_function_type): Likewise.
6294         (try_class_unification): New function.
6295         All callers changed to use new complain parameter.
6296         (get_template_base): Use try_class_unification.
6297         (unify): Adjust handling of classes derived from template types.
6298         (fn_type_unification): Substitute explicit arguments before
6299         unification.
6301 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
6303         * decl.c (pushdecl): Remove dead code.
6305 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
6307         * decl2.c (finish_objects): Fix code I missed in previous change.
6309 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
6311         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
6312         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
6314         * pt.c (maybe_process_partial_specialization): Complain about
6315         'template <>' on non-specialization.
6317 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
6319         * decl.c (grokdeclarator): Catch wierd declarators.
6320         * decl2.c (finish_file): Don't abort because of namespace parsing
6321         failure.
6322         (check_decl_namespace): Remove.
6324 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
6326         * cp-tree.h (get_template_base): Don't declare.
6327         (dfs_walk): Declare.
6328         (dfs_unmark): Likewise.
6329         (markedp): Likewise.
6330         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
6331         targs to get_template_base.
6332         (get_template_base_recursive): Move here from search.c.  Check to
6333         see that the base found can be instantiated to form the desired
6334         type.
6335         (get_template_base): Likewise.
6336         (get_class_bindings): Simplify.
6337         * search.c (get_template_base_recursive): Move to pt.c.
6338         (get_template_base): Likewise.
6339         (markedp): Make it global.
6340         (dfs_walk): Likewise.
6341         (dfs_unmark): Likewise.
6343 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
6345         * pt.c (maybe_process_partial_specialization): Complain about
6346         specialization in wrong namespace.
6347         * tree.c (decl_namespace_context): New fn.
6349 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
6351         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
6352         * pt.c (coerce_template_template_parms): Handle nested
6353         template template parameters.
6355 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
6357         * typeck2.c: Update email addresses.
6359 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
6361         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
6362         turned off.
6364 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
6366         * lex.c (retrofit_lang_decl): Split out...
6367         (build_lang_decl): From here.
6368         * decl.c (pushdecl): Call it for functions generated by the middle
6369         end that don't have DECL_LANG_SPECIFIC.
6370         * cp-tree.h: Declare it.
6372         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
6373         (start_objects, finish_objects): Only use special
6374         init_priority code if the user specified a priority.
6375         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
6376         objects.
6378 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
6380         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
6381         mkstemp.o.  Get them from libiberty now.
6382         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
6384 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
6386         * decl2.c (lang_decode_option): Use read_integral_parameter.
6388 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
6390         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
6391         before calling complete_type_or_else.
6393 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6395         * input.c (inline): Don't define, its handled by system.h.
6397 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
6399         * decl2.c: Don't define flag_no_ident here.  Don't process
6400         -f(no-)ident here.
6401         * cp-tree.h: Don't declare flag_no_ident here.
6402         * lang-specs.h: Map -Qn to -fno-ident.
6404 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
6406         * cp-tree.h (struct tree_binding): Replace scope field with a union.
6407         (BINDING_SCOPE): Adjust.
6408         * decl.c (BINDING_LEVEL): Adjust.
6410 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
6412         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
6413         member constants.
6415         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
6416         a ctor initializer.
6418         * tree.c (equal_functions): Fix name in prototype.
6420         * decl.c (push_local_binding): Add FLAGS argument.
6421         (pushdecl, push_overloaded_decl): Pass it.
6422         * decl2.c (do_local_using_decl): Likewise.
6423         * cp-tree.h: Adjust prototype.
6424         * decl.c (poplevel): Fix logic.
6426         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
6427         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
6428         (cat_namespace_levels): Don't loop forever.
6430 1999-01-25  Richard Henderson  <rth@cygnus.com>
6432         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
6434 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
6436         * class.c (resolve_address_of_overloaded_function): Mark the
6437         chosen function used.
6439         * call.c (build_call): Make sure that a function coming in has
6440         been marked used already.
6441         * decl.c (expand_static_init): Call mark_used instead of
6442         assemble_external.
6443         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
6444         alloc_eh_object, expand_throw): Likewise.
6445         * init.c (build_builtin_delete_call): Likewise.
6446         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
6447         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
6448         expand_generic_desc): Likewise.
6450 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6452         * tree.c (equal_functions): New function.
6453         (ovl_member): Call it.
6455 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
6457         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
6459 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6461         * decl.c (decls_match): Return 1 if old and new are identical.
6462         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
6464 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
6466         * decl.c (start_function): Make member functions one_only on windows.
6467         * decl2.c (import_export_decl): Likewise.
6469         * decl.c (grokdeclarator): Don't complain about implicit int in
6470         a system header.  Change same-name field check to not complain in
6471         a system header instead of within extern "C".
6473 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
6475         * cp-tree.h (PUSH_GLOBAL): New macro.
6476         (PUSH_LOCAL): Likewise.
6477         (PUSH_USING): Likewise.
6478         (namespace_bindings_p): Declare.
6479         (push_overloaded_decl): Likewise.
6480         * decl.c (push_overloaded_decl): Don't make it static.  Check for
6481         illegal declarations after using declarations here.
6482         (namespace_bindings_p): Likewise.
6483         (duplicate_decls): Don't consider declarations from different
6484         namespaces to be the same.
6485         (pushdecl): Use symbolic PUSH_ constants in calls to
6486         push_overloaded_decl.
6487         (push_overloaded_decl_1): Likewise.
6488         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
6489         (do_nonmember_using_decl): Check for illegal using declarations
6490         after ordinary declarations here.
6491         (do_local_using_decl): Call pushdecl to insert declarations.
6493 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
6495         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
6497 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
6499         * tree.c (build_cplus_array_type_1): Don't call build_array_type
6500         for types involving template parameters.
6502         * cp-tree.h (PARM_DECL_EXPR): Delete.
6503         (convert_default_arg): Change prototype.
6504         (check_default_argument): Declare.
6505         (search_tree): Likewise.
6506         * call.c (convert_default_arg): Take the function to which the
6507         default argument belongs as a parameter, and do any necessary
6508         instantiation here, instead of ...
6509         (build_over_call): Here.
6510         * decl.c (local_variable_p): New function.
6511         (check_default_argument): Likewise, split out and tidied from ...
6512         (grokparms): Here.
6513         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
6514         * pt.c (tsubst_call_declarator_parms): New function.
6515         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
6516         with CALL_EXPRs, rather than trying to be clever.
6517         (tsubst): Use tsubst_call_declarator_parms.
6518         * tree.c (search_tree): Don't make it static.
6519         * typeck.c (convert_arguments): Use new interface to
6520         convert_default_arg.
6522 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
6524         * error.c (dump_function_decl): Don't print the argument types for
6525         a function when the verbosity level is negative.
6527         * call.c (build_over_call): Check format attributes at call-time.
6529         * pt.c (tsubst_copy): Fix comment.
6530         (unify): Don't allow unification with variable-sized arrays.
6532         * semantics.c (finish_stmt_expr): When processing a template make
6533         the BIND_EXPR long-lived.
6535 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
6537         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
6538         (import_export_vtable): Not here.
6540 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
6542         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
6543         non-static member function.
6545 1999-01-18  Nathan Sidwell  <nathan@acm.org>
6547         * class.c (instantiate_type): Only diagnose illegal address of member
6548         function if complaining.
6550         * decl.c (lookup_name_real): Remove duplicate code.
6552 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
6554         * tree.c (copy_template_template_parm): Use permanent_obstack.
6556 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
6558         * pt.c (unify): Remove restrictions on deduction of argument
6559         of template template parameters.
6561 1999-01-18  Nathan Sidwell  <nathan@acm.org>
6563         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
6565         * class.c (resolve_address_of_overloaded_function): Show list of
6566         all candidates, when none of them match.
6568 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
6570         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
6571         definition of 'casting away const' in reinterpret_cast<>.
6573 1999-01-18  Graham  <grahams@rcp.co.uk>
6575         * cvt.c: Add include for decl.h, remove extern for
6576         static_aggregates which is now provided by decl.h.
6578         * Makefile.in (cvt.o): Add dependency for decl.h and missing
6579         dependencies for convert.h and flags.h.
6581 1999-01-18  Nathan Sidwell  <nathan@acm.org>
6583         * decl2.c (do_dtors): Set current location to that of the
6584         decl, for sensible diagnostics and debugging.
6585         (check_classfn): Issue `incomplete type' error, if
6586         class is not defined.
6588 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
6590         * cp-tree.h: Add prototype for bound_pmf_p.
6592 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
6593             Manfred Hollstein <manfred@s-direktnet.de>
6595         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
6596         -Wreturn-type.
6598 1999-01-16  Nathan Sidwell  <nathan@acm.org>
6600         * cp-tree.h (struct lang_type): Added has_mutable flag.
6601         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
6602         (TYPE_HAS_MUTABLE_P): New macro to read it.
6603         (cp_has_mutable_p): Prototype for new function.
6604         * class.c (finish_struct_1): Set has_mutable from members.
6605         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
6606         it contains a mutable.
6607         * typeck.c (cp_has_mutable_p): New function.
6609 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
6611         * pt.c (process_template_parm): Ignore top-level qualifiers on
6612         non-type parameters.
6614         * decl.c (start_function): Use current_function_parms in the call
6615         to require_complete_type_for_parms, not the probably empty
6616         DECL_ARGUMENTS.
6618 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
6620         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
6622         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
6623         that we don't suppress the other copies.
6624         * lex.c (handle_cp_pragma): Likewise.
6626 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
6628         * decl.c (grokdeclarator): Undo 1998-12-14 change.
6629         * tree.c (build_cplus_array_type_1): Likewise.
6630         * pt.c (instantiate_class_template): Remove misleading comment.
6631         (tsubst_aggr_type): Substitute if there are template parameters,
6632         regardless of whether or not they use template arguments.
6633         (unify): Likewise, but for unification.
6635 1999-01-12  Richard Henderson  <rth@cygnus.com>
6637         * cp-tree.h (flag_permissive): Declare extern.
6639 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
6641         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
6642         here.
6643         (lang_type): Add is_partial_instantiation.  Decrease width of
6644         dummy.
6645         (PARTIAL_INSTANTIATION_P): New macro.
6646         (OPERATOR_TYPENAME_P): Remove.
6647         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
6648         OPERATOR_TYPENAME_P.
6649         (grok_op_properties): Likewise.
6650         * friend.c (do_friend): Handle friends that are member functions
6651         correctly.
6652         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
6653         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
6654         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
6655         any more partial instantiation than is absolutely necessary for
6656         implicit typename.  Set PARTIAL_INSTANTIATION_P.
6657         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
6658         * semantics.c (begin_class_definition): Handle partial
6659         specializations of a type that was previously partially
6660         instantiated.
6662 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
6664         * g++spec.c (LIBSTDCXX): Provide default definition.
6665         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
6667 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6669         * Make-lang.in (g++.o): Depend on prefix.h.
6671 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
6673         * tree.c (bound_pmf_p): New fn.
6674         * typeck.c (build_c_cast): Use it.
6676         * decl.c (grok_op_properties): Use same_type_p.
6678 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6680         * Makefile.in (cvt.o): Depend on toplev.h.
6682         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
6684         * cvt.c: Include toplev.h.
6686         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
6687         definitions.
6689         * init.c (expand_vec_init): Initialize variable `itype'.
6691         * lex.c (yyerror): Cast the argument passed to a ctype function to
6692         an unsigned char.
6694         * method.c (build_mangled_C9x_name): Wrap prototype and definition
6695         in "HOST_BITS_PER_WIDE_INT >= 64".
6697         * typeck.c (build_binary_op): Mark parameter `convert_p' with
6698         ATTRIBUTE_UNUSED.
6700 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
6702         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
6703         * tree.c (build_exception_variant): Don't crash on empty throw
6704         specs.
6706 1998-12-18  DJ Delorie  <dj@cygnus.com>
6708         * cvt.c (convert_to_reference): Check for both error_mark_node
6709         and NULL_NODE after call to convert_for_initialization.
6711 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
6713         * error.c (interesting_scope_p): New fn.
6714         (dump_simple_decl): Use it.
6715         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
6716         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
6718 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
6720         * class.c (resolve_address_of_overloaded_function): Do conversion
6721         to correct type here, rather than ...
6722         (instantiate_type): Here.
6724         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
6725         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
6726         (decl_template_parm_p): Remove.
6727         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
6728         parameter.
6729         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
6730         * pt.c (push_inline_template_parms_recursive): Set it.
6731         (decl_template_parm_p): Remove.
6732         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
6733         (process_template_parm): Set it.
6735 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
6737         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
6738         if configured with cpplib.
6740 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
6742         * decl.c (poplevel): Make sure ns_binding is initialized.
6744         * decl.c (finish_function): Undo inadvertent change in previous
6745         patch.
6747 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
6749         * class.c (pushclass): Tweak handling of class-level bindings.
6750         (resolve_address_of_overloaded_function): Update pointer-to-member
6751         handling.
6752         (instantiate_type): Likewise.
6753         * cvt.c (cp_convert_to_pointer): Likewise.
6754         * decl.c (pop_binding): Take the DECL to pop, not just the name.
6755         Deal with `struct stat' hack.
6756         (binding_level): Add to documentation.
6757         (push_binding): Clear BINDING_TYPE.
6758         (add_binding): New function.
6759         (push_local_binding): Use it.
6760         (push_class_binding): Likewise.
6761         (poplevel): Adjust calls to pop_binding.
6762         (poplevel_class): Likewise.
6763         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
6764         declarations to current binding level.
6765         (push_class_level_binding): Likewise.
6766         (push_overloaded_decl): Adjust handling of OVERLOADs in local
6767         bindings.
6768         (lookup_namespace_name): Don't crash when confronted with a
6769         TEMPLATE_DECL.
6770         (lookup_name_real): Do `struct stat' hack in local binding
6771         contexts.
6772         (build_ptrmemfunc_type): Adjust documentation.
6773         (grokdeclarator): Don't avoid building real array types when
6774         processing templates unless really necessary.
6775         (finish_method): Adjust calls to pop_binding.
6776         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
6777         not reparse_decl_as_expr.
6778         (build_expr_from_tree): Deal with a template-id as the function to
6779         call in a METHOD_CALL_EXPR.
6780         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
6781         (maybe_adjust_types_For_deduction): Don't do peculiar things with
6782         METHOD_TYPEs here.
6783         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
6784         pointer-to-member types where necessary.
6785         * tree.c (build_cplus_array_type_1): Don't avoid building real
6786         array types when processing templates unless really necessary.
6787         (build_exception_variant): Compare the exception lists correctly.
6789 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
6791         * cp-tree.def (CPLUS_BINDING): Update documentation.
6792         * cp-tree.h (LOCAL_BINDING_P): New macro.
6793         (lang_identifier): Rename local_value to bindings.
6794         (tree_binding): Make `scope' of type `void*', not `tree'.
6795         (BINDING_SCOPE): Update documentation.
6796         (IDENTIFIER_LOCAL_VALUE): Remove.
6797         (IDENTIFIER_CLASS_VALUE): Document.
6798         (IDENTIFIER_BINDING): New macro.
6799         (IDENTIFIER_VALUE): Likewise.
6800         (TIME_IDENTIFIER_TIME): Likewise.
6801         (TIME_IDENTIFIER_FILEINFO): Likewise.
6802         (IMPLICIT_TYPENAME_P): Likewise.
6803         (set_identifier_local_value): Remove.
6804         (push_local_binding): New function.
6805         (push_class_binding): Likewise.
6806         * class.c (pushclass): Update comments; use push_class_binding.
6807         * decl.c (set_identifier_local_value_with_scope): Remove.
6808         (set_identifier_local_value): Likewise.
6809         (push_binding): New function.
6810         (pop_binding): Likewise.
6811         (binding_level): Update documentation.  Remove shadowed.
6812         (BINDING_LEVEL): New macro.
6813         (free_binding_nodes): New variable.
6814         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
6815         BLOCK_VARs when doing for-scope extension.  Remove effectively
6816         dead code.
6817         (pushlevel_class): Tweak formatting.
6818         (poplevel_class): Adjust for new name-lookup scheme.
6819         (print_binding_level): Likewise.
6820         (store_bindings): Likewise.
6821         (pushdecl): Likewise.
6822         (pushdecl_class_level): Likewise.
6823         (push_class_level_binding): Likewise.
6824         (push_overloaded_decl): Update comments.  Adjust for new
6825         name-lookup scheme.
6826         (lookup_name_real): Likewise.
6827         (lookup_name_current_level): Likewise.
6828         (cp_finish_decl): Likewise.
6829         (require_complete_types_for_parms): Likewise.  Remove misleading
6830         #if 0'd code.
6831         (grok_parms): Likewise.  Don't call
6832         require_complete_types_for_parms here.
6833         (grok_ctor_properties): Don't treat templates as copy
6834         constructors.
6835         (grop_op_properties): Or as assignment operators.
6836         (start_function): Document.  Adjust for new name-lookup scheme.
6837         (finish_function): Likewise.
6838         * decl2.c (do_local_using_decl): Use push_local_binding.
6839         * lex.c (begin_definition_of_inclass_inline): New function, split
6840         out from ...
6841         (do_pending_inlines): Here, and ...
6842         (process_next_inline): Here.
6843         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
6844         (init_filename_times): Likewise.
6845         (extract_interface_info): Likewise.
6846         (ste_typedecl_interface_info): Likewise.
6847         (check_newline): Likewise.
6848         (dump_time_statistics): Likewise.
6849         (handle_cp_pragma): Likewise.
6850         (do_identifier): Adjust for new name-lookup scheme.
6851         * parse.y (function_try_block): Return ctor_initializer_opt value.
6852         (fndef): Use it.
6853         (fn.defpen): Pass appropriate values to start_function.
6854         (pending_inline): Use functor_try_block value, and pass
6855         appropriate values to finish_function.
6856         * pt.c (is_member_template): Update documentation; remove handling
6857         of FUNCTION_DECLs.  As per name, this function should deal only in
6858         TEMPLATE_DECLs.
6859         (decl_template_parm_p): Change name of olddecl parameter to decl.
6860         (check_template_shadow): Adjust for new name-lookup scheme.
6861         (lookup_template_class): Likewise.
6862         (tsubst_decl): Tweak so as not to confuse member templates with
6863         copy constructors and assignment operators.
6864         (unify): Handle UNION_TYPEs.
6865         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
6866         (lang_print_xnode): Adjust for new name-lookup scheme.
6867         * typeck.c (mark_addressable): Likewise.
6868         (c_expand_return): Likewise.
6870 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
6872         * decl.c (grokdeclarator): Allow field with same name as class
6873         in extern "C".
6875         * decl.c (lookup_name_real): Don't limit field lookup to types.
6876         * class.c (check_member_decl_is_same_in_complete_scope): No error
6877         if icv and x are the same.
6878         * lex.c (do_identifier): Tweak error message.
6880 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
6882         * decl.c (start_enum): Use push_obstacks, not
6883         end_temporary_allocation.
6884         (finish_enum): Call pop_obstacks.
6886 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
6888         * class.c (instantiate_type): Return error_mark_node rather than
6889         junk.
6891 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
6893         * cp-tree.h (most_specialized_instantiation): New function.
6894         (print_candidates): Likewise.
6895         * class.c (validate_lhs): Remove.
6896         (resolve_address_of_overloaded_function): New function, split out
6897         and then substantially reworked, from ...
6898         (instantiate_type): Use it.  Simplify.
6899         * cvt.c (convert_to_reference): Complain when caller has indicated
6900         that's the right thing to do.  Don't crash if instantiate_type
6901         fails.
6902         * pt.c: Substitute `parameters' for `paramters' throughout.
6903         (print_candidates): Don't make it static.
6904         (most_specialized_instantiation): Split out from ...
6905         (most_specialized): Here.
6907 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
6909         * lex.c (lang_init_options): Initialize cpplib.
6910         * decl2.c (parse_options,cpp_initialized): Removed.
6911         (lang_decode_option): Move initialization of cpplib to
6912         lang_init_options.
6914 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
6916         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
6917         well as the TYPE_DECL, when a typedef name is assigned to a
6918         previously anonymous type.
6920 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
6922         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
6923         __cp_eh_info for getting the eh info pointer.  Add table_index to
6924         field list.
6925         (push_eh_cleanup): Don't increment 'handlers' data field.
6926         (process_start_catch_block): Don't set the 'caught' field.
6928         * cp/exception.cc (CP_EH_INFO): New macro for getting the
6929         exception info pointer within library routines.
6930         (__cp_eh_info): Use CP_EH_INFO.
6931         (__start_cp_handler): Get exception info pointer, set caught field,
6932         and increment the handlers field.  Avoids this being done by handlers.
6933         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
6934         (uncaught_exception): Use CP_EH_INFO macro.
6936 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
6938         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
6940 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
6942         * lex.c (check_newline): Add support for \ as `natural'
6943         characters in file names in #line to be consistent with #include
6944         handling.  We support escape processing in the # 1 "..." version of
6945         the command.  See also support in cp/lex.c.
6947 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6949         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
6950         structure.
6952 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
6954         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
6956         * error.c (dump_simple_decl): Also print namespace context.
6957         (dump_function_decl): Likewise.
6959         * decl2.c (ambiguous_decl): Don't print old value if it's
6960         error_mark_node.
6962         * decl.c (lookup_name_real): Fix handling of local types shadowed
6963         by a non-type decl.  Remove obsolete code.
6964         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
6966         * lang-options.h: Add -fpermissive.
6967         * decl2.c: Likewise.
6968         * cp-tree.h: Add flag_permissive.
6969         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
6970         were specified, set flag_pedantic_errors.
6971         * call.c (build_over_call): Turn dropped qualifier messages
6972         back into pedwarns.
6973         * cvt.c (convert_to_reference): Likewise.
6974         * typeck.c (convert_for_assignment): Likewise.
6976 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
6978         * decl2.c (coerce_new_type): Use same_type_p.
6979         (coerce_delete_type): Likewise.
6981         * call.c (check_dtor_name): Return 1, not error_mark_node.
6983 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
6985         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
6986         if MULTIPLE_SYMBOL_SPACES.
6988         * pt.c (check_template_shadow): New fn.
6989         * decl2.c (grokfield): Use it.
6990         * decl.c (pushdecl): Likewise.
6991         (pushdecl_class_level): Likewise.
6992         (start_method): Likewise.
6993         (xref_tag): Don't try to use 't' if we're defining.
6995         * call.c (check_dtor_name): Just return an error_mark_node.
6996         * pt.c (lookup_template_class): Complain about using non-template here.
6997         * parse.y (apparent_template_type): Not here.
6999         * pt.c (check_explicit_specialization): Complain about specialization
7000         with C linkage.
7002         * lang-options.h: Add -f{no-,}implicit-inline-templates.
7004         * pt.c (convert_nontype_argument): Don't assume that any integer
7005         argument is intended to be a constant-expression.
7007 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
7009         * class.c (handle_using_decl): Fix comment.  Don't lookup
7010         constructors in base classes.
7011         (validate_lhs): Fix typo in comment.
7012         * search.c (lookup_field_1): Don't return a USING_DECL.
7014         * cp-tree.h (DECL_ACCESS): Improve documentation.
7016         * decl.c (expand_static_init): Don't set the initialization-done
7017         flag until the initialization is done.
7019 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
7021         * decl2.c (validate_nonmember_using_decl): Complain about using
7022         declarations for class members.
7024 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
7026         * typeck2.c (process_init_constructor): Use same_type_p.
7028         * decl.c (check_tag_decl): Don't warn about null decl inside a
7029         class.
7031         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
7032         UNIFY_ALLOW_NONE.
7033         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
7034         (resolve_overloaded_unification): Strip baselinks.
7036 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7038         * g++spec.c: Don't prototype xmalloc.
7040 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
7042         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
7044         * decl.c (check_tag_decl): Do complain about null friend decl at
7045         file scope.
7047 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
7049         * lex.c (make_lang_type): Clear the whole struct lang_type, not
7050         only the first multiple of sizeof (int).
7052 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
7054         * decl.c (start_decl): An explicit specialization of a static data
7055         member is only a definition if it has an initializer.
7057         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
7058         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
7059         cp_finish_decl.
7060         * init.c (expand_default_init): Check for DIRECT_BIND instead of
7061         DECL_ARTIFICIAL.
7063         * call.c (build_over_call): Use build_decl.
7065         * except.c (expand_throw): Just use convert, not
7066         build_reinterpret_cast.
7068         * lex.c (handle_generic_pragma): Use token_buffer.
7070         * decl.c (check_tag_decl): Don't complain about null friend decl.
7072 1998-11-24  Dave Pitts  <dpitts@cozx.com>
7074         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
7075         first position.
7076         * lex.c (check_newline): Use ISALPHA.
7077         (readescape): Use ISGRAPH.
7078         (yyerror): Use ISGRAPH.
7080 1998-11-24  Nathan Sidwell  <nathan@acm.org>
7082         * search.c (get_abstract_virtuals): Do not use initial
7083         CLASSTYPE_ABSTRACT_VIRTUALS.
7084         * typeck2.c (abstract_virtuals_error): Show location of abstract
7085         declaration.
7086         * call.c (build_new_method_call): Use
7087         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
7088         * class.c (finish_struct_bits): Don't bother working out whether
7089         get_abstract_virtuals will do anything, just do it.
7091 1998-11-24  Graham  <grahams@rcp.co.uk>
7093         * typeck.c (build_component_ref): Remove unused statement.
7095 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
7097         * class.c (add_method): Catch invalid overloads.
7099         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
7100         * search.c (lookup_conversions): Handle getting real OVERLOADs.
7101         (add_conversions): Likewise.  Revert last change.
7102         * call.c (add_conv_candidate): Pass totype to add_candidate instead
7103         of fn.  Don't add a new candidate if the last one was for the same
7104         type.
7105         (print_z_candidates): Handle getting a type as a function.
7106         (joust): If we got two conversion candidates to the same type,
7107         just pick one.
7108         (build_object_call): Lose 'templates'.
7109         (build_user_type_conversion_1): Handle getting real OVERLOADs.
7111 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
7113         * typeck2.c (process_init_constructor): If there are elements
7114         that don't have initializers and they need to have constructors
7115         run, supply them with initializers.
7117         * class.c (finish_struct_1): A class with a 0-width bitfield is
7118         still empty.
7120 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
7122         * pt.c (instantiate_class_template): Don't try to figure out what
7123         specialization to use for a partial instantiation.  Correct
7124         typos in a couple of comments.  Avoid calling uses_template_parms
7125         multiple times.
7127 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
7129         * method.c (process_overload_item): Add call to
7130         build_mangled_C9x_name for intTI_type_nodes.
7131         (build_mangled_C9x_name): Add prototype, define.
7132         * decl.c (init_decl_processing): Add names for
7133         TImode_type_node.
7135 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
7137         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
7139         * class.c (finish_struct_1): Set things up for 0-width bitfields
7140         like we do for others.
7142         * decl.c (check_tag_decl): New fn.
7143         (shadow_tag): Split out from here.
7144         * decl2.c (grok_x_components): Call it.
7146 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
7148         * decl.c: Lose warn_about_return_type.
7149         (grokdeclarator): Always complain about implicit int, except for
7150         `main () { ... }'.
7152         * decl.c (tag_name): New fn.
7153         (xref_tag): Complain about using typedef-name after class-key.
7155         * init.c (expand_vec_init): Also keep going if from_array.
7157         * tree.c (is_overloaded_fn): Also handle the output of
7158         build_offset_ref.
7160         * decl.c (grokdeclarator): Use constructor_name when comparing
7161         field name against enclosing class.
7162         * class.c (finish_struct_anon): Likewise.
7164 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
7166         * decl.c (poplevel): Remove code to handle KEEP == 2.
7167         (finish_function): Don't confuse BLOCK-order when
7168         processing a destructor.
7170 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
7172         * decl.c (require_complete_types_for_parms): Call layout_decl
7173         after we've completed the type.
7175 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7177         * decl2.c (validate_nonmember_using_decl): Allow using templates
7178         from the global namespace.
7180 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
7182         Handle specifying template args to member function templates.
7183         * tree.c (build_overload): Always create an OVERLOAD for a template.
7184         * search.c (add_conversions): Handle finding an OVERLOAD.
7185         * decl2.c (check_classfn): Likewise.
7186         * lex.c (identifier_type): See through a baselink.
7187         * parse.y (do_id): Don't call do_identifier if we got a baselink.
7188         * class.c (instantiate_type, case TREE_LIST): Recurse.
7190         * decl.c (grokdeclarator): Allow a boolean constant for array
7191         bounds, odd as that sounds.
7193         * pt.c (unify): Be more strict about non-type parms, except for
7194         array bounds.
7195         (UNIFY_ALLOW_INTEGER): New macro.
7197 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
7199         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
7201 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
7203         * semantics.c (begin_class_definition): Call
7204         maybe_process_partial_specialization before push_template_decl.
7205         Don't call push_template_decl for a specialization.
7206         * search.c (lookup_field): Do return a member template class.
7207         * decl2.c (handle_class_head): Handle member template classes.
7209         * decl.c (grokdeclarator): A parm type need not be complete.
7211         * pt.c (convert_nontype_argument): Fix thinko.
7213 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
7215         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
7216         (global_delete_fndecl): New variable.
7217         * decl.c (global_delete_fndecl): Define it.
7218         (init_decl_processing): Set it.
7219         * init.c (build_builtin_delete_call): Use it.
7220         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
7221         nodes.
7223 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
7225         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
7226         type.
7228         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
7229         * call.c (build_object_call): Also support references to functions.
7230         * typeck.c (convert_for_initialization): Don't decay a function
7231         if the target is a reference to function.
7233         * search.c (add_conversions): Get all the overloads from a class.
7235         * decl.c (grok_ctor_properties): Complain about any constructor
7236         that will take a single arg of the class type by value.
7238         * typeck2.c (build_functional_cast): Can't create objects of
7239         abstract classes this way.
7240         * cvt.c (ocp_convert): Likewise.
7242         * decl.c (grokfndecl): Member functions of local classes are not
7243         public.
7245 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
7247         * Make-lang.in (cc1plus): Add dependency on hash.o.
7249 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
7251         * search.c (get_abstract_virtuals): Complain about virtuals with
7252         no final overrider.
7253         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
7254         with no final overrider.
7255         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
7256         on virtuals with no final overrider.
7258         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
7260         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
7261         after layout_type.
7263         * friend.c (do_friend): Don't set_mangled_name_for_decl.
7265         * class.c (finish_struct_anon): Complain about non-fields.
7266         * decl2.c (build_anon_union_vars): Likewise.
7268         * decl.c (grokdeclarator): Normal data members can't have the same
7269         name as the class, either.
7270         * class.c (finish_struct_anon): Neither can members of an
7271         anonymous union.
7273 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
7275         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
7276         (TYPE_BINFO): Likewise.
7277         (IS_AGGR_TYPE): Tweak.
7278         (SET_IS_AGGR_TYPE): New macro.
7279         (CLASS_TYPE_P): Tweak.
7280         (lang_type): Group mark bitfields together.  Remove linenum.
7281         (CLASSTYPE_SOURCE_LINE): Remove macro.
7282         (CLASSTYPE_MARKED_N): New macro.
7283         (SET_CLASSTYPE_MARKED_N): Likewise.
7284         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
7285         (CLASS_TYPE_MARKED_*): Use them.
7286         (SET_CLASSTYPE_MARKED_*): Likewise.
7287         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
7288         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
7289         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
7290         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
7291         * class.c (class_cache_obstack): New variable.
7292         (class_cache_firstobj): Likewise.
7293         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
7294         (pushclass): Free the cache, when appropriate.
7295         (popclass): Tidy.
7296         (maybe_push_cache_obstack): Use class_cache_obstack.
7297         * decl.c (include hash.h).
7298         (typename_hash): New function.
7299         (typename_compare): Likewise.
7300         (build_typename_type): Check the hash table to avoid creating
7301         duplicates.
7302         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
7303         (grokdeclarator): Use CLASS_TYPE_P.
7304         (xref_basetypes): Likewise.
7305         (start_function): Likewise.  Don't put current_class_ref on the
7306         permanent obstack.
7307         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
7308         and TYPE_TI_ARGS.
7309         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
7310         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
7311         fields for types other than class types.  Do clear TYPE_ALIAS_SET
7312         for types other than class types, though.
7313         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
7314         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7315         * pt.c (process_template_parm): Don't set
7316         CLASSTYPE_GOT_SEMICOLON.
7317         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7318         Coerce arguments on the momentary obstack.
7319         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7320         (instantiate_class_template): Calculate template arguments on the
7321         momentary obstack.  Tidy.
7322         (tsubst_template_arg_vector): Use make_temp_vec.
7323         (tsubst_aggr_type): Put template arguments on the momentary
7324         obstack.
7325         (tsubst_decl): Likewise.
7326         (tsubst): Copy the array bounds index to the permanent obstack
7327         before building index types.  Use new macros.
7328         (unify): Use new macros.
7329         (do_type_instantiation): Likewise.
7330         * search.c (lookup_fnfields_1): Use new macros.
7331         (dfs_pushdecls): Build envelopes on the cache obstack.
7332         (dfs_compress_decls): Use new macros.
7333         (push_class_decls): Build on the cache obstack.
7334         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
7335         * sign.c (build_signature_pointer_or_reference_type): Use
7336         SET_IS_AGGR_TYPE.
7337         * tree.c (make_binfo): Check CLASS_TYPE_P.
7338         (copy_template_template_parm): Adjust.
7339         (make_temp_vec): Use push_expression_obstack.
7340         * typeck.c (complete_type): Use new macros.
7341         (comptypes): Likewise.
7343 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
7345         * pt.c (tsubst): Add diagnostics for invalid array, reference
7346         and pointer to member types.
7348 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
7350         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
7352         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
7353         Simplify.
7355         * parse.y (structsp): Fix cut-and-paste error.
7357         * init.c (build_new): Complain about non-integral size.
7359         * parse.y (unary_expr): Complain about defining types in sizeof.
7361         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
7363         * rtti.c (build_x_typeid): Complain about typeid without
7364         including <typeinfo>.
7365         (get_typeid): Likewise.  Complain about typeid of incomplete type.
7366         (get_tinfo_fn_dynamic): Likewise.
7367         (get_typeid_1): Not static anymore.
7368         * except.c (build_eh_type_type): Use get_typeid_1.
7370         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
7371         ambiguous or private bases.  Fix warning for reference cast.
7373 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
7375         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
7376         * decl.c (duplicate_decls): Remove special-case code to deal with
7377         template friends, and just do the obvious thing.
7378         * pt.c (register_specialization): Tweak for clarity, and also to
7379         clear DECL_INITIAL for an instantiation before it is merged with a
7380         specialization.
7381         (check_explicit_specialization): Fix indentation.
7382         (tsubst_friend_function): Handle both definitions in friend
7383         declaration and outside friend declarations.
7384         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
7385         (regenerate_decl_from_template): Tweak accordingly.
7386         (instantiate_decl): Likewise.
7388 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
7390         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
7391         member function reference to error.
7392         * cvt.c (ocp_convert): Complain about converting an overloaded
7393         function to void.
7395         * init.c (build_offset_ref): Just return a lone static member
7396         function.
7398         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
7399         not internal ones.
7401         * typeck.c (build_binary_op_nodefault): Improve error handling.
7403         * decl.c (grokfndecl): Complain about making 'main' a template.
7405         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
7407         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
7408         TYPE_DECL in a template.
7410 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
7412         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
7414         * decl.c (struct cp_function): Add named_label_uses.
7415         (push_cp_function_context): Save it.
7416         (pop_cp_function_context): Restore it.
7417         (define_label): Also complain about jumping into the scope of
7418         non-POD objects that don't have constructors.
7419         * tree.c (pod_type_p): New fn.
7421         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
7422         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
7423         (get_tinfo_fn): Not here.
7424         * repo.c (repo_get_id): Abort if we get called for an incomplete
7425         type.
7427 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
7429         * except.c (expand_throw): Make sure first argument to
7430         __cp_push_exception is of type `void*' to avoid spurious error
7431         messages.
7433 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
7435         * pt.c (try_one_overload): Take orig_targs again.  Only check for
7436         mismatches against them; we don't care what a previous call found.
7437         (resolve_overloaded_unification): Adjust.
7439         * search.c (lookup_field): Don't return anything for a non-type
7440         field from a dependent type.
7441         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
7442         in an array declarator.
7443         (start_decl): Push into the class before looking for the field.
7445 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
7447         * method.c (build_overload_value): Handle REFERENCE_TYPE.
7449 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7451         * decl.c (grokdeclarator): Allow namespace-scoped members if they
7452         are friends.
7454 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
7456         * pt.c (tsubst_decl): Don't mess with the global value of an
7457         un-mangled DECL_ASSEMBLER_NAME.
7459 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
7461         * decl.c (init_decl_processing): Remove CYGWIN conditional
7462         since CYGWIN is now able to deal with trapping signals.
7464 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7466         * cp-tree.h: Don't include gansidecl.h.
7467         * exception.cc: Include gansidecl.h (since we don't include config.h)
7468         * g++spec.c: Don't include gansidecl.h.
7470 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
7472         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
7473         size of dummy.
7474         (DECL_DEFINED_IN_CLASS_P): New macro.
7475         (TEMPLATE_PARMS_FOR_INLINE): Document.
7476         (check_static_variable_definition): New function.
7477         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
7478         appropriate.
7479         (check_static_variable_definition): Split out from ...
7480         (grokdeclarator): Here.
7481         * pt.c (check_default_tmpl_args): New function, split out from ...
7482         (push_template_decl_real): Here.
7483         (instantiate_template): Fix comment.
7485 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
7487         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
7488         (CP_TYPE_VOLATILE_P): Likewise.
7489         (CP_TYPE_RESTRICT_P): Likewise.
7491 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
7493         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
7495 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
7497         * class.c (instantiate_type): Be more helpful.
7499         * decl2.c (import_export_decl): Call import_export_class.
7501         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
7502         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
7503         * pt.c (tsubst_copy): Likewise.
7505 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
7507         * init.c (expand_vec_init): Fix off-by-one error.
7509 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
7511         * parse.y (apparent_template_type): New type.
7512         (named_complex_class_head_sans_basetype): Use it.
7513         * Makefile.in (CONFLICTS): One new conflict.
7514         * parse.c: Regenerated.
7516 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
7518         * cp-tree.h (COMPARE_STRICT): New macro.
7519         (COMPARE_BASE): Likewise.
7520         (COMPARE_RELAXED): Likewise.
7521         (COMPARE_REDECLARATION): Likewise.
7522         (same_type_p): Likewise.
7523         (same_or_base_type_p): Likewise.
7524         * call.c (standard_conversion): Use them, in place of comptypes
7525         with numeric arguments.
7526         (reference_binding): Likewise.
7527         (convert_like): Likewise.
7528         (build_over_call): Likewise.
7529         (is_subseq): Likewise.
7530         (is_properly_derived_from): Likewise.
7531         (compare_ics): Likewise.
7532         (joust): Likewise.
7533         * class.c (delete_duplicate_fields_1): Likewise.
7534         (resolves_to_fixed_type_p): Likewise.
7535         (instantiate_type): Likewise.  Remove #if 0'd code.
7536         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
7537         (pushdecl): Likewise.
7538         (lookup_name_real): Likewise.
7539         (grokdeclarator): Likewise.  Check for illegal array declarations.
7540         (grokparms): Likewise.
7541         (grok_op_properties): Likewise.
7542         * decl2.c (check_classfn): Likewise.
7543         * friend.c (is_friend): Likewise.
7544         (make_friend_class): Likewise.
7545         * init.c (expand_aggr_init): Likewise.
7546         (expand_vec_init): Likewise.
7547         * pt.c (is_member_template_class): Remove declaration.
7548         (is_specialization_of): Use COMPARE_* and new macros.
7549         (comp_template_parms): Likewise.
7550         (convert_nontype_argument): Likewise.
7551         (coerce_template_template_parms): Likewise.
7552         (template_args_equal): Likewise.
7553         (lookup_template_class): Likewise.
7554         (type_unification_real): Likewise.
7555         (unify): Likewise.
7556         (get_bindings_real): Likewise.
7557         * search.c (covariant_return_p): Likewise.
7558         (get_matching_virtual): Likewise.
7559         * sig.c (match_method_types): Likewise.
7560         * tree.c (vec_binfo_member): Likewise.
7561         (cp_tree_equal): Likewise.
7562         * typeck.c (common_type): Likewise.
7563         (comp_array_types): Likewise.  Get issues involving unknown array
7564         bounds right.
7565         (comptypes): Update comments.  Use new flags.
7566         (comp_target_types): Use new macros.
7567         (compparms): Likewise.
7568         (comp_target_parms): Likewise.
7569         (string_conv_p): Likewise.
7570         (build_component_ref): Likewise.
7571         (build_indirect_ref): Likewise.
7572         (build_conditional_expr): Likewise.
7573         (build_static_cast): Likewise.
7574         (build_reinterpret_cast): Likewise.
7575         (build_const_cast): Likewise.
7576         (build_modify_expr): Likewise.
7577         (convert_for_assignment): Likewise.
7578         (comp_ptr_ttypes_real): Likewise.
7579         (ptr_reasonably_similar): Likewise.
7580         (comp_ptr_ttypes_const): Likewise.
7582 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
7584         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
7586 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
7588         * decl2.c (delete_sanity): Pass integer_zero_node, not
7589         integer_two_node, to build_vec_delete.
7590         * init.c (build_array_eh_cleanup): Remove.
7591         (expand_vec_init_try_block): New function.
7592         (expand_vec_init_catch_clause): Likewise.
7593         (build_vec_delete_1): Don't deal with case that auto_delete_vec
7594         might be integer_two_node anymore.
7595         (expand_vec_init): Rework for initialization-correctness and
7596         exception-correctness.
7597         * typeck2.c (process_init_constructor): Make mutual exclusivity
7598         of cases more obvious.
7600 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
7602         * decl.c (lookup_name_real): OK, only warn if not lexing.
7603         Simplify suggested fix.
7605         * cp-tree.h (IDENTIFIER_MARKED): New macro.
7606         * search.c (lookup_conversions): Use breadth_first_search.
7607         (add_conversions): Avoid adding two conversions to the same type.
7608         (breadth_first_search): Work with base binfos, rather
7609         than binfos and base indices.
7610         (get_virtual_destructor): Adjust.
7611         (tree_has_any_destructor_p): Adjust.
7612         (get_matching_virtual): Adjust.
7614         * pt.c (push_template_decl_real): Generalize check for incorrect
7615         number of template parms.
7616         (is_member_template_class): #if 0.
7618 1998-10-29  Richard Henderson  <rth@cygnus.com>
7620         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
7621         last.
7623 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
7625         * lex.c: Call check_newline from lang_init always.  After
7626         calling cpp_start_read, set yy_cur and yy_lim to read from the
7627         cpplib token buffer.
7629 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
7631         * class.c (instantiate_type): Don't consider templates for a normal
7632         match.
7634         * class.c (finish_struct_1): Don't complain about non-copy
7635         assignment ops in union members.
7637         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
7638         (prepare_fresh_vtable): Likewise.
7639         (finish_struct_1): Don't call import_export_class.
7640         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
7641         (finish_prevtable_vardecl): Lose.
7642         (finish_file): Don't call it.
7643         * pt.c (instantiate_class_template): Likewise.
7644         * cp-tree.h: Remove it.
7646         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
7647         * decl.c (finish_function): Not here.
7648         (start_function): Do set DECL_INITIAL.
7650         * pt.c (push_template_decl_real): Complain about default template
7651         args for enclosing classes.
7653         * call.c (add_function_candidate): Treat conversion functions
7654         as coming from the argument's class.
7655         * cp-tree.h (DECL_CONV_FN_P): New fn.
7656         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
7657         * class.c (add_method): Use DECL_CONV_FN_P.
7658         * decl2.c (check_classfn): Likewise.
7659         * error.c (dump_function_name): Likewise.
7660         (dump_function_decl): Likewise.
7661         * pt.c (fn_type_unification): Likewise.
7662         * search.c (add_conversions): Likewise.
7664 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
7666         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
7667         * method.c (hack_identifier): Also check for using RESULT_DECL
7668         from outer context.
7670 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
7672         * decl.c (grokdeclarator): Use type_quals, rather than constp,
7673         consistently.
7675 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
7677         * call.c (standard_conversion): instantiate_type here.
7678         (reference_binding): And here.
7679         (implicit_conversion): Not here.
7680         (build_op_delete_call): No need to cons up an OVERLOAD.
7681         * cvt.c (cp_convert_to_pointer): instantiate_type here.
7682         (convert_to_reference): And here.
7683         * decl.c (grok_reference_init): Not here.
7684         (grokparms): Or here.
7685         * typeck2.c (digest_init): Or here.
7686         * typeck.c (decay_conversion): Take the address of overloaded
7687         functions, too.
7688         (require_instantiated_type): Lose.
7689         (convert_arguments): Don't handle unknown types here.
7690         (build_c_cast): Likewise.
7691         (build_binary_op): Gut.
7692         (build_conditional_expr): Don't require_instantiated_type.
7693         (build_modify_expr): Likewise.
7694         (build_static_cast): Don't instantiate_type.
7695         (build_reinterpret_cast): Likewise.
7696         (build_const_cast): Likewise.
7697         (convert_for_initialization): Likewise.
7698         (build_ptrmemfunc): Use type_unknown_p.
7699         (convert_for_assignment): Also do default_conversion on overloaded
7700         functions.  Hand them off to ocp_convert.
7702 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
7704         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
7705         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
7707         * class.c (finish_struct_1): Use build_cplus_array_type to build
7708         array types.
7709         * decl.c (init_decl_processing): Likewise.
7710         * except.c (expand_end_eh_spec): Likewise.
7711         * search.c (expand_upcast_fixups): Simplify very slightly.
7713 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
7715         * decl.c (grokdeclarator): Complain about a variable using
7716         constructor syntax coming back null from start_decl.
7718         * friend.c (make_friend_class): Complain about trying to make
7719         a non-class type a friend.
7721         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
7722         (start_function): Not here.
7724 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
7726         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
7728 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
7730         * typeck2.c (process_init_constructor): Only skip anonymous fields
7731         if they are bitfields.
7733         * cp-tree.def (TYPEOF_TYPE): New code.
7734         * error.c (dump_type_real): Handle it.
7735         * pt.c (tsubst): Likewise.
7736         * tree.c (search_tree): Likewise.
7737         * semantics.c (finish_typeof): New fn.
7738         * parse.y (typespec): Use it.
7739         * cp-tree.h: Declare it.
7741 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
7743         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
7745 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
7747         * typeck.c (convert_arguments): Don't handle pmf references
7748         specially.
7750         * init.c (build_member_call): Don't try to convert to the base type
7751         if it's ambiguous or pedantic.
7753         * typeck2.c (check_for_new_type): Only depend on pedantic for
7754         C-style casts.
7756 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
7758         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
7759         non-converting constructors.
7761 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7763         * gxxint.texi: Correct documentation for n, N, Q, and B.
7765 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7767         * parse.y (condition): Convert VAR_DECL from reference to indirect
7768         reference.
7770 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
7772         * exception.cc (__cp_pop_exception): Free the original exception
7773         value, not the potentially coerced one.
7775 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
7777         * Makefile.in (hash.h): Run gperf when necessary.
7779         * cp-tree.h (CP_TYPE_READONLY): Remove.
7780         (CP_TYPE_VOLATILE): Likewise.
7781         (CP_TYPE_QUALS): New macro.
7782         (CP_TYPE_CONST_P): Likewise.
7783         (CP_TYPE_VOLATILE_P): Likewise.
7784         (CP_TYPE_RESTRICT_P): Likewise.
7785         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
7786         (cp_build_type_variant): Rename to ...
7787         (cp_build_qualified_type): New function.
7788         (c_apply_type_quals_to_decl): Declare.
7789         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
7790         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
7791         (cp_type_qual_from_rid): New function.
7792         (compparms): Remove unused parameter.  All callers changed.
7793         (cp_type_quals): New function.
7794         (at_least_as_qualified_p): Likewise.
7795         (more_qualified_p): Likewise.
7797         * call.c (standard_conversion): Replace calls to
7798         cp_build_type_variant with cp_build_qualified_type.  Use
7799         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
7800         compare them.  Use CP_TYPE_* macros to check qualifiers.
7801         (reference_binding): Likewise.
7802         (implicit_conversion): Likewise.
7803         (add_builtin_candidates): Likewise.
7804         (build_over_call): Likewise.
7805         * class.c (overrides): Compare all qualifiers, not just `const',
7806         on method declarations.
7807         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
7808         (convert_pointer_to_real): Likewise.
7809         (type_promotes_to): Likewise.
7810         * decl.c (check_for_uninitialized_const_var): New function.
7811         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
7812         (cp_finish_decl): Use check_for_uninitialized_const_var.
7813         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
7814         handle `restrict'.
7815         (grok_ctor_properties): Likewise.
7816         (grok_op_properties): Likewise.
7817         (start_function): Likewise.
7818         (rever_static_member_fn): Likewise.
7819         * decl2.c (grok_method_quals): Likewise.
7820         (grokfield): Likewise.
7821         * error.c (dump_readonly_or_volatile): Rename to ...
7822         (dump_qualifiers): New function.  Handle `restrict'.
7823         (dump_type_real): Use it.
7824         (dump_aggr_type): Likewise.
7825         (dump_type_prefix): Likewise.
7826         (dump_type_suffix): Likewise.
7827         (dump_function_decl): Likewise.
7828         (cv_as_string): Likewise.
7829         * gxx.gperf: Add __restrict and __restrict__.
7830         * gxxint.texi: Document `u' as used for `__restrict', and a few
7831         other previously undocumented codes.
7832         * hash.h: Regenerated.
7833         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
7834         (build_member_call): Likewise.
7835         (build_new_1): Likewise.
7836         * lex.c (init_parse): Add entry for RID_RESTRICT.
7837         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
7838         (cp_type_qual_from_rid): Define.
7839         * lex.h (enum rid): Add RID_RESTRICT.
7840         * method.c (process_modifiers): Deal with `restrict'.
7841         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
7842         * parse.c: Regenerated.
7843         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
7844         (tsubst_aggr_type): Likewise.
7845         (tsubst): Likewise.
7846         (check_cv_quals_for_unify): Likewise.
7847         (unify): Likewise.
7848         * rtti.c (init_rtti_processing): Likewise.
7849         (build_headof): Likewise.
7850         (get_tinfo_var): Likewise.
7851         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
7852         (expand_class_desc): Likewise.
7853         (expand_attr_desc): Likewise.
7854         (synthesize_tinfo_fn): Likewise.
7855         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
7856         (get_matching_virtual): Likewise.
7857         (expand_upcast_fixups): Likewise.
7858         * sig.c (build_signature_pointer_or_reference_name): Take
7859         type_quals, not constp and volatilep.
7860         (build_signature_pointer_or_reference_type): Likewise.
7861         (match_method_types): More CP_TYPE_QUALS conversion, etc.
7862         (build_signature_pointer_constructor): Likewise.
7863         (build_signature_method_call): Likewise.
7864         * tree.c (build_cplus_array_type): Likewise.
7865         (cp_build_type_variant): Rename to ...
7866         (cp_build_qualified_type): New function.  Deal with `__restrict'.
7867         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
7868         (build_exception_variant): Likewise.
7869         (mapcar): Likewise.
7870         * typeck.c (qualif_type): Likewise.
7871         (common_type): Likewise.
7872         (comptypes): Likewise.
7873         (comp_cv_target_types): Likewise.
7874         (at_least_as_qualified_p): Define.
7875         (more_qualified_p): Likewise.
7876         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
7877         (compparms): Likewise.
7878         (inline_conversion): Likewise.
7879         (string_conv_p): Likewise.
7880         (build_component_ref): Likewise.
7881         (build_indirect_ref): Likewise.
7882         (build_array_ref): Likewise.
7883         (build_unary_op): Likewise.
7884         (build_conditional_expr): Likewise.
7885         (build_static_cast): Likewise.
7886         (build_c_cast): Likewise.
7887         (build_modify_expr): Likewise.
7888         (convert_For_assignment): Likewise.
7889         (comp_ptr_ttypes_real): Likewise.
7890         (cp_type_quals): New function.
7892 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
7894         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
7895         (CP_TYPE_VOLATILE): Likewise.
7896         * decl.c (grokdeclarator): Use them.
7897         * tree.c (canonical_type_variant): Likewise.
7899 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7901         * parse.y (named_class_head): Push into class while parsing the
7902         base class list.
7903         * decl2.c (push_scope, pop_scope): New functions.
7904         * cp-tree.h: Declare them.
7905         * init.c (build_new_1): Delay cleanup until end of full expression.
7907 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
7909         * typeck.c (build_component_ref): Use of a type here is an error.
7911 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
7913         Revamp references to member functions.
7914         * method.c (hack_identifier): Call build_component_ref for a
7915         reference to a member function.
7916         * typeck.c (build_component_ref): Only return a single function
7917         if it's static.  Otherwise, return a COMPONENT_REF.
7918         (build_x_function_call): Handle a COMPONENT_REF.
7919         (build_unary_op): Handle all unknown-type things.
7920         * decl2.c (arg_assoc): Handle COMPONENT_REF.
7921         * class.c (instantiate_type): Complain if the function we get is a
7922         nonstatic member function.  Remove code for finding "compatible"
7923         functions.
7924         * pt.c (tsubst_copy): Handle NOP_EXPR.
7925         * tree.c (build_dummy_object): New fn.
7926         (maybe_dummy_object): New fn.
7927         (is_dummy_object): New fn.
7928         * cp-tree.h: Declare them.
7929         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
7930         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
7931         * init.c (build_member_call): Use maybe_dummy_object and
7932         is_dummy_object.
7933         (build_offset_ref): Use maybe_dummy_object.
7934         (resolve_offset_ref): Use is_dummy_object.
7935         * typeck.c (build_x_function_call): Call build_dummy_object.
7936         (unary_complex_lvalue): Call is_dummy_object.
7938         * typeck.c (build_component_addr): Make sure field is a field.
7940         * call.c (build_new_op): Delete obsolete code.
7942         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
7944 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7946         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
7947         std if std is ignored.
7949 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
7951         * decl.c (grokvardecl): Fix thinko.
7953         * decl.c (grokdeclarator): Embedded attrs bind to the right,
7954         not the left.
7956         * parse.y (fn.def2): Fix 'attrs' format.
7958 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
7960         * Makefile.in (CONFLICTS): Update.
7961         * parse.y (expr_or_declarator_intern): New rule.
7962         (expr_or_declarator, direct_notype_declarator, primary,
7963         functional_cast): Use it.
7964         (notype_declarator_intern): New rule.
7965         (notype_declarator, complex_notype_declarator): Use it.
7967 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
7969         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
7970         (grokvardecl): Likewise.
7972 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7974         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
7975         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
7977         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
7979         * pt.c (process_partial_specialization): Cast 1st argument of
7980         `bzero' to (PTR).
7982         * tree.c (build_base_fields): Cast `base_align' to (int) when
7983         comparing against one.
7985 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
7987         * decl.c (lookup_name_real): Handle template parameters for member
7988         templates where said parameters have the same name as the
7989         surrounding class.
7991         * decl.c (expand_static_init): Build cleanups before entering the
7992         anonymous function used to do them to avoid access-checking
7993         confusion.
7995         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
7996         accidentally removed by previous change, and make DECL_RTL here.
7997         * class.c (add_method): Don't make DECL_RTL here.
7999         * pt.c (for_each_template_parm): Don't examine uninstantiated
8000         default arguments.
8002 1998-10-16  Dave Brolley  <brolley@cygnus.com>
8004         * lex.c (real_yylex): Fix unaligned access of wchar_t.
8006 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
8008         * class.c (add_method): Fix documentation to reflect previous
8009         changes.  Check for duplicate method declarations here.
8010         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
8011         correctly; such things never match.
8012         (grokfndecl): Don't look for duplicate methods here.
8013         * decl2.c (check_classfn): Don't assume names are mangled.
8014         Don't add bogus member function declarations to a class before the
8015         class type is complete.
8016         (grokfield): Reformat error message.
8017         * method.c (set_mangled_name_for_decl): Don't mangle names while
8018         processing_template_decl.
8020 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
8022         * typeck.c (build_indirect_ref): Complain about a pointer to data
8023         member, too.
8024         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
8025         data member.
8026         * init.c (resolve_offset_ref): Don't undo the above.
8028         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
8029         (struct lang_decl_flags): Add `bitfield'.
8030         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
8031         DECL_BIT_FIELD.
8032         * decl2.c (grokbitfield, grok_alignof): Likewise.
8033         * init.c (build_offset_ref): Likewise.
8034         * typeck.c (build_component_addr, expr_sizeof): Likewise.
8035         * cvt.c (build_up_reference): Don't crash if taking the address
8036         returns error_mark_node.
8038         * decl.c (grokfndecl): Also check ctype when checking for ::main().
8040 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
8042         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
8043         Do mangling here.
8044         (grokdeclarator): Instead of here.
8045         * friend.c (do_friend): Lose special handling of ::main and
8046         __builtin_*.
8047         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
8049         * spew.c (yylex): Clear looking_for_typename if we got
8050         'enum { ... };'.
8052 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
8054         * class.c (maybe_warn_about_overly_private_class): Improve error
8055         messages for class with only private constructors.
8057         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
8058         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
8059         (build_typename_type): New function.
8060         * decl.c (build_typename_type): Broken out from ...
8061         (make_typename_type): Use it.
8062         * search.c (lookup_field): Likewise.
8064 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
8066         * pt.c (convert_nontype_argument): Check against type_referred_to.
8067         * decl.c (grokvardecl): Check for declarator name before building
8068         DECL_ASSEMBLER_NAME.
8070 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
8072         * pt.c (lookup_template_class): Add comment.
8073         (instantiate_class_template): Don't mark the _TYPE node for
8074         member class templates as an instantiation.
8076 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
8078         * decl.c (grokfndecl): Fix my thinko.
8080 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
8082         * tinfo2.cc (fast_compare): Remove.
8083         (before): Just use strcmp.
8084         * tinfo.cc (operator==): Just use strcmp.
8086 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
8088         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
8089         declarations.
8091 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
8093         * cp-tree.h (specializations_of_same_template_p): Remove.
8094         * search.c (get_template_base): Don't use it.
8095         (get_template_base_recursive): Likewise.
8096         * pt.c (specializations_of_same_template_p): Remove.
8097         (unify): Don't use it.
8098         (lookup_template_class): Find the correct parent when setting
8099         CLASSTYPE_TI_TEMPLATE.
8101 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
8103         * tinfo.cc (operator==): Always compare names.
8105 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
8107         * decl.c (start_function): Fix cut-and-paste error.
8109 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
8111         * inc/typeinfo: Add #pragma interface.
8112         (operator!=): Just call operator==.
8113         * tinfo.cc: Add #pragma implementation.
8114         (operator==): Move from inc/typeinfo and tinfo2.cc.
8115         Check __COMMON_UNRELIABLE instead of _WIN32.
8117         * typeck2.c (my_friendly_abort): Add URL.
8119 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
8121         * decl.c (start_method): Added extra parameter for attributes.
8122         * cp-tree.h (start_method): Update prototype.
8123         * parse.y (fn.def2): Update start_method parameter list.
8125 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
8127         * cp-tree.h (specializations_of_same_template_p): Declare.
8128         * pt.c (specializations_of_same_template_p): New function.
8129         (unify): Use it.
8130         * search.c (get_template_base): Use it.
8131         (get_template_base_recursive): Likewise.
8133 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
8135         * decl2.c (start_objects): Add new variable `joiner' and
8136         initialize it properly.
8138 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
8140         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
8141         change to vtable types.
8143         * cvt.c (ocp_convert): Avoid infinite recursion caused by
8144         1998-10-03 change.
8146 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
8148         * pt.c (resolve_overloaded_unification): New fn.
8149         (try_one_overload): Likewise.
8150         (unify): Don't fail on unknown type.
8151         (type_unification_real): Likewise.  Use resolve_overloaded_unification
8152         to handle an overloaded argument.
8153         (template_args_equal): Split out...
8154         (comp_template_args): From here.
8155         (determine_specialization): Also allow a template with more
8156         parms than were explicitly specified.
8157         * cp-tree.h: Add template_args_equal.
8158         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
8160 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
8162         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
8163         change.
8165 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
8167         * typeck.c (unsigned_type): Only return TItype nodes when
8168         HOST_BITS_PER_WIDE_INT is >= 64 bits.
8169         (signed_type): Likewise.
8170         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
8171         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
8172         (init_decl_processing): Only create TItype nodes when
8173         HOST_BITS_PER_WIDE_INT is >= 64 bits.
8174         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
8175         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
8177 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8179         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
8180         (gxx.gperf): Update comments describing invocation flags.
8181         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
8183 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
8185         * class.c (finish_struct_1): Add commentary on previous change.
8187         * cp-tree.h (vtbl_ptr_type_node): New variable.
8188         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
8189         already of the right type.
8190         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
8191         Simplify code to grow vtable.
8192         * decl.c (vtbl_ptr_type_node): Define.
8193         (init_decl_processing): Initialize it.
8195 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
8197         * cp-tree.def (PTRMEM_CST): New tree node.
8198         * cp-tree.h (ptrmem_cst): New type.
8199         (lang_type): Remove local_typedecls.
8200         (dummy): Increase to 12 bits from 11.
8201         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
8202         (PTRMEM_CST_CLASS): New macro.
8203         (PTRMEM_CST_MEMBER): Likewise.
8204         (current_access_specifier): New variable.
8205         (current_class_type): Remove duplicate declaration.
8206         (finish_struct): Change prototype.
8207         (unreverse_member_declarations): New function.
8208         (pushdecl_class_level): Change prototype.
8209         (grok_enum_decls): Remove.
8210         (fixup_anonymous_union): New function.
8211         (grok_x_components): Change prototype.
8212         (tsubst_chain): Remove.
8213         (finish_member_template_decl): Likewise.
8214         (check_explicit_specialization): Fix indentation.
8215         (finish_class_definition): Change prototype.
8216         (finish_member_class_template): Likewise.
8217         (finish_member_declaration): New function.
8218         (check_multiple_declarators): Likewise.
8219         * class.c (class_stack_node_t): New type.
8220         (current_class_base): Remove.
8221         (current_class_stack): Change type.
8222         (current_access_specifier): New variable.
8223         (grow_method): Remove.
8224         (check_member_decl_is_same_in_complete_scope): Break out from
8225         finish_struct.
8226         (make_method_vec): New function.
8227         (free_method_vec): Likewise.
8228         (add_implicitly_declared_members): Break out from finish_struct_1.
8229         (free_method_vecs): New variable.
8230         (add_method): Rework for direct use from parser.
8231         (handle_using_decl): Watch for NULL_TREE while iterating through
8232         CLASSTYPE_METHOD_VEC.
8233         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
8234         just do some error-checking.
8235         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
8236         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
8237         (finish_struct): Change prototype.  Simplify; fields and methods
8238         are already set up at this point.
8239         (init_class_processing): Set up current_class_stack.
8240         (pushclass): Save current_access_specifier.
8241         (popclass): Restore it.
8242         (currently_open_class): Simplify.
8243         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
8244         * decl.c (saved_scope): Add access_specifier.
8245         (maybe_push_to_top_level): Save it.
8246         (pop_from_top_level): Restore it.
8247         (maybe_process_template_type_declaration): Use
8248         finish_member_declaration.
8249         (pushtag): Likewise.
8250         (pushdecl_class_level): Don't return a value.
8251         (fixup_anonymous_union): Break out from grok_x_components.
8252         (shadow_tag): Use it.
8253         (xref_tag): Complain about using an elaborated type specifier to
8254         reference a template type parameter or typedef name.
8255         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
8256         (current_local_enum): Remove.
8257         (build_enumerator): Call finish_member_declaration.
8258         (grok_enum_decls): Remove.
8259         * decl2.c (grok_x_components): Simplify.
8260         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
8261         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
8262         (merge_functions): Add to comment.
8263         (arg_assoc_type): Prototype.
8264         (arg_assoc): Pass as many arguments as there are parameters.
8265         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
8266         OFFSET_REF.
8267         * expr.c (cpls_expand_expr): Remove dead code.  Handle
8268         PTRMEM_CST.
8269         * friend.c (do_friend): Lookup friends when in nested classes.
8270         Change comments.
8271         * init.c (build_offset_ref): Do lookup even for classes that are
8272         only partially defined.
8273         (decl_constant_value): Remove dead code.
8274         * method.c (build_overload_value): Remove hack where by TYPE was
8275         not a TYPE.  Handle PTRMEM_CST.
8276         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
8277         should go.
8278         * parse.y (components, notype_components, component_decl,
8279         component_decl_1, component_declarator, component_declarator0):
8280         Now all are itype rather than ttype.  Rework to add members to
8281         classes on the fly.
8282         (typesqpecqual_reserved): Use check_multiple_declarators.
8283         (structsp): Update class to finish_class_definition.
8284         (do_xref_defn): Unsplit into named_class_head.
8285         (access_specifier): Set current_access_specifier.
8286         * pt.c (set_current_access_from_decl): New function.
8287         (finish_member_template_decl): Don't take the parameters.
8288         (comp_template_args): Make more robust.
8289         (lookup_template_class): Don't use current_local_enum.
8290         (for_each_template_parm): Handle PTRMEM_CST.
8291         (instantiate_class_template): Use set_current_access_from_decl,
8292         finish_member_declaration and unreverse_member_declarations.  Set
8293         lineno/input_filename before generating implicit member functions.
8294         (type_unification_real): Don't assume back-unification happens
8295         only for the last argument.
8296         (regenerate_decl_from_template): Call pushclass a bit earlier.
8297         (tsubst_chain): Remove.
8298         (tsubst_enum): Use set_current_access_from_decl.
8299         (set_mangled_name_for_template_decl): Fix indentation.
8300         * search.c (lookup_fnfields_1): Change iteration through
8301         CLASSTYPE_METHOD_VEC.
8302         (dfs_pushdecls): Likewise.
8303         (dfs_compress_decls): Likewise.
8304         (add_conversions): Likewise.
8305         * semantics.c (finish_class_definition): Don't take components.
8306         Change call to finish_struct.
8307         (finish_member_declaration): New function.
8308         (finish_member_class_template): Don't take template parameters.
8309         Change call to grok_x_components.  Call finish_member_template_decl.
8310         (check_multiple_declarators): New function.
8311         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
8312         a passed in fieldlist.
8313         * tree.c (search_tree): Handle PTRMEM_CST.
8314         (mapcar): Likewise.
8315         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
8316         INTEGER_CSTs, for pointer-to-data members.
8318         * call.c (resolve_args): Resolve template specializations, if
8319         possible.
8321 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8323         * Makefile.in (spew.o): Depend on toplev.h.
8325         * call.c (compare_ics): Initialize variables `deref_from_type2',
8326         `deref_to_type1' and `deref_to_type2'.
8328         * except.c (get_eh_type): Hide prototype and definition.
8329         (process_start_catch_block_old): Remove unused static prototype.
8331         * pt.c (tsubst_decl): Initialize variable `argvec'.
8333         * spew.c: Include toplev.h.
8335 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
8337         * pt.c (instantiate_decl): Do save and restore file position.
8339 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8341         * method.c (build_decl_overload_real): Clear
8342         numeric_output_need_bar after __.
8344 1998-10-05  Nathan Sidwell  <nathan@acm.org>
8346         * call.c (build_new_method_call): Issue 'incomplete type' error,
8347         if class is not defined.
8349 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8351         * call.c (build_object_call): Move declaration of variable
8352         `fn' into the scope where it is used.  Don't access variable
8353         `fn' when it is uninitialized, instead use `fns'.
8355 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
8357         * errfn.c (cp_thing): Print buf as a string not as a printf format
8358         to avoid problems with the operator%.  Consequently, `%%' sequences
8359         in format are copied as `%' in buf.
8361 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
8363         * pt.c (pop_tinst_level): Call extract_interface_info.
8364         (instantiate_decl): Don't save and restore file position.
8366         * decl.c (cp_finish_decl): Make statics in extern inlines and
8367         templates common, if possible and the target doesn't support weak
8368         symbols.
8370         * decl.c (grokdeclarator): Remove redundant calls to
8371         build_type_variant and some duplicated code.
8372         * sig.c (build_signature_reference_type): Only take the type parm.
8373         (build_signature_pointer_type): Likewise.
8374         * tree.c (build_cplus_method_type): Adjust.
8375         * cp-tree.h: Update.
8377 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
8379         * call.c (build_over_call): Make pedwarns about dropped qualifiers
8380         into full-fledged errors.
8381         * cvt.c (convert_to_reference): Likewise.
8382         * typeck.c (convert_for_assignment): Likewise.
8384         * search.c (expand_upcast_vtables): In addition to unsetting
8385         TREE_READONLY, remove top-level const type qualifier.
8387 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
8389         * class.c (current_class_ptr, current_class_ref): Clarify
8390         documentation.
8391         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
8392         NOP type conversions.
8393         * decl.c (decls_match): Use comptypes directly; ignore
8394         qualifiers on the DECL.
8395         (duplicate_decls): Remove qualifier checks on DECL.
8396         (grokdeclarator): Make the type built up include top-level
8397         qualifiers.
8398         * decl2.c (do_dtors): Fix spelling error.
8399         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
8400         when printing type information.
8401         * init.c (build_new_1): Add documentation.  Deal with the fact
8402         that type of allocated memory now contains qualifiers.
8403         * lex.c (is_global): Improve error-recovery.
8404         * sig.c (build_member_function_pointer): Don't cast away const
8405         on fields of sigtable_entry_type.
8406         * tree.c (lvalue_type): Don't look at top-level qualifiers on
8407         expressions.
8408         * typeck.c (decay_conversion): Likewise.
8409         (build_component_ref): Make sure the type of the COMPONENT_REF
8410         contains top-level qualifiers, as appropriate.  Improve
8411         error-handling.
8412         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
8413         (build_array_ref): Likewise.
8414         (build_unary_op): Improve error-recovery.
8415         (unary_complex_lvalue): Make taking the address a bound member
8416         function an error, not a sorry.
8417         (build_conditional_expr): Look at the type qualifiers, not the
8418         qualifiers on the expression itself.
8420 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
8422         * decl2.c (merge_functions): Remove duplicates.
8424         * decl2.c: Add -f{no-,}implicit-inline-templates.
8425         (import_export_decl): Check it.
8427         * decl.c (lookup_name_real): Template parms also take precedence
8428         over implicit typename.  Only warn if yylex.
8430         * typeck.c (build_conditional_expr): Only fold if ifexp is an
8431         INTEGER_CST.
8433         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
8434         instead of linkage.
8436 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
8438         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
8439         * class.c (build_vbase_pointer): Use it.
8440         * rtti.c (expand_class_desc): Likewise.
8441         * tree.c (build_vbase_pointer_fields): Likewise.
8443 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
8445         * decl.c (start_decl): Add invocation of
8446         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
8447         (start_function): Add invocation of
8448         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
8450         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
8451         HANDLE_GENERIC_PRAGMAS.
8453 1998-09-28  Anthony Green  <green@cygnus.com>
8455         * semantics.c (finish_asm_stmt): Always permit volatile asms.
8457 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
8459         * decl.c (grokdeclarator): Tighten checks for invalid
8460         destructors.  Improve error-messages and error-recovery.
8461         * decl2.c (check_classfn): Don't assume that mangled destructor
8462         names contain type information.
8464 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
8466         * search.c (get_base_distance): Remove assert.
8468         * decl2.c (build_anon_union_vars): Don't process a field with no
8469         name.
8470         (finish_anon_union): Also complain about local anon unions with no
8471         members.
8473 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8475         * decl.c (lookup_namespace_name): If the name is a namespace,
8476         return it immediately.
8478 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8480         * cp-tree.h (define_case_label): Remove unused parameter.
8481         (check_java_method): Likewise.
8482         (grokclassfn): Likewise.
8483         (expand_aggr_init): Likewise.
8484         (build_x_delete): Likewise.
8485         (maybe_end_member_template_processing): Likewise.
8486         (unshare_base_binfos): Add prototype.
8487         (string_conv_p): Likewise.
8488         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
8490         * cvt.c (build_up_reference): Remove unused parameter
8491         `checkconst', all callers changed.
8492         (build_type_conversion): Mark parameter `code' with
8493         ATTRIBUTE_UNUSED.
8494         (build_expr_type_conversion): Initialize variable `conv'.
8496         * decl.c (push_namespace): Initialize variable `d'.
8497         (define_case_label): Remove unused parameter `decl', all callers
8498         changed.
8500         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
8501         `argc' with ATTRIBUTE_UNUSED.
8502         (grokclassfn): Remove unused parameter `cname', all callers
8503         changed.
8504         (check_java_method): Likewise for parameter `ctype'.
8505         (copy_assignment_arg_p): Mark parameter `virtualp' with
8506         ATTRIBUTE_UNUSED.
8507         (finish_prevtable_vardecl): Likewise for parameter `prev'.
8509         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
8511         * init.c (expand_aggr_init_1): Remove unused parameter
8512         `alias_this', all callers changed.
8513         (expand_aggr_init): Likewise.
8514         (expand_default_init): Likewise.
8515         (build_new_1): Initialize variable `susp'.
8516         (build_x_delete): Remove unused parameter `type', all callers
8517         changed.
8519         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
8520         ATTRIBUTE_UNUSED.
8521         (readescape): Use (unsigned) value in shift.
8522         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
8523         comparing to a signed quantity.
8525         * pt.c (maybe_end_member_template_processing): Remove unused
8526         parameter `decl', all callers changed.
8527         (check_explicit_specialization): Add braces around empty body in
8528         an else-statement.
8529         (current_template_args): Initialize variable `args'.
8530         (lookup_template_class): Likewise for variable `prev_local_enum'.
8531         (tsubst_decl): Likewise for variable `r'.
8532         (set_mangled_name_for_template_decl): Initialize variable
8533         `context'.
8535         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
8536         Likewise for variable `i'.
8537         (yylex): Initialize variable `trrr'.
8539         * typeck.c (compparms): Mark variable `strict' with
8540         ATTRIBUTE_UNUSED.
8542         * xref.c (simplify_type): Cast argument of ctype function to
8543         `unsigned char'.
8545 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
8547         * cp-tree.h (language_lvalue_valid): Remove.
8548         * decl.c (grokdeclarator): Don't disallow references to functions.
8549         * tree.c (lvalue_p_1): New function, combining duplicated
8550         code from ...
8551         (lvalue_p): Use it.
8552         (real_lvalue_p): Likewise.
8553         * typeck.c (language_lvalue_valid): Remove.
8554         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
8555         they don't have TREE_READONLY set.
8556         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
8558 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
8560         * spew.c (yylex): Give diagnostic.
8561         * hash.h (is_reserved_word): Add export.
8562         * gxx.gperf: Likewise.
8563         * lex.h (rid): Add RID_EXPORT.
8564         * lex.c (init_parse): Likewise.
8566 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
8568         * friend.c (do_friend): Make warning a full sentence.
8570 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
8572         * parse.y (component_decl_list): Improve error-recovery.
8574 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
8576         * decl.c (make_typename_type): Move error to point where name
8577         variable can be used by dump_type.
8579 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
8581         * decl.c (grokfndecl): Improve error-recovery.
8582         * decl2.c (grokfield): Likewise.
8583         * pt.c (finish_member_template_decl): Likewise.
8585 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8587         * method.c (hack_identifier): Finding multiple members is always
8588         an error.
8590 1998-09-21  Per Bothner  <bothner@cygnus.com>
8592         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
8594 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
8596         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
8598 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
8600         * class.c (maybe_warn_about_overly_private_class): Reformat.
8602 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
8604         * exception.cc (__cplus_type_matcher): Realign some code.
8606 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
8608         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
8609         (tinfo2.o): Likewise.
8610         (exception.o): Likewise.
8611         (new.o): Likewise.
8612         (opnew.o): Likewise.
8613         (opnewnt.o): Likewise.
8614         (opvnew.o): Likewise.
8615         (opvnewnt.o): Likewise.
8616         (opdel.o): Likewise.
8617         (opdelnt.o): Likewise.
8618         (opvdel.o): Likewise.
8619         (opvdelnt.o): Likewise.
8621 1998-09-16  Richard Henderson  <rth@cygnus.com>
8623         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
8625 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
8627         * call.c (build_field_call): Handle static data members too.
8629         * typeck.c (comptypes): When comparing pointer types, check
8630         whether referred types match even in strictest modes.
8632 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
8634         * cp-tree.h: Revert previous change.
8635         (finish_struct_methods): Remove declaration.
8636         * class.c: Revert previous change.
8637         (maybe_warn_about_overly_private_class): New function.
8638         (finish_struct_methods): Declare here, and make static.  Remove
8639         unnecessary parameters.  Tidy slightly.  Use
8640         maybe_warn_about_overly_private_class.
8641         (finish_struct_1): Adjust.  Remove check for private constructors,
8642         now done elsewhere.
8643         (finish_struct): Adjust.
8645 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
8647         * except.c (expand_start_catch_block): No need to check for new
8648         exception model.
8649         (process_start_catch_block_old): Deleted.
8650         (process_start_catch_block): Add call to start_decl_1().
8651         (expand_end_catch_block): Add call to end_catch_handler().
8652         * exception.cc (__cplus_type_matcher): Only check the exception
8653         language if there is an exception table.
8655 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
8657         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
8658         as used to prevent conflicts with virtual function tables.
8660 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
8662         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
8663         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
8664         * class.c (maybe_class_too_private_p): New function.
8665         (finish_struct_methods): Use it.
8666         (finish_struct_1): Likewise.
8667         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
8668         appropriate.
8670         * pt.c (check_specialization_scope): Fix spelling error.
8671         (check_explicit_specialization): Remove code to handle explicit
8672         specializations in class scope; they are now correctly diagnosed
8673         as errors.
8675 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
8677         * decl.c (pushdecl): Don't copy types if the
8678         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
8679         type.
8681 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8683         * class.c (get_enclosing_class): New function.
8684         (is_base_of_enclosing_class): Likewise.
8685         * cp-tree.h (get_enclosing_class): Declare.
8686         (is_base_of_enclosing_class): Likewise.
8687         * pt.c (coerce_template_parms): Use them.
8689 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
8691         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
8692         null to decide whether to use it.
8694         * error.c (dump_type_real): Handle NAMESPACE_DECL.
8695         * parse.y (base_class.1): Avoid crash on error.
8697 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8699         * decl.c (make_typename_type): If context is a namespace, the code
8700         is in error.
8702 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
8704         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
8706 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
8708         * cp-tree.h (anonymous_namespace_name): Declare.
8709         * decl.c: Define it.
8710         (push_namespace): Use anonymous_namespace_name, rather than local
8711         static anon_name.
8712         * error.c (dump_decl): If a namespace is named
8713         anonymous_namespace_name, call it {anonymous}.
8715         * decl.c (grokparms): Distinguish between references and pointers
8716         in error message.
8718 1998-09-08  Richard Henderson  <rth@cygnus.com>
8719             Mark Mitchell  <mark@markmitchell.com>
8721         * pt.c (process_partial_specialization): Consistently allocate
8722         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
8723         tpd.parms, where appropriate.
8725 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
8727         * Makefile.in (INCLUDES): Update after recent toplevel gcc
8728         reorganizations.
8730 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
8732         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
8733         * class.c (finish_struct): Remove hackery to deal with explicit
8734         specializations in class scope.
8735         * decl.c (grokfndecl): Improve error-recovery.
8736         * decl2.c (grokfield): Likewise.
8737         * pt.c (check_specialization_scope): New function.
8738         (begin_specialization): Call it.
8739         (process_partial_specialization): New function, split out from
8740         push_template_decl.  Check partial specializations more
8741         stringently.
8742         (push_template_decl): Call it.
8743         (check_explicit_specialization): Don't attempt to handle explicit
8744         specializations in class scope.
8745         (template_parm_data): Document.  Add current_arg and
8746         arg_uses_template_parms.
8747         (mark_template_parm): Set it.
8748         (tsubst_arg_types): Remove unused variable.
8749         * semantics.c (begin_class_definition): Tweak.
8751 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
8753         * inc/typeinfo (type_info::type_info(const char*)): Make
8754         `explicit'.
8756         * cp-tree.h (hash_tree_cons_simple): New macro.
8757         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
8758         (coerce_template_parms): Use make_temp_vec, instead of
8759         make_tree_vec.  Document this behavior.
8760         (lookup_template_class): Likewise.
8761         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
8762         Remove dead code (and add assertion to check its deadness).  Fix
8763         bug w.r.t. exception specifications.
8765 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
8767         * decl2.c (import_export_vtable): Always make artificials comdat.
8768         (import_export_decl): Likewise.
8769         * pt.c (mark_decl_instantiated): Likewise.
8771 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
8773         * cp-tree.h (finish_globally_qualified_member_call_expr):
8774         Rename to ...
8775         (finish_qualified_call_expr).
8776         * semantics.c: Likewise.
8777         * parse.y (primary): Use it.
8778         * method.c (hack_identifier): Remove redundant code.
8780         * init.c (resolve_offset_ref): Call convert_from_reference to
8781         handle members of reference type.  Improve error recovery.
8783 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
8785         * cp-tree.h: Declare warn_nontemplate_friend.
8786         * decl2.c (lang_decode_option): Set.
8787         * lang-options.h: Add -Wnon-template-friend.
8788         * friend.c (do_friend): Use to toggle non-template function warning.
8790 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
8792         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
8793         corresponding INTEGER_CSTs when processing_template_decl.
8794         * pt.c (tsubst_enum): Tweak accordingly.
8796 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
8798         * decl.c (pushdecl_class_level): Add warning here.
8799         (pushdecl): Tweak.
8801 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
8803         * cvt.c (convert_pointer_to_real): Tidy.
8804         * search.c (get_base_distance_recursive): Simplify.
8805         (get_base_distance): Likewise.
8807         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
8808         parms.
8810 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
8812         * lex.c (check_newline):  Call HANDLE_PRAGMA before
8813         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
8814         if unknown pragmas are encountered.
8815         (handle_sysv_pragma): Interpret return code from
8816         handle_pragma_token ().  Return success/failure indication rather
8817         than next unprocessed character.
8818         (pragma_getc): New function: retrieves characters from the
8819         input stream.  Defined when HANDLE_PRAGMA is defined.
8820         (pragma_ungetc): New function: replaces characters back into the
8821         input stream.  Defined when HANDLE_PRAGMA is defined.
8823 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
8825         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
8826         * class.c (build_vtable_entry_ref): Likewise.
8828 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
8830         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
8831         * decl2.c (import_export_decl): Likewise.
8832         * pt.c (instantiate_decl): Use it.
8834 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
8836         * decl.c (lookup_name_real): Also do implicit typename thing for
8837         artificial TYPE_DECLs.
8838         * search.c (lookup_field): Likewise.
8839         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
8840         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
8841         (enter_scope_of): Extract type from implicit typename.
8842         (begin_class_definition): Likewise.
8843         * lex.c (identifier_type): Handle implicit typename when checking
8844         for SELFNAME.
8846         * cp-tree.h: Declare flag_strict_prototype.
8847         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
8848         -fstrict-prototype.
8849         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
8850         specified, set it to the value of pedantic.
8852 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
8854         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
8856 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
8858         * decl.c (finish_enum): Handle member enums of classes declared in
8859         template functions.
8861         * decl2.c (grok_x_components): Strip attributes before calling
8862         groktypename.
8864 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
8866         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
8867         -fenum-int-equivalence and -fno-nonnull-objects.
8868         * class.c (check_for_override): Remove support for -fall-virtual.
8869         (finish_struct_1): Likewise.
8870         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
8871         * typeck.c (build_binary_op_nodefault): Likewise.
8872         * cvt.c (ocp_convert): Likewise.
8873         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
8874         * class.c (build_vbase_path): Likewise.
8876 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
8878         * Makefile.in (INTERFACE): New, set to 1.
8880 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
8882         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
8883         comparing with global_namespace.
8884         (dump_aggr_type): Likewise.
8886         * decl.c (grokfndecl): Issue error on declaration of friend
8887         templates with explicit template arguments.
8889         * pt.c (convert_template_argument): New function, split out
8890         from...
8891         (coerce_template_parms): Here.
8892         (tsubst): Attempt better error-recovery.
8894 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
8896         * pt.c (decl_template_parm_p): Add checks for
8897         TEMPLATE_TEMPLATE_PARM.
8899 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
8901         * lex.c (do_identifier): Fix thinko in previous change.
8903 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
8905         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
8906         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
8908 1998-08-28  Richard Henderson  <rth@cygnus.com>
8910         Add support for discarding unused virtual functions.
8911         * lang-options.h: Add -fvtable-gc.
8912         * cp-tree.h: Add flag_vtable_gc.
8913         * decl2.c (output_vtable_inherit): New fn.
8914         (finish_vtable_vardecl): Call it.
8915         * class.c (build_vtable_entry_ref): New fn.
8916         (build_vtbl_ref): Call it.
8918 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
8920         * cp-tree.h (build_enumerator): Take the enumeration type as a
8921         parameter.
8922         * decl.c (finish_enum): Don't set the TREE_TYPE for the
8923         enumeration constant values if we're processing_template_decls.
8924         Don't set the type for the CONST_DECLs either; that's done in
8925         build_enumerator.
8926         (build_enumerator): Take the enumeration type as a
8927         parameter.
8928         * lex.c (do_identifier): Don't resolve enumeration constants while
8929         processing template declarations, even if they happen to be
8930         TEMPLATE_PARM_INDEXs.
8932         * parse.y (current_enum_type): New variable.
8933         (primary): Don't allow statement-expression in local classes just
8934         as we don't in global classes.
8935         (structsp): Use current_enum_type.
8936         (enum_list): Likewise.
8937         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
8938         finish_enum; they no longer occur.
8940         * cp-tree.h (finish_base_specifier): New function.
8941         * parse.y (base_class): Use it.
8942         * semantics.c (finish_base_specifier): Define it.
8944         * parse.y (structsp): Warn on use of typename outside of template
8945         declarations.
8947 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
8949         * lex.c (handle_cp_pragma): Remove #pragma vtable.
8950         * lang-options.h: Remove +e options.
8951         * decl2.c (lang_decode_option): Likewise.
8952         (import_export_vtable): Don't check write_virtuals.
8953         (finish_vtable_vardecl, finish_file): Likewise.
8954         * search.c (dfs_debug_mark): Likewise.
8955         * semantics.c (begin_class_definition): Likewise.
8956         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
8958         * call.c (build_over_call): Check flag_elide_constructors.
8959         * decl2.c: flag_elide_constructors defaults to 1.
8960         * typeck.c (convert_arguments): Remove return_loc parm.
8961         (build_function_call_real): Adjust.
8963         * search.c: Tear out all mi_matrix and memoize code.
8964         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
8965         * lang-options.h: Remove documentation for -fhandle-exceptions,
8966         -fmemoize-lookups and -fsave-memoized.
8967         * cp-tree.h: Lose mi_matrix and memoize support.
8968         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
8969         * class.c: Lose struct class_level.
8970         (pushclass, popclass): Lose memoize support.
8971         * init.c (build_offset_ref): Likewise.
8973         Never change BINFO_INHERITANCE_CHAIN.
8974         * init.c (emit_base_init): Change modification of
8975         BINFO_INHERITANCE_CHAIN to an assert.
8976         * search.c (get_base_distance_recursive): Likewise.
8977         (get_base_distance): Likewise.
8978         (lookup_member): Likewise.
8979         (convert_pointer_to_single_level): Likewise.
8980         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
8981         (lookup_fnfields): Likewise.
8982         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
8983         (unshare_base_binfos): Don't call propagate_binfo_offsets.
8984         (layout_basetypes): Call propagate_binfo_offsets instead of
8985         unshare_base_binfos.
8986         * decl.c (xref_basetypes): Call unshare_base_binfos.
8987         * pt.c (instantiate_class_template): Likewise.
8988         * tree.c (reverse_path): Remove 'copy' parm; always make a
8989         temporary copy.
8990         * class.c (build_vbase_path): Just call it.
8991         * search.c (compute_access): Likewise.  Don't re-reverse.
8993 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
8995         * class.c (build_vbase_path): Use reverse_path.
8996         (finish_base_struct): Move warnings for inaccessible bases to
8997         layout_basetypes.
8998         (modify_one_vtable): Remove check of TREE_USED (binfo).
8999         (fixup_vtable_deltas1): Likewise.
9000         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
9001         (xref_tag): Remove binfos parameter.
9002         (make_binfo): Remove chain parameter.
9003         (reverse_path): Add copy parameter.
9004         * decl.c (init_decl_processing): Change calls to xref_tag.
9005         (xref_tag): Remove binfos parameter.
9006         (xref_basetypes): Change calls to make_binfo.
9007         * decl2.c (grok_x_components): Change calls to xref_tag.
9008         (handle_class_head): Likewise.
9009         * friend.c (do_friend): Likewise.
9010         * lex.c (make_lang_type): Change calls to make_binfo.
9011         * parse.y (structsp): Change calls to xref_tag.
9012         (named_complex_class_head_sans_basetype): Likewise.
9013         (named_class_head): Likewise.
9014         * rtti.c (init_rtti_processing): Likewise.
9015         * search.c (compute_access): Change calls to reverse_path.
9016         (dfs_get_vbase_types): Change calls to make_binfo.
9017         (get_vbase_types): Remove dead code.
9018         * tree.c (unshare_base_binfos): Change calls to make_binfo.
9019         (layout_basetypes): Warn here about inaccessible bases.
9020         (make_binfo): Remove chain parameter.
9021         (reverse_path): Add copy parameter.
9023 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
9025         * class.c: #if 0 complete_type_p.
9026         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
9027         * method.c (process_overload_item): Likewise.
9028         * typeck.c (comp_target_types): Likewise.
9030         Stop sharing binfos for indirect virtual bases.
9031         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
9032         (layout_basetypes): Likewise.
9033         (unshare_base_binfos): Copy vbases, too.
9034         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
9035         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
9036         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
9037         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
9038         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
9039         reference to BINFO_VIA_PUBLIC.
9040         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
9041         (push_class_decls): Use them.
9042         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
9043         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
9045 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
9047         * decl.c (build_enumerator): Set DECL_CONTEXT for the
9048         CONST_DECLs.
9050 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
9052         * cp-tree.h (finish_enum): Change prototype.
9053         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
9054         VALUES parameter.  Don't try to compute mins/maxs if
9055         processing_template_decl.
9056         * parse.y (structsp): Use new calling sequence for finish_enum.
9057         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
9058         (lookup_template_class): Remove unused variables.  Tweak.
9059         Register enums on instantiation list before substituting
9060         enumeration constants.
9061         (tsubst_decl): Remove unused variables.
9062         (regenerate_decl_from_template): Likewise.
9064         * decl.c (duplicate_decls): Don't obliterate the
9065         DECL_TEMPLATE_INFO for a template if we're not replacing it with
9066         anything.
9068         * lex.c (do_identifier): Fix typo in comment.
9070 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9072         * errfn.c: Remove stdarg.h/varargs.h.
9073         * tree.c: Likewise.
9075 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
9077         * pt.c (tsubst_copy): Only do typename overloading on an
9078         IDENTIFIER_NODE that happens to look like a typename if it actually
9079         has a type for us to use.
9081 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
9083         * typeck.c (comp_cv_target_types): Split out...
9084         (comp_target_types): From here.  Don't allow cv-qual changes under
9085         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
9086         (build_ptrmemfunc): Pass 1 to nptrs.
9087         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
9089 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
9091         * search.c (dependent_base_p): Don't compare a binfo to
9092         current_class_type; use the TREE_TYPE of the binfo instead.
9094         * cp-tree.h (CLASS_TYPE_P): Revise definition.
9096 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
9098         * decl.c (duplicate_decls): Don't complain about different
9099         exceptions from an internal decl even if pedantic.
9101         * typeck.c (convert_for_assignment): Converting from pm of vbase
9102         to derived is an error, not a sorry.
9104         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
9105         * class.c (fixed_type_or_null): Rename from
9106         resolves_to_fixed_type_p.  Return the dynamic type of the
9107         expression, if fixed, or null.
9108         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
9109         does not match the static type.
9110         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
9111         resolves_to_fixed_type_p again.
9113 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
9115         * pt.c (tsubst_decl): Move special case code for dealing with
9116         tricky friend templates here from ...
9117         (regenerate_decl_from_template): Here.
9119 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
9121         * decl.c (start_decl): Remove redundant linkage check.
9123 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
9125         * typeck.c (c_expand_return): Handle the case that valtype
9126         is wider than the functions return type.
9128 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
9130         * cp-tree.h (CLASS_TYPE_P): New macro.
9131         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
9132         * pt.c (process_template_parm): Undo previous change.
9134 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
9136         * cp-tree.h: Declare.
9137         * pt.c (decl_template_parm_p): New function.
9138         * decl.c (pushdecl): Check decls for redeclaring template parms.
9139         (xref_tag): Make redeclaration an error, print decl.
9140         * decl2.c (grokfield): Check field_decls for redeclaration as well.
9142 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
9144         * parse.y (primary): Fix up the type of string constants.
9146 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
9148         * typeck.c (convert_for_initialization): Move check for odd uses
9149         of NULL to avoid duplicate warnings.
9151 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
9153         * tree.c (lvalue_type): Fix for arrays.
9154         * typeck.c (string_conv_p): New fn.
9155         (convert_for_assignment): Use it.
9156         (build_unary_op): Use lvalue_type.
9157         * call.c (standard_conversion, convert_like): Use string_conv_p.
9158         (add_function_candidate): Use lvalue_type.
9159         * cvt.c (convert_to_reference): Likewise.
9160         * decl2.c (lang_decode_option): Ignore -traditional.
9161         * decl.c (init_decl_processing): flag_writable_strings inhibits
9162         flag_const_strings.
9164 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
9166         * lang-options.h (lang_options): Add fconst-strings to the list
9167         of valid options.
9168         * decl2.c (lang_f_options, lang_decode_option): Likewise.
9170 1998-08-24  Nathan Sidwell  <nathan@acm.org>
9172         * lex.c (real_yylex): Don't warn about long long constants if
9173         we're allowing long long.
9175 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9177         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
9178         accessing bindings directly.
9180         * search.c (my_tree_cons): Reimplement.
9182         * lang-specs.h: Remove __HONOR_STD.
9183         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
9185 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
9187         * decl.c (grokdeclarator): Complain about in-class initialization
9188         of aggregates and/or references.
9189         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
9190         TEMPLATE_TYPE_PARMs.
9192         * decl2.c (grok_array_decl): Add comment.
9193         (mark_used): Don't instantiate an explicit instantiation.
9194         * friend.c (make_friend_class): Remove bogus comment.  Fix check
9195         for partial specializations.
9196         * pt.c (check_explicit_specialization): Don't
9197         SET_DECL_EXPLICIT_INSTANTIATION here.
9198         (mark_decl_instantiated): Or here.
9199         (do_decl_instantiation): Do it here, instead.  Add checks for
9200         duplicate explicit instantiations, etc.  Tidy.
9201         (do_type_instantiation): Likewise.
9202         (instantiate_decl): Improve comments.  Complain about explicit
9203         instantiations where no definition is available.
9205         * cp-tree.h (ansi_null_node): Remove.
9206         * call.c (build_over_call): Warn about converting NULL to an
9207         arithmetic type.
9208         * cvt.c (build_expr_type_conversion): Likewise.  Use
9209         null_ptr_cst_p instead of expanding it inline.
9210         * decl.c (ansi_null_node): Remove.
9211         (init_decl_processing): Make null_node always have integral type.
9212         * except.c (build_throw): Warn about converting NULL to an
9213         arithmetic type.
9214         * lex.c (init_parse): Remove handling of ansi_null_node.
9215         * pt.c (type_unification_real): Don't convert NULL to void* type.
9216         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
9217         (convert_for_assignment): Warn about converting NULL to an
9218         arithmetic type.
9219         (convert_for_initialization): Likewise.
9221 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
9223         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
9224         * pt.c (coerce_template_parms): Use no_linkage_check.
9225         * decl.c (grokvardecl): Likewise.
9226         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
9228         * method.c (process_overload_item): Remove useless code.
9230 1998-08-20  Per Bothner  <bothner@cygnus.com>
9232         Handle new'ing of Java classes.
9233         * init.c (build_class_classref):  New function.
9234         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
9235         constructor does not return this;  don't need to exception-protect.
9237         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
9238         * decl2.c (acceptable_java_type):  Handle template-derived types.
9240 1998-08-20  Per Bothner  <bothner@cygnus.com>
9242         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
9244 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
9246         * decl.c (duplicate_decls): Always merge the old and new patterns
9247         for templates, regardless of whether or not the new one has
9248         DECL_INITIAL.  Don't throw away specializations.  Merge
9249         DECL_SAVED_TREE.
9250         * pt.c (tsubst_decl): Use the right pattern when calculating the
9251         complete args for a new template instance.
9252         (do_decl_instantiation): Fix typo in comment.
9253         (regenerate_decl_from_template): Deal with tricky friend template
9254         case.
9255         (instantiate_decl): Likewise.
9257 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
9259         * init.c (build_builtin_delete_call): Add missing assemble_external
9260         call.
9262 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
9264         * parse.y (notype_unqualified_id): Also accept ~A<int>.
9266 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
9268         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
9269         arithmetic.
9270         * except.c (build_throw): Warn when NULL is thrown, even with
9271         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
9272         thrown expression.
9274         * cp-tree.h (ansi_null_node): New variable.
9275         * decl.c (ansi_null_node): New variable.
9276         (init_decl_processing): Initialize its type.
9277         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
9278         for null_node in non-ANSI mode.
9279         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
9280         place of null_node to avoid spurious errors.
9282 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
9284         * cp-tree.h (enter_scope_of): New function.
9285         * parse.y (complex_direct_notype_declarator): Use it.
9286         * semantics.c (enter_scope_of): New function.
9288 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
9290         * decl.c (grokparms): No, here.
9292         * decl.c (grokdeclarator): Catch parm with pointer to array of
9293         unknown bound here...
9294         * method.c (process_overload_item): ...not here.
9296         * gxxint.texi: Remove obsolete documentation of overloading code.
9298         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
9299         * class.c (finish_struct_bits): Likewise.
9301         * tree.c (lvalue_type): Fix for arrays.
9302         * typeck.c (build_unary_op): Use lvalue_type.
9303         * call.c (add_function_candidate): Likewise.
9304         * cvt.c (convert_to_reference): Likewise.
9306         * decl2.c (lang_decode_option): Ignore -traditional.
9308         * init.c (build_offset_ref): Don't mess with error_mark_node.
9309         * lex.c (do_scoped_id): Use cp_error.
9311         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
9313 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
9315         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
9317 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
9319         * cp-tree.h (set_identifier_local_value): Provide prototype.
9321         * decl2.c (do_namespace_alias): Remove unused variables `binding'
9322         and `old'.
9324 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
9326         * Makefile.in: Rename BBISON to BISON so that it can be properly
9327         inherited from the parent makefile.
9329 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
9331         * lang-options.h: Add -finit-priority.
9332         * decl2.c: Likewise.  Check flag_init_priority instead of
9333         USE_INIT_PRIORITY.
9335         * decl2.c (setup_initp): New fn.
9336         (start_objects, finish_objects, do_ctors): Handle init_priority.
9337         (do_dtors, finish_file): Likewise.
9339 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
9341         * pt.c (tsubst_copy): Hush warning.
9343         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
9345 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
9347         * pt.c (print_template_context): Don't abort when instantiating a
9348         synthesized method.
9350         * decl.c (grokdeclarator): Issue errors on namespace qualified
9351         declarators in parameter lists or in class scope.
9353 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
9355         * pt.c (check_explicit_specialization): Don't abort on bogus
9356         explicit instantiations.
9358 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
9360         * typeck.c (require_complete_type): Use complete_type_or_else.
9361         (complete_type_or_else): Always return NULL_TREE on failure, as
9362         documented.
9364         * pt.c (tsubst_aggr_type): Prototype.
9365         (tsubst_decl): New function, split out from tsubst.  Set
9366         input_filename and lineno as appropriate.
9367         (pop_tinst_level): Restore the file and line number saved in
9368         push_tinst_level.
9369         (instantiate_class_template): Set input_filename and lineno as
9370         appropriate.
9371         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
9372         context for a TYPENAME_TYPE is complete.
9374         * decl2.c (grokbitfield): Issue errors on bitfields declared with
9375         function type.
9376         (do_dtors): As in do_ctors, pretend to be a member of the same
9377         class as a static data member while generating a call to its
9378         destructor.
9380         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
9381         conversions, even in complex virtual base class hierarchies.
9383 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
9385         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
9386         (TYPE_TEMPLATE_INFO): Likewise.
9387         (SET_TYPE_TEMPLATE_INFO): Likewise.
9388         (ENUM_TI_TEMPLATE): Likewise.
9389         (ENUM_TI_ARGS): Likewise.
9390         (lookup_nested_type_by_name): Remove.
9391         * decl.c (maybe_process_template_type_declaration): Handle enums.
9392         (start_enum): Don't check for primary-template enum declarations
9393         here.
9394         (finish_enum): Clean up, document.  Make sure template enum
9395         constants get the correct type.
9396         (build_enumerator): Copy initializers for template enumerations,
9397         too.
9398         (grok_enum_decls): Document.
9399         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
9400         better.  Build LOOKUP_EXPRs for local variables, even if they are
9401         TREE_PERMANENT.
9402         * pt.c (tsubst_enum): Remove field_chain parameter.
9403         (template_class_depth): Include the depth of surrounding function
9404         contexts.
9405         (push_template_decl): Check for primary-template enum declarations
9406         here.  Deal with enumeration templates.
9407         (lookup_template_class): Likewise.
9408         (for_each_template_parm): Likewise.
9409         (instantiate_class_template): Don't call tsubst_enum directly,
9410         call tsubst instead, to instantiate enums.  Deal with all
9411         field_chain issues here, not in tsubst_enum.
9412         (lookup_nested_type_by_name): Remove.
9413         (tsubst_aggr_type): Revise handling of enumeration types.
9414         (tsubst): Likewise.
9415         (tsubst_copy): Likewise.
9416         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
9418 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
9420         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
9421         uses template parameters.
9422         * method.c (build_template_parm_names): Use the full set of
9423         template arguments for tsubst'ing.
9424         (build_overload_identifier): Pass the full set of template
9425         arguments to build_template_parm_names, not just the
9426         innermost_args.
9427         * pt.c (TMPL_ARGS_DEPTH): Define using
9428         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
9429         (NUM_TMPL_ARGS): New macro.
9430         (add_outermost_template_args): Deal with the case where the outer
9431         args will be completely discarded.
9432         (coerce_template_parms): Use the full set of template arguments
9433         for tsubst'ing.  Simplify.  Add some asserts.  Improve
9434         error messages.
9435         (lookup_template_class): Pass the full set of template arguments
9436         to coerce_template_parms.
9437         (tsubst): Add assertion.
9438         (do_type_instantiation): Don't instantiate member template
9439         classes.
9441         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
9442         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
9444 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
9446         * method.c (set_mangled_name_for_decl): Change return type to void.
9448         * decl.c (lookup_name_real): A namespace-level decl takes priority
9449         over implicit typename.  Avoid doing the same lookup twice.
9451         * search.c (dependent_base_p): New fn.
9452         (dfs_pushdecls, dfs_compress_decls): Use it.
9454         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
9455         virtual functions if the type doesn't have any.
9457 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
9459         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
9460         uses template parameters.
9462 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
9464         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
9465         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
9466         * lex.c (do_identifier): Don't use a second argument, or a type,
9467         when building LOOKUP_EXPRs.
9468         (do_identifier): Likewise.
9469         (do_scoped_id): Likewise.
9470         * method.c (hack_identifier): Improve error message.
9471         * pt.c (lookup_template_function): Don't needlessly call
9472         copy_to_permanent or build_min.
9473         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
9474         necessary.
9475         (do_decl_instantiation): Improve error message.
9476         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
9477         (build_min): Copy the type to the permanent obstack, too.
9479 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
9481         * init.c (init_init_processing): Remove BI* handling.
9482         (build_builtin_call): Remove.
9483         (build_builtin_delete_call): New fn.
9484         (build_delete): Use it.
9486 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
9488         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
9489         (maybe_check_template_type): New function.
9490         * decl.c (maybe_process_template_type_declaration): New function,
9491         split out from pushtag  Call maybe_check_template_type.
9492         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
9493         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
9494         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
9495         * pt.c (template_class_depth_real): Generalization of ...
9496         (template_class_depth): Use it.
9497         (register_specialization): Use duplicate_decls for duplicate
9498         declarations of specializations.
9499         (maybe_check_template_type): New function.
9500         (push_template_decl_real): Fix comment.
9501         (convert_nontype_argument): Likewise.
9502         (lookup_template_class): Likewise.  Avoid an infinite loop on
9503         erroneous code.
9504         (tsubst_friend_function): Fix comment.
9505         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
9506         an IDENTIFIER_NODE.
9507         * semantics.c (begin_function_definition): Use
9508         reset_specialization to note that template headers don't apply
9509         directly to declarations after the opening curly for a function.
9511 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
9513         * decl.c (push_overloaded_decl): Use current_namespace instead of
9514         DECL_CONTEXT (decl) to determine where we go.
9516         * decl.c (lookup_name_real): Fix typo.
9518 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
9520         * friend.c (is_friend): Be lenient with member functions to deal
9521         with nested friends.
9523 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
9525         * class.c (finish_struct_1): Convert integer_zero_node to
9526         ssizetype before passing it to set_rtti_entry.
9527         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
9528         of any size to a pointer.
9530 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
9532         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
9533         (build_template_decl_overload): Remove.
9534         (set_mangled_name_for_decl): New function.
9535         (innermost_args): Remove is_spec parameter.
9536         (most_specialized, most_specialized_class): Remove declarations.
9537         (lookup_template_class): Add entering_scope parameter.
9538         (maybe_process_partial_specialization): New function.
9539         (finish_template_decl): Likewise.
9540         (finish_template_type): Likewise.
9541         * class.c (finish_struct): Clean up processing of member template
9542         specializations.
9543         * decl.c (pushtag): Fix formatting.
9544         (lookup_tag): Improve handling of pseudo-global levels.
9545         (make_typename_type): Adjust call to lookup_template_class.
9546         (shadow_tag): Use maybe_process_partial_specialization.
9547         (xref_tag): Improve handling of member friends.
9548         (start_function): Call push_nested_class before
9549         push_template_decl.  Don't call push_template_decl for
9550         specializations.
9551         * decl2.c (grok_x_components): Don't call xref_tag for
9552         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
9553         (grokclassfn): Use set_mangled_name_for_decl.
9554         (arg_assoc_class): Adjust call to innermost_args.
9555         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
9556         * error.c (dump_function_name): Improve printing of template
9557         function names.
9558         * friend.c (is_friend): Don't compare types of decls to determine
9559         friendship, unless flag_guiding_decls.
9560         (make_friend_class): Partial specializations cannot be friends.
9561         (do_friend): Use set_mangled_name_for_decl.  Call
9562         push_template_decl_real instead of push_template_decl.
9563         * method.c (build_decl_overload_real): Remove prototype.  Give it
9564         external linkage.
9565         (build_overload_identififer): Adjust call to innermost_args.
9566         (build_template_decl_overload): Remove.
9567         (set_mangled_name_for_decl): New function.
9568         * parse.y (.finish_template_type): New non-terminal.
9569         (template_def): Use finish_template_decl.  Use template_extdef
9570         instead of extdef.
9571         (template_extdef, template_datadef): New non-terminals, containing
9572         only those rules for things which can be templates.
9573         (datadef): Tidy.
9574         (template_type, self_template_type): Use .finish_template_type.
9575         (named_class_head): Use maybe_process_partial_specialization.
9576         * pt.c (mangle_class_name_for_template): Remove context parameter.
9577         (get_class_bindings): Remove outer_args parameter.
9578         (complete_template_args): Remove.
9579         (add_outermost_template_args): New function.
9580         (register_specialization): Return the specialization.
9581         (unregister_specialization): New function.
9582         (tsubst_template_parms): Likewise.
9583         (most_specialized, most_specialized_class): Prototype here as
9584         static.
9585         (original_template): Rename to most_general_template.
9586         (tsubst_template_parms): New function.
9587         (set_mangled_name_for_template_decl): Likewise.
9588         (TMPL_ARGS_DEPTH): New macro.
9589         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
9590         (TMPL_ARGS_LEVEL): New macro.
9591         (SET_TMPL_ARGS_LEVEL): Likewise.
9592         (TMPL_ARG): Likewise.
9593         (SET_TMPL_ARG): Likewise.
9594         (TMPL_ARGS_DEPTH): Likewise.
9595         (finish_member_template_decl): Use finish_template_decl.
9596         (maybe_process_partial_specialization): New function, split out
9597         from tsubst.
9598         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
9599         (maybe_begin_member_template_processing): Use new macros.
9600         (is_member_template): Likewise.
9601         (is_member_template_class): Likewise.
9602         (add_to_template_args): Likewise.  Deal with multiple levels of
9603         args.
9604         (maybe_process_partial_specialization): New function.
9605         (retrieve_specialization): Add consistency check.
9606         (determine_specialization): Return full argument list.
9607         (check_explicit_specialization): Tweak friend handling.  Use full
9608         argument lists.  Simplify.
9609         (current_template_args): Use new macros.
9610         (push_template_decl_real): Change ill-named mainargs to specargs.
9611         Check that a partial specialization actually specializes at least
9612         one parameter.   Improve friend handling.  Modify for full
9613         template arguments.
9614         (classtype_mangled_name): Don't mangle the names of
9615         specializations.
9616         (lookup_template_class): Add entering_scope parameter.  Use it to
9617         avoid finding a template type when an instantiation is required.
9618         Simplify.  Use full template arguments.
9619         (tsubst_friend_function): Use unregister_specialization.  Use new
9620         macros.  Use full template arguments.
9621         (tsubst_friend_class): Substitute, using tsubst_template_parms,
9622         into the template parameters before passing them to
9623         redeclare_class_template.
9624         (instantiate_class_template): Simplify.  Use full template
9625         arguments.  Adjust calls to get_class_bindings.  Use
9626         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
9627         (innermost_args): Use new macros.
9628         (tsubst_aggr_type): New function, split out from tsubst.
9629         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
9630         conventions for lookup_template_class.  Refine handling of partial
9631         instantiations.   Remove calls to complete_template_args.
9632         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
9633         and set_mangled_name_for_template_decl.
9634         (tsubst_copy): Use tsubst_aggr_type.
9635         (instantiate_template): Use full template arguments.
9636         (more_specialized): Improve formatting.
9637         (more_specialized_class): Adjust calls to get_class_bindings.
9638         (get_bindings_real): Don't call complete_template_args.
9639         (most_specialized): Don't overwrite input; create a new list.
9640         (most_specialized_class): Use most_general_template.
9641         (regenerate_decl_from_template): Use unregister_specialization.
9642         Use full template arguments.
9643         (instantiate_decl): Use full template arguments.
9644         (set_mangled_name_for_template_decl): New function.
9645         * semantics.c (begin_class_definition): Use
9646         maybe_process_partial_specialization.
9647         (finish_member_class_template): New function.
9648         (finish_template_decl): Likewise.
9649         (finish_template_type): Likewise.
9650         (typeck.c): Don't crash after issuing a compiler_error.
9651         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
9653 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
9655         * typeck2.c (build_functional_cast): Handle default-initialization.
9657         * call.c (build_over_call): Pass 1 to popclass.
9659         * parse.y (direct_notype_declarator): Add precedence declaration
9660         to notype_unqualified_id case.
9661         * Makefile.in (EXPECT): Adjust.
9663         * tree.c (ovl_member): Fix for single function in OVL.
9665 1998-07-27  Dave Brolley  <brolley@cygnus.com>
9667         * c-lex.c (yylex): Fix boundary conditions in character literal and
9668         string literal loops.
9670 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
9672         * decl.c (lookup_name_real): OK, do return the from_obj value
9673         unless got_object depends on template parms.
9675         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
9677         * pt.c (coerce_template_parms): Also complain about local enums.
9679         * cp-tree.h: Add prototype for set_identifier_local_value.
9680         * decl.c (set_identifier_local_value_with_scope): Make static,
9681         prototype.
9682         * search.c (covariant_return_p): Likewise.
9683         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
9685         * call.c (build_method_call): Only pull out the type of a destructor
9686         if it's a template type parm.
9687         * decl.c (lookup_name_real): Never return the from_obj value.
9689 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
9691         * except.c (process_start_catch_block_old): Call start_decl_1 for
9692         catch parm.
9693         * decl.c (start_decl_1): Avoid duplicate error.
9695         * init.c (expand_default_init): Only perform the initialization if
9696         it will do something.
9698 1998-07-23  H.J. Lu  (hjl@gnu.org)
9700         * parse.y (base_class): Check for invalid base class.
9702 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
9704         * decl2.c (import_export_template): Fold in...
9705         (import_export_class): ...to here.  Handle dllimport/export.
9707         * class.c (build_vtable): Pass at_eof to import_export_vtable.
9708         (prepare_fresh_vtable): Likewise.
9709         * decl2.c (import_export_class): Split out...
9710         (finish_prevtable_vardecl): From here.
9711         * class.c (finish_struct_1): Call import_export_class if at_eof.
9713         * decl.c (start_function): #if 0 mysterious code I wrote and have
9714         forgotten why.
9715         * rtti.c (get_tinfo_fn): If this is for a class type, set
9716         DECL_CONTEXT.
9718 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
9720         * inc/exception: Change terminate and unexpected to ().
9722         * parse.y (named_class_head_sans_basetype_defn): A
9723         named_class_head_sans_basetype followed by '{' or ':' is a defn.
9725 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
9727         * tree.c (canonical_type_variant): New fn to handle arrays.
9728         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
9729         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
9730         * method.c (process_overload_item): Use build_overload_value for
9731         arrays.
9733 1998-07-20  Dave Brolley  <brolley@cygnus.com>
9735         * lex.c (mbchar.h): #include it.
9736         (GET_ENVIRONMENT): New macro.
9737         (init_parse): Set character set based on LANG environment variable.
9738         (real_yylex): Handle multibyte characters in character literals.
9739         (real_yylex): Handle multibyte characters in string literals.
9741 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
9743         * lex.c (do_identifier): Look for class value even if we don't
9744         have a global value.  Do implicit declaration if parsing is 2.
9745         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
9746         lookup.
9748 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
9750         * decl.c (pushtag): Revert previous change.
9751         * pt.c (lookup_template_class): Don't put out debugging
9752         information for types that use template parameters.
9754         * decl.c (pushtag): Don't put out debugging information for
9755         compiler-generated typedefs.
9757         * error.c (dump_type_real): Don't crash when presented with
9758         intQI_type_node or the like.
9760         * semantics.c (finish_translation_unit): Fix spelling error in
9761         comment.
9763 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
9765         * decl.c (lookup_name_real): Pull out single function here.
9766         (select_decl): Not here.
9767         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
9769         * decl.c (qualify_lookup): Tweak again.
9771         * pt.c (lookup_template_class): Don't mess with the context of the
9772         instantiation.
9773         * decl2.c (current_decl_namespace): Remove special handling for
9774         templates.
9776         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
9777         a member template specialization.
9779         * tree.c (ovl_member): Use decls_match to compare functions.
9780         * decl.c (decls_match): Check the context of a function.
9782         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
9783         in Koenig lookup support rules.
9784         * semantics.c (finish_call_expr): Handle the new cases.
9786         * typeck.c (build_x_function_call): Handle overloaded methods.
9788         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
9790 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
9792         * semantics.c (finish_object_call_expr): Revert previous change.
9793         * call.c (build_new_method_call): Likewise.  Instead, convert
9794         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
9796 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
9798         * decl.c (qualify_lookup): Handle templates.
9800         * decl2.c (do_using_directive): Don't pass ancestor.
9801         * decl.c (push_using_directive): Calculate ancestor.
9803         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
9804         * decl.c (pushdecl): Move type shadowing handling from here...
9805         (duplicate_decls): ...to here.
9806         * decl.c (set_identifier_local_value_with_scope): New fn.
9807         (pushdecl): Use it.
9808         (set_identifier_local_value, lookup_type_current_level): New fns.
9809         * decl2.c (do_local_using_decl): Handle types and binding level
9810         stuff properly.
9812         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
9813         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
9814         (lookup_namespace_name): Likewise.
9815         * typeck.c (build_unary_op): Not here anymore.
9817         * decl2.c (do_class_using_decl): Make sure we get an identifier.
9818         * class.c (handle_using_decl): Ignore TYPE_DECLs.
9820         * decl.c (qualify_lookup): New fn.
9821         (lookup_name_real): Use it.
9823 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9825         * decl2.c (add_using_namespace): When directly using a namespace
9826         that was indirect before, promote it.
9828         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
9829         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
9830         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
9831         * decl.c (select_decl): Replace two flag parameters by one.
9832         (unqualified_namespace_lookup): Likewise, pass flag.
9833         (lookup_flags): New function.
9834         (lookup_name_real): Compute flags, pass them.
9835         (lookup_namespace_name): Call with zero-flag.
9836         * decl2.c (ambiguous_decl): Add flag parameter, complain only
9837         according to flags.
9838         (lookup_using_namespace, qualified_lookup_using_namespace):
9839         Add flag parameter, pass them through.
9840         * lex.c (do_scoped_id): Call with zero-flag.
9842 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
9844         * typeck.c (convert_for_assignment): Use comptypes.
9846 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
9848         * semantics.c (finish_object_call_expr): Move test for the
9849         function called being a TYPE_DECL to ...
9850         * call.c (build_new_method_call): Here.
9852 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
9854         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
9855         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
9857         * lex.c (looking_for_typename): Don't initialize.
9859         * decl2.c (ambiguous_decl): Clarify error message.
9861         * decl.c (push_using_directive): Iterate over namespaces used
9862         indirectly.
9864 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9866         * decl2.c (add_using_namespace): Iterate over namespaces used
9867         indirectly.
9869         * decl.c (lookup_name_real): Accept namespace aliases as locals.
9870         (cat_namespace_levels): Ignore aliases.
9871         (duplicate_decls): Ignore duplicate aliases.
9872         * decl2.c (do_namespace_alias): Process block level namespace
9873         aliases.  Store alias with pushdecl.  Remove odr errors.
9874         * parse.y (namespace_alias): New non-terminal.
9875         (extdef): Use it.
9877 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
9879         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
9880         Handle TEMPLATE_TYPE_PARM.
9881         (arg_assoc): Rewrite.
9883         * pt.c (complete_template_args): Don't look at the context unless
9884         we have to.
9886         * method.c (build_decl_overload_real): Fix namespace handling.
9888         * typeck.c (build_unary_op): Extract a lone function from an
9889         OVERLOAD.
9891         * call.c (build_scoped_method_call): Handle getting a namespace
9892         for basetype in a destructor call.
9893         (check_dtor_name): Handle enums.
9895         * parse.y (using_directive): New nonterminal.
9896         (extdef, simple_stmt): Use it.
9898 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9900         * decl2.c (add_function): Move error message ...
9901         (arg_assoc_namespace): ... from here.
9903 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
9905         * parse.y (namespace_qualifier): Fix multiple level handling.
9906         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
9907         (arg_assoc): Don't skip the first argument of a function.
9909 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
9911         * search.c (my_tree_cons): Clean up.
9913 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
9915         * call.c (joust): Don't warn about "confusing" conversions to the
9916         same type.
9918 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9920         * class.c (push_nested_class): Complain about namespaces.
9921         * decl.c (start_decl): Enter the object's namespace.
9922         (cp_finish_decl): Leave it.
9923         (grokdeclarator): Likewise.
9924         * decl2.c (check_decl_namespace): New function.
9925         (finish_file): Call it.
9926         * parse.y (complex_direct_notype_declarator): Set complexity
9927         of namespace-qualified ids to -1, enter the namespace.
9929         * method.c (build_template_decl_overload): Expect _DECL as first
9930         parameter.  Put context temporarily into current_namespace.
9931         * pt.c (check_explicit_specialization): Change caller.
9932         (tsubst): Likewise.
9934         * init.c (build_offset_ref): Call mark_used and
9935         convert_from_reference for namespace members.
9937 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9939         * search.c (my_tree_cons): The bitfield is at index 2.
9941 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
9943         * lang-options.h: Format changed to work with new --help support
9944         in gcc/toplev.c
9946 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9948         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
9949         Do Koenig lookup in CALL_EXPR.
9950         (arg_assoc): Handle error_mark.
9951         * lex.c (is_global): New function.
9952         (do_identifier): Expect arguments for Koenig lookup.
9953         * parse.y (primary): Add rules for calls of unqualified function calls.
9954         (do_id): Change call of do_identifier.
9955         * pt.c (finish_stmt_expr): Likewise.
9956         * semantics.c (finish_id_expr): Likewise.
9957         (finish_call_expr): Add integer parameter to indicate
9958         argument-dependent lookup.
9960         * decl.c (struct binding_level): New field using_directives.
9961         (push_using_decl): Not sorry anymore.
9962         (push_using_directive): New function.
9963         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
9964         (unqualified_namespace_lookup): New function, code from ...
9965         (lookup_name_real): ... here.
9966         * decl2.c (lookup_using_namespace): Pass using list instead of
9967         initial scope.
9968         (validate_nonmember_using_decl): New function.
9969         (do_nonmember_using_decl): New function.
9970         (do_toplevel_using_decl): Use them.
9971         (do_local_using_decl): New function.
9972         (do_using_directive): Support block-level directives.
9973         * parse.y (simple_stmt): Support using declarations and
9974         directives.
9975         (namespace_qualifier, namespace_using_decl): New non-terminals.
9977         * xref.c (classname): New function.
9978         (GNU_xref_hier): Change class and base parameters to tree.
9979         * decl.c (xref_baseypes): Change caller.
9980         * friend.c (make_friend_class): Likewise.
9982 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
9984         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
9985         comparison.
9987         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
9988         template template parameter, record its use.
9989         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
9990         its template arguments if exists.
9992         * pt.c (coerce_template_template_parms): New function equivalent
9993         to coerce_template_parms when IS_TMPL_PARM is true.
9994         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
9995         all callers changed.
9997         (coerce_template_parms): Access ARGLIST properly when creating a
9998         new vector.  Only accept implicit TYPE_DECL as valid argument for
9999         a template template parameter when it is a base class of
10000         current_class_type.  Don't display error message when COMPLAIN is
10001         false.
10003 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
10005         * repo.c (get_base_filename): Use file_name_nondirectory.
10006         (open_repo_file): Likewise.
10007         * cp-tree.h (file_name_nondirectory): Add prototype.
10009 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
10011         * friend.c (do_friend): Pull the identifier out of declarator.
10012         Use cp_error and friends.
10013         * decl2.c (qualified_lookup_using_namespace): Fix call to
10014         purpose_member.
10015         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
10016         (grokvardecl): Use DECL_CLASS_SCOPE_P.
10017         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
10018         * class.c (warn_hidden): Fix for OVERLOAD.
10019         From grahams@rcp.co.uk:
10020         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
10021         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
10023 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
10025         * g++.1 (-traditional): Remove duplicated documentation.
10027 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
10029         * method.c (flush_repeats): Add nrepeats parameter.
10030         (issue_nrepeats): Likewise.
10031         (is_back_referenceable_type): New function.  Don't back-reference
10032         TEMPLATE_TYPE_PARMs as well as simple types like integers.
10033         (build_mangled_name_for_type): Likewise.
10034         (build_mangled_name_for_type_with_Gcode): Likewise.
10035         (lasttype): Remove.
10036         (nrepeats): Likewise.
10037         (Nrepeats): Likewise.
10038         (start_squangling): Don't clear the variables removed above.
10039         (end_squangling): Likewise.
10040         (flush_repeats): Tidy.  Use nrepeats parameter rather than
10041         Nrepeats global.
10042         (issue_nrepeats): Likewise, but with nrepeats global.  Use
10043         is_backreferenceable_type.
10044         (build_overload_nested_name): Tidy.  Add comment.  Use
10045         build_mangled_name_for_type.
10046         (build_underscore_int): Comment.
10047         (build_overload_scope_ref): Use build_mangled_name_for_type.
10048         (build_overload_int): Likewise.
10049         (build_template_template_parm_names): Tidy.
10050         (build_template_parm_names): Use build_mangled_name_for_type.
10051         (build_overload_identifier): Add comments.
10052         (build_mangled_name_for_type_with_Gcode): Split out from
10053         build_mangled_name.
10054         (build_mangled_name_for_type): Use it.
10055         (build_mangled_name): Rework to use build_mangled_name_for_type
10056         and to not use global nrepeats/Nrepeats.  Tidy.
10057         (process_modifiers): Tidy.
10058         (check_btype): Use is_backreferenceable_type.  Add comment.
10059         Rename `node' to `type'.
10060         (process_overload_item): Set numeric_output_need_bar here.
10061         Use build_mangled_name_for_type.  Tidy.
10062         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
10063         build_mangled_name_for_type.
10065         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
10066         for TYPE_DECLs.
10068 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
10070         * cp-tree.h (warn_long_long): Define.
10071         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
10072         warning "ANSI C++ does not support `long long'".
10073         * decl2.c (warn_long_long): Define.
10074         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
10076 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
10078         * decl.c (xref_tag): Handle attributes between 'class' and name.
10079         * parse.y (aggr): Likewise.
10080         * semantics.c (finish_class_definition): Likewise.
10081         * Makefile.in (EXPECTED): Adjust.
10083         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
10084         * decl2.c: Define them.
10085         (lang_decode_option): Handle them.
10086         * lang-options.h: Add -foptional-diags.
10087         * class.c (finish_struct): Don't complain about multiple meanings of
10088         name if -fno-optional-diags.
10089         * decl.c (pushdecl_class_level): Likewise.
10090         * lex.c (real_yylex): Check warn_multichar.
10092 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
10094         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
10096         * tree.c (make_binfo): Fix length.
10098 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
10100         * decl2.c (lang_decode_option): Remove warn_template_debugging.
10101         * lang-options.h: Likewise.
10103 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10105         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
10106         (process_start_catch_block): Likewise for variables
10107         `false_label_rtx', `call_rtx' and `return_value_rtx'.
10109 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
10111         * tree.c (build_srcloc): Make sure we allocate this node on the
10112         permanent obstack.
10114 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
10116         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
10117         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
10118         (lang_specific_driver): Only add -lm automatically if need_math is
10119         nonzero.
10121 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
10123         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
10125 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10127         * Makefile.in (EXPR_H): New dependency variable.
10128         (decl2.o): Depend on $(EXPR_H).
10129         (typeck.o): Likewise.
10130         (init.o): Likewise.
10131         (expr.o): Likewise.
10133 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
10135         * decl.c (start_enum): Put local enums on permanent_obstack.
10137 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
10139         * cp-tree.h (c_get_alias_set): Declare.
10140         * decl.c (init_decl_processing): Set lang_get_alias_set.
10142 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
10144         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
10145         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
10146         flag for all function decls which are in the exception table.
10147         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
10148         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
10149         code is emitted for any referenced rtti function.
10151 1998-06-25  Dave Brolley  <brolley@cygnus.com>
10153         * lang-specs.h: Use new | syntax to eliminate
10154         string concatenation.
10156 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
10158         * cp-tree.h (CP_DECL_CONTEXT): New macro.
10159         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
10160         * method.c (build_overload_nested_name): Likewise.
10161         * sig.c (build_signature_pointer_or_reference_type): Don't set
10162         DECL_CONTEXT.
10164 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10166         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
10167         * cp-tree.h (FROB_CONTEXT): New macro.
10168         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
10169         * decl.c (namespace_binding): Replace NULL_TREE with
10170         global_namespace.
10171         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
10172         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
10173         Likewise.
10174         * decl.c (pushtag): Use FROB_CONTEXT.
10175         (pushdecl, make_typename_type, define_function, grokdeclarator):
10176         Likewise.
10177         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
10178         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
10179         Likewise.
10180         * decl2.c (decl_namespace): Return global_namespace if no context.
10181         * method.c (build_overload_nested_name): Expect null as context.
10182         * pt.c (mangle_class_name_for_template): Do nothing for null
10183         contexts.
10184         (lookup_template_class): Allow for null id_context.
10186 1998-06-25  Richard Henderson  <rth@cygnus.com>
10188         * method.c (emit_thunk): Set current_function_is_thunk for the
10189         ASM_OUTPUT_MI_THUNK case as well.
10191 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
10193         * exception.cc (__cplus_type_matcher): Get a match_info pointer
10194         instead of an exception table entry as a parameter.
10196 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
10198         * parse.y (function_try_block): Don't call start_catch_handler.
10199         * except.c (call_eh_info): Remove coerced field from declaration.
10200         (build_eh_type_type_ref): New function to create an address of a
10201         rtti function for the new style exception tables.
10202         (expand_start_catch_block): Split function, this contains the
10203         common part.
10204         (process_start_catch_block_old): New function to perform the rest
10205         of expand_start_catch_block under old style exceptions.
10206         (process_start_catch_block_old): New function to perform the rest
10207         of expand_start_catch_block under new style exceptions.
10208         (expand_end_catch_block): Only pop the false label off the stack under
10209         the old style of exceptions.
10210         * semantics.c (finish_try_block): Don't call start_catch_handler.
10211         * exception.cc (struct cp_eh_info): Add original_value field.
10212         (__cplus_type_matcher): Perform type matching on the original exception
10213         value, and if we have a match, set the current value.
10214         (__cp_push_exception): Set the original exception value.
10216 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
10218         * call.c (joust): Fix confusing conversion warning.
10220         * call.c (build_op_delete_call): Add placement parm.  Check
10221         LOOKUP_SPECULATIVELY.
10222         * cp-tree.h, decl2.c, init.c: Adjust.
10223         * decl.c (finish_function): Use it.
10225         * pt.c (tsubst): Diagnose creating void fields or variables.
10227 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10229         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
10231         * cp-tree.h (check_dtor_name): Add prototype.
10233         * init.c (expand_member_init): Remove unused variables
10234         `ptr_type_node', `parm' and `rval'.
10236         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
10237         in call to fprintf.
10238         (lang_print_xnode): Likewise.
10240         * typeck2.c (enum_name_string): Cast argument to sprintf to long
10241         and use %ld specifier.
10243         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
10244         specifier in call to fprintf.
10245         (GNU_xref_member): Cast argument to sprintf to int.
10247 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
10249         * typeck2.c (pop_init_level): Warn about implicit zero initialization
10250         of struct members.
10252 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10254         * cp-tree.h: Prototype function `check_java_method'.
10256 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
10258         * class.c (finish_struct): Make conflicting use of id a pedwarn.
10259         * decl.c (pushdecl_class_level): Likewise.
10261 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
10263         * pt.c (convert_nontype_argument): Issue an error when presented
10264         with an integer (real) constant that cannot be simplified to an
10265         INT_CST (REAL_CST).
10267         * cp-tree.h (c_get_alias_set): Remove declaration added in
10268         1998-06-13 change that should never have been checked in.
10270 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
10272         * typeck.c (build_binary_op_nodefault): Change % in format strings
10273         to %%.
10275         * decl.c (grokvardecl): Don't build_static_name for decls that
10276         aren't at namespace scope.
10278         * init.c (perform_member_init): Catch default-initialization of
10279         references.
10281 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
10283         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
10285 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
10287         * method.c (hack_identifier): Complain about getting a namespace
10288         or class template.
10289         * typeck.c (decay_conversion): Remove check for namespaces.
10290         * typeck2.c (incomplete_type_error): Likewise.
10291         * parse.y (template_arg): Add PTYPENAME expansion.
10293 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
10295         * decl.c (grokvardecl): Don't build external assembler names for
10296         TYPENAMEs in other namespaces as there is no declarator.
10297         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
10298         info from DECL_CONTEXT if it is NULL.
10300 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
10302         * call.c (check_dtor_name): Split out.
10303         (build_scoped_method_call): Use it.
10304         (build_method_call): Use it.
10305         * init.c (build_offset_ref): Use it.
10307         * typeck.c (build_static_cast): Fix handling of pointers to members.
10309         * decl.c (finish_function): Just return nothing from a constructor.
10310         * typeck.c (c_expand_return): Complain about returning a void
10311         expression from a destructor.
10313 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
10315         * class.c (alter_access): Accept a BINFO explaining how to get
10316         from the entity whose accessed is being altered to the type doing
10317         the altering.
10318         (handle_using_decl): New function containing code split out from ...
10319         (finish_struct_1): Here.
10321         * cp-tree.h (complete_type_or_else): Declare.
10322         * init.c (build_new_1, build_delete): Use it.
10323         * typeck.c (require_complete_type): Use complete_type, rather than
10324         expanding it inline.
10325         (complete_type_or_else): New function.
10326         (build_component_ref): Use it.
10327         (pointer_int_sum): Make sure the type pointed to is complete.
10328         (pointer_diff): Likewise.
10330         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
10331         types.
10333         * search.c (get_matching_virtual): Note that member templates
10334         cannot override virtual functions.
10336 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
10338         * pt.c (check_explicit_specialization): If DECLARATOR turned into
10339         an error_mark_node from lookup_template_function, return the same.
10340         (determine_specialization): Also make sure TEMPLATE_ID isn't an
10341         error_mark_node, before we try to read its operands.
10342         * decl.c (grokdeclarator): If we got an error_mark_node from
10343         check_explicit_specialization, just return it right back.
10345 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
10347         * class.c (instantiate_type): Don't treat template-ids that don't
10348         specify any template arguments as equivalent to ordinary
10349         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
10350         pointer-to-members for member templates.  Tidy slightly.
10351         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
10352         * init.c (build_offset_ref): Handle template-ids like ordinary
10353         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
10354         offset part of the OFFSET_REF.
10355         * typeck.c (build_unary_op): Change check for unknown types to
10356         look for OFFSET_REFs, not SCOPE_REFs.
10358 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
10360         * pt.c (is_member_template_class): New function.
10361         (push_template_decl_real): Use it.
10363 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
10365         * friend.c (do_friend): Add support for nested classes using
10366         member functions of the enclosing class as friends.
10368 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
10370         * call.c (convert_default_arg): Make global, not static.
10371         (convert_arg_for_ellipsis): Split out from ...
10372         (build_over_call): Here.
10373         * cp-tree.h (convert_default_arg); Declare.
10374         (convert_arg_to_ellipsis): Likewise.
10375         (do_member_init): Remove.
10376         * init.c (do_member_init): Remove; this code is dead.
10377         (expand_member_init): Remove much of this code; it is dead.
10378         * typeck.c (convert_arguments): Use convert_default_arg and
10379         convert_arg_for_ellipsis, rather than duplicating here.
10381         * call.c (convert_like): Don't fail silently if
10382         build_user_type_conversion fails.  Always return error_mark_node
10383         for failure.
10385 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
10387         * search.c (covariant_return_p): Complain about ambiguous base.
10389         * typeck.c (build_component_ref): Diagnose ref to nested type.
10391 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
10393         * decl.c (grokparms): Check that INIT isn't an error_mark_node
10394         before giving error about invalid type for default arg.
10396 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
10398         * call.c (build_method_call): Fix thinko.
10400 1998-06-10  Dave Brolley  <brolley@cygnus.com>
10402         * decl2.c (lang_decode_option): New argc/argv interface.
10403         * cp-tree.h (lang_decode_option): New argc/argv interface.
10404         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
10405         specified for cpplib-enabled compilers.
10406         * lex.c (lang_init): Don't check_newline for cpplib.
10407         (init_parse): Don't initialize cpplib here.
10409 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
10411         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
10412         piece before checking DECL_MUTABLE_P.
10414 1998-06-10  John Carr  <jfc@mit.edu>
10416         * tree.c (debug_binfo): Make printf format match arguments.
10418         * error.c (OB_PUTI): Make printf format match arguments.
10420 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
10422         * init.c (perform_member_init): Handle default-initialization.
10424         * except.c (build_throw): Handle throwing NULL.
10426         * typeck.c (build_x_function_call): Use resolve_offset_ref.
10428         * search.c (compute_access): Only strip an anonymous union
10429         for a FIELD_DECL.
10431         * call.c (add_builtin_candidates): Tweak.
10433         * cvt.c (build_expr_type_conversion): Restore code for conversion
10434         from class types.
10435         * decl2.c (delete_sanity): Use it.  Clean up.
10437         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
10439 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
10441         * typeck.c (c_expand_return): Don't warn about void expressions on
10442         return statements in functions returning void.
10444 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
10446         * pt.c (fn_type_unification): Revise documentation.  Tidy.
10447         (type_unification): Likewise.
10449 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
10451         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
10452         expand_end_catch.
10453         * parse.y (function_try_block): Rename expand_start_catch, and delete
10454         expand_end_catch.
10455         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
10456         expand_end_catch.
10458 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
10460         * search.c (lookup_member): New fn.
10461         * class.c (finish_struct_1): Use it.
10462         * decl.c (lookup_name_real): Use it.
10464 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10466         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
10468         * cp-tree.h: Add prototype for `maybe_print_template_context' and
10469         `maybe_make_one_only'.
10471         * decl.c (auto_function): Remove unused variable `decl'.
10473         * decl2.c: Include dwarf2out.h and dwarfout.h.
10475         * lex.c: Remove redundant declarations of `set_float_handler' and
10476         `asm_out_file'.
10478 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
10480         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
10481         time flag.  Call __cp_eh_info instead of __cp_exception_info.
10482         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
10483         (__cp_exception_info): Return offset into cp_eh_info structure to
10484         match what use to be the start of this structure.
10485         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
10486         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
10487         compile time flag.
10488         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
10489         __cp_eh_info instead of __cp_exception_info.
10491 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
10493         * decl.c (cp_finish_decl): Disable inlining of extern inlines
10494         with static variables.
10496 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
10498         * init.c (build_offset_ref): Correct previous change to use build,
10499         not build_min.
10501 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
10503         * class.c (instantiate_type): Handle pointer-to-members where the
10504         member is a template.
10505         * init.c (build_offset_ref): Likewise.
10506         * typeck.c (build_unary_op): Likewise.
10508 1998-06-07  Richard Henderson  <rth@cygnus.com>
10510         * lex.c (lang_init_options): New function.
10511         (lang_init): Remove flag_exceptions == 2 hack.
10513 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
10515         * search.c (envelope_add_decl): Tweak for implicit typename.
10517         * call.c (joust): Also warn about confusing conversion op/constructor
10518         overload resolution.
10520         * spew.c (yylex): Also return the TYPE_DECL if got_object.
10521         Don't clear got_object after '~'.
10522         * call.c (build_scoped_method_call): Tweak destructor handling.
10523         (build_method_call): Likewise.
10524         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
10525         TYPE_MAIN_VARIANT for destructors.
10526         * semantics.c (finish_object_call_expr): Complain about calling a
10527         TYPE_DECL.
10529 1998-06-05  Per Bothner  <bothner@cygnus.com>
10531         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
10532         Define - update needed by gcc.c change.
10534 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
10536         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
10538 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
10540         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
10541         * decl.c (lookup_name_real): Add namespaces_only parameter.
10542         If set, return only NAMESPACE_DECLs.
10543         (select_decl): Likewise.
10544         (identifier_type_value): Give additional parameter.
10545         (lookup_name_nonclass): Likewise.
10546         (lookup_name): Likewise.
10547         (find_binding): Skip namespace aliases.
10548         (binding_for_name): Likewise.
10549         (push_namespace): Check for namespace aliases.
10550         (lookup_name_namespace_only): New function.
10551         (begin_only_namespace_names, end_only_namespace_names): New functions.
10552         * decl2.c (set_decl_namespace): Skip namespace aliases.
10553         (do_using_directive): Likewise.
10554         (do_namespace_alias): Produce namespace aliases, fix alias
10555         redeclaration.
10556         * error.c (dump_decl): Support SCOPE_REF.
10557         * parse.y (extdef): Wrap lookup with namespace_only for namespace
10558         aliases and using declarations.
10560 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
10562         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
10564         * error.c (dump_expr): Clean up NEW_EXPR case.
10566 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10568         Suggested by Brendan Kehoe
10569         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
10570         treat it as using ::decl.
10572         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
10574         * tree.c (mapcar): Support NEW_EXPR.
10576         * error.c (dump_expr): Support NEW_EXPR.
10578 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
10580         * method.c (make_thunk): Use overload machinery to make name.
10581         * search.c (covariant_return_p): New fn.
10582         (get_matching_virtual): Use it.
10584         * init.c (build_new_1): Fix check for void.
10586 1998-06-01  Per Bothner  <bothner@cygnus.com>
10588         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
10589         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
10590         java_int_type_node, java_long_type_node, java_float_type_node,
10591         java_double_type_node, java_char_type_node, java_boolean_type_node):
10592         New "primitive" types, with predefined names __java_byte etc.
10593         (record_builtin_java_type):  New function.
10594         (init_decl_processing):  Make Java types with record_builtin_java_type.
10595         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
10596         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
10597         (grokfndecl):  Call check_java_method for Java classes.
10598         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
10599         (process_overload_item):  Match types against specific
10600         java_XX_type_node types, rather than using is_java_type.
10601         * class.c (finish_struct_1):  Don't add default copy constructor
10602         or operator= if TYPE_FOR_JAVA.
10603         (pop_lang_conext):  Restore strict_prototyp proper if Java.
10604         * decl2.c (acceptable_java_type, check_java_method):  New functions.
10605         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
10606         (tsubst):  Move common statement after if statement.
10607         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
10609 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
10611         * pt.c (for_each_template_parm): Use first_rtl_op.
10613         * tree.c (build_cplus_array_type_1): Also check index_type for
10614         template parms.
10616 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
10618         * pt.c (tsubst): Always copy BINFO_BASETYPES.
10620 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
10622         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
10623         TYPE_SIZE_UNIT too.
10625 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
10627         * decl.c (grokdeclarator): Don't complain about in-class
10628         initialization of static consts if we don't really know the type
10629         of the variable.
10631 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
10633         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
10634         * method.c (build_destructor_name): New fn.
10635         * decl2.c (maybe_retrofit_in_chrg): Split out...
10636         (grokclassfn): From here.  Reorganize.
10637         * decl.c (grok_ctor_properties): Make sure ctors for types with
10638         vbases have the in_chrg parm.
10639         * pt.c (instantiate_class_template): Update
10640         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
10641         grok_*_properties.
10642         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
10644 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
10646         * pt.c (instantiate_decl): Make test for whether or not static
10647         variables should be instantiated early match its comment.
10649 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
10651         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
10652         a member.
10653         (start_function): Call check_default_args.
10654         * decl2.c (grokfield): Don't call check_default_args.
10655         (check_default_args): Use cp_error_at.
10656         * lex.c (do_pending_defargs): Call check_default_args.
10658 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
10660         * call.c (build_method_call): Make sure get_type_value returns
10661         something before we try to use its TYPE_MAIN_VARIANT.
10662         (build_scoped_method_call): Likewise.
10664 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
10666         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
10667         initialize an array.
10669         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
10670         DECL_VIRTUAL_P.
10672         * friend.c (do_friend): Clarify template warning.
10674 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
10676         * decl.c (shadow_label): Don't treat decls as identifiers.
10677         (maybe_push_to_top_level): Clear shadowed_labels.
10679         * pt.c (instantiate_decl): Reset lineno and filename after calling
10680         regenerate_decl_from_template.
10682         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
10683         error_mark_node.
10685 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
10687         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
10689 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10691         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
10692         (convert_nontype_argument): Handle cases when nontype template
10693         parameters become classes after substitution.
10695 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
10697         * friend.c (is_friend): Use comptypes, rather than == to compare
10698         types.  Modify for new representation of template friends.
10699         (make_friend_class): Likewise.
10700         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
10701         (instantiate_class_template): Deal with template friends.
10703         * decl.c (store_parm_decls): Remove redundant call to
10704         expand_main_function.
10706 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10708         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
10709         DECL_USE_TEMPLATE.
10711 1998-05-26  Per Bothner  <bothner@cygnus.com>
10713         * language_as_string:  Handle lang_java.
10715 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
10717         * decl.c (pushdecl): Don't copy the type_decl.
10719 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10721         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
10722         current_class_type.
10723         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
10725         * parse.y (complex_direct_notype_declarator): Use $1 to access
10726         scope of notype_qualified_id.
10728 1998-05-26  Dave Brolley  <brolley@cygnus.com>
10730         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
10731         (init_parse): Initialize cpplib interface.
10733         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
10734         empty continuation.
10736 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
10738         * decl.c (pushtag): Avoid crashing on erroneous input.
10740 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10742         * decl.c (push_namespace): Only produce one unique name for
10743         anonymous namespaces.
10744         (get_unique_name): Remove.
10746 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
10748         * call.c (tourney): Don't do any extra comparisons.
10750         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
10752         * cp-tree.h (processing_template_parmlist): Declare.
10753         * decl.c (pushtag): Don't call push_template_decl when we
10754         shouldn't.
10755         * pt.c (processing_template_parmlist): New variable.
10756         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
10757         (complete_template_args): Use it.
10758         (add_to_template_args): Likewise.
10759         (innermost_args): Likewise.
10760         (tsubst): Likewise.
10761         (begin_template_parm_list): Use processing_template_parmlist.
10762         (end_template_parm_list): Likewise.
10764         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
10765         * decl.c (grokdeclarator): Use it.
10766         * decl2.c (grok_x_components): Likewise.
10767         * init.c (initializing_context): Likewise.
10768         * method.c (do_build_copy_constructor): Likewise.
10769         (do_build_assign_ref): Likewise.
10770         * search.c (compute_access): Likewise.
10771         * typeck.c (build_component_ref): Likewise.
10773         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
10774         unnamed type a typedef name "for linkage purposes".
10776         * pt.c (lookup_template_class): Don't look at
10777         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
10779         * method.c (build_overload_int): Handle error cases gracefully.
10781         * pt.c (instantiate_decl): Handle static member variables
10782         correctly.
10784         * pt.c (tsubst): Use the tsubst'd type when producing new
10785         TEMPLATE_PARM_INDEX nodes.
10787 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
10789         * tree.c (cp_tree_equal): Handle pointers to member functions.
10791         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
10792         sure the type of the REF_BIND is a reference type.
10793         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
10794         target_type for clarity.
10796         * parse.y (xcond): Move call to condition_conversion ...
10797         * semantics.c (finish_for_cond): Here.
10798         * parse.c: Regenerated.
10800 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
10802         * decl.c (push_namespace): Namespaces have type void.
10803         * typeck2.c (incomplete_type_error): Complain about namespace
10804         used as expression.
10805         * typeck.c (decay_conversion): Likewise.
10807 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10809         * error.c (dump_expr): Support namespaces.
10811 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
10813         * cp-tree.def: Add SRCLOC.
10814         * cp-tree.h: Add struct tree_srcloc and accessor macros.
10815         * tree.c (build_srcloc, build_srcloc_here): New fns.
10816         * pt.c (add_pending_template): Use build_srcloc_here.
10817         (push_tinst_level): Update last_template_error_tick before erroring.
10818         (instantiate_decl): Restore lineno and input_filename before
10819         calling add_pending_template.
10820         * decl2.c (finish_file): Set up lineno and input_filename for
10821         pending templates.
10823 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
10825         * decl.c (lang_print_error_function): New fn.
10826         (init_decl_processing): Set print_error_function to use it.
10827         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
10829         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
10830         ICS_BAD_FLAG.
10832         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
10833         copy-initialization.
10835         * class.c (build_vtable_entry): Use int_fits_type_p.
10836         (build_vtable): Pass a signed offset to build_vtable_entry.
10837         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
10838         set_rtti_entry): Likewise.
10840 1998-05-22  Per Bothner  <bothner@cygnus.com>
10842         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
10843         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
10845 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
10847         * pt.c (print_template_context): Use fprintf instead of cp_error.
10849         * pt.c (determine_specialization): Just return an error_mark_node.
10850         Also print the decl we want in error messages.  If we complain,
10851         return error_mark_node.
10852         (tsubst_friend_function): Set lineno and input_filename so
10853         error messages will be useful.
10854         (instantiate_template): Just return an error_mark_node.
10855         (check_explicit_specialization): Don't mess with a returned
10856         error_mark_node.
10858         * pt.c (print_template_context): Add new argument.
10859         (maybe_print_template_context): New fn.
10860         (push_tinst_level): Increment tinst_level_tick.
10861         (pop_tinst_level): Likewise.
10862         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
10863         xrealloc instead of xmalloc.
10865         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
10867 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
10869         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
10870         if the template we looked up is the same as the one we already
10871         have.
10873 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
10875         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
10876         (cpp_reader,parse_in): Add for cpplib.
10877         (check_newline): Call handle_sysv_pragma with new interface.
10878         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
10880         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
10881         (sub_getch): Call GETC for cpplib.
10883         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
10884         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
10886         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
10888 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
10890         * decl2.c (maybe_make_one_only): New fn.
10891         (import_export_vtable): Use it.
10892         (import_export_decl): Likewise.
10893         * pt.c (mark_decl_instantiated): Likewise.
10895 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
10897         * decl2.c (find_representative_member): Rename to ...
10898         (build_anon_union_vars): New function.
10899         (finish_anon_union): Fix stupidity of previous change.
10901 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
10903         * decl.c (grokfndecl): Handle definition of specialization in
10904         friend declaration.
10906         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
10908 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
10910         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
10911         to look for type declarations.
10912         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
10913         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
10914         (finish_member_class_template): Declare.
10915         * decl.c (pushtag): Put member class templates on the
10916         CLASSTYPE_TAGS list, just as for ordinary member classes.
10917         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
10918         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
10919         IDENTIFIER_NAMESPACE_VALUEs.
10920         * parse.y (component_decl): Move code to ...
10921         * semantics.c (finish_member_class_template): New function.
10922         Don't put member class templates on the list of components for a
10923         class.
10924         * parse.c: Regenerated.
10925         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
10926         In fact, don't use DECL_CONTEXT at all here.
10928 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10930         * decl.c (record_unknown_type): New function.
10931         (init_decl_processing): Call it for the unknown and global type
10932         nodes.
10934 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
10936         * decl2.c (find_representative_member): New function.
10937         (finish_anon_union): Use it.
10939         * cp-tree.h (MAIN_NAME_P): New macro.
10940         (DECL_MAIN_P): Likwise.
10941         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
10942         (grokfndecl): Use the new macros.
10943         (grokdeclarator): Likewise.
10944         (start_function): Likewise.
10945         (store_parm_decls): Likewise.
10946         (finsh_function): Likewise.
10947         * friend.c (do_friend): Likewise.
10948         * typeck.c (build_function_call_real): Likewise.
10949         (build_unary_op): Likewise.
10951 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
10953         * decl2.c (start_objects, finish_objects, do_dtors,
10954         do_ctors): Split out from...
10955         (finish_file): ...here.
10957 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
10959         * tree.c (is_overloaded_fn): Don't abort on placeholders from
10960         push_class_decls.
10962 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
10964         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
10966         * error.c (dump_expr): Handle an ARROW_EXPR.
10968 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
10970         * decl.c (saveable_obstack): Declare.
10971         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
10972         declare, if necessary.
10974 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
10976         * call.c (compare_qual): Remove.
10977         (is_subseq): Tweak.
10978         (is_properly_derived_from): New function.
10979         (maybe_handle_ref_bind): Likewise.
10980         (maybe_handle_implicit_object): Likewise.
10981         (compare_ics): Modify substantially to bring into conformance with
10982         the standard.
10983         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
10984         (comp_cv_qualification): Declare.
10985         (comp_cv_qual_signature): Likewise.
10986         * typeck.c (comp_cv_qualification): Likewise.
10987         (comp_cv_qual_signature): Likewise.
10989 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10991         * Makefile.in (parse.o): Depend on toplev.h.
10993         * class.c (typecode_p): Remove prototype and definition.
10995         * cp-tree.h (currently_open_class, is_empty_class, member_p):
10996         Add prototype.
10998         * decl.c (push_overloaded_decl_top_level): Remove prototype and
10999         definition.
11001         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
11002         in call to `cp_thing'.
11003         (cp_warning): Likewise for function pointer `warning'.
11005         * except.c (do_function_call): Remove prototype and definition.
11006         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
11008         * method.c (is_java_type): Add prototype and make it static.
11010         * parse.y: Include toplev.h.
11012         * pt.c (type_unification): Remove unused variable `arg'.
11013         (instantiate_decl): Likewise for `save_ti'.
11015         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
11017 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
11019         * init.c (build_member_call): Handle template_ids.
11020         * parse.y (primary): Add global_scope template_id.
11022 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
11024         * decl2.c (get_sentry): Use end_temporary_allocation.
11025         Don't declare permanent_obstack.
11027 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
11029         * parse.y (.finish_new_placement): New non-terminal.
11030         (unary_expr, new_type_id): Use it.
11031         * parse.c: Regenerated.
11033 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
11035         * pt.c (redeclare_class_template): Say where the original definition
11036         of the template-parameter's default argument appeared.
11038 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
11040         * call.c (build_over_call): Tweak empty class handling.
11042         * decl.c (make_typename_type): Use currently_open_class.
11044         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
11046 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
11048         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
11049         for a type unless it is one.
11051         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
11053 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
11055         * Makefile.in (program_transform_name, objdir): Define.
11057         * Makefile.in (BISON): Use bison from the build tree if it exists.
11058         (FLEX): Likewise.
11060 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
11062         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
11064         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
11066 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
11068         * call.c (build_scoped_method_call): Likewise.
11070 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
11072         * init.c (build_new_1): Call suspend_momentary around the creation
11073         of values that must be saved for exception handling.
11074         * parse.y (.build_new_placement): New non-terminal.
11075         (unary_expr, new_placement): Use it.
11076         * parse.c: Regenerated.
11078 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
11080         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
11081         old and new types.
11083         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
11084         canonical type.
11086         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
11088 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
11090         * decl.c (start_decl): Revert problem change.
11092         * Makefile.in (CONFLICTS): Fix.
11094 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11096         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
11098 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
11100         * class.c (finish_struct_1): Use BINFO_SIZE.
11102         * decl.c (start_decl): Use 'tem'.
11104 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
11106         * exception.cc: Include eh-common.h.
11107         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
11108         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
11109         (__cp_push_exception): Initialize eh_info struct as well.
11110         * except.c: Remove local structs and include eh-common.h.
11111         (init_exception_processing): Set language and version codes.
11112         (call_eh_info): Add presence of eh_info to runtime description of
11113         struct cp_eh_info.
11114         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
11115         * semantics.c (finish_try_block): Call start_catch_block() and
11116         end_catch_block().
11117         * parse.y (function_try_block): Call start_catch_block() and
11118         end_catch_block().
11120 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
11122         * typeck.c (original_type): New function.
11123         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
11124         to see if they're actually the same.
11125         * cp-tree.h (original_type): Declare.
11127 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11129         * Makefile.in (lex.o): Depend on output.h.
11131         * call.c (add_function_candidate): Remove unused variable `cand'.
11132         (add_conv_candidate): Likewise.
11133         (build_builtin_candidate): Likewise.
11135         * cp-tree.h: Add prototype for `types_overlap_p'.
11137         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
11139         * decl2.c (merge_functions): Remove unused variables `tmp' and
11140         `tempn'.
11142         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
11143         (code_as_string): Likewise.
11144         (language_as_string): Likewise.
11145         (parm_as_string): Likewise.
11146         (op_as_string): Likewise.
11147         (assop_as_string): Likewise.
11148         (cv_as_string): Likewise.
11150         * lex.c: Include output.h.
11152         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
11154         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
11155         ATTRIBUTE_UNUSED.
11157         * tinfo.cc (__class_type_info::dcast): Change the type of variable
11158         `i' from int to size_t.
11160         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
11161         ATTRIBUTE_UNUSED.
11163 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
11165         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
11166         DECL_NAMESPACE_SCOPE_P.
11167         (lang_decl_name): Likewise.
11168         * pt.c (tsubst_friend_function, tsubst): Likewise.
11169         * decl.c (pushdecl, redeclaration_error_message, start_decl,
11170         cp_finish_decl, start_function): Likewise.
11171         * class.c (finish_struct_1): Likewise.
11172         * call.c (build_over_call): Likewise.
11173         (compare_ics): Use DERIVED_FROM_P.
11175 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
11177         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
11178         * method.c (build_mangled_name): Use it.
11179         (build_decl_overload_real): Likewise.
11181         * error.c (dump_simple_decl): New function, broken out from ...
11182         (dump_decl): Use it.
11184 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
11186         * ptree.c (lang_print_xnode): Add missing `break'.
11188         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
11190         * call.c (add_template_candidate): Adjust for changes to
11191         fn_type_unification.
11192         (add_template_candidate_real): Likewise.
11193         (add_template_conv_candidate): Likewise.
11194         (build_user_type_conversion_1): Likewise.
11195         (build_new_function_call): Likewise.
11196         (build_object_call): Likewise.
11197         (build_new_op): Likewise.
11198         (build_new_method_call): Likewise.
11199         * class.c (instantiate_type): Likewise.
11200         * cp-tree.h (unification_kind_t): New type.
11201         (fn_type_unification): Adjust prototype.
11202         (type_unificaiton): Likewise.
11203         * pt.c (UNIFY_ALLOW_NONE): New macro.
11204         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
11205         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
11206         (UNIFY_ALLOW_DERIVED): Likewise.
11207         (unify): Change prototype.
11208         (maybe_adjust_types_for_deduction): New function.
11209         (check_cv_quals_for_unify): Likewise.
11210         (determine_specialization): Adjust.
11211         (fn_type_unification): Likewise.
11212         (type_unification): Likewise.
11213         (type_unification_real): Likewise.  Use
11214         maybe_adjust_types_for_deduction.  Fix mishandling of
11215         back-unification of template functions passed as arguments.  Pass
11216         appropriate combination of UNIFY_ALLOW_* to unify.
11217         (unify): Remove unused NTPARMS parameter.  Use
11218         check_cv_quals_for_unify.  Remove bogus code that allowed
11219         too-generous unification in order to adhere more closely to standard.
11220         (get_bindings_real): Adjust.
11221         (get_class_bindings): Likewise.
11223         * method.c (build_overload_identifier): Only use the innermost
11224         template arguments when mangling.
11225         * pt.c (tsubst_template_argument_vector): New function.
11226         (complete_template_args): Deal with the situation where the
11227         extra_args contain more than one level of arguments.
11228         (lookup_template_class): Deal with member template classes, which
11229         may have more than one level of arguments.
11230         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
11231         Improve handling of member template classes.  Use
11232         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
11233         tsubst_template_argument_vector where appropriate.
11234         (regenerate_decl_from_template): Break out from ...
11235         (instantiate_decl): Here.
11237         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
11238         * parse.h: Regenerated.
11239         * parse.c: Really regenerated.
11241         * cp-tree.h (finish_unary_op_expr): New function.
11242         (finish_id_expr): Likewise.
11243         (begin_new_placement): Likewise.
11244         (finish_new_placement): Likewise.
11245         (finish_declarator): Likewise.
11246         (finish_translation_unit): Likewise.
11247         (finish_parmlist): Likewise.
11248         (begin_class_definition): Likewise.
11249         (finish_class_definition): Likewise.
11250         (finish_default_args): Likewise.
11251         (finish_inline_definitions): Likewise.
11252         * parse.y (GCC_ASM_KEYWORD): Remove.
11253         (TYPENAME_ELLIPSIS): Likewise.
11254         * parse.c: Regenerated.
11255         Use new functions in semantics.c in the actions for many rules.
11256         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
11257         * hash.h: Regenerated.
11258         * semantics.c (finish_expr_stmt): Allow NULL expr.
11259         (finish_unary_op_expr): New function, containing
11260         code previously in parse.y.
11261         (finish_id_expr): Likewise.
11262         (begin_new_placement): Likewise.
11263         (finish_new_placement): Likewise.
11264         (finish_declarator): Likewise.
11265         (finish_translation_unit): Likewise.
11266         (finish_parmlist): Likewise.
11267         (begin_class_definition): Likewise.
11268         (finish_class_definition): Likewise.
11269         (finish_default_args): Likewise.
11270         (finish_inline_definitions): Likewise.
11272 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
11274         * typeck.c (build_c_cast): Don't decay arrays and functions to
11275         pointer type when converting to a class type.
11277 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
11279         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
11280         (DECL_CLASS_SCOPE_P): Likewise.
11282 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
11284         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
11285         * decl2.c (constructor_name_full): Likewise.
11287 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
11289         * tree.c (mapcar): Add OVERLOAD support.
11291         * init.c (resolve_offset_ref): We must use basetype_path before we
11292         destroy it with a call to convert_pointer_to.
11294 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11296         * class.c (currently_open_class): New fn.
11297         * decl.c (lookup_name_real): Use it.
11298         * search.c (lookup_field): Likewise.
11300 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11302         * cp-tree.def (OVERLOAD): New node.
11303         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
11304         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
11305         (NAMESPACE_BINDING): Remove.
11306         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
11307         namespace_binding.
11308         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
11309         Define.
11310         (tree_overload): New struct.
11311         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
11312         (REAL_IDENTIFIER_TYPE_VALUE): Define.
11313         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
11314         (lang_decl_flags): Remove in_namespace.
11315         (lang_decl): Remove chain.
11316         (DECL_CHAIN, DECL_NAMESPACE): Remove.
11317         (flag_honor_std): Declare extern.
11318         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
11319         namespace_binding, set_namespace_binding,
11320         lookup_function_nonclass, cat_namespace_levels,
11321         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
11322         scratch_ovl_cons, ovl_member, build_overload): Declare.
11323         (decl_list_length, get_namespace_id, current_namespace_id,
11324         overloaded_globals_p): Remove.
11325         (lookup_using_namespace, qualified_lookup_using_namespace): Change
11326         return type.
11327         (push_scratch_obstack): New macro.
11328         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
11329         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
11330         convs, fns.
11331         (build_new_function_call): Iterate using OVL_CHAIN.
11332         Print DECL_NAME in when reporting ambiguities.
11333         (build_object_call): Iterate using OVL_NEXT for fns, convs.
11334         (build_new_op): Call lookup_function_nonclass.
11335         Iterate using OVL_NEXT.
11336         (build_op_delete_call): Change detection of members.
11337         Do not wrap TREE_LIST around fields and single global functions.
11338         (build_over_call): Don't push a class level if the context is a
11339         namespace.
11340         (build_new_method_call): Iterate using OVL_NEXT.
11341         * class.c (add_method): Chain overloaded members using
11342         build_overload.  Remove copying of method.
11343         (grow_method): When iterating through the obstack, expect OVERLOAD
11344         nodes.  Chain overload members.
11345         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
11346         nodes in call to get_baselinks.
11347         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
11348         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
11349         fdecls that are OVERLOAD nodes.
11350         (validate_lhs): New function.
11351         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
11352         code.  Use DECL_NAME in error messages.  Split code between global
11353         and member function processing.
11354         * decl.c (global_type_node): New static variable.
11355         (in_std): New global.
11356         (struct binding_level): New field usings.
11357         (resume_binding_level): Assert that we are not in a class.
11358         (toplevel_bindings_p): Just check for namespace_p or
11359         pseudo_global.
11360         (resume_level): Remove.
11361         (find_binding): New function.
11362         (binding_for_name): Call it.
11363         (namespace_binding, set_namespace_binding): New functions.
11364         (push_namespace): Associate binding level with new namespace,
11365         resume_binding_level for existing namespace.  Remove old code.
11366         Fake std by counting.
11367         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
11368         (maybe_push_to_top_level): Save current namespace.
11369         (pop_from_top_level): Restore saved namespace.
11370         (pop_namespace): Call suspend_binding_level.  Remove old code.
11371         (cat_namespace_levels): New function.
11372         (set_identifier_type_value_with_scope): For namespace bindings,
11373         set BINDING_TYPE, and use global_type_node.
11374         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
11375         (identifier_type_value): New function.
11376         (pushtag): If no context, use current_namespace.
11377         (duplicate_decls): Don't process DECL_CHAIN.
11378         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
11379         already set.  Never reset it to NULL_TREE.  Lookup global variables
11380         in their namespace.  Push overloaded templates if they are on
11381         namespace level.
11382         (pushdecl_namespace_level): New function.
11383         (pushdecl_top_level): Implement using pushdecl_namespace_level.
11384         (pushdecl_using_decl): New function.
11385         (overloaded_globals_p): Remove.
11386         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
11387         them.  Use namespace_binding and set_namespace_value.
11388         (redeclaration_error_message): Complain if the declarations come
11389         from different namespaces.
11390         (lookup_tag): On namespace level, look in the BINDING_TYPE.
11391         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
11392         old code.
11393         (select_decl): New function.
11394         (lookup_name_real): Call it for qualified and unqualified lookup.
11395         Pass tree_bindings from the stack.
11396         If prefer_type is 1, also accept namespaces.
11397         (lookup_function_nonclass): New function.
11398         (init_decl_processing): Set the binding level of the global
11399         namespace to global_binding_level.
11400         Build a proper type list for __builtin_apply.
11401         Initialize std_node to "fake std" if flag_honor_std is set.
11402         Initialize global_type_node.
11403         Allocated bad_alloc in namespace std if flag_honor_std.
11404         (define_function): Set the DECL_CONTEXT to the current_namespace.
11405         (start_decl): A namespace is not considered as a context here.  If
11406         the DECL_CONTEXT is a namespace, push the decl.
11407         (cp_finish_decl): Check for namespaces used as initializers.
11408         (grokfndecl): Add namespace parameter.  Remove processing of
11409         DECL_CHAIN.
11410         (grokvardecl): Add namespace parameter.
11411         (grokdeclarator): Process SCOPEs that are namespaces.  For
11412         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
11413         (start_function): Check for contexts that are namespaces.
11414         Set context for declarations that have not been pushed.
11415         (store_parm_decls): Check for ::main only.
11416         (finish_function): Likewise.
11417         (start_method): Check for contexts that are namespaces.
11418         (start_method): Remove DECL_CHAIN processing.
11419         * decl2.c (flag_honor_std): Declare.
11420         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
11421         (decl_namespace_list): New static global.
11422         (grok_x_components): Ignore namespaces as type contexts.
11423         (check_classfn): Expect OVERLOAD nodes.
11424         (grokfield): Remove DECL_CHAIN processing.
11425         (finish_file): Call cat_namespace_levels.
11426         (merge_functions): New function.
11427         (ambiguous_decl): Rewrite.
11428         (lookup_using_namespace): Produce tree_bindings.
11429         (qualified_lookup_using_namespace): Likewise.
11430         (set_decl_namespace, decl_namespace, current_decl_namespace,
11431         push_decl_namespace, pop_decl_namespace): New functions.
11432         (arg_lookup): New struct.
11433         (add_function, arg_assoc_namespace, arg_assoc_class,
11434         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
11435         New functions.
11436         (get_namespace_id, current_namespace_id): Remove.
11437         (do_toplevel_using_decl): Rewrite.
11438         (do_class_using_decl): Complain about namespace qualifiers.
11439         (do_using_directive): Sorry if not on namespace level.  Complain
11440         about unknown namespaces.
11441         * error.c (dump_aggr_type): Check for namespace contexts.
11442         * except.c (init_exception_processing): Push terminate into std.
11443         * friend.c (is_friend): A namespace is not a context, here.
11444         * init.c (expand_member_init): Remove DECL_CHAIN processing.
11445         (build_offset_ref): Process OVERLOAD nodes.
11446         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
11447         * lex.c (identifier_type): Loop using OVL_CHAIN.
11448         (see_typename): Set looking_for_typename to 2.
11449         (real_yylex): Likewise.
11450         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
11451         (do_scoped_id): Expect OVERLOAD nodes.
11452         Change calling convention for qualified_lookup_using_namespace.
11453         (build_lang_decl): Don't set in_namespace anymore.
11454         * method.c (typevec_size): New global.
11455         (build_overload_nested_name): Return if global_namespace.
11456         Otherwise, always expect a declaration context.
11457         (build_qualified_name): Likewise.
11458         Make sure we don't write beyond typevec_size.
11459         (build_decl_overload_real): Likewise.
11460         Allocate one extra slot for the namespace.
11461         (hack_identifier): Mark code dead.
11462         Process OVERLOAD and NAMESPACE_DECL nodes.
11463         * parse.y (program): Pop namespaces until in global namespace.
11464         (extdef): In a using-declaration, don't discard the identifier if
11465         there is no declaration.
11466         (left_curly): Ignore type contexts which are namespaces.
11467         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
11468         used as scope.
11469         * pt.c (template_class_depth): Expect types to be namespaces.
11470         (determine_specialization): Simplify by expecting OVERLOAD nodes.
11471         (push_template_decl): Push into namespace level.
11472         Reset ctx if it is a namespace.
11473         Set DECL_CONTEXT to current_namespace if not set already.
11474         Ignore real contexts that are namespaces.
11475         (mangle_class_name_for_template): Skip global_namespace.
11476         Mangle other namespaces as declarations.
11477         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
11478         (lookup_template_class): Push into namespace of context.
11479         If the context is a namespace, set it to global_namespace.
11480         Use id_context for mangling.
11481         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
11482         (tsubst_friend_function): Ignore namespace contexts.
11483         Push into namespace level.
11484         (tsubst): Handle NAMESPACE_DECL nodes.
11485         Remove DECL_CHAIN processing.
11486         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
11487         * ptree.c (print_lang_identifier): Print bindings.
11488         (lang_print_xnode): Print OVERLOAD nodes.
11489         * rtti.c (init_rtti_processing): Push type_info into std.
11490         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
11491         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
11492         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
11493         lookup_fnfields_here): Likewise.
11494         Process all nodes, instead of going through TREE_CHAIN.
11495         * sig.c (build_signature_pointer_or_reference_type): Set context
11496         to global_namespace.
11497         (build_signature_table_constructor): Expect OVERLOAD nodes.
11498         * spew.c (yylex): Save old setting of looking_for_typename.
11499         * tree.c (decl_list_length): Remove.
11500         (binding_init): New function.
11501         (count_functions): Rewrite.
11502         (is_overloaded_fn): Expect OVERLOAD nodes.
11503         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
11504         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
11505         ovl_member): New functions.
11506         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
11507         (type_unknown_p): Likewise.
11508         (require_instantiated_type): Likewise.
11509         (build_component_ref): Declare code dead.
11510         (build_x_function_call): Create and expect OVERLOAD nodes.
11511         (build_function_call_real): Check for ::main only.
11512         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
11513         (convert_for_assignment): Check for TREE_LIST before accessing
11514         TREE_VALUE.
11515         * decl.c (duplicate_decls): Check for namespace bindings instead
11516         of global bindings.
11517         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
11518         lookup_name_current_level, start_decl, xref_tag,
11519         finish_enum): Likewise.
11520         * init.c (build_offset_ref): Likewise.
11521         * search.c (lookup_field): Likewise.
11522         (lookup_fnfields): Likewise.
11523         (dfs_debug_mark): Likewise.
11524         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
11525         (poplevel_class, pop_from_top_level): Likewise.
11526         * decl2.c (finish_method): Likewise.
11527         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
11528         * decl.c (record_builtin_type): Likewise.
11529         (init_decl_processing, grokfndecl): Likewise.
11530         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
11531         (make_lang_type): Likewise.
11532         * parse.y (make_thunk): Likewise.
11533         * pt.c (tsubst): Likewise.
11534         * tree.c (debug_binfo): Likewise.
11535         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
11536         tinfo2.cc, inc/new.h: Add std qualifications.
11537         * inc/new: Wrap with namespace std if __HONOR_STD.
11538         * inc/typeinfo: Likewise.
11540 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
11542         * call.c (build_user_type_conversion_1): Handle second_conv
11543         properly for templates.
11545 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
11547         * method.c (build_decl_overload_real): Set TREE_USED flag to
11548         zero for build_type_variants nodes as well.
11550 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
11552         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
11554 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
11556         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
11557         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
11558         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
11559         xref.o): Add toplev.h dependencies.
11561 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
11563         * errfn.c (cp_error, cp_warning): Remove declarations for
11564         error and warning respectively.
11566 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11568         * error.c: Convert to using ctype macros defined in system.h.
11569         * method.c: Likewise.
11570         * xref.c: Likewise.
11571         * lex.c: Likewise.  Also remove redundant system header stuff.
11573 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
11575         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
11576         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
11577         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
11578         xref.c: Add include of toplev.h.
11580 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
11582         * tree.c (perm_manip): Also regenerate the RTL of an extern.
11583         (copy_to_permanent): Use end_temporary_allocation.
11585 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
11587         * init.c (expand_vec_init): The initialization of each array
11588         element is a full-expression.
11590 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
11592         * method.c (build_mangled_name): Add a call to build_type_variant
11593         to get the right type.
11595 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
11597         * Makefile.in: Add .SUFFIXES.
11599         * cp-tree.def: Remove NAMESPACE_DECL.
11601 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
11603         * call.c (build_over_call): Do evaluate arg even if it has empty
11604         class type.
11605         * decl.c (start_function): Don't push a member function.
11607 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
11609         * Makefile.in (g++FAQ.info): Put -o option before input file.
11611 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
11613         * gxxint.texi: Add info for squangling codes K and B.
11615 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
11617         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
11618         the expression in templates.
11619         (finish_stmt_expr): Likewise.
11621 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
11623         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
11625 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
11627         * decl.c (maybe_push_to_top_level): Always clear
11628         current_template_parms and processing_template_decl.
11629         (pushtag): Remove check of current_class_type and some comments,
11630         since maybe_push_to_top_level no longer creates confusion.
11632 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
11634         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
11635         (DECL_CLASS_TEMPLATE_P): Likewise.
11636         (DECL_PRIMARY_TEMPLATE): Likewise.
11637         (PRIMARY_TEMPLATE_P): Use it.
11638         (push_template_decl_real): New function.
11639         (redeclare_class_template): Take new template parameters as
11640         input.
11641         (is_specialization_of): New function.
11642         (comp_template_args): Declare.
11643         * decl.c (pushtag): Handle friend template classes.
11644         (xref_tag): Likewise.  Use new calling convention for
11645         redeclare_class_template.
11646         * decl2.c (grok_x_components): Handle friend templates.
11647         * friend.c (is_friend): Use is_specialization_of where
11648         appropriate.  Deal with friend class templates.
11649         (make_friend_class): Let a class template be friends with itself.
11650         * pt.c (comp_template_args): Remove declaration.
11651         (tsubst_friend_class): New function.
11652         (push_template_decl_real): New function.
11653         (push_template_decl): Use it.
11654         (redeclare_class_template): Adjust for new calling convention.
11655         (comp_template_args): Give it external linkage.
11656         (instantiate_class_type): Use tsubst_friend_class to deal
11657         with friend templates.
11658         * typeck.c (comptypes): Use comp_template_args, rather than
11659         expanding it inline.
11660         * parse.y (component_decl): Handle a nested template type
11661         like other component type declarations.
11663         * pt.c (check_explicit_specialization): Handle overloaded
11664         constructors correctly.
11666         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
11667         (lookup_template_class): Use it.
11669 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
11671         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
11672         * cp-tree.h: Add WRAPPER support.
11673         * call.c (add_candidate): Split out from add_*_candidate fns.
11674         (build_over_call): Take the candidate instead of function and args.
11675         Enforce access control here.  Emit overload warnings here.
11676         (add_warning): New fn.
11677         (joust): Add WARN parm.  If not set, call add_warning instead of
11678         printing a warning.  Re-enable some warnings.
11679         (tourney): Pass it.
11680         (convert_like): Adjust.
11681         (build_new_op): Adjust.
11682         (build_new_function_call): Adjust.
11683         (build_user_type_conversion_1): Adjust.
11684         (USER_CONV_FN): Adjust.
11685         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
11686         build_int_wrapper): New fns.
11688 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
11690         * pt.c (unify): Fix typo in previous change.
11692 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
11694         * error.c (dump_type_real): Declare canonical_name.
11696         * typeck.c (comp_target_types): Fix PMFs.
11698 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
11700         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
11701         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
11702         TEMPLATE_DECL.
11704         * pt.c (tsubst): Decrease the template-level of
11705         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
11706         TEMPLATE_PARM_INDEX.
11707         (template_decl_level): New function.
11708         (unify): Make sure to record unifications for template
11709         parameters, even when the parameters exactly match the arguments.
11710         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
11711         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
11712         aren't from the level we're currently working on.
11714 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
11716         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
11718         * decl2.c (check_member_template): Set DECL_IGNORED for member
11719         class templates, too.
11721         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
11723 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11725         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
11727 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
11729         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
11730         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
11731         (init_decl_processing): Handle TI types.
11732         * typeck.c (unsigned_type, signed_type): Handle TI types.
11734 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
11736         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
11737         New local added_libraries.  Increment count when add library to
11738         arglist.
11740 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
11742         * cp-tree.h (type_as_string_real): New function.
11743         * pt.c (mangle_class_name_for_template): Use it.
11744         * error.c (dump_aggr_type): Change prototype.
11745         (dump_type_prefix): Likewise.
11746         (dump_type_suffix): Likewise.
11747         (dump_type_real): Convert from dump_type.  If desired, the
11748         "canonica" name of a typedef, i.e., the name of the underlying
11749         type, can be printed.
11750         (dump_type): Call dump_type_real.
11752 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
11754         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
11756         * typeck.c (comp_target_types): Tweak pedantic case.
11757         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
11758         Return -1 or 1 instead of 1 or 2.
11759         (compparms): Remove STRICT handling.
11760         (convert_for_assignment): Fix handling of pmfs.
11762 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
11764         * typeck.c (comp_target_types): Handle references like pointers.
11765         (comp_target_parms): Note that return code from comp_target_types
11766         can be negative to indicate failure.
11768 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
11770         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
11771         which requires a working target compiler to build.
11773 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
11775         * tree.c (avoid_overlap): Add prototype.
11777         * spew.c (num_tokens): Add prototype.
11778         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
11780         * search.c (dfs_check_overlap): Add prototype.
11781         (dfs_no_overlap_yet): Likewise.
11783         * pt.c (original_template): Add prototype.
11784         (inline_needs_template_parms): Likewise.
11785         (push_inline_template_parms_recursive): Likewise.
11786         (retrieve_specialization, register_specialization): Likewise.
11787         (print_candidates, reduce_template_parm_level): Likewise.
11788         (build_template_decl, mark_template_parm): Likewise.
11789         (tsubst_friend_function, get_bindings_real): Likewise.
11791         * method.c (start_squangling): Add prototype.
11792         (end_squangling, check_ktype, issue_ktype): Likewise.
11793         (build_overloaded_scope_ref, check_btype): Likewise.
11794         (build_mangled_template_parm_index): Likewise.
11796         * lex.c (init_cpp_parse): Add prototype.
11797         (handle_cp_pragma, handle_sysv_pragma): Likewise.
11798         (reduce_cmp, token_cmp): Likewise.
11800         * except.c (call_eh_info): Add prototype.
11801         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
11802         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
11804         * decl2.c (is_namespace_ancestor): Add prototype.
11805         (namespace_ancestor, add_using_namespace): Likewise.
11806         (ambiguous_decl): Likewise.
11808         * decl.c (indent): Add prototype.
11810         * call.c (add_template_candidate_real): Add prototype.
11812 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
11814         * decl2.c (build_expr_from_tree): Just return a PMF.
11816 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
11818         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
11819         when doing initializations.
11821         * pt.c (unify): Use comptypes to compare type args.
11823 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
11825         * decl.c (duplicate_decls): Fix check for when it's safe to free
11826         the new decl.
11828         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
11829         to type_as_string.
11831 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
11833         * pt.c (build_template_parm_index): Add prototype.
11835         * search.c (my_tree_cons): Don't clear words outside the
11836         newly allocated node.
11838 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
11840         * lex.c (init_parse): Now returns char* containing the filename.
11842 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
11843                           Jeff Law   <law@cygnus.com>
11845         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
11846         than a pointer.
11848 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11850         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
11852 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
11854         * decl.c (duplicate_decls): Don't warn for redundant decls if
11855         friend: let add_friend take care of it.
11857 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
11859         * sig.c (build_signature_pointer_constructor): Don't set
11860         TREE_HAS_CONSTRUCTOR for a signature pointer.
11861         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
11862         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
11863         here, too.
11864         * typeck.c (build_unary_op): Only allow taking the address of a
11865         real constructor.
11866         * typeck2.c (digest_init): Simplify.
11867         (store_init_value): Don't pedwarn about using { } for pmfs.
11869 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
11871         * cp-tree.h (start_decl):  Update prototype.
11872         * decl.c (start_decl):  Like the C version, new parameters
11873         for the attributes.  Call cplus_decl_attributes here,
11874         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
11875         (grokdeclarator):  Pass NULL for new start_decl arguments.
11876         * pt.c (tsubst_expr):  Likewise.
11877         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
11878         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
11879         * lex.c (build_lang_decl): Add lang_name_java.
11880         * class.c (push_lang_context): Add lang_name_java.
11881         * method.c (build_mangled_name): Check for is_java_type.
11883 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
11885         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
11886         * call.c (build_scoped_method_call): Check for TREE_CODE for
11887         VOID_TYPE instead of type ==  void_type_node.
11888         (build_method_call): Likewise.
11889         * decl.c (lookup_name_real): Likewise.
11890         (grokdeclarator): Likewise.
11891         (start_decl): Likewise.
11892         (grokparms): Likewise.
11893         (start_function): Likewise.
11894         (finish_function): Likewise.
11895         (start_method): Likewise.
11897 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
11899         * lex.c (finput): New variable.
11900         (init_cpp_parse):  Renamed from init_parse.
11901         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
11902         (finish_parse): New function.
11903         * cp-tree.h (init_lex, init_parse): Remove declarations.
11905 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
11907         * call.c (build_call): Still evaluate the actual argument.
11908         * class.c (is_empty_class): Update for -fnew-abi.
11910         * decl2.c: -fnew-abi implies -fsquangle.
11912         * method.c (do_build_assign_ref): Don't do anything to copy
11913         an empty class.
11914         (do_build_copy_constructor): Likewise.
11915         * call.c (build_over_call): Likewise.
11917 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
11919         * tree.c (avoid_overlap): Return a value.
11921 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
11923         * method.c (check_btype): Add missing argument to xrealloc.
11924         (check_ktype): Likewise.
11926 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
11928         Implement empty base optimization.
11929         * class.c (finish_struct_1): Add vbase fields earlier.  Set
11930         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
11931         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
11932         (types_overlap_p): New fn.
11933         * tree.c (avoid_overlap): New fn.
11934         (build_base_fields): Use it to avoid overlapping empty bases.
11935         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
11937         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
11939         Re-implement allocation of base class subobjects.
11940         * tree.c (unshare_base_binfos): New fn.
11941         (layout_basetypes): Use it.  Now handles offsets of both virtual and
11942         non-virtual bases, after layout_type.
11943         (layout_vbasetypes): Remove.
11944         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
11945         (build_vbase_pointer_fields): Split out from old layout_basetypes.
11946         * class.c (finish_base_struct): Lose offset handling code.
11947         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
11948         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
11949         * cp-tree.h: Adjust.
11951 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
11953         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
11954         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
11955         * class.c (duplicate_tag_error): Likewise.
11956         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
11957         * tree.c (layout_vbasetypes): Update from layout_record, remove
11958         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
11959         (layout_basetypes): Likewise.
11961 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
11963         * class.c, Make sure system.h is included just after config.h.
11964         Delete lingering stdio and errno references too.
11965         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
11967 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
11969         * friend.c (is_friend): Fix access control for local classes.
11971         * class.c (is_empty_class): New fn.
11972         * call.c (build_call): Don't pass empty class objects to a function.
11974 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
11976         * call.c (build_over_call): Do name resolution for default
11977         arguments of function templates in the scope of the templates.
11979 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
11981         * call.c: Include system.h.  Remove includes, declarations and
11982         defines provided by system.h.
11983         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
11984         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
11985         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
11986         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
11987         * typeck2.c, xref.c: Likewise.
11988         * Makefile.in: Dependencies updated as appropriate.
11989         * Make-lang.in: Likewise.
11991 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
11993         * pt.c (fn_type_unification): Allow incomplete unification without
11994         an immediate error message.
11996 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
11998         * tree.c (member_p): New fn.
11999         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
12000         initializing class members.
12002         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
12003         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
12005         * call.c (build_method_call): Handle non-scoped destructors, too.
12006         * pt.c (tsubst_copy): Likewise.
12008         * pt.c (print_template_context): Split out...
12009         (push_tinst_level): ...from here.
12011         * friend.c (is_friend): Don't pass a type to decl_function_context.
12013         * typeck.c (convert_for_initialization): Always hand off
12014         conversions to class type.
12016 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
12018         * friend.c (is_friend): Local classes have the same access as the
12019         enclosing function.
12021 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
12023         * typeck.c (expand_target_expr): Delete dead function.
12025         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
12027         * repo.c (save_string): Delete dead function.
12029         * method.c (thunk_printable_name): Delete dead function.
12031         * lex.c (yynextch): Delete dead function.
12033         * expr.c (tree_extract_aggr_init): #if 0 out.
12035         * except.c (do_unwind): Delete dead function.
12036         (easy_expand_asm): Likewise.
12038         * cvt.c (build_conversion_type_1): Delete dead function.
12040         * cp-tree.h (push_expression_obstack): Declare.
12042         * call.c (source_type): #if 0 out.
12044         * class.c (alter_access): Remove unused label.  Add braces
12045         around empty else clause.
12047         * lex.c (yyprint): Fix argument to printf.
12049 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
12051         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
12053         * pt.c (instantiate_class_template): Make sure template
12054         arguments are permanent.
12055         * init.c (resolve_offset_ref): Don't go looking around in
12056         template types.
12058         * semantics.c: Add routines to handle expressions, and some
12059         declaration processing.
12060         * parse.y: Use them.
12061         (current_class_depth): Move declaration to cp-tree.h.
12062         * parse.c: Regenerated.
12063         * cp-tree.h: Use them.
12064         (current_class_depth): Declare.
12065         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
12067 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
12069         * error.c (dump_decl): Be a bit more explicit with template
12070         type arguments, when verbose.
12072 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
12074         * inc/exception: Reorder closing braces.
12076 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
12078         * pt.c (redeclare_class_template): New function.
12079         * cp_tree.h (redeclare_class_template): Declare it.
12080         * decl.c (xref_tag): Use it.
12082 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
12084         * call.c (build_over_call): Check IS_AGGR_TYPE, not
12085         TYPE_LANG_SPECIFIC.
12086         * typeck.c (convert_arguments): Likewise.
12088         * decl.c (grokdeclarator): Remove const and volatile from type after
12089         setting constp and volatilep.
12091         * class.c (finish_struct_1): Don't warn about bool bitfield larger
12092         than one bit.
12094 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
12096         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
12098 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
12100         * call.c (build_object_call): Complain about ambiguous operator(),
12101         rather that crashing.
12102         (build_new_op): Likewise.
12103         (build_op_delete_call): Likewise.
12105 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
12107         * cvt.c (perform_qualification_conversions): Use comp_target_types
12108         instead of comp_ptr_ttypes.
12110 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
12112         * cp-tree.h (enforce_access): Declare.
12113         * call.c (enforce_access): Make it extern, not static.
12114         * class.c (alter_access): Use enforce_access; modify code for ISO
12115         compliance, rather than ARM rules.
12117 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12119         * cp-tree.h: Fix typo.
12121 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
12123         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
12124         if (aggregate_value_p (type)).
12126         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
12128 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
12130         * tree.c (mapcar): When dealing with a DECL, use it's constant
12131         value, if any.
12132         * pt.c (lookup_template_class): Don't mangle the names of template
12133         classes whose arguments are unknown.
12135         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
12137 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
12139         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
12141 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
12143         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
12144         boolean_type_node to 1.
12146 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
12148         * error.c (dump_expr): Remove unused variable `l'.
12150         * pt.c (for_each_template_parm): New function, created by
12151         converting uses_template_parms.
12152         (tree_fn_t): New typedef.
12153         (uses_template_parms): Use it.
12154         (mark_template_parm): New function.
12155         (push_template_decl): Check that the argument list of a partial
12156         specialization uses all the template parameters.
12158         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
12159         with it; we might want it for debugging.
12160         * cp-tree.h (type_unification): Change interface.
12161         * class.c (finish_struct_1): Skip nested template types, just like
12162         ordinary nested types.
12163         (instantiate_type): Use new interface to type_unification.
12164         * lex.c (init_lex): Add __sz as opname for sizeof.
12165         * method.c (build_overload_scope_ref): New function.
12166         (build_overload_int): Handle complex expressions.  Set
12167         numeric_output_need_bar if necessary.
12168         (build_overload_value): Handle non-PARM_DECL nodes; this
12169         routine is now used by build_overload_int.  Remove some
12170         assignments to numeric_output_need_bar.  Use
12171         build_overload_scope_ref.
12172         (build_qualified_name): Note that some template mangled names end
12173         with digits, and set numeric_output_need_bar appropriately.  Use
12174         build_underscore_int.
12175         * pt.c (unify): Change interface.
12176         (type_unification_real): Likewise.
12177         (determine_specialization): Use new interfaces.
12178         (tsubst): Deal gracefully with situations in which the argument
12179         vector is not fully filled.
12180         (fn_type_unification): Use new interfaces.
12181         (type_unification): Likewise.  Remove NOP_EXPR hack.
12182         (type_unification_real): Likewise.
12183         (unify): Likewise.  Deal with unification of complex expressions.
12185 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
12187         * pt.c (complete_template_args): Initialize skip properly.
12189         * decl.c (make_typename_type): Revert.
12190         (make_implicit_typename): Remove.
12191         (lookup_name_real): Don't call it.  Call lookup_field if we see a
12192         TYPE_DECL from a template base.
12193         * search.c (lookup_field): Do implicit typename stuff.
12195 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
12196                           Geoff Noer    <noer@cygnus.com>
12198         * Makefile.in: Various fixes for building cygwin32 native toolchains.
12199         * Make-lang.in: Likewise.
12201 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12203         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
12205 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
12207         * decl.c (make_implicit_typename): Rewrite removed code.
12208         (make_typename_type): Call it if the type we look up comes from
12209         a base that uses template parms.
12211         * pt.c (complete_template_args): Rewrite.
12212         (tsubst, FUNCTION_DECL): Use it.
12214 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
12216         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
12217         c_expand_asm_operands () if output_operands, input_operands or
12218         clobbers is not NULL_TREE.
12220 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12222         * pt.c (complete_template_args): New function.
12223         (get_bindings): Deal with specializations of function templates
12224         with return type containing parameters from outer class
12225         templates.
12226         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
12227         substitute arguments and compose a new type.
12229 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
12231         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
12232         FUNCTION_DECLs.
12234 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
12236         * decl.c (make_implicit_typename): Lose useless code.
12238         * call.c (standard_conversion): Handle A* -> const A* properly.
12240         * pt.c (get_bindings_real): Rename from get_bindings.  Add
12241         check_rettype parm.
12242         (get_bindings): Pass 1.
12243         (get_bindings_overload): Pass 0.
12245 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
12247         * pt.c (check_explicit_specialization): When reverting a static
12248         member function, also remove the `this' parameter from
12249         last_function_parms.
12251 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
12253         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
12254         a function context.
12256         * decl.c (store_bindings): Use free_binding_vecs.
12257         (pop_from_top_level): Likewise.
12259 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
12261         * decl.c (make_implicit_typename): Only change the type of a
12262         TYPENAME_TYPE.
12264 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
12266         * semantics.c: New file, containing routines to perform the
12267         semantic phase of parsing.
12268         * parse.y: Use it.
12269         * pt.c (tsubst_expr): Likewise.
12270         * cp-tree.h: Declare the various functions in semantics.c.
12271         Provide macros to access _STMT tree nodes.
12272         * cp-tree.def: Add ASM_STMT tree node.
12273         * Makefile.in, Make-lang.in: Add dependencies on and for
12274         semantics.c.
12276 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
12278         * pt.c (push_template_decl): Only check primary templates.
12280         * pt.c (check_explicit_specialization): Complain about default args
12281         in explicit specialization.
12283         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
12284         constructor_declarator.
12286 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
12288         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
12289         has no overloaded operator ->.
12291         * call.c (build_field_call): Don't crash when presented with a
12292         field that is actually a nested type.
12294         * decl.c (pushtag): Deal with friend class injection in local
12295         classes.
12297         * call.c (build_object_call): Don't crash if OBJ is a
12298         pointer-to-member-function.
12300 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
12302         * pt.c (push_template_decl): Complain about template with C linkage,
12303         anonymous template class.
12305 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
12307         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
12308         * search.c: Likewise.
12310         * lex.c (do_pending_defargs): Only call
12311         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
12313         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
12315 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
12317         * parse.y: Deal with CONSTRUCTORS in new_initializers.
12319 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
12321         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
12322         closely mimics the behavior in parse.y.
12323         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
12324         into a compound statement.
12326 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
12328         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
12329         * pt.c (inline_needs_template_parms): New fn.
12330         (original_template): New fn.
12331         (push_inline_template_parms_recursive): New fn.
12332         (maybe_begin_member_template_processing): Use them.
12333         (maybe_end_member_template_processing): Likewise.
12334         (is_member_or_friend_template): Rename to is_member_template.
12335         Member functions of local classes are never member templates.
12337 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12339         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
12340         added in the class scope to catch redefinition error.
12342         * pt.c (reduce_template_parm_level): Also copy
12343         the DECL_TEMPLATE_PARMS field.
12345 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
12347         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
12348         reduced-level template type parameter.
12350 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12352         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
12353         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
12354         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
12355         * decl.c (duplicate_decls): Propagate it.
12356         * typeck2.c (abstract_virtuals_error): Use two loops to emit
12357         abstract virtual functions and virtual functions which need a
12358         final overrider separately.
12360 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12362         * lang-specs.h: Properly put brackets around array elements in
12363         initializer.
12365         * typeck.c (build_binary_op_nodefault): Correctly place parens around
12366         && and || in expression.
12368 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12370         * call.c (default_parm_conversions): Remove prototype definition.
12371         (build_method_call): Remove unused variable result.
12373         * cvt.c (ocp_convert): Remove unused variable conversion.
12375         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
12377         * except.c (do_unwind): #if 0 definition of unused variables fcall
12378         and next_pc.
12380         * expr.c (extract_scalar_init): #if 0 prototype and function
12381         definition.
12383         * init.c (expand_aggr_init_1): Remove unused variable init_type.
12384         (build_new_1): Remove unused variable t.
12386         * pt.c (instantiate_class_template): Remove unused variable newtag;
12387         cast called function return value to void.
12388         (do_decl_instantiation): Remove unused variables name and fn.
12390         * tree.c (get_type_decl): Add default return to shut up compiler from
12391         complaining control reaches end of non-void function.
12393         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
12395 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12397         * call.c (default_parm_conversions): Remove prototype definition.
12398         (build_method_call): Remove unused variable result.
12399         (build_over_call): Add default case in enumeration switch.
12401 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12403         * decl2.c (lang_decode_option): Change j's type to size_t.
12405         * tree.c (layout_vbasetypes): record_align and desired_align are of
12406         type unsigned int; const_size and nonvirtual_const_size likewise.
12408 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
12410         * parse.y (new_initializer): Make sure all initializers are
12411         lists.
12413 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
12415         * decl2.c (import_export_decl): Mark tinfo functions for
12416         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
12418 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
12420         * method.c: Fix typo.
12422 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12424         * method.c: Include "system.h" to get stdlib.h, stdio.h,
12425         ctype.h, string.h, etc.
12426         (issue_nrepeats): Add default case in enumeration switch.
12427         (check_btype): Likewise.
12428         (process_overload_item): Likewise.
12430         * Makefile.in (method.o): Depend on system.h.
12432 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
12434         * lex.c (do_scoped_id): Fix parenthesizing.
12436 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
12438         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
12439         FLAG_RTTI is unset, initialize type info machinery and continue
12440         with FLAG_RTTI enabled.
12441         (get_typeid): Likewise.
12443 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
12445         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
12446         from B.
12448 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
12450         * pt.c (finish_member_template_decl): Deal more gracefully with
12451         invalid declarations.
12453 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
12455         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
12456         cp-tree.h: Clean up more old overloading code, old RTTI code, and
12457         some formatting quirks.
12459         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
12460         method.c, pt.c, ptree.c, typeck.c: Remove support for
12461         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
12462         * class.h: Remove.
12463         * Makefile.in: Adjust.
12465         * pt.c (unify): Don't allow reduced cv-quals when strict.
12467         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
12468         *type_unification* and unify.
12470 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
12472         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
12473         (nested_name_specifier): And add it before this use.
12474         (typename_sub0): And this use.  Also add use without the keyword.
12475         (typename_sub1): Likewise.
12476         * pt.c (instantiate_class_template): Don't actually instantiate
12477         anything if our type uses template parms.
12479 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
12481         * decl.c (start_function): Don't call temporary_allocation for a
12482         nested function.
12484 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
12486         * pt.c (instantiate_class_template): Don't mess with friends if
12487         our type uses template parms.
12489 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
12491         * parse.y (nested_name_specifier): Use explicit_template_type.
12492         (typename_sub): Allow a template_type, an explicit_template_type,
12493         or an implicit template type at the end.
12494         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
12495         * decl.c (make_typename_type): Handle template-id where the name
12496         is a TEMPLATE_DECL.
12497         * call.c (build_scoped_method_call): Handle member template
12498         destructor call.
12499         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
12500         destructor is represented by the type.
12502         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
12503         * parse.y (nested_name_specifier): Add 'template' case.
12504         (explicit_template_type): New rule.
12505         (typename_sub): Use it.
12506         * decl.c (make_typename_type): Handle getting a template-id for NAME.
12507         * pt.c (tsubst): Likewise.
12509 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
12511         * pt.c (add_to_template_args): Fix thinko.
12512         (instantiate_class_template): Call it later.
12514         * pt.c (get_class_bindings): Add outer_args parm.
12515         (most_specialized_class): Likewise.
12516         (instantiate_class_template): Pass it.
12517         (more_specialized_class): Likewise.
12518         (lookup_template_class): Get context from template if none
12519         was specified.
12520         (finish_member_template_decl): Don't do anything with a
12521         partial specialization.
12522         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
12523         AGGREGATE_TYPE_P.
12524         * class.c (finish_struct): Member class templates have already been
12525         checked for name clashes.
12526         * decl.c (pushdecl_with_scope): Handle pushing at class level.
12528 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
12530         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
12531         (tsubst, *_PARM): Support multiple levels of template classes.
12532         (instantiate_class_template): Look up the pattern from the
12533         original template.
12534         (lookup_template_class): Handle getting a template for d1.
12535         (push_template_decl): Correct setting of 'primary'.
12536         (reduce_template_parm_level): Add 'levels' parm.
12537         (finish_member_template_decl): Support member class templates.
12538         (template_class_depth): Handle multiple levels.
12539         * parse.y (component_decl_1, fn.def2): Remove member template case.
12540         (component_decl): Add member template cases.
12541         * decl2.c (check_member_template): We now handle member template
12542         classes.
12543         * decl.c (pushtag): Handle member templates.
12544         * method.c (do_inline_function_hair): Don't touch
12545         IDENTIFIER_GLOBAL_VALUE.
12546         * init.c (build_offset_ref): If name isn't an identifier, just
12547         return it.
12548         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
12550         * typeck.c (get_delta_difference): Do adjust for conversions to
12551         and from virtual base.
12553 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
12555         * typeck.c (get_delta_difference): Give hard error for conversion
12556         from virtual base.
12558         * cp-tree.h: Tweak formatting.
12560 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
12562         * decl.c (push_namespace): Handle redeclaration error.
12564         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
12565         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
12566         (NAMESPACE_BINDING): New macro.
12567         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
12568         * *.c: Use them.
12570         * pt.c (push_template_decl): Use innermost_args.
12572         * decl.c (get_unique_name): Tweak from earlier in the name.
12574 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12576         * cp-tree.def: Add CPLUS_BINDING node.
12577         * cp-tree.h (tree_binding): New struct.
12578         (BINDING_SCOPE, BINDING_VALUE): New macros.
12579         (current_namespace, global_namespace): Declare extern.
12580         (struct lang_decl_flags): New field in_namespace.
12581         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
12582         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
12583         (TREE_INDIRECT_USING): New macro.
12584         * decl2.c (current_namespace, global_namespace): Declare.  The
12585         value is a NAMESPACE_DECL now, not a TREE_LIST.
12586         (is_namespace_ancestor, namespace_ancestor): New static functions.
12587         (add_using_namespace, ambiguous_decl): Likewise.
12588         (lookup_using_namespace): New support function for lookup_name.
12589         (qualified_lookup_using_namespace): New support function for
12590         do_scoped_id and lookup_namespace_name.
12591         (get_namespace_id): Mark as obsolete.
12592         (current_namespace_id): Likewise.
12593         (do_namespace_alias): Implement.
12594         (do_using_directive): Implement as call to add_using_namespace.
12595         * decl.c (binding_for_name): New function.
12596         (push_namespace, pop_namespace): Implement.
12597         (push_decl): Don't install a FUNCTION_DECL in the global branch.
12598         (lookup_namespace_name): Implement using qualified lookup.
12599         (lookup_name_real): For global scoping, lookup in
12600         global_namespace.  For namespace scoping, lookup in given
12601         namespace.  For unscoped lookup, iterate over namespace,
12602         considering using directives.
12603         (init_decl_processing): Initialize global_namespace.
12604         (grokvardecl): Build assembler name as static name for globals.
12605         (grokdeclarator): Remove old namespace mangling.
12606         (xref_tag): When installing a global binding for the
12607         tag, make sure we have an identifier.
12608         * method.c (build_overload_nested_name): Mangle namespaces.
12609         (build_qualified_name): Likewise.
12610         (build_decl_overload_real): Likewise.
12611         * lex.c (build_lang_decl): Set namespace for new declaration to
12612         current_namespace.
12613         (do_scoped_id): Find global names in global or current
12614         namespace, or using qualified namespace lookup, depending on
12615         context.
12616         * init.c (build_member_call): When scope is namespace, use
12617         build_x_function_call instead.
12618         (build_offset_ref): When scope is namespace, collapse processing
12619         to lookup_namespace_name instead.
12620         * error.c (dump_decl): Support NAMESPACE_DECL.
12621         * decl.c (pushdecl): Bind globals to current namespace.
12622         (push_overloaded_decl): Likewise.
12623         (lookup_tag): Likewise.
12624         (lookup_name_current_level): Likewise.
12625         (xref_tag): Likewise.
12626         (start_function): Likewise.
12627         * lex.c (do_identifier): Likewise.
12628         (identifier_typedecl_value): Likewise.
12629         (real_yylex): Likewise.
12630         * method.c (do_inline_function_hair): Likewise.
12631         * parse.y (unscoped): Likewise.
12632         * pt.c (check_explicit_specialization): Likewise.
12633         (lookup_template_class): Likewise.
12634         * rtti.c (call_void_fn): Likewise.
12635         * sig.c (build_sigtable): Likewise.
12636         * ptree.c (lang_print_xnode): New function.
12638 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
12640         * pt.c (instantiate_class_template): Don't instantiate if pedantic
12641         and the args use template parms.
12643         * pt.c (push_tinst_level): If the instantiation uses template parms,
12644         fail silently.
12645         * decl.c (xref_basetypes): Do call complete_type for basetypes
12646         that involve template parameters.
12648 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
12650         * typeck2.c (process_init_constructor): Fix labeled init check.
12652 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
12654         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
12655         argument to tsubst and friends.
12657         * pt.c (tsubst, FUNCTION_DECL): Tidy.
12659         * typeck.c (build_x_function_call): Handle static member function
12660         templates like non-templates.  Handle friend templates like normal
12661         function templates.
12662         * pt.c (tsubst, *_PARM): Don't use orig_level.
12663         (get_bindings): Don't call add_to_template_args.
12664         (instantiate_template): Likewise.
12665         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
12666         * ptree.c (print_lang_type): Print index/level for template parms.
12668 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
12670         * Make-lang.in (cc1plus): Note that cc1plus depends on
12671         cp/cp-tree.h and cp/cp-tree.def.
12673         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
12674         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
12675         position in a template parameter list.
12676         * cp-tree.h (template_parm_index): New structure, used as the tree
12677         structure for a TEMPLATE_PARM_INDEX.
12678         (TEMPLATE_PARM_IDX): New macro.
12679         (TEMPLATE_PARM_LEVEL): Likewise.
12680         (TEMPLATE_PARM_DESCENDANTS): Likewise.
12681         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
12682         (TEMPLATE_PARM_DECL): Likewise.
12683         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
12684         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
12685         (TEMPLATE_TYPE_DECL): Likewise.
12686         (TEMPLATE_CONST_IDX): Remove.
12687         (TEMPLATE_CONST_LEVEL): Likewise.
12688         (TEMPLATE_CONST_SET_INFO): Likewise.
12689         (TEMPLATE_TYPE_SET_INFO): Likewise.
12690         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
12691         node.
12692         (TEMPLATE_TYPE_LEVEL): Likewise.
12693         * decl.c (decls_match): Call comp_template_parms, rather than
12694         expanding it inline.
12695         (duplicate_decls): If two template declarations are being merged,
12696         then their TEMPLATE_INFOs should be merged as well.
12697         (grokfndecl): Save template-id information when declaring a friend
12698         with explicit template arguments.  Pass arguments to
12699         check_explicit_specialization via correct convention; at some
12700         point check_explicit_specialization changed, but these call-sites
12701         did not.
12702         (grokdeclarator): Tidy up slightly.
12703         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
12704         two template functions with the same DECL_ASSEMBLER_NAME the same,
12705         since the names are not yet mangled.
12706         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
12707         TEMPLATE_CONST_PARM.
12708         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
12709         decl for a non-type parameter, rather than printing `<tparm ...>'.
12710         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
12711         (do_friend): Deal with template friends.
12712         * lex.c (do_pending_inlines): Call
12713         maybe_begin_member_template_processing, rather than
12714         conditionally calling begin_member_template_processing.
12715         (process_next_inline): Likewise.  Call
12716         maybe_end_member_template_processing, rather than
12717         conditionally calling end_member_template_processing.
12718         (do_pending_defargs): Likewise.
12719         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
12720         TEMPLATE_CONST_PARM.
12721         * method.c (build_mangled_template_parm_index): New function.
12722         (build_overload_value): Use it.
12723         (build_overload_name): Likewise.
12724         * pt.c (finish_member_template_decl): Allow friend declarations.
12725         (template_class_depth): New function.
12726         (is_member_template): Rename, and modify, to become...
12727         (is_member_or_friend_template): New function.
12728         (end_member_template_processing): Rename, and modify, to become...
12729         (maybe_end_member_template_processing).
12730         (build_template_parm_index): New function.
12731         (reduce_template_parm_level): New function.
12732         (process_template_parm): Modify to use build_template_parm_index.
12733         (push_template_decl): Deal with friend templates.
12734         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
12735         TEMPLATE_CONST_PARM.
12736         (tsubst_friend_function): New function.
12737         (instantiate_class_template): Generate the DECL_FRIENDLIST
12738         for a new instantiation by using tsubst_friend_function rather
12739         than just tsubst.
12740         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
12741         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
12742         appropriate new macros.  Use reduce_template_parm_level to
12743         generate lower-level template parameters.  Handle tsubst'ing into
12744         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
12745         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
12746         templates.  Similarly for the template parameters for a new
12747         template.
12748         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
12749         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
12750         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
12751         (get_bindings): Call add_to_template_args if necessary.
12752         (instantiate_decl): Handle instantiations of friend templates.
12753         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
12754         TEMPLATE_TYPE_PARM as a list of fields; it's not!
12755         * spew.c (yylex): Do a little manual constant propagation to
12756         clarify the code.
12758 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
12760         * error.c: Include sys/types.h.
12762 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
12764         * method.c (build_mangled_name): Start CPP directives in column zero.
12766 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
12768         * typeck2.c (process_init_constructor): Sorry about non-trivial
12769         labeled initializers.
12770         * parse.y (initlist): Re-enable labeled initializers.
12772 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12774         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
12775         all callers changed.  Rely on the new parameter instead of arg
12776         being a TREE_LIST when determine whether we are working inside
12777         template template parameter.  Clean up is_type test.
12779 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
12781         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
12782         * typeck2.c (initializer_constant_valid_p): Allow conversions
12783         between pointers and references.
12785 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
12787         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
12788         if pedantic || warn_pointer_arith.
12790 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12792         * pt.c (unify): Handle TEMPLATE_DECL.
12794 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
12796         * cp-tree.h (strip_attrs): Remove decl.
12798 1998-02-18  Doug Evans  <devans@cygnus.com>
12800         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
12801         Update olddecl's attributes too.
12802         (strip_attrs): Remove function.
12803         * typeck.c (common_type): Call merge_machine_type_attributes.
12805 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
12807         * parse.y (initdcl0_innards): New grammar symbol.
12808         (nomods_initdecls, nomods_initdcl0): Change type from itype to
12809         none, since the resulting value is never used.
12810         (parse_decl): New function.
12811         (datadef): Remove redundant actions.
12812         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
12813         * parse.c: Regenerated.
12815 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
12817         * parse.y (simple_stmt): Use getdecls() to check for decl.
12819 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12821         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
12822         macros.
12823         (c++.install-common): Install c++filt properly as native or as cross
12824         variant.
12825         (c++.uninstall): Add c++filt.
12827 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
12829         * call.c (standard_conversion): Fix multi-level ptr conversions.
12831 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
12833         * init.c (build_new): Propagate error_mark_node up.
12835 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
12837         * parse.y (simple_stmt): If the condition isn't a declaration,
12838         start the controlled block after the test.
12840 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
12842         * call.c (build_over_call): Convert builtin abs, labs and fabs to
12843         tree-codes.
12844         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
12845         builtins.
12847 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
12849         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
12851 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
12853         * cp-tree.h: Add access_protected_virtual_node.
12854         * class.c (init_class_processing): Initialize it.
12855         * decl.c (xref_basetypes): Use it.
12856         * parse.y (base_class_access_list): Likewise.
12858         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
12859         (c++.install-common): Install c++filt.
12861 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12863         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
12865 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
12867         * call.c (reference_binding): Use comptypes when comparing
12868         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
12870 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
12872         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
12873         (really_overloaded_fn): Move check here from is_overloaded_fn.
12874         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
12876 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
12878         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
12879         conversions.
12881 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
12883         * cp-tree.h (push_template_decl): Return the decl passed in, or an
12884         equivalent duplicate.
12885         * decl.c (pushtag): Use the return value from push_template_decl.
12886         (duplicate_decls): When duplicating a template declaration, merge
12887         the DECL_TEMPLATE_RESULTs as well.
12888         (make_implicit_typename): Don't try to dive into typename types to
12889         find a context for making a new implicit typename.
12890         (start_decl): Use the return value from push_template_decl.
12891         (grokdeclarator): Complain about declarations list `const operator
12892         int'.  Since we don't correctly handle in-class initializations of
12893         non-static data members, complain about this (now illegal)
12894         practice.  Issue an error for initializations of non-const statics
12895         since that is illegal as well, and since we don't handle that case
12896         correctly either.
12897         (start_function): Use the return value from push_template_decl.
12898         (start_method): Likewise.
12899         * decl2.c (grokfield): Likewise.  Since the change to
12900         grokdeclarator ensures that all initialized fields are in fact
12901         static, remove a redundant test for TREE_PUBLIC.
12902         * parse.y (initlist): Disable labeled initializers since they do
12903         not work as per the documentation, and since they do not use the
12904         same syntax as the C front end.
12905         * pt.c (push_template_decl): Return the decl passed in, or an
12906         equivalent duplicate.
12907         (lookup_template_class): When searching in a nested context,
12908         use the right arguments.
12909         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
12910         * typeck.c (build_component_ref): Assign the correct type to the
12911         result of build_vfn_ref.
12913 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
12915         * pt.c (convert_nontype_argument): Fix typo.
12916         (check_explicit_specialization): Allow old-style specialization
12917         of class template members.
12919 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
12920                           Manfred Hollstein  <manfred@s-direktnet.de>
12922         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
12923         when deciding to override DECL_ASSEMBLER_NAME.
12925 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
12927         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
12928         * cp-tree.h (flag_do_squangling): Add declaration.
12929         * lang-options.h: Add -fsquangle and -fno-squangle.
12930         * method.c: Add macros and static variables for squangling.
12931         (build_overload_name): Rename to build_mangled_name, add logic for B
12932         compression, and split into process_modifiers and
12933         process_overload_item.
12934         (process_modifiers): New function, to handle constant, reference,
12935         and pointer types.
12936         (process_overload_item): New function, handles issue of type codes.
12937         (build_overload_name): New function, start squangling and call
12938         build_mangled_name.
12939         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
12940         (start_squangling): New function to initialize squangling structs.
12941         (end_squangling): New function to destroy squangling structs.
12942         (nrepeats): Rename variable to Nrepeats.
12943         (issue_nrepeats): New function for issuing 'n' type repeats.
12944         (check_ktype): New function to check for type K name compression.
12945         (build_overload_nested_name): Add a check for K name compression.
12946         (build_qualified_name): Add a check for K name compression and don't
12947         use DECL_ASSEMBLER_NAME when squangling is on.
12948         (check_btype): New function, checks for B type compression.
12949         (build_static_name, build_decl_overload_real): Initiate squangling.
12950         (build_typename_overload, build_overload_with_type): Initiate
12951         squangling
12953 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
12955         * method.c (make_thunk): Avoid name buffer overflow.
12957 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
12959         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
12960         don't define them yet.
12962         * parse.y (nomods_initdcl0): Add constructor_declarator case.
12964 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12966         * config-lang.in (diff_excludes): Use basename only.
12968 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
12970         * tinfo2.cc: Add tinfo for signed char.
12972 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
12974         * search.c (compute_access): Handle protected constructors in derived
12975         classes as accessible.
12977 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
12979         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
12980         Call convert_from_reference sooner.
12982 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
12984         * cvt.c (ocp_convert): Obtain the constant values from constant
12985         decls even if the destination type is the same as the type of the
12986         decl.
12988         * decl2.c (finish_file): Make sure that static inlines with
12989         definitions are not marked DECL_EXTERNAL before returning.
12991 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
12993         * decl.c: Lose arg_looking_for_template.
12994         (lookup_name_real): Likewise.
12995         * parse.y: Lose processing_template_arg, template_arg1.
12996         (primary): Likewise.
12997         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
12999 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13001         * error.c (dump_decl): Fix type of default arguments for template
13002         template parameters and nontype template parameters.
13003         * parse.y (template_parm): Handle invalid default template
13004         template arguments here.
13006         * parse.y (template_parm): Use template_arg instead of PTYPENAME
13007         for default template template argument.
13008         * pt.c (coerce_template_parms): Merge default template argument
13009         codes.  Can treat RECORD_TYPE as template name if it is implicitly
13010         created.  Fix argument index in error message.
13011         * typeck.c (comptypes): Merge template argument comparison codes in
13012         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
13014 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
13016         * lex.c (file_name_nondirectory): Also check for '/'.
13018 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
13020         * parse.y (primary): Deal with statement-expressions in
13021         templates.
13022         * pt.c (tsubst_copy): Handle BIND_EXPR.
13023         * tree.c (mapcar): Likewise.
13025         * call.c (add_template_candidate_real): Pass extra parameter to
13026         fn_type_unification.
13027         * cp-tree.h (fn_type_unification): Add parameter.
13028         * pt.c (fn_type_unification): Add additional parameter to deal with
13029         static member functions.
13030         (get_bindings): Deal with static member functions.
13032         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
13033         (revert_static_member_fn): Declare.
13034         * decl.c (revert_static_member_fn): Remove declaration.  Change
13035         linkage from internal to external.
13036         (cp_finish_decl): Deal with virtual functions in classes local to
13037         template functions.
13038         * decl2.c (finish_file): Don't forget to emit increment/decrement
13039         expressions in initializers for file-scope variables.
13040         * parse.y (typename_sub2): If the typename doesn't names a
13041         template, rather than a type, issue an error message.
13042         * pt.c (check_explicit_specialization): Handle specializations of
13043         static member functions.
13044         (coerce_template_parms): Handle offset references to lists of
13045         member functions.
13046         * search.c (note_debug_info_needed): Don't crash when handed a
13047         type which is being defined.
13048         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
13049         that can happen with some illegal code.
13051 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13053         * call.c (user_harshness): Initialize `code' to 0.
13054         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
13055         (null_ptr_cst_p): Add parentheses around && within ||.
13056         (standard_conversion): Likewise.
13057         (z_candidate): Likewise.
13058         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
13059         (build_object_call): Likewise for `mem_args'.
13060         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
13061         default case in enumeration switch.
13063         * class.c (build_vtable_entry): Add explicit braces to avoid
13064         ambiguous `else'.
13065         (build_class_init_list): Likewise.
13066         (finish_struct_1): Initialize `width' to 0.
13067         (instantiate_type): Initialize `name' to NULL_TREE.  Add
13068         explicit braces to avoid ambiguous `else'.
13070         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
13071         `else'.
13073         * decl.c (grok_reference_init): Eliminate unused parameter, all
13074         callers changed.
13075         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
13076         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
13077         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
13078         (grokdeclarator): Add parentheses around && within ||.  Add
13079         explicit braces to avoid ambiguous `else'.
13080         (grokparms): Initialize `type' to NULL_TREE.
13081         (xref_tag): Remove unused label `just_return'.
13082         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
13083         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
13084         (hack_incomplete_structures): Add parentheses around assignment
13085         used as truth value.
13087         * decl2.c (coerce_delete_type): Hide definition of `e3'.
13089         * error.c: Include <stdlib.h>.
13090         (dump_expr): Change the type of `i' to size_t.  Remove unused
13091         label `error'.
13093         * except.c (init_exception_processing): Remove unused variable `d'.
13094         (expand_throw): Likewise for `label'.
13096         * friend.c (add_friends): Add explicit braces to avoid ambiguous
13097         `else'.
13099         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
13100         (sort_base_init): Likewise for `binfo'.
13101         (expand_member_init): Likewise for `rval'.
13102         (build_member_call): Add parentheses around assignment used as
13103         truth value.
13104         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
13105         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
13106         `old_immediate_size_expand' to 0.
13107         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
13108         (build_vec_delete_1): Remove unused variable `block'.
13109         (expand_vec_init): Initialize `itype' to NULL_TREE.
13111         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
13112         declaration of `index' and `rindex' with autoconf macros.
13113         (reinit_parse_for_expr): Remove unused variables
13114         `look_for_semicolon' and `look_for_lbrac'.
13115         (cons_up_default_function): Initialize `args' to NULL_TREE.
13116         (readescape): Initialize `firstdig' to 0.
13117         (real_yylex): Add parentheses around assignment used as truth value.
13119         * method.c: Include <strings.h> if we don't have <string.h>.
13120         Protect declaration of `index' with autoconf macro.
13122         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
13123         Initialize `type' to NULL_TREE.
13124         (structsp): Remove unused variable `id'.
13126         * pt.c (coerce_template_parms): Add explicit braces to avoid
13127         ambiguous `else'.
13128         (lookup_template_class): Initialize `template' to NULL_TREE.
13129         (instantiate_class_template): Remove unused variable `name' and `e'.
13130         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
13131         (do_poplevel): Initialize `saved_warn_unused' to 0.
13132         (type_unification): Remove unused varable `parm'.
13133         (unify): Likewise for `j'.
13135         * repo.c (init_repo): Add parentheses around assignment used as
13136         truth value.
13137         (finish_repo): Remove unused varable `p'.
13139         * search.c (get_binfo): Initialize `type' to NULL_TREE.
13140         (get_base_distance): Likewise.
13141         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
13142         and `new_v' to NULL_TREE.
13143         (lookup_fnfields): Likewise for `rval_binfo_h'.
13144         (breadth_first_search): Add parentheses around assignment used as
13145         truth value.
13146         (get_template_base): Initialize `type' to NULL_TREE.
13148         * sig.c (append_signature_fields): Initialize `last_mfptr' to
13149         NULL_TREE.
13150         (build_signature_table_constructor): Likewise for
13151         `last_rhs_field', `pfn' and `vt_off'.
13152         (build_sigtable): Likewise for `init'.
13154         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
13155         (propagate_binfo_offsets): Likewise for `delta'.
13156         (hash_tree_cons): Initialize hashcode to 0.
13157         (can_free): Likewise for `size'.
13158         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
13160         * typeck.c (convert_sequence): Hide prototype.
13161         (common_type): Add explicit braces to avoid ambiguous `else'.
13162         (comp_target_types): Likewise.
13163         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
13164         (build_function_call_real): Add explicit braces to avoid ambiguous
13165         `else'.
13166         (convert_arguments): Initialize `called_thing' to 0.
13167         (convert_for_initialization): Initialize `savew' and `savee' to 0.
13169         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
13170         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
13171         (build_x_arrow): Likewise for `last_rval'.
13173         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
13175 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
13177         * decl.c (init_decl_processing): Use set_sizetype.
13178         * decl2.c (sizetype): Don't declare.
13179         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
13180         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
13181         (build_component_addr, unary_complex_lvalue): Likewise.
13182         * rtti.c (expand_class_desc): Likewise.
13183         * class.c (get_vfield_offset): Likewise.
13185 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
13187         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
13188         early to avoid bogus error.  Handle overloaded function
13189         names provided as template arguments correctly.
13190         (coerce_template_parms): Don't mishandle overloaded functions when
13191         dealing with template template parameters.
13192         (lookup_template_class): Issue an error message, rather than
13193         crashing, when the TYPE_DECL provided is not a template type.
13195 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
13197         * class.c (instantiate_type): Don't just return a known type if
13198         it's wrong.
13200 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
13202         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
13203         since that code could never be reached.
13205         * error.c (dump_decl): Avoid aborting in the midst of printing an
13206         error message about an illegal template declaration.
13208         * parse.y (structsp): Print an error message, rather than crashing,
13209         when a class-head does not name a class.
13211         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
13212         template arguments as a g++ extension.
13214         * cp-tree.def (ALIGNOF_EXPR): New tree code.
13215         * decl2.c (grok_alignof): If processing_template_decl, just store
13216         the expression.
13217         * typeck.c (c_alignof): Likewise.
13218         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
13219         * error.c (dump_expr): Likewise.
13220         * pt.c (tsubst_copy): Likewise.
13221         * tree.c (cp_tree_equal): Likewise.
13222         * pt.c (uses_template_parms): Correctly determine whether or not a
13223         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
13224         folding can be done.
13226         * cp-tree.h (grok_enum_decls): Remove type parameter.
13227         * decl.c (grok_enum_decls): Likewise.
13228         * decl2.c (grok_x_components): Call grok_enum_decls
13229         unconditionally, since it will do nothing if there is no
13230         current_local_enum.  Use the new calling sequence.
13231         * pt.c (tsubst_enum): Use the new calling sequence for
13232         grok_enum_decls.
13234         * decl.c (start_function): Make member functions of local classes
13235         in extern inline functions have comdat linkage here...
13236         (grokdeclarator): Rather than here.
13238 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
13240         * pt.c (convert_nontype_argument): Use decl_constant_value.
13242 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
13244         * call.c (add_template_candidate_real): New function.
13245         (add_template_candidate): Use it.
13246         (add_template_conv_candidate): Likewise.
13247         (joust): Pass extra argument to more_specialized.
13248         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
13249         (is_local_class): Remove.
13250         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
13251         * cp-tree.h (is_local_class): Remove.
13252         (perform_array_to_pointer_conversion): Likewise.
13253         (finish_member_template_decl): Add.
13254         (check_explicit_specialization): Return a tree, not an int.
13255         (more_specialized): Take additional argument.
13256         (get_bindings): Likewise.
13257         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
13258         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
13259         (perform_array_to_pointer_conversion): Remove.
13260         * decl.c (saved_scope): Add processing_specialization,
13261         processing_explicit_instantiation fields.
13262         (maybe_push_to_top_level): Save them.
13263         (pop_from_top_level): Restore them.
13264         (grokfndecl): Use new return value from
13265         check_explicit_specialization.
13266         (start_decl): Don't check flag_guiding_decls before pushing
13267         decls.
13268         (cp_finish_decl): Remove previous (bogus) change.
13269         (grok_declarator): Use decl_function_context rather than
13270         is_local_class.
13271         * decl2.c (finish_file): Pass extra argument to get_bindings.
13272         (build_expr_from_tree): Let build_x_component_ref check
13273         validity of arguments rather than doing it here.
13274         * lex.c (cons_up_default_function): Remove code fooling with
13275         processing_specialization, processing_explicit_instantiation
13276         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
13277         * method.c (build_overload_identifier): Mangle local classes in
13278         template functions correctly.
13279         * parse.y (finish_member_template_decl): Move to pt.c.
13280         * pt.c (finish_member_template_decl): Moved here from parse.y.
13281         (print_candidates): New function.
13282         (determine_specialization): Change interface.  Properly look for
13283         most specialized versions of template candidates.
13284         (check_explicit_specialization): Fully process explicit
13285         instantiations.
13286         (push_template_decl): Avoid looking at CLASSTYPE fields in
13287         FUNCTION_DECLS.
13288         (determine_overloaded_function): Remove.
13289         (convert_nontype_argument): Change name from
13290         convert_nontype_parameter.  Use determine_overloaded_function
13291         instead of instantiate_type.
13292         (mangle_class_name_for_template): Handle type contexts as well as
13293         function contexts.
13294         (classtype_mangled_name): Likewise.
13295         (lookup_template_class): Likewise.
13296         (tsubst): Likewise.
13297         (more_specialized): Take explict template arguments as a
13298         parameter.
13299         (most_specialized): Likewise.
13300         (get_bindings): Likewise.  Check that return types match before
13301         proclaiming a function a match.
13302         (do_decl_instantiation): Remove code searching for function to
13303         instantiate; that is now done in check_explicit_specialization.
13304         (add_maybe_template): Pass extra argument to get_bindings.
13305         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
13306         implementation.
13307         * typeck.c (build_component_ref): Check for invalid arguments.
13309 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
13311         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
13312         return_target and call_target are equivalent.
13314         * pt.c (type_unification_real): Just accept function parms that
13315         don't use any template parms.
13317 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
13319         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
13320         unset DECL_NOT_REALLY_EXTERN.
13322         * parse.y (typename_sub*): Fix std::.
13324 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
13326         * error.c (dump_decl): Fix type default template args.
13327         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
13329 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
13331         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
13332         (file_name_nondirectory): Use.
13334 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13336         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
13337         that are not really present.  Substitute default arguments in
13338         template template arguments.  Correctly convert TEMPLATE_DECL to
13339         TEMPLATE_TEMPLATE_PARM.
13340         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
13341         are no longer treated specially here.
13342         * parse.y (template_template_parm): Fix copy error.
13343         * decl.c (grokdeclarator): Warn about missing `typename' for nested
13344         type created from template template parameters.
13345         * parse.y (bad_parm): Likewise
13347         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
13348         (push_nested_class): Likewise.
13349         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
13350         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
13351         (copy_template_template_parm): Declare.
13352         * decl.c (arg_looking_for_template): New variable.
13353         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
13354         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
13355         node if arg_looking_for_template is nonzero.
13356         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
13357         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
13358         (grokdeclarator): Handle TEMPLATE_DECL.
13359         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
13360         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
13361         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
13362         (dump_decl): Handle unnamed template type parameters.
13363         Handle template template parameters.
13364         (dump_function_name): Handle template template parameters.
13365         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
13366         Handle TEMPLATE_TEMPLATE_PARM.
13367         * method.c (build_template_template_parm_names): New function.
13368         (build_template_parm_names): Handle TEMPLATE_DECL.
13369         (build_overload_nested_name, build_overload_name):
13370         Handle TEMPLATE_TEMPLATE_PARM.
13371         * parse.y (maybe_identifier): New nonterminal.
13372         (template_type_parm): Use it.
13373         (template_template_parm, template_arg1): New nonterminal.
13374         (template_parm): Add template_template_parm rules.
13375         (template_arg): Set processing_template_arg.
13376         (template_arg1): Rules moved from template_arg.
13377         (primary, nonnested_type): Set arg_looking_for_template if we are
13378         processing template arguments.
13379         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
13380         (process_template_parm): Handle template template parameters.
13381         (coerce_template_parms, comp_template_args): Likewise.
13382         (mangle_class_name_for_template, lookup_template_class): Likewise.
13383         (uses_template_parms): Handle TEMPLATE_DECL and
13384         TEMPLATE_TEMPLATE_PARM.
13385         (current_template_args): Handle TEMPLATE_DECL.
13386         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
13387         * search.c (dfs_walk, dfs_record_inheritance):
13388         Handle TEMPLATE_TEMPLATE_PARM.
13389         * tree.c (copy_template_template_parm): New function.
13390         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
13391         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
13393 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
13395         * decl.c (start_decl): Don't allow duplicate definitions of static
13396         data members.
13398         * call.c (build_user_type_conversion_1): Handle user-defined
13399         template conversion operators correctly.
13401         * decl2.c (build_expr_from_tree): Issue an error message if the
13402         object in a COMPONENT_REF is a TEMPLATE_DECL.
13404         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
13406         * class.c (is_local_class): New function.
13407         * cp-tree.h (is_local_class): Declare it.
13408         (last_tree): Likewise.
13409         (begin_tree): Likewise.
13410         (end_tree): Likewise.
13411         (lookup_template_class): Change prototype.
13412         * decl.c (cp_finish_decl): Check for NULL where necessary.
13413         Consider FUNCTION_DECLS to declare objects with top-level binding,
13414         when calling make_decl_rtl.
13415         (grokdeclarator): Give members of local classes internal linkage.
13416         (start_function): Remove declaration of last_tree.
13417         (finish_function): Set flag_keep_inline_functions around call to
13418         rest_of_compilation if we are processing a member function in a
13419         local class.
13420         (start_method): Call push_template_decl for member functions of
13421         local classes in template functions.
13422         * decl2.c (import_export_decl): Don't give external linkage to
13423         instantiations of templates with internal linkage.
13424         * parse.y (last_tree): Remove declaration.
13425         (template_type): Pass extra parameter to lookup_template_class.
13426         (self_template_type): Likewise.
13427         (structsp): Move call to reset_specialization into left_curly.
13428         (left_curly): Call reset_specialization, and begin_tree.
13429         * pt.c (saved_trees): New variable.
13430         (mangle_class_name_for_template): Change prototype.  Use
13431         additional function context to name local classes in templates
13432         correctly.
13433         (classtype_mangled_name): Pass the context.
13434         (push_template_decl): Handle local classes and templates, and
13435         member functions for such classes.
13436         (convert_nontype_parameter): Fix handling of pointer-to-member
13437         constants.
13438         (lookup_template_class): Handle local classes in templates.
13439         (tsubst): Likewise.  Don't assume that template instantiations
13440         have external linkage; pay attention to the template declaration.
13441         (mark_decl_instantiated): Likewise.
13442         (begin_tree): New function.
13443         (end_tree): Likewise.
13445         * decl.c (xref_basetypes): Don't call complete_type for basetypes
13446         that involve template parameters; that can lead to infinite
13447         recursion unnecessarily.
13449         * pt.c (register_specialization): Do not register specializations
13450         that aren't ready to be registered yet.
13451         (check_explicit_specialization): Handle explicit specialization of
13452         constructors and destructors.
13453         (build_template_decl): New function.
13454         (push_template_delc): Handle out-of-class specializations of
13455         member templates.
13457         * pt.c (check_explicit_specialization): Set up the template
13458         information before registering the specialization.
13459         (coerce_template_parms): Fix thinko.
13460         (tsubst): Handle specializations of member templates correctly.
13462         * class.c (finish_struct_methods): Remove calls to
13463         check_explicit_specialization from here.
13464         (finish_struct): And insert them here.
13465         * cp-tree.h (perform_qualification_conversions): New function.
13466         (perform_array_to_pointer_conversion): Likewise.
13467         (begin_explicit_instantiation): Likewise.
13468         (end_explicit_instantiation): Likewise.
13469         (determine_specialization): Renamed from
13470         determine_explicit_specialization.
13471         (comp_template_parms): New function.
13472         (processing_explicit_instantiation): New variable.
13473         * cvt.c (perform_qualification_conversions): New function.
13474         (perform_array_to_pointer_conversion): Likewise.
13475         * decl.c (duplicate_decls): Don't consider template functions
13476         alike unless they have the same parameters.  Refine handling of
13477         instantiation/specialization mismatches.
13478         (start_decl): Don't call pushdecl for template specializations,
13479         since they don't affect overloading.
13480         (start_function): Likewise.
13481         (grokfndecl): Call check_explicit_specialization a little later.
13482         Don't call duplicate_decls for memberm template specializations.
13483         (grokdeclarator): Don't update template_count for classes that are
13484         themselves specializations.  Remove use of `2' as parameter to
13485         grokfndecl since that value isn't used.
13486         * lex.c (cons_up_default_function): Save and restore
13487         processing_explicit_instantiation around calls to grokfield.
13488         * parse.y (finish_member_template_decl): New function.
13489         (component_decl_1): Use it.
13490         (fn.def2): Likewise.
13491         (template_arg_list_opt): New nonterminal.
13492         (template_type): Use it.
13493         (self_template_type): Likewise.
13494         (template_id): Likewise.
13495         (object_template_id): Likewise.
13496         (notype_template_declarator): Likwise.
13497         (begin_explicit_instantiation): Likewise.
13498         (end_explicit_instantiation): Likewise.
13499         (explicit_instantiation): Use them.
13500         * pt.c (coerce_template_parms): Add parameters.
13501         (processing_explicit_instantiation): New variable.
13502         (convert_nontype_parameter): New function.
13503         (determine_overloaded_function): Likewise.
13504         (begin_explicit_instantiation): Likewise.
13505         (end_explicit_instantiation): Likewise.
13506         (retrieve_specialization): Likewise.
13507         (register_specialization): Likewise.
13508         (processing_explicit_specialization): Removed.
13509         (determine_specialization): Handle specializations of member
13510         functions of template class instantiations.
13511         (check_explicit_specialization): Refine to conform to standard.
13512         (comp_template_parms): New function.
13513         (coerce_template_parms): Call convert_nontype_parameter.
13514         (tsubst): Refine handling of member templates.  Use
13515         register_specialization.
13516         (instantiate_template): Use retrieve_specialization.
13517         (do_decl_instantiation): Likewise.
13518         (instantiate_decl): Likewise.
13519         (type_unification): Improve handling of explict template
13520         arguments.
13521         * tree.c (mapcar): Return error_mark_node, rather than aborting,
13522         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
13523         * typeck.c (build_unary_op): Call determine_specialization, rather
13524         than determine_explicit_specialization.
13526 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
13528         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
13530 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13532         * error.c (dump_decl): For enum tags, output the tag, not its value.
13534 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
13536         * decl.c (init_decl_processing): Only call init_rtti_processing
13537         FLAG_RTTI is set.
13539 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
13541         * init.c (build_new_1): Split out from build_new.
13542         (build_new): Just return a NEW_EXPR.
13543         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
13545         * decl2.c (get_temp_regvar): Tweak.
13547         * cp-tree.h (TREE_CALLS_NEW): Comment out.
13548         * class.c (resolves_to_fixed_type_p): Remove use.
13549         * method.c (build_opfncall): Likewise.
13550         * call.c (build_new_op): Likewise.
13552 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
13554         * exception.cc (__eh_alloc, __eh_free): New fns.
13555         (__cp_push_exception, __cp_pop_exception): Use them.
13556         (__uncatch_exception): Call terminate here if no exception.
13557         * except.c (build_terminate_handler): New fn.
13558         (expand_start_catch_block): Use it.
13559         (expand_exception_blocks): Likewise.
13560         (alloc_eh_object): New fn.
13561         (expand_throw): Use it.  Protect exception init with terminate.
13562         * typeck.c (build_modify_expr): Remove code that ignores trivial
13563         methods.
13565 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13567         * call.c (add_builtin_candidate): Add default case in enumeration
13568         switch.
13569         (build_new_op): Likewise.
13570         (convert_like): Likewise.
13571         * cvt.c (build_expr_type_conversion): Likewise.
13572         * tree.c (real_lvalue_p): Likewise.
13573         (lvalue_p): Likewise.
13574         (cp_tree_equal): Likewise.
13575         * typeck.c (comptypes): Likewise.
13576         (build_component_ref): Likewise.
13577         (build_function_call_real): Likewise.
13578         (build_binary_op_nodefault): Likewise.
13579         (build_unary_op): Likewise.
13580         (build_modify_expr): Likewise.
13581         * typeck2.c (initializer_constant_valid_p): Likewise.
13583 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
13585         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
13587 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
13589         * pt.c (coerce_template_parms): Make sure to digest_init if
13590         possible.
13592         * decl.c (duplicate_decls): Make the newdecl virtual if the
13593         olddecl was, just as is done with other attributes of olddecl.
13595 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
13597         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
13598         address of an OFFSET_REF.
13600         * cp-tree.def: Add AGGR_INIT_EXPR.
13601         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
13602         AGGR_INIT_EXPR where appropriate.
13603         * expr.c (cplus_expand_expr): Likewise.  Simplify.
13605         * decl2.c (finish_file): Remove call to register_exception_table.
13607 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13609         * pt.c (instantiate_class_template): Don't do injection when
13610         processing_template_decl is true, as pollutes current_binding_level
13611         for base classes.
13613 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
13615         * pt.c (maybe_fold_nontype_arg): Add prototype.
13617 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
13619         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
13620         * error.c (dump_expr): Likewise.
13622 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
13624         * typeck.c (build_function_call_real): Remove "inline called before
13625         definition" pedwarn.
13627         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
13629 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
13631         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
13633         * pt.c (type_unification_real): Change __null to type void* with
13634         a warning.
13636 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
13638         * call.c (implicit_conversion): Don't call
13639         build_user_type_conversion_1 with a NULL expr, since it will
13640         crash.
13642         * pt.c (unify): Don't try to unify array bounds if either array is
13643         unbounded.
13645 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
13647         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
13648         Replace extern decls with casts.
13650         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
13651         Update last_parm_cleanup_insn.
13652         (store_after_parms): Remove.
13653         * cp-tree.h: Adjust.
13655 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
13657         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
13658         (finish_file): Check DECL_COMDAT instead of weak|one_only.
13659         (import_export_vtable): Use make_decl_one_only instead of
13660         comdat_linkage for win32 tweak.
13661         (import_export_decl): Likewise.
13662         * pt.c (mark_decl_instantiated): Likewise.
13664         * decl2.c (finish_file): Lose handling of templates in pending_statics.
13666 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
13668         * decl2.c (finish_file): Lose call to expand_builtin_throw.
13669         * except.c (expand_builtin_throw): Remove.
13670         * cp-tree.h: Remove ptr_ptr_type_node.
13671         * decl.c: Likewise.
13673 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
13675         * decl.c (ptr_ptr_type_node): Define.
13676         (init_decl_processing): Initialize it.
13677         * cp-tree.h: Declare it.
13678         * exception.cc (__cp_exception_info): Use __get_eh_info.
13679         (__cp_push_exception): Likewise.
13680         (__cp_pop_exception): Likewise.
13682         From Scott Snyder <snyder@d0sgif.fnal.gov>:
13683         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
13684         saved_pc.
13685         (init_exception_processing): Removed saved_pc initialization.
13687 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
13689         * pt.c (instantiate_decl): Defer all templates but inline functions.
13691 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13693         * init.c (expand_vec_init): Don't fold a list of parameters.
13695         * decl.c (copy_args_p): Handle copy elision for types with virtual
13696         bases.
13697         * call.c (build_over_call): Likewise.
13699 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
13701         * pt.c (lookup_template_function): Copy the template arguments,
13702         not just the list containing them, to the permanent obstack.
13704 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
13706         * except.c (expand_start_catch_block): suspend_momentary for the
13707         terminate handler.
13709         * error.c (dump_decl): Handle LOOKUP_EXPR.
13711 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
13713         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
13714         permanent obstack if we are processing a template decl.
13715         * typeck.c (build_static_cast): Likewise.
13716         (build_const_cast): Likewise.
13717         (build_reinterpret_cast): Likewise.
13719         * pt.c (coerce_template_parms): Coerce some expressions, even
13720         when processing_template_decl.
13722 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13724         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
13725         handling of pointer difference expressions.
13727         * typeck.c (comp_target_types): Comparison of function/method types
13728         is independent of nptrs.
13730 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
13732         * pt.c (tsubst): Avoid creating pointer to reference and
13733         reference to reference types.
13735 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
13737         * parse.y (do_id): New nonterminal.
13738         (template_id): Use it.
13740 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
13742         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
13743         * spew.c (yylex): Don't do_identifier here.
13744         * decl2.c (build_expr_from_tree): Revert last change.
13746         * decl2.c (build_expr_from_tree): Expand the name for a method call.
13747         * parse.y (object_template_id): Don't try to take the DECL_NAME.
13749 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
13751         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
13752         alloc_expr.
13753         * call.c (build_op_delete_call): Adjust.
13755         * except.c (expand_end_catch_block): Lose rethrow region.
13756         (expand_start_catch_block): Likewise.
13757         (expand_end_catch_block): Don't expand_leftover_cleanups.
13759 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13761         * pt.c (tsubst): Remove tree_cons call (places redundant info into
13762         DECL_TEMPLATE_INSTANTIATION).
13764 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
13766         * tree.c (is_overloaded_fn): Handle getting a fn template.
13767         (really_overloaded_fn): Likewise.
13768         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
13769         * pt.c (check_explicit_specialization): Tweak.
13770         (determine_explicit_specialization): Tweak.
13772         * tree.c, cp-tree.h (get_target_expr): New fn.
13774 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
13776         * pt.c (check_explicit_specialization): Fix misspelling in
13777         diagnostic: `preceeded'.
13778         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
13779         `conversiona'.
13781 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
13783         * pt.c (determine_explicit_specialization): Avoid an internal
13784         error for bad specializations.
13786         * method.c (build_overload_value): Handle SCOPE_REF.
13788 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
13790         * class.c (prepare_fresh_vtable): Enable even more complex MI
13791         vtable names.
13793 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
13795         * exception.cc (__check_eh_spec): Optimize a bit.
13797         * exception.cc (__cp_pop_exception): Lose handler arg.
13798         * except.c (do_pop_exception): Likewise.
13799         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
13800         (expand_end_catch_block): Likewise.
13802 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
13804         * pt.c (check_explicit_specialization): Complain about using a
13805         template-id for a non-specialization.
13807 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
13809         * repo.c: Prototype rindex only if needed.
13810         * xref.c: Likewise.
13812 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13814         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
13816 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
13818         * typeck.c (build_const_cast): Handle references here instead of
13819         handing off to convert_to_reference.
13821         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
13822         TerminateFunctionCall.
13823         (init_exception_processing): Likewise.  Terminate et al are now
13824         the fns, not ADDR_EXPRs.
13825         (various): Lose redundant assemble_external calls.
13826         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
13828         * cp-tree.h (struct lang_decl_flags): Add comdat.
13829         (DECL_COMDAT): New macro.
13830         * decl.c (duplicate_decls): Propagate it.
13831         (cp_finish_decl): Handle it.
13832         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
13834         * class.c: Remove static pending_hard_virtuals.
13835         (add_virtual_function): Take pointers to pending_virtuals
13836         and pending_hard_virtuals.
13837         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
13839 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
13841         * decl2.c (import_export_vtable): If we support one_only but not
13842         weak symbols, mark instantiated template vtables one_only.
13843         (import_export_decl): Likewise for tinfo functions.
13844         (finish_vtable_vardecl): Also write out vtables from explicitly
13845         instantiated template classes.
13846         * pt.c (mark_class_instantiated): Revert last change.
13848         * except.c (expand_throw): Call mark_used on the destructor.
13850 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
13852         * lex.c (lang_init): Enable flag_exceptions by default if no
13853         command line switch was specified.
13855 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
13857         * pt.c (unify): Handle `void' template parameters in
13858         specializations.
13860 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
13862         * rtti.c (build_dynamic_cast): Handle template case here.
13863         (build_dynamic_cast_1): Not here.
13865         * typeck2.c (digest_init): Make copies where appropriate.
13867         * decl2.c (delete_sanity): resolve_offset_ref.
13869         * except.c: Call terminate without caching so many bits.
13871         * except.c (expand_start_catch_block): Fix catching a reference
13872         to pointer.
13874 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
13876         * init.c (build_new): Copy size to the saveable obstack.
13878         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
13879         TRY_CATCH_EXPR for now.
13881 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
13883         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
13884         has DECL_LANG_SPECIFIC.
13886         * exception.cc (struct cp_eh_info): Add handlers field.
13887         (__cp_push_exception): Initialize it.
13888         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
13889         (__throw_bad_exception): Remove.
13890         * except.c (call_eh_info): Add handlers field.
13891         (get_eh_handlers): New fn.
13892         (push_eh_cleanup): Increment handlers.
13894 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
13896         * except.c (expand_start_eh_spec): Use the try/catch code.
13897         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
13898         doing everything inline.
13899         (init_exception_processing): throw_type_match now takes
13900         const void pointers.
13901         * exception.cc (__check_eh_spec): New fn.
13902         * inc/exception: Neither terminate nor unexpected return.
13903         * decl.c: Make const_ptr_type_node public.
13904         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
13906         * except.c (expand_start_catch_block): We only need the rethrow
13907         region for non-sjlj exceptions.
13908         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
13910 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
13912         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
13913         (various.o): Likewise.
13914         * inc/new: Add placement deletes.  Add throw specs for default new.
13915         * new.cc (set_new_handler): Move here from libgcc2.
13916         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
13917         (new): Move from libgcc2.  Throw bad_alloc.
13918         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
13919         * decl.c (init_decl_processing): Update exception specs on new and
13920         delete.
13922         * method.c (build_decl_overload_real): Don't mess with global
13923         placement delete.
13925         * init.c (build_new): Check for null throw spec, not nothrow_t.
13927         * decl.c (duplicate_decls): Don't complain about different exceptions
13928         from an internal declaration.
13930         * call.c (build_op_delete_call): Fix check for member fns again.
13932         * decl2.c (import_export_decl): Interface hackery affects
13933         virtual synthesized methods.
13935 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
13937         * decl.c (start_decl): Don't just complain about a mismatched
13938         scope, fix it.
13940         * decl.c (make_implicit_typename): Handle case where t is not
13941         actually from context.
13942         * tree.c (get_type_decl): Lose identifier case.
13943         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
13944         * parse.y (nonnested_type): Just use lookup_name.
13945         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
13947 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
13949         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
13950         T was built in C language context (for example, by
13951         output_func_start_profiler).
13953 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
13955         * decl.c (make_implicit_typename): New fn.
13956         (lookup_name_real): Use it.  Use current_class_type as the context.
13958 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
13960         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
13962 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
13964         * friend.c (do_friend): Warn about non-template friends in templates.
13966         * call.c (build_op_delete_call): Fix handling of inherited delete.
13968         * search.c (dfs_record_inheritance): Ignore template type parms.
13970 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
13972         * call.c (build_new_op): Fix copy error.
13973         (build_op_new_call): New fn.
13974         (build_op_delete_call): New fn.
13975         * cp-tree.h: Declare them.
13976         * init.c (build_new): Use them.  Support placement delete.
13977         (build_x_delete): Use build_op_delete_call.
13978         (build_delete): Likewise.
13979         * decl2.c (delete_sanity): Likewise.
13980         (coerce_delete_type): Don't complain about placement delete.
13982 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13984         * call.c (build_new_function_call): Remove unused 'obj' parm.
13985         * cp-tree.h, typeck.c: Adjust.
13987         * init.c (build_new): Make the cleanup last longer.
13988         (expand_vec_init): Call do_pending_stack_adjust.
13990 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
13992         * pt.c (do_type_instantiation): Fix typo.
13993         (mark_class_instantiated): If we support one_only but not weak
13994         symbols, don't mark this as known.
13996         * init.c (build_new): Handle vec delete in EH cleanup.
13998 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14000         * call.c (build_method_call): Call complete_type before checking
14001         for destructor.
14003 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
14005         * decl.c (add_block_current_level): Delete.
14006         * init.c (build_vec_delete_1): Delete build_block and
14007         add_block_current_level calls.
14009 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
14011         * init.c (build_new): Handle freeing allocated memory when the
14012         constructor throws.
14014         * call.c (build_new_method_call): Fix flags arg.
14016         * pt.c (do_type_instantiation): Don't try to instantiate
14017         member templates.
14018         (mark_decl_instantiated): If we support one_only but not
14019         weak symbols, mark this one_only.
14020         * decl2.c (import_export_vtable): Don't defer handling of vtables
14021         if MULTIPLE_SYMBOL_SPACES.
14023 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14025         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
14027 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
14029         * except.c (do_pop_exception): Return a value.
14031 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
14033         * call.c (build_new_method_call): Handle getting a
14034         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
14035         if we got template parms.
14036         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
14037         not just the args.
14038         * decl2.c (build_expr_from_tree): Tweak last change.
14039         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
14040         (maybe_fold_nontype_arg): Split out from tsubst_copy.
14041         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
14043 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
14045         * pt.c (tsubst_copy): Handle explicit template arguments in
14046         function calls.
14047         * typeck.c (build_x_function_call): Likewise.
14048         * decl2.c (build_expr_from_tree): Lookup function name if it
14049         hasn't been done.
14051         * pt.c (tsubst): Instantiate template functions properly when
14052         template parameter does not appear in function arguments and return
14053         type.
14054         (comp_template_args): Handle member templates required by tsubst.
14056 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
14058         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
14059         previous change.
14061 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14063         * pt.c (coerce_template_parms): Tweak error message.
14065         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
14066         return type defaults to `int', even if there are storage-class
14067         specifiers.
14069 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
14071         Complete nested exception support.
14072         * except.c (do_pop_exception): Split out...
14073         (push_eh_cleanup): From here.  Handle the EH region by hand.
14074         (expand_start_catch_block): Add a new level for the catch parm.
14075         Move the rethrow region outside the two cleanup regions.
14076         Protect the initializer for the catch parm with terminate.
14077         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
14078         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
14079         popping off the middle of the stack.
14080         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
14081         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
14082         (build_cplus_new): Only wrap CALL_EXPRs.
14083         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
14084         the constructor call.
14086 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14088         * Make-lang.in (c++.distdir): Make inc subdirectory.
14090 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14092         * decl2.c (finish_file): Put back some code.
14094 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
14096         * decl2.c (finish_file): Remove redundant code.
14097         * method.c (emit_thunk): Don't let the backend defer generic thunks.
14099 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
14101         * except.c (call_eh_info): Split out...
14102         (push_eh_info): From here.
14103         (expand_builtin_throw): Use it.
14104         (expand_start_catch_block): Move region start back.
14106 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
14108         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
14109         (real_yylex): Record wide strings using target endianness, not host.
14111 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
14113         * repo.c (rindex): Add decl unconditionally.
14114         (get_base_filename, open_repo_file): Don't cast rindex.
14115         * xref.c (rindex): Add decl unconditionally.
14116         (index): Remove unused decl.
14117         (open_xref_file): Don't cast rindex.
14119 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14121         * class.c (build_vbase_path): Propagate the result type properly.
14123 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
14125         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
14126         remaining use of saved_throw_type with a call to get_eh_type.
14128 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
14130         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
14131         (file_name_nondirectory): New function, doing the same as the macro.
14132         (set_typedecl_interface_info): Use it instead of the macro.
14133         (check_newline): Likewise.
14134         (handle_cp_pragma): Likewise.
14136         * repo.c (get_base_filename): Cast result of rindex to char*.
14137         (open_repo_file): Likewise.
14138         * xref.c (open_xref_file): Likewise.
14139         * error.c (dump_char): Make its arg int, not char.
14141         * except.c (push_eh_info): Pass the number of fields - 1 down, not
14142         the exact number of fields.
14144 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
14146         Support for nested exceptions.
14147         * tinfo2.cc (__is_pointer): New fn.
14148         * exception.cc (struct cp_eh_info): Define.
14149         (__cp_exception_info, __uncatch_exception): New fns.
14150         (__cp_push_exception, __cp_pop_exception): New fns.
14151         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
14152         Lose empty_fndecl.
14153         (init_exception_processing): Likewise.  __eh_pc is now external.
14154         (push_eh_info): New fn.
14155         (get_eh_{info,value,type,caught}): New fns.
14156         (push_eh_cleanup): Just call __cp_pop_exception.
14157         (expand_start_catch_block): Use push_eh_info.  Start the eh region
14158         sooner.
14159         (expand_end_eh_spec): Use push_eh_info.
14160         (expand_throw): Call __cp_push_exception to set up the exception info.
14161         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
14162         when we rethrow.
14163         (expand_builtin_throw): Don't refer to empty_fndecl.
14165 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
14167         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
14169 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
14171         * method.c (build_template_parm_names, build_decl_overload_real):
14172         Add static to definitions.
14173         * pt.c (add_to_template_args, note_template_header,
14174         processing_explicit_specialization, type_unification_real): Likewise.
14175         ({determine,check}_explicit_specialization): Use a single string for
14176         error messages.
14178 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
14180         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
14181         (expand_end_catch_block): Likewise.
14182         (expand_end_eh_spec): Likewise.
14184 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
14186         * decl.c (duplicate_decls): Handle template specializations
14187         correctly.
14188         * error.c (dump_function_name): Fix printing of specializations of
14189         member functions that are not member templates.
14190         * cp-tree.h (processing_specialization): Make global.
14191         * pt.c (processing_specialization): Likewise.
14192         * lex.c (cons_up_default_function): Save and restore
14193         processing_specialization to avoid confusion.
14195 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
14197         * decl.c (init_decl_processing): Give null_node unknown* type.
14198         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
14199         (common_type): Likewise.
14200         * error.c (args_as_string): Recognize null_node.
14202 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14204         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
14205         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
14207         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
14209         * Make-lang.in (g++): Include prefix.o.
14211 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
14213         * pt.c (determine_explicit_specialization): Initialize "dummy"
14214         to keep Purify quiet.
14216 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
14218         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
14219         (build_overload_int): Not here.
14221 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
14223         * class.c (build_type_pathname): Remove.
14224         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
14226 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
14228         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
14229         &&label GNU extension.
14231 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
14233         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
14234         so as to avoid incorrect manglings.
14235         * method.c (build_decl_overload_real): Don't mangle return types
14236         for constructors.
14238 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
14240         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
14241         scratch_tree_cons): Define as macros for now.
14242         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
14243         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
14244         typeck2.c: Use them and the expression_obstack variants.
14246 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14248         * decl.c (store_return_init): Allow classes with explicit ctors to
14249         be used with the named return values extension.
14251 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
14253         * pt.c (instantiate_decl): Fix previous change.
14255 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
14257         * pt.c (tsubst): Fix thinko.
14258         (instantiate_decl): Really use the original template.
14260         * call.c (build_new_method_call): Use simple constructor_name for
14261         error messages.
14263 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
14265         * method.c (build_underscore_int): Don't use ANSI specific
14266         features.
14268 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
14270         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
14271         for our key method; it might have been inlined by -O3.
14273 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
14275         * decl.c (make_typename_type): Do not try to call lookup_field for
14276         non-aggregate types.
14278 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
14280         * typeck.c (build_reinterpret_cast): Tweak.
14282 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
14284         * typeck.c (build_reinterpret_cast): Converting a void pointer
14285         to function pointer with a reinterpret_cast produces a warning
14286         if -pedantic is issued.
14288 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14290         * typeck.c (c_expand_return): Don't warn about returning a
14291         reference-type variable as a reference.
14293 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
14295         * method.c (build_static_name): Fix typo.
14297 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
14299         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
14300         OLDDECL before we try to do DECL_USE_TEMPLATE.
14302 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
14304         * decl.c (duplicate_decls): Don't warn about template instances.
14306         * typeck.c (mark_addressable): Lose ancient code that unsets
14307         DECL_EXTERNAL.
14309         * pt.c (do_decl_instantiation): Lose support for instantiating
14310         non-templates.
14312         * call.c (build_new_function_call): Fix handling of null explicit
14313         template args.
14314         (build_new_method_call): Likewise.
14316 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
14318         * method.c (build_underscore_int): Fix typo.
14320 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
14322         * tree.c (print_lang_statistics): #if 0 call to
14323         print_inline_obstack_statistics until its definition is checked in.
14325 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
14327         * decl2.c (finish_file): Move dump_tree_statistics to end.
14329         * pt.c (instantiate_decl): Look for the original template.
14330         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
14331         of member templates.
14333 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
14335         * Makefile.in (g++FAQ.*): New rules.
14336         (CONFLICTS): Update.
14337         * g++FAQ.texi: Moved from libg++.
14339         * parse.y (PFUNCNAME): Only specify the type once.
14341 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
14343         * lex.c (real_yylex): Clean up the code to fully behave the way
14344         the c-lex.c parser does for complex and real numbers.
14346 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
14348         * method.c (build_decl_overload_real): Reformat.
14350 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
14352         * method.c (synthesize_method): If at_eof, determine our linkage.
14354 1997-09-29  Paul Eggert  <eggert@twinsun.com>
14356         * lex.c (real_yylex): Treat `$' just like `_', except issue a
14357         diagnostic if !dollars_in_ident or if pedantic.
14359         * lang-specs.h (@c++): -ansi no longer implies -$.
14361         * decl2.c (lang_decode_option):
14362         -traditional and -ansi now do not mess with
14363         dollars_in_ident.
14365 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
14367         * Makefile.in (parse.o, decl.o): Also depend on
14368         $(srcdir)/../except.h $(srcdir)/../output.h.
14369         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
14370         $(srcdir)/../except.h $(srcdir)/../output.h.
14371         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
14372         ../insn-codes.h.
14374         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
14376         * expr.c (cplus_expand_expr): Make it static.
14378         * decl2.c, init.c, typeck.c: Include "expr.h".
14379         (expand_expr): Use proper values when calling the function.
14381 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
14383         * lang-options.h: New -Wold-style-cast flag.
14384         * cp-tree.h (warn_old_style_cast): New variable.
14385         * decl2.c (warn_old_style_cast): Likewise.
14386         (lang_decode_option): Support -Wold-style-cast.
14387         (reparse_absdcl_as_casts): Produce old-style-cast warning.
14389 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14391         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
14392         TREE_USED, reset value based on already_used.
14394         * init.c (expand_member_init): Revert change.
14396 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
14398         * cp-tree.h, decl.c, decl2.c, pt.c:
14399         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
14401         * decl2.c (lang_decode_option): Add missing ;.
14403 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
14405         * friend.c (do_friend): Disable injection for all template-derived
14406         decls.
14407         * decl2.c (lang_decode_option): Handle -fguiding-decls.
14408         * parse.y (notype_template_declarator): New nonterminal.
14409         (direct_notype_declarator): Use it.
14410         (complex_direct_notype_declarator): Likewise.
14411         (object_template_id): Accept any kind of identifier after TEMPLATE.
14412         (notype_qualified_id): Don't add template declarators here.
14414 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
14416         * call.c (add_template_candidate): Add explicit_targs parameter.
14417         (build_scoped_method_call): Use it.
14418         (build_overload_call_real): Likewise.
14419         (build_user_type_conversion_1): Likewise.
14420         (build_new_function_call): Likewise.
14421         (build_object_call): Likewise.
14422         (build_new_op): Likewise.
14423         (build_new_method_call): Likewise.
14424         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
14425         (build_new_method_call): Likewise.
14427         * class.c (finish_struct_methods): Add specialization pass to
14428         determine which methods were specializing which other methods.
14429         (instantiate_type): Handle TEMPLATE_ID_EXPR.
14431         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
14433         * cp-tree.h (name_mangling_version): New variable.
14434         (flag_guiding_decls): Likewise.
14435         (build_template_decl_overload): New function.
14436         (begin_specialization): Likewise.
14437         (reset_specialization): Likewise.
14438         (end_specialization): Likewise.
14439         (determine_explicit_specialization): Likewise.
14440         (check_explicit_specialization): Likewise.
14441         (lookup_template_function): Likewise.
14442         (fn_type_unification): Add explicit_targs parameter.
14443         (type_unification): Likewise.
14445         * decl.c (duplicate_decls): Add smarts for explicit
14446         specializations.
14447         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
14448         specializations.
14449         (grokfndecl): Call check_explicit_specialization.
14451         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
14452         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
14453         (check_classfn): Handle specializations.
14455         * error.c (dump_function_name): Print specialization arguments.
14457         * friend.c (do_friend): Don't call pushdecl for template
14458         instantiations.
14460         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
14462         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
14463         and -fno-guiding-decls.
14465         * lex.c (identifier_type): Return PFUNCNAME for template function
14466         names.
14468         * method.c (build_decl_overload_real): New function.
14469         (build_template_parm_names): New function.
14470         (build_overload_identifier): Use it.
14471         (build_underscore_int): New function.
14472         (build_overload_int): Use it.  Add levels for template
14473         parameters.
14474         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
14475         (build_overload_nested_names): Handle template type parameters.
14476         (build_template_decl_overload): New function.
14478         * parse.y (YYSTYPE): New ntype member.
14479         (nested_name_specifier): Use it.
14480         (nested_name_specifier_1): Likewise.
14481         (PFUNCNAME): New token.
14482         (template_id, object_template_id): New non-terminals.
14483         (template_parm_list): Note specializations.
14484         (template_def): Likewise.
14485         (structsp): Likewise.
14486         (fn.def2): Handle member template specializations.
14487         (component_decl_1): Likewise.
14488         (direct_notype_declarator): Handle template-ids.
14489         (component_decl_1): Likewise.
14490         (direct_notype_declarator): Handle template-ids.
14491         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
14493         * pt.c (processing_specializations): New variable.
14494         (template_header_count): Likewise.
14495         (type_unification_real): New function.
14496         (processing_explicit_specialization): Likewise.
14497         (note_template_header): Likewise.
14498         (is_member_template): Handle specializations.
14499         (end_template_decl): Call reset_specialization.
14500         (push_template_decl): Handle member template specializations.
14501         (tsubst): Likewise.
14502         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
14503         (instantiate_template): Handle specializations.
14504         (instantiate_decl): Likewise.
14505         (fn_type_unification): Handle explicit_targs.
14506         (type_unification): Likewise.  Allow incomplete unification
14507         without an error message, if allow_incomplete.
14508         (get_bindings): Use new calling sequence for fn_type_unification.
14510         * spew.c (yylex): Handle PFUNCNAME.
14512         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
14513         (really_overloaded_fn): Likewise.
14514         (get_first_fn): Handle function templates.
14516         * typeck.c (build_x_function_call): Use really_overloaded_fn.
14517         Handle TEMPLATE_ID_EXPR.
14518         (build_x_unary_op): Likewise.
14519         (build_unary_op): Likewise.
14520         (mark_addressable): Templates whose address is taken are marked
14521         as used.
14523 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14525         * decl.c (init_decl_processing): Declare __builtin_constant_p as
14526         accepting any kind of type, not only int.
14528 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
14530         * search.c (get_matching_virtual): Notice virtual bases when sorrying
14531         about covariant returns.
14533         * parse.y (member_init): Also imply typename here.  Remove ancient
14534         extension for initializing base members.
14536 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
14538         Handle multi-level typenames and implicit typename in base list.
14539         * parse.y (typename_sub{,[0-2]}): New rules.
14540         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
14541         (nonnested_type): New rule.
14542         (complete_type_name): Use it.
14543         (base_class.1): Use typename_sub and nonnested_type.
14544         (nested_name_specifier): Don't elide std:: here.
14545         * decl.c (make_typename_type): Handle getting a type for NAME.
14546         (lookup_name_real): Turn std:: into :: here.
14548         Rvalue conversions were removed in London.
14549         * call.c (is_subseq): Don't consider lvalue transformations.
14550         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
14551         (joust): Re-enable ?: kludge.
14553 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
14555         * decl.c (start_function): Up warning of no return type to be a
14556         pedwarn.
14558 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14560         * init.c (expand_member_init): Don't set TREE_USED.
14561         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
14562         set,don't clear TREE_USED wholesale.
14564 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
14566         * call.c (build_over_call): Do require_complete_type before
14567         build_cplus_new.
14569 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
14571         * search.c (lookup_field): Call complete_type in all cases.
14573         * decl.c (finish_function): Just warn about flowing off the end.
14575 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
14577         * decl.c (grokparms): Don't bash a permanent list node if we're
14578         in a function.
14580 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
14582         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
14584 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
14586         * call.c (build_new_op): Give better error for syntactically
14587         correct, but semantically invalid, use of undeclared template.
14589         * call.c (compare_qual): Handle pmfs.
14591         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
14592         after the exception spec.
14594 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
14596         * call.c (null_ptr_cst_p): Integer type, not integral type.
14598         * call.c (joust): Disable warnings until they can be moved to the
14599         right place.
14601 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
14603         * Makefile.in, config-lang.in:  Convert to autoconf.
14605 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
14607         * decl.c (lookup_name_real): Add implicit 'typename' to types from
14608         base classes.
14610         * pt.c (most_specialized_class): Fix typo.
14611         (tsubst): Move constant folding to TREE_VEC case.
14613 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
14615         * pt.c (do_poplevel): Don't warn about unused local variables
14616         while processing_template_decl since we don't always know whether
14617         or not they will need constructing/destructing.
14619         * pt.c (uses_template_parms): Check the values of an enumeration
14620         type to make sure they don't depend on template parms.
14622         * decl.c (make_typename_type): Don't lookup the field if the
14623         context uses template parms, even if we're not
14624         processing_template_decl at the moment.
14626         * pt.c (coerce_template_parms): Avoid looking at the
14627         TYPE_LANG_DECL portion of a typename type, since there won't be
14628         one.
14629         (tsubst): Do constant folding as necessary to make sure that
14630         arguments passed to lookup_template_class really are constants.
14632 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
14634         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
14635         * decl2.c (finish_file): Only register exception tables if we
14636         need to.
14638         * decl.c (init_decl_processing): Add __builtin_[fs]p.
14640 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
14642         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
14644 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
14646         * error.c (dump_decl): Avoid crashing when presented with a
14647         uninitialized constant, as can occur with a template parameter.
14648         (dump_expr): Make sure that there are enough levels of
14649         current_template_parms before we start diving through them.
14651 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
14653         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
14654         c-typeck.c.
14656 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14658         * except.c (expand_throw): Call build_delete for all
14659         exception types, not just objects with destructors.
14661 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
14663         * decl.c (current_local_enum): Remove static.
14664         * pt.c (tsubst_enum): Save and restore value of current_local_enum
14665         in case template is expanded in enum decl.
14666         (instantiate_class_template): Use new tsubst_enum signature.
14667         (tsubst_expr): Likewise.
14669 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
14671         * pt.c (begin_member_template_processing): Take a function as
14672         argument, not a set of template arguments.  Use the template
14673         parameters, rather than the arguments.  Handle non-type parameters
14674         correctly.  Push a binding level for the parameters so that multiple
14675         member templates using the same parameter names can be declared.
14676         (end_member_template_processing): Pop the binding level.
14677         (push_template_decl): Mark member templates as static when
14678         appropriate.
14680         * lex.c (do_pending_inlines): Pass the function, not its template
14681         arguments, to begin_member_template_processing.
14682         (process_next_inline): Likewise.
14683         (do_pending_defargs): Likewise.
14685         * error.c (dump_expr): Obtain the correct declaration for a
14686         TEMPLATE_CONST_PARM.
14688         * call.c (add_template_conv_candidate): New function.
14689         (build_object_call): Handle member templates, as done in the other
14690         build_ functions.
14692 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
14694         * decl.c (replace_defag): Undo previous change.
14695         * lex.c (do_pending_defargs): Deal with member templates.
14697         * pt.c (is_member_template): Avoid crashing when passed a
14698         non-function argument.
14700 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
14702         * class.c (grow_method): Remove check for redeclaration.
14704 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
14706         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
14707         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
14708         (PRIMARY_TEMPLATE_P): Use it.
14709         * call.c (build_overload_call_real): Use it.
14710         * class.c (instantiate_type): Likewise.
14711         * decl.c (decls_match): Likewise.
14712         * method.c (build_overload_identifier): Likewise.
14713         * pt.c (push_template_decl): Likewise.
14714         (classtype_mangled_name): Likewise.
14715         (lookup_template_class): Likewise.
14717         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
14718         DECL_NTPARMS to conform to usage elsewhere.
14719         * call.c (add_template_candidate): Likewise.
14720         * class.c (instantiate_type): Likewise.
14721         * pt.c (instantiate_template): Likewise.
14722         (get_bindings): Likewise.
14724         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
14725         is_member_template.
14727         * pt.c (unify): Undo changes to allow multiple levels of template
14728         parameters.
14729         (type_unification): Likewise.
14730         (fn_type_unification): Likewise.
14731         (get_class_bindings): Likewise.
14732         * cp-tree.h (Likewise).
14734         * decl.c (replace_defarg): Check that the type of the default
14735         parameter does not invlove a template type before complaining
14736         about the initialization.
14738         * error.c (dump_expr): Deal with template constant parameters in
14739         member templates correctly.
14741         * pt.c (is_member_template): Deal with class specializations
14742         correctly.
14743         (tsubst): Handle "partial instantiation" of member templates
14744         correctly.
14746 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
14748         * pt.c (type_unification): Change calling sequence to allow for
14749         multiple levels of template parameters.
14750         (tsubst_expr): Likewise.
14751         (tsubst): Likewise.
14752         (tsubst_copy): Likewise.
14753         (instantiate_template): Likewise.
14754         (unify): Likewise.
14755         * call.c (build_overload_call_real): Use it.
14756         (add_builtin_candidate): Use it.
14757         (build_new_method_call): Use it.
14758         * class.c (instantiate_type): Use it.
14759         * decl.c (grokdeclarator): Use it.
14760         * decl2.c (finish_file): Use it.
14761         * method.c (build_overload_identifier): Use it.
14763         * call.c (add_template_candidate):  Add additional parameter for
14764         the function return type.  Call fn_type_unification istead of
14765         type_unification.
14766         (build_user_type_conversion_1): Handle member templates.
14767         (build_new_function_call): Likewise.
14768         (build_new_op): Likewise.
14769         (build_new_method_call): Likewise.
14771         * class.c (grow_method): Don't give an error message indicating
14772         that two member templates with the same name are ambiguous.
14773         (finish_struct): Treat member template functions just like member
14774         functions.
14776         * cp-tree.h (check_member_template): Add declaration.
14777         (begin_member_template_processing): Likewise.
14778         (end_member_template_processing): Likewise.
14779         (fn_type_unification): Likewise.
14780         (is_member_template): Likewise.
14781         (tsubst): Change prototype.
14782         (tsubst_expr): Likewise.
14783         (tsubst_copy): Likewise.
14784         (instantiate_template): Likewise.
14785         (get_bindings): Likewise.
14787         * decl.c (decls_match): Handle multiple levels of template
14788         parameters.
14789         (pushdecl): Handle template type params just like other type
14790         declarations.
14791         (push_class_level_binding): Return immediately if the
14792         class_binding_level is NULL.
14793         (grokfndecl): If check_classfn() returns a member_template, use
14794         the result of the template, not the template itself.
14796         * decl2.c (check_member_template): New function.  Check to see
14797         that the entity declared to be a member template can be one.
14798         (check_classfn): Allow redeclaration of member template functions
14799         with different types; the new functions can be specializations or
14800         explicit instantiations.
14802         * error.c (dump_decl): Handle multiple levels of template
14803         parameters.
14804         (dump_function_decl): Update to handle function templates.
14806         * lex.c (do_pending_inlines): Set up template parameter context
14807         for member templates.
14808         (process_next_inline): Likewise.
14810         * method.c (build_overload_identifier): Adjust for multiple levels
14811         of template parameters.
14813         * parse.y (fn.def2): Add member templates.
14814         (component_decl_1): Likewise.
14816         * pt.c (begin_member_template_processing): New function.
14817         (end_member_template_processing): Likewise.
14818         (is_member_template): Likewise.
14819         (fn_type_unification): Likewise.
14820         (current_template_parms): Return a vector of all the template
14821         parms, not just the innermost level of parms.
14822         (push_template_decl): Deal with the possibility of member
14823         templates.
14824         (lookup_template_class): Likewise.
14825         (uses_template_parms): Likewise.
14826         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
14827         TEMPLATE_CONST_PARM to deal with multiple levels of template
14828         arguments.   Add processing of TEMPLATE_DECL to produce new
14829         TEMPLATE_DECLs from old ones.
14830         (do_decl_instantiation): Handle member templates.
14832         * search.c (lookup_fnfields_1): Handle member template conversion
14833         operators.
14835         * tree.c (cp_tree_equal): Check the levels, as well as the
14836         indices, of TEMPLATE_CONST_PARMs.
14838         * typeck.c (comptypes): Check the levels, as well as the indices,
14839         fo TEMPLATE_TYPE_PARMs.
14840         (build_x_function_call): Treat member templates like member
14841         functions.
14843 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
14845         * typeck.c (c_expand_return): Always convert_for_initialization
14846         before checking for returning a pointer to local.
14848         * pt.c (type_unification): If strict and the function parm doesn't
14849         use template parms, just compare types.
14851 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
14853         * method.c (build_overloaded_value): Replace direct call
14854         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
14856 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
14858         * typeck.c (convert_arguments): Don't arbitrarily choose the first
14859         of a set of overloaded functions.
14861 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
14863         * lex.c (real_yylex): Don't elide __FUNCTION__.
14865         * method.c (build_overload_value): Add in_template parm.
14866         (build_overload_int): Likewise.
14867         (build_overload_identifier): Pass it.
14869         * decl.c (duplicate_decls): Don't bash a previous template
14870         definition with a redeclaration.
14872         * pt.c (unify): float doesn't match double.
14874         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
14875         TYPE_DECL.  Handle getting non-template types.
14876         * parse.y (explicit_instantiation): Use typespec instead of
14877         aggr template_type.
14879 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
14881         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
14883 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
14885         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
14886         (compare_ics): Likewise.
14888 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
14890         * call.c (joust): Warn about choosing one conversion op over
14891         another because of 'this' argument when the other return type is
14892         better.
14893         (source_type): New fn.
14895         * call.c (build_new_op): Strip leading REF_BIND from first operand
14896         to builtin operator.
14898         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
14899         use its RTL.
14901 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
14903         * call.c (null_ptr_cst_p): Remove support for (void*)0.
14905 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
14907         * typeck.c (expand_target_expr): Make definition match declaration.
14909         * class.c (get_basefndecls): Make definition match declaration.
14911 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
14913         * input.c (sub_getch): Eventually give up and release the input file.
14915         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
14916         right place.
14918         * call.c (joust): Tweak message.
14920 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
14922         * error.c (type_as_string): Put const/volatile on template type
14923         parameters where appropriate.
14925 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
14927         * call.c (strictly_better): Make arguments unsigned ints.
14929 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
14931         * lex.c (real_yylex): Refer to __complex instead of complex.
14933 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
14935         * lex.c (real_yylex): Don't use getc directly.
14937 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
14939         * call.c (is_subseq): Don't try to be clever.
14941 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
14943         * parse.y, pt.c: Include "except.h".
14944         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
14945         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
14946         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
14947         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
14948         prototyping.
14950 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
14952         * decl2.c (mark_vtable_entries): Instead of replacing pure
14953         virtuals with a reference to __pure_virtual, copy the decl and
14954         change the RTL.
14956 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
14958         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
14960         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
14962         * pt.c (instantiate_class_template): Call repo_template_used
14963         before finish_prevtable_vardecl.
14965         * call.c (is_subseq): New fn.
14966         (compare_ics): Use it.
14968         * repo.c (finish_repo): Don't crash on no args.
14970         * parse.y (named_complex_class_head_sans_basetype): Handle
14971         explicit global scope.
14972         * decl2.c (handle_class_head): New fn.
14974         * pt.c (unify): Add CONST_DECL case.
14976 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14978         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
14980         * cp-tree.h (report_type_mismatch): Add prototype.
14981         * call.c (build_overload_call_real): Remove erroneous fourth
14982         argument to report_type_mismatch.
14983         (build_user_type_conversion_1): Remove erroneous second arg to
14984         tourney.
14985         (build_new_function_call): Likewise.
14986         (build_object_call): Likewise.
14987         (build_new_op): Likewise.
14988         (build_new_method_call): Likewise.
14990 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
14992         * error.c (dump_decl): Don't bother processing a function with no
14993         DECL_LANG_SPECIFIC.
14995         * method.c (emit_thunk): Call init_function_start in the macro case.
14997 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
14999         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
15000         defined and used to set flag_vtable_thunks.
15002 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
15004         * parse.y: Don't clear the inlines from their obstack until they've
15005         all been processed.
15007         * decl.c (duplicate_decls): Don't complain about exception
15008         specification mismatch if flag_exceptions is off.
15010 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
15012         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
15014 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
15016         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
15017         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
15018         Include <stdio.h> before include files that formerly used STDIO_PROTO.
15020         * decl.c, g++spec.c, lex.c, method.c, repo.c:
15021         Include "config.h" first, as per autoconf manual.
15023 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
15025         * decl.c (duplicate_decls): Tweak wording.
15026         * lex.c (do_pending_defargs): Don't die if we see a default arg
15027         that isn't a DEFAULT_ARG.
15028         * error.c (dump_expr): Handle DEFAULT_ARG.
15030         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
15031         * lang-options.h: Add -fhandle-exceptions.
15033         * class.c (build_vtable): Vtables are artificial.
15034         (prepare_fresh_vtable): Likewise.
15036 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
15038         * cvt.c (ocp_convert): After converting to the target type, set
15039         LOOKUP_NO_CONVERSION.
15041         * call.c (joust): Warn about potentially confusing promotion rules
15042         with -Wsign-promo.
15043         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
15045 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
15047         * exception.cc: Declare __terminate_func with noreturn attribute.
15049 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
15051         * parse.y: Break out eat_saved_input, handle errors.
15052         (function_try_block): Use compstmt instead of compstmt_or_error.
15054 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
15056         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
15058 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
15060         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
15061         existence of cc1plus check whether $(LANGUAGES) contains C++.
15063 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
15065         * method.c (do_build_copy_constructor): When copying an anonymous
15066         union member loop around to handle nested anonymous unions.  Use
15067         the offset of the member relative to the outer structure, not the
15068         union.
15070 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
15072         * call.c (resolve_args): New fn.
15073         (build_new_function_call): Use it.
15074         (build_object_call): Likewise.
15075         (build_new_method_call): Likewise.
15077 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
15079         * call.c (build_over_call): tsubst all default parms from templates.
15081 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
15083         * decl.c (struct cp_function): Add static_labelno.
15084         (push_cp_function_context): Save it.
15085         (pop_cp_function_context): Restore it.
15087 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
15089         * typeck.c (build_component_ref_1): Convert from reference.
15091 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15093         * parse.y (current_declspecs, prefix_attributes): Initialize to
15094         NULL_TREE.
15096         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
15097         before we try to force it to be a TREE_LIST.
15098         (decl): Make sure $1.t is non-nil.
15100 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
15102         * pt.c (uses_template_parms): Handle template first-parse codes.
15104         * decl.c (cp_finish_decl): Only warn about user-defined statics.
15106 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
15108         * pt.c (unify): Handle BOOLEAN_TYPE.
15110         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
15111         * pt.c (tsubst): Don't set it.
15112         * call.c (build_over_call): Use uses_template_parms.
15114 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
15116         * method.c (build_overload_nested_name): Use static_labelno
15117         instead of var_labelno.
15118         (build_qualified_name): New fn.
15119         (build_overload_name): Split out from here.
15120         (build_static_name): Use build_qualified_name.
15121         * decl.c (cp_finish_decl): Statics in extern inline functions
15122         have comdat linkage.
15123         (start_function): Initialize static_labelno.
15125 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15127         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
15128         before "all member functions in class [] are private".
15130 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
15132         * lex.c (do_scoped_id): convert_from_reference.
15133         * init.c (build_offset_ref): Likewise.
15135 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
15137         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
15139 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
15141         * typeck.c (get_member_function_from_ptrfunc): Promote index
15142         before saving it.
15144 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
15146         * tree.c (layout_basetypes): Move non-virtual destructor warning.
15147         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
15149 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
15151         * decl.c (grokdeclarator): Call add_defarg_fn for the function
15152         type, too.
15153         * lex.c (add_defarg_fn): Adjust.
15154         (do_pending_defargs): Adjust.  Don't skip the first parm.
15156 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
15158         * decl.c (build_enumerator): Global enumerators are also readonly.
15160         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
15161         (build_dynamic_cast): Call it and convert_from_reference.
15163         * lex.c (add_defarg_fn): New fn.
15164         (snarf_defarg): Don't add to defarg_types.
15165         (do_pending_defargs): Lose defarg_types.  All fns we process now
15166         have defargs.
15167         * decl.c (grokfndecl): Call add_defarg_fn.
15169         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
15170         * cp-tree.def: Add DEFAULT_ARG.
15171         * spew.c (yylex): Call snarf_defarg as appropriate.
15172         * parse.y: New tokens DEFARG and DEFARG_MARKER.
15173         (defarg_again, pending_defargs, defarg, defarg1): New rules.
15174         (structsp): Use pending_defargs.
15175         (parms, full_parm): Use defarg.
15176         * lex.c (init_lex): Initialize inline_text_firstobj.
15177         (do_pending_inlines): Never pass the obstack to feed_input.
15178         (process_next_inline): Call end_input instead of restore_pending_input.
15179         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
15180         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
15181         * input.c (end_input): New fn.
15182         (sub_getch): At the end of some fed input, just keep returning EOF
15183         until someone calls end_input.
15184         Remove 'obstack' field from struct input_source.
15185         * decl.c (grokparms): Handle DEFAULT_ARG.
15186         (replace_defarg): New fn.
15187         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
15189 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
15191         * call.c (implicit_conversion): If nothing else works, try binding
15192         an rvalue to a reference.
15194 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
15196         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
15197         ifndef for Cygwin32 to include SIGSEGV.
15199 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
15201         * class.c (finish_struct_1): Only complain about pointers without
15202         copy stuff if there are any constructors.
15204         * rtti.c (build_dynamic_cast): Call complete_type on the types.
15206         * decl.c (grokfndecl): If the function we chose doesn't actually
15207         match, die.
15209         * decl2.c (grokclassfn): Don't specify 'const int' for the
15210         artificial destructor parm.
15212         * pt.c (type_unification): If we are called recursively, nothing
15213         decays.
15215 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
15217         * decl.c (init_decl_processing): Stop trying to catch signals
15218         other than SIGABRT since the Cygwin32 library doesn't support
15219         them correctly yet.  This fixes a situation in which g++ causes
15220         a hang on SIGSEGVs and other such signals in our Win32-hosted
15221         tools.
15223 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
15225         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
15227 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
15229         * typeck2.c (store_init_value): Always return the value if our
15230         type needs constructing.
15232         * method.c (hack_identifier): Convert class statics from
15233         reference, too.
15235 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
15237         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
15239 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
15241         * typeck.c (c_expand_return): Make sure we clean up temporaries at
15242         the end of return x;
15244 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15246         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
15248 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
15250         * except.c (expand_builtin_throw): Add support
15251         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
15253 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
15255         * repo.c (extract_string): Null-terminate.
15257         * cp-tree.h (TI_SPEC_INFO): New macro.
15258         (CLASSTYPE_TI_SPEC_INFO): New macro.
15259         * pt.c (push_template_decl): Correctly determine # of template parms
15260         for partial specs.
15262         * call.c (compare_ics): Really fix 'this' conversions.
15264         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
15265         non-template fn.
15267         * pt.c (push_template_decl): Complain about mismatch in # of
15268         template parms between a class template and a member template.
15270 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
15272         * method.c (synthesize_method): You can't call
15273         function_cannot_inline_p after finish_function.
15274         * decl.c (finish_function): Turn on flag_inline_functions and turn
15275         off DECL_INLINE before handing a synthesized method to the
15276         backend.
15278 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
15280         * method.c (synthesize_method): Remove July 30 change to never set
15281         DECL_INLINE if at_eof.
15283 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
15285         * xref.c (GNU_xref_member): Ensure that the node has a
15286         decl_lang_specific part before checking DECL_FRIEND_P.
15288 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
15290         * pt.c (instantiate_class_template): Diagnose non-class types used
15291         as bases.
15293 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
15295         * typeck.c (build_conditional_expr): Use convert_for_initialization
15296         instead of convert_and_check.
15298 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15300         * parse.y (typespec): Don't pedwarn for typeof.
15302 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
15304         * repo.c (finish_repo): Only check changes if we would write a
15305         repo file.
15307         * call.c (compare_ics): Fix handling of 'this' conversions.
15309         * pt.c (do_decl_instantiation): Support static data too.  Rename
15310         from do_function_instantiation.
15311         * cp-tree.h: Adjust.
15312         * parse.y: Adjust.
15314         * repo.c (extract_string): New fn.
15315         (get_base_filename): Use it.
15316         (init_repo): Compare old args with current args.
15318 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
15320         * Makefile.in, Make-lang.in: Protect C-ls with a comment
15321         character, idea from Paul Eggert <eggert@twinsun.com>.
15323 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
15325         * typeck.c (c_expand_return): Be more persistent in looking for
15326         returned temps.
15328         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
15329         pointer to reference.
15331         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
15333 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
15335         * init.c (build_member_call, build_offset_ref):
15336         Use do_scoped_id instead of do_identifier.
15338         * cvt.c (convert): Remove bogosity.
15340 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15342         * cvt.c (build_up_reference): Do checks of ARGTYPE and
15343         TARGET_TYPE before trying to use get_binfo.
15345 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
15347         * cvt.c (build_up_reference): Call get_binfo to get access control.
15349         * decl2.c (import_export_decl): If we don't support weaks, leave
15350         statics undefined.
15352 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
15354         * except.c (expand_builtin_throw): Add support for machines that
15355         cannot access globals after throw's epilogue when
15356         -fno-sjlj-exceptions is used.
15358 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
15360         * parse.y: 'std::' becomes '::'.
15361         * lex.c (real_yylex): Remove 'namespace' warning.
15362         * init.c (build_member_call): Ignore 'std::'.
15363         (build_offset_ref): Likewise.
15364         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
15365         (do_toplevel_using_decl): Ignore 'using std::whatever'.
15366         * decl.c (push_namespace): Just sorry.
15367         (pop_namespace): Nop.
15368         (init_decl_processing): Declare std namespace.
15370 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
15372         * search.c (push_class_decls): A name which ambiguously refers to
15373         several instantiations of the same template just refers to the
15374         template.
15376 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
15378         * decl.c (build_enumerator): Fix problem with unsigned long
15379         enumerated values being smashed to ints, causing overflow
15380         when computing next enumerated value (for enum values around
15381         MAX_VAL).
15383 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
15385         * typeck.c (build_component_ref): Only call mark_used on a decl.
15387 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15389         * typeck.c (build_c_cast): Make the check for a ptr to function
15390         more specific before possible default_conversion call.
15392 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
15394         * except.c (expand_exception_blocks): Simplify and fix and make
15395         sure we don't end a region in a sequence, as expand_end_bindings
15396         doesn't like it.
15398 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
15400         * except.c (init_exception_processing): Mark terminate as not
15401         returning so that the optimizer can optimize better.
15403 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
15405         * cvt.c (convert): Don't do any extra work, if we can avoid it
15406         easily.
15408 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
15410         * *.[chy]: Change cp_convert to ocp_convert, change convert to
15411         cp_convert.  convert is now reserved for the backend, and doesn't
15412         have the semantics a frontend person should ever want.
15414 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
15416         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
15417         Lose -traditional support.
15419 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
15421         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
15423         * parse.y (self_reference): Do it for templates, too.
15424         * class.c (pushclass): Don't overload_template_name; the alias
15425         generated by build_self_reference serves the same purpose.
15427         * tree.c (list_hash): Make static, take more args.
15428         (list_hash_lookup): Likewise.
15429         (list_hash_add): Make static.
15430         (list_hash_canon): Lose.
15431         (hash_tree_cons): Only build a new node if one isn't already in the
15432         hashtable.
15433         (hash_tree_chain): Use hash_tree_cons.
15434         * cp-tree.h: Adjust.
15435         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
15436         of calling lookup_name.
15438 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
15440         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
15441         doesn't refer to the CONST_DECLs.
15443 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
15445         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
15446         is bigger.
15447         (expand_class_desc): Convert the last argument to a sizetype.
15449 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15451         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
15452         __real__): Add reswords.
15453         * hash.h: Regenerate.
15454         * lex.h (rid): Add RID_COMPLEX.
15455         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
15456         * lex.c (init_lex): Add building of RID_COMPLEX.
15457         (real_yylex): General cleanup in line with what c-lex.c also has,
15458         sans the cruft for traditional; add handling of SPEC_IMAG, complex
15459         types, and imaginary numeric constants.
15460         * parse.y (REALPART, IMAGPART): Add tokens.
15461         (unary_expr): Add REALPART and IMAGPART rules.
15462         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
15463         * decl.c (complex_{integer,float,double,long}_type_node): Define
15464         types.
15465         (init_decl_processing): Set up the types.
15466         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
15467         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
15468         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
15469         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
15470         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
15471         COMPLEX_TYPE case.
15472         * method.c (build_overload_name): Add handling of the different
15473         COMPLEX_TYPEs, prefixing them with `J'.
15474         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
15475         as a template parm.
15476         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
15477         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
15478         (mapcar): Handle COMPLEX_CST.
15479         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
15480         (common_type): Add code for complex types.
15481         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
15482         (convert_for_assignment): Likewise.
15483         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
15485 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
15487         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
15488         tsubst_expr, as it might try to do overload resolution.
15490 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
15492         * pt.c (instantiate_class_template): Oops.
15494 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
15496         * cp-tree.def: Add TAG_DEFN.
15497         * pt.c (tsubst_enum): New fn.
15498         (instantiate_class_template): Use it.
15499         (tsubst_expr): Support TAG_DEFN.
15500         (tsubst): Support local enums.
15501         (tsubst_copy): Likewise.
15502         * decl.c (finish_enum): Likewise.
15503         (start_enum): If this is a local enum, switch to permanent_obstack.
15505 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
15507         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
15508         (finish_function): Put the base init code for constructors just
15509         after the parm cleanup insns.
15510         (struct cp_function): Add last_parm_cleanup_insn.
15511         (pu