* decl.c (init_decl_processing): Set flag_inline_trees if
[official-gcc.git] / gcc / cp / ChangeLog
blob2a007f8677e52a4eb7809b66bfe0b6b2eb7a0c30
1 1999-12-05  Mark Mitchell  <mark@codesourcery.com>
3         * decl.c (init_decl_processing): Set flag_inline_trees if
4         !flag_no_inline.
6         * cp-tree.h (calls_setjmp_p): Declare.
7         * decl.c (finish_function): Mark functions that call setjmp as
8         uninlinable.
9         * optimize.c (calls_setjmp_r): New function.
10         (calls_setjmp_p): Likewise.
12 1999-12-04  Mark Mitchell  <mark@codesourcery.com>
14         * optimize.c (expand_call_inline): Wrap the expanded call in an
15         EXPR_WITH_FILE_LOCATION node to get correct line numbers for
16         inlined functions.
18         * optimize.c (inline_data): Remove fns_top.  Add scope_stmt.  Add
19         in_target_cleanup_p.
20         (remap_decl): New function.
21         (remap_block): Likewise.
22         (copy_scope_stmt): Likewise.
23         (copy_body_r): Use remap_decl and copy_scope_stmt.
24         (copy_body): Use VARRAY_TOP_TREE.
25         (initialize_inlined_parameters): Likewise.
26         (declare_return_variable): Likewise.
27         (inlinable_function_p): Check flag_inline_trees.
28         (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
29         specially.  Use VARRAY_PUSH_TREE.  Create a BLOCK for the
30         parameters of the inlined function.
31         (optimize_function): Prevent recursion into partially complete
32         functions.
33         
34         * cp-tree.def (SCOPE_STMT): Take one operand.
35         * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
36         (SCOPE_NULLIFIED_P): Redefine.
37         (SCOPE_NO_CLEANUPS_P): New macro.
38         (add_scope_stmt): Change prototype.
39         * decl.c (poplevel): Tidy.  Warn about unused variables here.
40         Record SCOPE_STMT_BLOCKs.
41         (finish_function): Keep DECL_INITIAL for functions that might be
42         inlined.
43         * ir.texi: Document SCOPE_NO_CLEANUPS_P.
44         * semantics.c: Include rtl.h.
45         (add_scope_stmt): Return the new scope statement and, for an
46         end-of-scope statement, its matching begin statement.  Don't set
47         SCOPE_NULLIFIED_P.
48         (do_pushlevel): Simplify, now that we are always
49         function-at-a-time.
50         (do_poplevel): Likewise.  Record SCOPE_STMT_BLOCKs.
51         (expand_stmt): Don't call expand_start_bindings or
52         expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
53         * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
54         SCOPE_NULLIFIED_P.
55         * Makefile.in (semantics.o): Depend on RTL_H.
56         
57         * decl2.c (pending_statics_used): Make it a macro.
58         (saved_inlines_used): Likewise.
59         (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
60         (mark_inline_for_output): Likewise.
61         (ssdf_decls_used): Remove.
62         (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
63         (generate_ctor_or_dtor_function): Adjust accordingly.
64         
65 1999-11-24  Geoffrey Keating  <geoffk@cygnus.com>
66             Greg McGary  <gkm@gnu.org>
68         * decl.c (duplicate_decls): Merge
69         DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
70         DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
72 1999-12-02  Mike Stump  <mrs@wrs.com>
74         * init.c (perform_member_init): Handle parse errors better.
76 1999-12-01  Mark Mitchell  <mark@codesourcery.com>
78         * cp-tree.h (min_tree_cons): Remove.
79         (scratch_ovl_cons): Likewise.
80         * decl.c (saveable_obstack): Don't declare.
81         (duplicate_decls): Tweak error-message.
82         (initialize_local_var): Explicitly mark the definition as static.
83         (finish_function): Call permanent_allocation, just so
84         that the middle-end sees the obstacks it expects.
85         (mark_cp_function_context): Likewise.
86         * init.c (build_new): Don't use min_tree_cons.
87         * lex.c (permanent_obstack): Don't declare.
88         (current_obstack, saveable_obstack): Likewise.
89         * spew.c (current_obstack, saveable_obstack): Likewise.
90         * tree.c (current_obstack, saveable_obstack): Likewise.
91         (scratch_ovl_cons): Remove.
92         (build_min_nt): Don't mess with obstacks.
93         (build_min): Likewise.
94         (min_tree_cons): Remove
95         * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
96         (build_x_function_call): Likewise.
97         (build_c_cast): Don't use min_tree_cons.
98         
99 1999-11-29  Mark Mitchell  <mark@codesourcery.com>
101         * pt.c (tsubst_decl): Robustify.
103 1999-11-27  Mark Mitchell  <mark@codesourcery.com>
105         * decl2.c (finish_file): Call expand_body for inline functions
106         that will be written out but that do not yet have RTL.
107         * semantics.c (expand_body): Do not generate RTL For inline
108         functions that do not yet need to be written out.
110 1999-11-25  Mark Mitchell  <mark@codesourcery.com>
112         * Make-lang.in (CXX_SRCS): Add optimize.c.  
113         * Makefile.in (CXX_OBJS): Add optimize.o.
114         (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
115         (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
116         (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
117         (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
118         (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
119         (dump.o): Likewise.
120         (optimize.o): New target.  
121         * class.c: Don't include splay-tree.h.
122         * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.  
123         * cp-tree.h: Include splay-tree.h.
124         (DECL_UNINLINABLE): New macro.
125         (CTOR_BEGIN_P, CTOR_END_P): New macros.
126         (flag_inline_trees): New variable.
127         (local_variable_p): New function.
128         (nonstatic_local_decl_p): Likewise.
129         (optimize_function): Likewise.
130         (cplus_unsave_expr_now): Remove.
131         (copy_tree_r): Declare.
132         (remap_save_expr): Likewise.  
133         * decl.c (local_variable_p): Don't
134         make it static.
135         (local_variable_p_walkfn): New function.
136         (make_rtl_for_local_static): Remove code to try to avoid writing
137         out static constants.
138         (emit_local_var): Fix indentation.
139         (nonstatic_local_decl_p): New function.
140         (check_default_argument): Use local_variable_p_walkfn, not
141         local_variable_p, when walking the tree.
142         (start_function): Set the DECL_CONTEXT for automatically generated
143         labels.
144         (finish_constructor_body): Use CTOR_STMT to mark the end of a
145         constructor.  
146         * decl2.c: Don't include splay-tree.h.
147         (flag_inline_trees): Define.  
148         * dump.c: Don't include
149         splay-tree.h.  
150         * except.c (expand_end_catch_block): Fix comment formatting.
151         (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
152         (expand_throw): Tidy comment.  
153         * init.c (build_vec_delete_1): Use create_temporary_var.  
154         * lex.c (cplus_tree_code_type): Make it static.
155         (cplus_tree_code_length): Likewise.
156         (cplus_tree_code_name): Likewise.  
157         * optimize.c: New file.  
158         * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
159         with computed gotos.
160         (setup_vtbl_ptr): Mark the beginnings of constructors with
161         CTOR_STMT.
162         (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
163         (expand_body): Call optimize_function.  Save bodies if we're doing
164         inlining on trees.
165         * tree.c: Don't include splay-tree.h.  Include insn-config.h and
166         integrate.h.
167         (copy_tree_r): Make it public.
168         (statement_code_p): New function.
169         (mark_local_for_remap_r): Likewise.
170         (cp_usave_r): Likewise.
171         (cp_unsave): Likewise.
172         (build_cplus_new): Set DECL_CONTEXT for temporary variables.
173         (walk_tree): Walk into `s' class nodes.  Walk statement chains.
174         (copy_tree_r): Handle 's' class nodes.  Restore chains for
175         statements.  Nullify scopes.  Don't copy types.
176         (init_tree): Set lang_unsave to cp_unsave.
177         (remap_save_expr): Define.
178         * ir.texi: Document CTOR_STMT.
179         
180 1999-11-24  Jason Merrill  <jason@casey.cygnus.com>
182         * search.c (note_debug_info_needed): Do perform this optimization
183         for dwarf2.  
184         (maybe_suppress_debug_info): Likewise.  Start by clearing
185         TYPE_DECL_SUPPRESS_DEBUG.
187 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
189         * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
191         * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
193 1999-11-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
195         * decl.c (pushdecl, grokdeclarator): Don't call a variadic
196         function with a non-literal format string.
198         * lex.c (do_identifier): Likewise.
200         * typeck.c (build_unary_op): Likewise.
202 1999-11-23  Mark Mitchell  <mark@codesourcery.com>
204         * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
206 1999-11-22  Mark Mitchell  <mark@codesourcery.com>
208         * cp-tree.def (CTOR_COMPLETE): New tree node.
209         * decl.c (finish_constructor_body): Add it, to mark the end of the
210         constructor.
211         (finish_function): Don't call end_protect_partials here.
212         * ir.texi (CTOR_COMPLETE): Document it.
213         * semantics.c (expand_stmt): Handle it.
214         
215         * cp-tree.def (FUNCTION_NAME): New tree node.
216         * cp-tree.h (current_function_name_declared): Tweak documentation.
217         (lang_decl_flags): Add pretty_function_p, adjust dummy.
218         (DECL_PRETTY_FUNCTION_P): New macro.
219         * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
220         etc., in a template function.  Use at_function_scope_p instead of
221         expanding it inline.
222         * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
223         specially.
224         (tsubst): Handle FUNCTION_NAME.
225         (tsubst_copy): Likewise.
226         (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
227         etc. in instantiation.
228         * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
229         even in template functions.
230         (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
231         conditional scope at the top of a destructor.
232         
233         * error.c (dump_function_decl): Use `[ with ... ]' syntax for
234         specializations too.
236 1999-11-22  Nathan Sidwell  <nathan@acm.org>
238         * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
239         when actually negative.
241         * typeck.c (convert_for_assignment): Expand comment about
242         strange NULL check, moved from ...
243         (convert_for_initialization): ... here. Remove unneeded
244         code.
246 1999-11-21  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
248         * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
249         * init.c (build_vec_delete, build_vec_delete_1): Likewise.
250         Always destruct virtual bases of array components, but never
251         delete them.
252         (build_vec_init): Adjust invocations.
253         (build_delete): Likewise.
254         * decl2.c (delete_sanity): Likewise.
256 1999-11-19  Nathan Sidwell  <nathan@acm.org>
258         * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
259         * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
260         * decl2.c (grok_method_quals): Accept `restrict' as applying to
261         the object pointer. Return such qualifiers.
262         (grokclassfn): Apply this pointer qualifiers. Cleanup unused
263         variables.
265 1999-11-18  Mark Mitchell  <mark@codesourcery.com>
267         * except.c (expand_end_catch_block): Fix typo.
268         (expand_exception_blocks): Simplify.  Don't call
269         expand_leftover_cleanups.
271 1999-11-15  Jason Merrill  <jason@casey.cygnus.com>
273         * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
274         * pt.c (tsubst, case INTEGER_TYPE): Call it.  
275         Check uses_template_parms.
277         * class.c (finish_struct): If we're a local class in a template
278         function, add a TAG_DEFN.
279         * pt.c (lookup_template_class): If this is a local class in a
280         template function, call pushtag.
281         (tsubst_expr, case TAG_DEFN): Handle classes, too.
283         Emit debug info with the vtable.
284         * search.c (maybe_suppress_debug_info): New function...
285         * class.c (finish_struct_1): ...split out from here.
286         * cp-tree.h: Declare it.
287         * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
288         if we're writing out the vtable.
289         * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p, 
290         note_debug_info_needed): #if 0 out.
292 1999-11-14  Mark Mitchell  <mark@codesourcery.com>
294         * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
295         * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
296         TREE_PERMANENT.
297         * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
298         * decl2.c (lookup_arg_dependent): Use it.
299         
300         * cp-tree.h (cp_finish_decl): Change prototype.
301         (finish_static_data_member_decl): Likewise.
302         (push_permanent_obstack): Remove declaration.
303         (push_expression_obstack): Likewise.
304         (push_scratch_obstack): Likewise.
305         (DECL_TEMPLATE_PARM_P): Robustify.
306         (SET_DECL_TEMPLATE_PARM_P): New macro.
307         * class.c (add_method): Don't manipulate obstacks.
308         (finish_vtbls): Likewise.
309         * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
310         * decl.c (binding_for_name): Don't manipulate obstacks.
311         (maybe_push_to_top_level): Likewise.
312         (pop_from_top_level): Likewise.
313         (duplicate_decls): Likewise.
314         (pushdecl): Likewise.
315         (implicitly_declare): Likewise.
316         (build_typename_type): Likewise.
317         (start_decl): Likewise.
318         (cp_finish_decl): Likewise.
319         (finish_decl): Likewise.
320         (destroy_local_static): Likewise.
321         (expand_static_init): Likewise.
322         (complete_array_type): Likewise.
323         (grokvardecl): Likewise.
324         (build_ptrmemfnc_type): Likewise.
325         (grokdeclarator): Likewise.
326         (xref_tag): Likewise.
327         (xref_basetypes): Likewise.
328         (start_enum): Likewise.
329         (finish_enum): Likewise.
330         (start_function): Likewise.
331         (finish_function): Likewise.
332         (start_method): Adjust call to cp_finish_decl.
333         * decl2.c (finish_static_data_member_decl): Don't manipulate
334         obstacks.
335         (grokfield): Likewise.
336         (grokbitfield): Likewise.
337         (get_temp_name): Likewise.
338         (get_sentry): Likewise.
339         (fnish_file): Likewise.
340         (lookup_arg_dependent): Likewise.
341         * except.c (call_eh_info): Likewise.
342         (push_eh_info): Likewise.
343         (do_pop_exception): Likewise.
344         (initialize_handler_parm): Likewise.
345         (expand_end_eh_spec): Likewise.
346         (alloc_eh_object): Likewise.
347         (expand_throw): Likewise.
348         * expr.c (extract_scalar_init): Likewise.
349         * init.c (build_java_class_ref): Likewise.
350         * lex.c (get_time_identifier): Likewise.
351         (snarf_defarg): Likewise.
352         (add_defarg_fn): Likewise.
353         (is_global): Simplify.
354         (do_identifier): Don't check TREE_PERMANENT.
355         * method.c (emit_thunk): Don't manipulate obstacks.
356         * parse.y (condition): Adjust call to cp_finish_decl.
357         (primary): Likewise.
358         (initdcl): Likewise.
359         (initdcl0_innards): Likewise.
360         (nomods_initdcl0): Likewise.
361         * pt.c (push_inline_template_parms_recursive): Use
362         SET_DECL_TEMPLATE_PARM_P.
363         (process_template_parm): Likewise.
364         (lookup_template_class): Don't manipulate obstacks.
365         (instantiate_class_template): Adjust call to
366         finish_static_data_member_decl.
367         (tsubst_decl): Don't manipulate obstacks.
368         (tsubst_expr): Likewise.
369         (instantiate_template): Likewise.
370         (instantiate_decl): Adjust calls to cp_finish_decl.
371         * rtti.c (call_void_fn): Don't manipulate obstacks.
372         (get_tinfo_var): Likewise.
373         (get_tinfo_fn_unused): Likewise.
374         (build_dynamic_cast_1): Likewise.
375         (expand_si_desc): Likewise.
376         (expand_class_desc): Likewise.
377         (expand_ptr_desc): Likewise.
378         (expand_attr_desc): Likewise.
379         (expand_generic_desc): Likewise.
380         (synthesize_tinfo_fn): Likewise.
381         * search.c (expand_upcast_fixups): Likewise.
382         * semantics.c (finish_asm_stmt): Likewise.
383         (finish_named_return_value): Likewise.
384         (begin_class_definition): Likewise.
385         (finish_class_definition): Likewise.
386         (finish_typeof): Likewise.
387         * tree.c (build_cplus_method_type): Likewise.
388         (reverse_path): Likewise.
389         (copy_template_template_parm): Likewise.
390         (build_expr_ptr_wrapper): Likewise.
391         (push_expression_obstack): Remove.
392         (push_permanent_obstack): Likewise.
393         * typeck.c (mark_addressable): Likewise.
394         
395 1999-11-13  Mark Mitchell  <mark@codesourcery.com>
397         * call.c (build_conditional_expr): Use build_target_expr_with_type.
398         (convert_like): Likewise.
399         (build_over_call): Likewise.
400         * cp-tree.h (build_target_expr): Remove.
401         (build_target_expr_with_type): New function.
402         * cvt.c (build_up_reference): Use get_target_expr.
403         * decl.c (build_target_expr): Move to ...
404         * tree.c (build_target_expr): Here.  Make it static.
405         (build_target_expr_with_type): New function.  Set DECL_CONTEXT on
406         the temporary VAR_DECLs.
407         (get_target_expr): Use it.
409 1999-11-13  Jason Merrill  <jason@yorick.cygnus.com>
411         * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
412         * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
413         * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
414         * class.c (set_rtti_entry): Use it.
416 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
418         * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
419         here.
420         * semantics.c (finish_expr_stmt): Call it here instead.  Move
421         default_conversion logic to semantic-analysis time.
423 1999-11-12  Jason Merrill  <jason@yorick.cygnus.com>
425         * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
427 Fri Nov 12 12:56:32 MST 1999    Diego Novillo <dnovillo@cygnus.com>
429         * init.c (init_init_processing): Re-instated Nov 11 patch after
430         approval.
432 Fri Nov 12 10:42:02 MST 1999    Diego Novillo <dnovillo@cygnus.com>
434         * init.c (init_init_processing): Undo patch from Nov 11, 1999.
435         Patch had not been approved yet.
437 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
439         * decl.c (compute_array_index_type): New function, split out from
440         grokdeclarator.
441         (create_array_type_for_decl): Likewise.
442         (grokdeclarator): Use them.
444         * semantics.c (expand_stmt): Don't suspend_momentary or
445         resume_momentary.
447 Thu Nov 11 12:42:11 MST 1999    Diego Novillo <dnovillo@cygnus.com>
449         * init.c (init_init_processing): Header information for
450         arrays allocated via `new' should have the same alignment used by
451         malloc.
453 1999-11-10  Mark Mitchell  <mark@codesourcery.com>
455         * error.c (dump_function_name): Don't crash if given a friend
456         pseudo-instantiation.
458         * cp-tree.h (build_enumerator): Change prototype.
459         * decl.c (enum_next_value): Remove.
460         (enum_overflow): Likewise.
461         (init_decl_processing): Don't register enum_next_value as a root.
462         (start_enum): Clear TYPE_VALUES for a redefined enum.
463         (finish_enum): Reset the type of enumeration constants.
464         (build_enumerator): Fix indentation.  Don't copy CONST_DECLs when
465         we don't need to.  Maintain the TYPE_VALUES list and look there
466         for the previously defined enumeration constant.  Let enumeration
467         constants have the type of their values until the enumeration type
468         is complete.
469         * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
470         (structsp): Adjust.
471         * parse.c: Regenerated.
472         * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
473         
474 Wed Nov 10 12:43:21 1999  Philippe De Muyter  <phdm@macqel.be>
475                           Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
477         * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
479 1999-11-09  Mark Mitchell  <mark@codesourcery.com>
481         * cp-tree.h (language_function): Remove x_last_dtor_insn and
482         x_last_parm_cleanup_insn.
483         * decl.c (last_dtor_insn): Remove.
484         (last_parm_cleanup_insn): Likewise.
485         (expand_start_early_try_stmts): Don't set them.
486         (store_parm_decls): Likewise.
487         (save_function_data): Or save them.
488         (mark_lang_function): Or mark them.
490 1999-11-08  Mark Mitchell  <mark@codesourcery.com>
492         * decl.c (store_parm_decls): Generate cleanup code at
493         semantic-analysis time.  Destroy objects in the correct order.
495 1999-11-07  Mark Mitchell  <mark@codesourcery.com>
497         * cp-tree.h (begin_new_placement): Remove.
498         (finish_new_placement): Likewise.
499         * class.c (finish_struct_1): Don't suspend_momentary or
500         resume_momentary.
501         * decl.c (grokdeclarator): Likewise.
502         (maybe_build_cleanup_1): Likewise.
503         * except.c (push_eh_cleanup): Likewise.
504         (build_terminate_handler): Likewise.
505         * init.c (build_new_1): Likewise.
506         * parse.y (parse_decl): Change prototype.
507         (initdecls, notype_initdecls, initdcl): Don't return int.
508         (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
509         (.begin_new_placement): Remove.
510         (.finish_new_placement): Likewise.
511         (nonmomentary_expr): Likewise.
512         (suspend_mom): Likewise.
513         (condition): Don't suspend_momentary, resume_momentary, or keep
514         track of need to resume.
515         (unary_expr): Likewise.
516         (new_placement): Likewise.
517         (decl): Likewise.
518         (structsp): Likewise.
519         (new_type_id): Likewise.
520         (maybe_parmlist): Likewise.
521         (direct_after_type_declaration): Likewise.
522         (direct_new_declarator): Likewise.
523         (direct_abstract_declaration): Likewise.
524         * parse.c: Regenerated.
525         * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
526         * semantics.c (begin_new_placement): Remove.
527         (finish_new_placement): Likewise.
528         
529 1999-11-05  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
531         * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
532         (DECL_TEMPLATE_INFO): Use it.
533         * decl.c (warn_extern_redeclared_static): Do nothing for
534         TEMPLATE_DECLs.
535         * decl2.c (mark_used): Explicitly check for function or variable.
536         * semantics.c (finish_unary_op_expr): Check whether result is also
537         an INTEGER_CST.
539 1999-11-05  Mark Mitchell  <mark@codesourcery.com>
541         * Makefile.in (typeck2.o): Depend on output.h.
542         * typeck2.c: Include output.h.
544         * decl.c (flag_ansi): Remove declaration.
546         * pt.c (tinst_level_tick): Make it static.
547         (last_template_error_tick): Likewise.
548         
549         * cp-tree.h (mapcar): Remove declaration.
550         (search_tree): Likewise.
551         (walk_tree_fn): New typedef.
552         (walk_tree): New function.
553         * tree.c (bot_manip): Change prototype.  Adjust to be called via
554         walk_tree.
555         (bot_replace): Likewise.
556         (no_linkage_helper): Likewise.
557         (copy_tree_r): New function.
558         (search_tree): Rename, and adjust, to become ...
559         (walk_tree): New function.
560         (mapcar): Remove.
561         (target_remap): Remove.
562         (target_remap_count): Likewise.
563         (break_out_target_exprs): Use walk_tree.
564         * decl.c (local_variable_p): Change prototype.
565         (check_default_argument): Use walk_tree.
566         * pt.c (for_each_template_parm_r): New function, split out from ...
567         (for_each_template_parm): Here.  Use it, via walk_tree.
568         
569 1999-11-03  Mark Mitchell  <mark@codesourcery.com>
571         * class.c (check_bitfield_decl): New function, split out from
572         finish_stuct_1.
573         (check_field_decl): Likewise.  Recursively examine members of
574         anonymous structs.
575         (finish_struct_1): Use them.
576         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
577         
578 1999-11-02  Mark Mitchell  <mark@codesourcery.com>
580         * decl.c (grokfndecl): Remove dead code.
582         * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
584 1999-11-02  Scott Snyder  <snyder@fnal.gov>
586         * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
587         IMAGPART_EXPR.
588         * pt.c (tsubst_copy): Likewise.
590 1999-11-01  Jason Merrill  <jason@yorick.cygnus.com>
592         * decl2.c (maybe_make_one_only): Always make things comdat on
593         ELF targets, too.
595 1999-10-31  Mark Mitchell  <mark@codesourcery.com>
597         * decl.c (finish_function): Call free_after_parsing for functions
598         we are not immediately turning into RTL.
600 1999-10-31  Brendan Kehoe  <brendan@cygnus.com>
602         * cp-tree.h (flag_dump_translation_unit): Add decl.
604 Sat Oct 30 22:42:50 1999  Stephen L Moshier <moshier@mediaone.net>
606         * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
608 1999-10-30  Mark Mitchell  <mark@codesourcery.com>
610         * decl.c (pop_cp_function_context): Don't call free on a NULL
611         pointer.
612         * semantics.c: Include ggc.h.
613         (expand_body): Do garbage-collection after processing a template
614         function.  Clear DECL_SAVED_TREE after generating RTL for a
615         function.
616         * Makefile.in (semantics.o): Depend on ggc.h.
617         
618 1999-10-29  Mark Mitchell  <mark@codesourcery.com>
620         * cp-tree.h (make_typename_type): Change prototype.
621         * decl.c (make_typename_type): Only complain if so requested.
622         * parse.y (nested_name_specifier): Adjust calls.
623         (typename_sub0): Likewise.
624         (typename_sub1): Likewise.
625         * parse.c: Regenerated.
626         * pt.c (convert_template_argument): Pass complain to
627         make_typename_type.
628         (tsubst): Likewise.
629         
630 1999-10-28  Mark Mitchell  <mark@codesourcery.com>
632         * semantics.c (finish_handler): End the scope of the handler
633         before attaching it to the statement-tree.
635 1999-10-28  Ian Lance Taylor  <ian@zembu.com>
637         * rtti.c (build_dynamic_cast_1): Give a better error message for
638         an attempt to dynamic_cast from a non-polymorphic type.
640 1999-10-27  Mark Mitchell  <mark@codesourcery.com>
642         * cp-tree.h (make_temp_vec): Remove.
643         (make_scratch_vec): Likewise.
644         * call.c (add_function_candidate): Use make_tree_vec.
645         (add_conv_candidate): Likewise.
646         (build_builtin_candidate): Likewise.
647         (add_template_candidate_real): Likewise.
648         * class.c (resolve_address_of_overloaded_function): Likewise.
649         * decl.c (start_function): Don't fool with the momentary obstack.
650         (finish_function): Likewise.
651         * init.c (expand_direct_vtbls_init): Likewise.
652         (begin_init_stmts): Likewise.
653         (finish_init_stmts): Likewise.
654         * pt.c (add_to_template_args): Use make_tree_vec.
655         (check_explicit_specialization): Likewise.
656         (coerce_template_parms): Likewise.
657         (lookup_template_class): Don't fool with the momentary obstack.
658         (instantiate_class_template): Likewise.
659         (tsubst_template_arg_vector): Use make_tree_vec.
660         (tsubst_aggr_type): Don't fool with the momentary obstack.
661         (tsubst_decl): Likewise.  Use make_tree_vec.
662         (try_one_overload): Likewise.
663         (try_class_unification):  Don't fool with the momentary obstack.
664         (get_bindings_real): Use make_tree_vec.
665         (set_mangled_name_for_template_decl): Likewise.
666         * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
667         * semantics.c (finish_expr_stmt): Likewise.
668         (finish_do_stmt): Likewise.
669         (finish_for_expr): Likewise.
670         (finish_switch_cond): Likewise.
671         (do_pushlevel): Likewise.
672         (do_poplevel): Likewise.
673         * tree.c (make_temp_vec): Remove.
674         
675         * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs.  Dump
676         CLEANUP_P for a TRY_BLOCK.
677         * ir.texi: Document SAVE_EXPR.
679 Tue Oct 26 23:29:56 1999  Jeffrey A Law  (law@cygnus.com)
681         * call.c (build_over_call):  Check that the built-in function is
682         of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
683         * typeck.c (build_function_call_real): Similarly. 
685 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
687         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS.  Don't call
688         remember_end_note.
690 1999-10-24  Mark Mitchell  <mark@codesourcery.com>
692         * decl.c (push_overloaded_decl_1): Use pushdecl.
693         
694         * decl.c (auto_function): Replace #ifdef'd __inline with just
695         plain inline.
696         * lex.c (my_get_run_time): Likeise.
697         (yyprint): Likewise.
698         (identifier_type): Likewise.
699         * method.c (start_squangling): Likewise.
700         (end_squangling): Likewise.
701         (icat): Likewise.
702         (old_backref_index): Likewise.
703         (flush_repeats): Likewise.
704         (issue_ktype): Likewise.
705         * parse.y (empty_parms): Likewise.
706         * parse.c: Regenerated.
707         
708 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
710         * dump.c (dequeue_and_dump): Replace several uses of
711         queue_and_dump_index with dump_child.
713 1999-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
715         * expr.c: Include tm_p.h.
717 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
719         * cp-tree.h (SCOPE_PARTIAL_P): New macro.
720         (pushlevel_temporary): Remove.
721         (add_scope_stmt): New function.
722         * decl.c (pushlevel_temporary): Remove.
723         (poplevel): Use add_scope_stmt.
724         (start_decl_1): Likewise.
725         * semantics.c (add_scope_stmt): New function.
726         (do_pushlevel): Use it.
727         (do_poplevel): Use it.
728         (expand_stmt): Check SCOPE_PARTIAL_P.
729         
730         * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
731         * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
732         * expr.c (cplus_expand_expr): Expand it.
733         * ir.texi: Document EMPTY_CLASS_EXPR.
734         
735 1999-10-20  Mark Mitchell  <mark@codesourcery.com>
737         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
738         parameters as having namespace scope.
740 1999-10-19  Mark Mitchell  <mark@codesourcery.com>
742         * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
743         (mangling_flags): New type.
744         (build_overload_int): Change prototype.
745         (build_overload_value): Likewise.
746         (numeric_output_need_bar): Improve comment.
747         (mangle_expression): New function, broken out from ...
748         (build_overload_int): Here.
749         (build_overload_value): Adjust for use of mangling flags.  Don't
750         warn about real-valued template parameters here.  Do handle
751         complex expressions involving real-valued template parameters.
752         (build_template_parm_names): Encase non-type template parameters
753         in underscores, if necessary.
754         (process_overload_item): Remove conditional on
755         PARM_CAN_BE_ARRAY_TYPE.
757 1999-10-17  Mark Mitchell  <mark@codesourcery.com>
759         * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
761         * ir.texi: Clean up documentation of RETURN_INIT.
762         
763 1999-10-15  Greg McGary  <gkm@gnu.org>
765         * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
766         (lang_init): Set default for flag_bounds_check if still "unspecified".
768 1999-10-13  Andrew Haley  <aph@cygnus.com>
770         * class.c (finish_struct_1): Force alignment of non-bitfields to
771         BITS_PER_UNIT.
773 Wed Oct 13 22:01:35 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
775         * typeck2.c (process_init_constructor): Handle empty constructors.
777 1999-10-13  Jason Merrill  <jason@yorick.cygnus.com>
779         * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
781         * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
782         array error.
784 1999-10-13  Mark Mitchell  <mark@codesourcery.com>
786         * decl.c (make_rtl_for_local_static): Don't create register RTL
787         for addressable constants.
789 1999-10-13  Nathan Sidwell  <nathan@acm.org>
791         * cp-tree.h (build_x_va_arg): Prototype new function.
792         * call.c (build_x_va_arg): Define it.
793         * parse.y (unary_expr): Call build_x_va_arg.
794         
795         * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
796         * call.c (convert_type_from_ellipsis): Define it.
797         * decl.c (init_decl_processing): Set lang_type_promotes_to.
799         * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
801 1999-10-11  Jason Merrill  <jason@yorick.cygnus.com>
803         * class.c (fixed_type_or_null): Always set *nonnull.
805 1999-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
807         * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
808         __GNUC__ and __GNUC_MINOR__.
810 1999-10-09  Mark Mitchell  <mark@codesourcery.com>
812         * cp-tree.h (make_rtl_for_local_static): New function.  
813         * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
814         local statics ...
815         (make_rtl_for_local_static): Here.
816         * semantics.c (expand_stmt): Use make_rtl_for_local_static.
817         
818 1999-10-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
820         * method.c: Include tm_p.h.
822 1999-10-7   Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
824         * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
825         * lex.c (cp_make_lake_type): Likewise.
826         * tree.c (init_tree): Init make_lang_type_fn.
827         
828 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
830         * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
831         paramter.
832         
833         * semantics.c (expand_stmt): Don't pretend to have asmspecs for
834         local statics if we don't really have them.
836         * ir.texi: Improve documentation for STMT_EXPR.  Describe
837         CLEANUP_POINT_EXPR.
839 1999-10-07  Jason Merrill  <jason@yorick.cygnus.com>
841         * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
843 1999-10-07  Greg McGary  <gkm@gnu.org>
845         * class.c (finish_struct_1): Use simpler method of
846         removing elements of a singly-linked list which doesn't
847         lose for classes without data members.
849 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
851         * friend.c (make_friend_class): Robustify.
853         * semantics.c (finish_object_call_expr): Reject calls to template
854         types.
856 1999-10-06  Mark Mitchell  <mark@codesourcery.com>
858         * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
860         * cp-tree.h (CLASSTYPE_VFIELD): Remove.
861         * call.c (build_vfield_ref): Use TYPE_VFIELD, not
862         CLASSTYPE_VFIELD.
863         * class.c (get_vfield_offset): Likewise.
864         (finish_base_struct): Likewise.
865         (modify_one_vtable): Likewise.
866         (fixup_vtable_deltas): Likewise.
867         (finish_struct_1): Likewise.
868         * init.c (expand_virtual_init): Likewise.
869         * search.c (lookup_field_1): Likewise.
870         (expand_upcast_fixups): Likewise.
871         * typeck.c (build_component_ref): Likewise.
872         (build_binary_op_nodefault): Likewise.
873         
874         * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
875         * ir.texi: Document TYPE_VFIELD.
877 1999-10-06  Brendan Kehoe  <brendan@cygnus.com>
879         * decl.c (grokdeclarator): Only warn about non-zero arrays if
880         !in_system_header (linux socketbits.h can give this for
881         __cmsg_data, which is using a GNU extension).
883 1999-10-05  Mark Mitchell  <mark@codesourcery.com>
885         * decl2.c (start_static_storage_duration_function): Push the
886         function declaration so it ends up in namespace scope.
888         * dump.c (DUMP_CHILDREN): Remove.
889         (DUMP_BINFO): Adjust.
890         (struct dump_node_info): Remove dump_children_p.
891         (queue_and_dump_type): Remove dump_children_p parameter.
892         (queue): Don't set dump_children_p.
893         (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
894         queue_and_dump_index.
895         (dequeue_and_dump): Unconditionally print children.  Adjust calls
896         to functions mentioned above.
897         (dump_node):  Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
898         
899         * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
900         * dump.c (dequeue_and_dump): Dump them.
901         
902         * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
904         * decl.c (start_function): Set current_in_charge_parm for
905         constructors, too, where appropriate.
906         * search.c (fixup_all_virtual_upcast_offsets): New function.
907         (expand_indirect_vtbls_init): Use it.
908         
909 1999-10-04  Nathan Sidwell  <nathan@acm.org>
911         * decl2.c (grok_alignof): Don't decay lvalues.
912         
913         * init.c (build_new): Remove unused variable.
915 1999-10-04  Mark Mitchell  <mark@codesourcery.com>
917         * cp-tree.h (struct language_function): Remove static_labelno.
918         (static_labelno): Remove macro.
919         * method.c (build_overload_nested_name): Make static_labelno
920         static here.
921         
922         * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
923         to decide whether or not a function is defined.
925         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
926         situations where make_node will do it automatically.
927         * decl.c (grok_reference_init): Likewise.
928         (expand_static_init): Likewise.
929         (do_static_initialization): Likewise.
930         * init.c (perform_member_init): Likewise.
931         (expand_aggr_init_1): Likewise.
932         (build_new_1): Likewise.
933         * method.c (do_build_copy_constructor): Likewise.
934         (do_build_assign_ref): Likewise.
935         * search.c (expand_upcast_fixups): Likewise.
936         * semantics.c (finish_stmt_expr): Likewise.
937         * typeck.c (build_unary_op): Likewise.
938         (check_return_expr): Likewise.
940 1999-10-04  Jason Merrill  <jason@yorick.cygnus.com>
942         * init.c (build_vec_delete_1): Fold COND_EXPRs.
944 1999-10-03  Mark Mitchell  <mark@codesourcery.com>
946         * cp-tree.def (VEC_INIT_EXPR): Remove.
947         * cp-tree.h (struct stmt_tree): New type.
948         (struct saved_scope): Remove firstobj.  Add x_saved_tree,
949         x_stmt_tree.
950         (class_cache_firstobj): Remove.
951         (struct language_function): Remove stmts_are_full_exprs_p,
952         x_last_tree, and x_last_expr_type.  Add x_stmt_tree.
953         (current_stmt_tree): New macro.
954         (last_tree): Adjust.
955         (last_expr_type): Likewise.
956         (doing_semantic_analysis_p): Simplify.
957         (stmts_are_full_exprs_p): Adjust.
958         (begin_tree): Remove prototype.
959         (end_tree): Likewise.
960         (begin_stmt_tree): Change prototype.
961         (finish_stmt_tree): Likewise.
962         (building_stmt_tree): Simplify.
963         * decl.c (mark_stmt_tree): New function.
964         (mark_saved_scope): Use it.
965         (start_function): Rearrange slightly to call begin_stmt_tree 
966         earlier.
967         (save_function_data): Tweak.
968         (finish_function): Adjust call to finish_stmt_tree.
969         (mark_lang_function): Use mark_stmt_tree.
970         * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
971         * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
972         (build_vec_init): Remove creation of stand-in intializer.
973         * pt.c (begin_tree): Remove.
974         (end_tree): Likewise.
975         * semantics.c (SET_LAST_STMT): New macro.  Use it throughout.
976         (begin_compound_stmt): Handle a compound-statement outside of a
977         function.
978         (begin_stmt_expr): Handle a statement-expression outsidef of a
979         function.
980         (finish_stmt_expr): Likewise.
981         (begin_class_definition): Don't call begin_tree.
982         (finish_inline_definitions): Don't call end_tree.
983         (begin_stmt_tree): Take a pointer to tree, not a function as input.
984         (finish_stmt_tree): Likewise.
985         * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
986         (mapcar): Likewise.
987         
988         * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
989         * parse.c: Regenerated.
990         
991         * dump.c (dqueue_and_dump): Dump bitfieldness.
992         
993         * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
994         bitfields, rather than DECL_BIT_FIELD.
995         * ir.texi: Document how to tell whether or not a field is a
996         bitfield.
997         
998         * lex.c (make_lang_type): Fix typo in comment.
1000 1999-10-01  Jason Merrill  <jason@yorick.cygnus.com>
1002         * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
1004 1999-10-01  Mark Mitchell  <mark@codesourcery.com>
1006         * pt.c (tsubst_decl): If the type of a template instantiation is
1007         bogus, so is the whole instantiation.
1009 1999-09-30  Mark Mitchell  <mark@codesourcery.com>
1011         * decl.c (initialize_local_var): Handle static variables here.
1012         (cp_finish_decl): Tweak handling of function-scope static
1013         variables.
1014         * semantics.c (expand_stmt): Handle DECL_STMTs for static
1015         variables.
1017         * method.c (emit_thunk): Don't crash when -fsyntax-only.
1019         * cp-tree.h (lang_decl_flags): Add global_ctor_p and
1020         global_dtor_p.  Add init_priority.
1021         (DECL_ACCESS): Adjust accordingly.
1022         (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
1023         (GLOBAL_INIT_PRIORITY): Likewise.
1024         * decl.c (lang_mark_tree): Adjust accordingly.
1025         (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 
1026         and GLOBAL_INIT_PRIORITY.
1027         * dump.c (dequeue_and_dump): Print them.
1028         * ir.texi: Document them.
1030         * decl2.c (struct priority_info_s): Remove initialization_sequence
1031         and destruction_sequence.
1032         (start_static_storage_duration_function): Return the body of the
1033         function.  Convert for function-at-a-time mode.
1034         (generate_inits_for_priority): Remove.
1035         (finish_static_storage_duration_function): Change prototype.
1036         Adjust for function-at-a-time mode.
1037         (do_static_initialization): Likewise.
1038         (do_static_destruction): Likewise.
1039         (do_static_initialization_and_destruction): Remove.
1040         (start_static_initialization_or_destruction): New function.
1041         (finish_static_initialization_or_destruction): Likewise.
1042         (get_priority_info): Don't manipulation initialization_sequence or
1043         destruction_sequence.
1044         (prune_vars_needing_no_initialization): New function.
1045         (write_out_vars): Likewise.
1046         (finish_file): Use the various new functions instead of the old.
1047         
1048 Thu Sep 30 00:13:27 1999  Dirk Zoller  <duz@rtsffm.com>
1050         * cp-tree.h (warn_float_equal): Declare.
1051         * decl2.c (warn_float_equal): Define.
1052         (lang_decode_option): Recognize -W[no-]float-equal.
1053         * typeck.c (build_binary_op_nodefault): Conditionally warn
1054         about equality tests of floating point types.
1056 1999-09-29  Jason Merrill  <jason@yorick.cygnus.com>
1058         Support normal type_info-based EH mechanisms with -fno-rtti.
1059         * except.c (build_eh_type_type): Remove special -fno-rtti handling.
1060         (build_eh_type_type_ref): Likewise.
1061         (build_eh_type): Remove.
1062         (expand_throw): Call build_eh_type_type, not build_eh_type.
1063         * decl2.c (import_export_decl): Don't associate the tinfo fn with
1064         the vtable if -fno-rtti.
1065         * decl.c (init_decl_processing): Always init_rtti_processing.
1067         * rtti.c (get_typeid): Don't complain about -fno-rtti.
1069         * class.c (class_cache_obstack, class_obstack): Remove.
1070         (init_class_processing): Don't initialize class_obstack.
1071         (push_cache_obstack): Remove.
1072         (pushclass): Don't call it.
1073         * cp-tree.h: Remove prototype for push_cache_obstack.
1074         * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
1075         (pushlevel_class): Don't push_decl_level.
1076         (poplevel_class): Don't pop_stack_level.
1077         (push_class_level_binding): Don't push_cache_obstack.
1078         (init_decl_processing): Don't intialize decl_obstack.
1079         * search.c (push_class_decls): Don't push_cache_obstack.
1080         * tree.c (list_hash_add): Put hash node on permanent_obstack.
1081         (hash_tree_cons): Don't mess with obstacks.
1082         (print_lang_statistics): Don't print stats for class_obstack and
1083         decl_obstack.
1085 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
1087         * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
1088         * ir.texi: Document DECL_EXTERNAL.
1090         * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
1091         * ir.texi: Document THUNK_DECLs.
1093         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
1094         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
1095         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
1096         * error.c (dump_template_bindings): Remove unused parameter.
1097         Handle multiple levels of template parameters.
1098         (dump_template_decl): Use `parms', not `args', for template
1099         parameters.  Fix thinko.
1100         (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION.  Don't pass
1101         flags to dump_template_bindings.
1102         * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
1103         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
1104         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
1105         (tsubst_copy): Clarify variable name.
1106         (most_general_template): Robustify.
1107         
1108 1999-09-29  Nathan Sidwell  <nathan@acm.org>
1110         * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
1111         to change primary template rendering.
1113 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
1115         * cp-tree.h (UPT_TEMPLATE): Remove.
1116         (UPT_PARMS): Likewise.
1117         (DECL_NEEDED_P): New macro.
1118         * decl2.c (finish_vtable_vardecl): Use it.
1119         (finish_objects): Don't crash with -fsyntax-only.
1120         (finish_file): Use DECL_NEEDED_P.  Don't prune vtables when
1121         -fsyntax-only.
1122         * pt.c (tsubst_friend_function): Remove FIXME that talks about
1123         obstacks.
1124         (tsubst_expr): Correct handling of function try-blocks.
1125         * semantics.c: Include flags.h.
1126         (expand_body): Don't do RTL generation if -fsyntax-only.
1127         * Makefile.in (semantics.o): Depends on flags.h.
1128         
1129 1999-09-28  Gabriel Dos Reis  <gdr@codesourcery.com>
1131         * pt.c (most_general_template): Adjust declaration.
1133         * cp-tree.h: (most_general_template): Declare.
1135         * error.c (dump_template_value): Rename to ...
1136         (dump_template_argument): This.
1137         (dump_template_argument_list): New function.
1138         (dump_type): Use it.
1139         (dump_template_parameter): New function.
1140         (dump_template_decl): Use it.
1141         (dump_template_bindings): New function.
1142         (dump_function_decl): Use it. Pretty print function template
1143         instantiations.
1145 1999-09-28  Nathan Sidwell  <nathan@acm.org>
1147         * decl.c (grokdeclarator): Distinguish parameter context for
1148         diagnostics. Tidy up missing type diagnostic.
1149         Diagnose `explicit' in one place. Diagnose `mutable' in one place.
1151 1999-09-28  Mark Mitchell  <mark@codesourcery.com>
1153         * ir.texi: Improve documentation for TARGET_EXPR.
1155 1999-09-27  Nathan Sidwell  <nathan@acm.org>
1157         Augment stringification of trees.
1158         * cp-tree.h (tree_string_flags): New error stringifying enumeration.
1159         (fndecl_as_string, type_as_string_real, args_as_string,
1160         code_as_string, language_as_string, parm_as_string,
1161         op_as_string, assop_as_string, cv_as_string): Remove.
1162         (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
1163         (context_as_string): Declare new function.
1164         * error.c (cp_printers): Move definition.
1165         (OB_UNPUT): Remove.
1166         (OB_END_TEMPLATE_ID): Adjust.
1167         (interesting_scope_p): Remove.
1168         (dump_scope): New static function.
1169         (dump_qualifiers): Adjust prototype, reimplement.
1170         (dump_template_value): Use tree_string_flags.
1171         (dump_type_real): Move back to dump_type.
1172         (dump_type): Adjust prototype. Use tree_string_flags.
1173         (dump_aggr_type): Likewise. Use dump_template_parms.
1174         (dump_type_prefix): Adjust prototype. Use tree_string_flags.
1175         Return pad flag.
1176         (dump_type_suffix): Adjust prototype. Use tree_string_flags.
1177         (dump_simple_decl): Likewise.
1178         (dump_decl): Likewise. Use dump_template_decl.
1179         (dump_template_decl): New static function broken out of dump_decl.
1180         (dump_function_decl): Adjust prototype. Use tree_string_flags.
1181         (dump_parameters): Likewise. Prefix space.
1182         (dump_exception_spec): Adjust prototype. Use tree_string_flags.
1183         (dump_function_name): Likewise. Use dump_template_parms.
1184         (dump_template_parms): New static function broken out of
1185         dump_function_name.
1186         (dump_expr_list): Adjust prototype. Use tree_string_flags.
1187         (dump_expr): Likewise.
1188         (fndecl_as_string): Removed
1189         (type_as_string_real): Removed
1190         (dump_binary_op): Adjust prototype. Use tree_string_flags.
1191         (dump_unary_op): Likewise.
1192         (type_as_string): Likewise.
1193         (expr_as_string): Likewise.
1194         (decl_as_string): Likewise.
1195         (context_as_string): New function.
1196         (lang_decl_name): Adjust.
1197         (decl_to_string): New static print callback.
1198         (expr_to_string): Likewise.
1199         (fndecl_to_string): Likewise.
1200         (code_as_string): Renamed to ...
1201         (code_to_string): ... here. Adjust.
1202         (language_as_string): Renamed to ...
1203         (language_to_string): ... here. Adjust.
1204         (parm_as_string): Renamed to ...
1205         (parm_to_string): ... here.
1206         (op_as_string): Renamed to ...
1207         (op_to_string): ... here.
1208         (assop_as_string): Renamed to ...
1209         (assop_to_string): ... here.
1210         (type_to_string): New static print callback.
1211         (args_as_string): Renamed to ...
1212         (args_to_string): ... here. Adjust.
1213         (cv_as_string): Renamed to ...
1214         (cv_to_string): ... here. Adjust.
1215         * pt.c (mangle_class_name_for_template): Use tree_string_flags.
1216         (print_template_context): Likewise.
1218 1999-09-26  Mark Mitchell  <mark@codesourcery.com>
1220         * cp-tree.h (expand_throw): Remove prototype.
1221         * except.c (expand_throw): Make it static.  Use tree-generation
1222         functions, rather than RTL-generation functions.
1223         (build_throw): Use it.
1224         * expr.c: Include except.h.
1225         (cplus_expand_expr): Don't call expand_throw here.
1226         * Makefile.in (expr.o): Depend on except.h.
1227         * ir.texi: Update documentation for THROW_EXPR.
1228         
1229         * decl.c (start_function): Set x_dont_save_pending_sizes rather
1230         than calling get_pending_sizes.
1231         * init.c (build_new): Don't save and restore
1232         immediate_size_expand; instead, assert that it has the expected
1233         value already.
1235 1999-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1237         * lex.c (compiler_error): Add missing call to va_end().
1239 1999-09-25  Mark Mitchell  <mark@codesourcery.com>
1241         * dump.c (dequeue_and_dump): Handle RESULT_DECL.
1242         * ir.texi: Document RESULT_DECL and DECL_RESULT.
1244         * cp-tree.h (check_return_expr): New function.
1245         * decl.c (finish_constructor_body): New function.
1246         (pushdecl): Put global friend functions in namespace binding
1247         level, not the class binding level.
1248         (finish_destructor_body): Make sure the dtor_label is always
1249         defined.  Fix typo in comment.
1250         (finish_function): Move generation of constructor-termination code
1251         to semantic-analysis time.  Move generation of implicit `main'
1252         return value to semantic-analysis time.
1253         * semantics.c (finish_return_stmt): Generate goto's to
1254         ctor_label/dtor_label here.  Use check_return_expr to do semantic
1255         analysis on the returned expression.
1256         * typeck.c (maybe_warn_about_returning_address_of_local): New
1257         function split out from c_expand_return.
1258         (check_return_expr): Likewise.
1259         (c_expand_return): Just generate the RTL for the return.
1260         
1261 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
1263         * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
1264         (cleanup_type): Likewise.
1265         (search_tree): Change prototype.
1266         * decl.c (local_variable_p): Adjust for new interface to
1267         search_tree.
1268         (check_default_argument): Likewise.
1269         * error.c (dump_expr): Handle INIT_EXPR.
1270         * except.c (expand_throw): Don't make cleanup_type a local static.
1271         * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
1272         * init.c (build_new): Call build_new_1 directly, rather than
1273         building a NEW_EXPR.
1274         (build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
1275         processing file-scope initializers.
1276         * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
1277         * tree.c: Include splay-tree.h
1278         (no_linkage_helper): Adjust for new interface to search_tree.
1279         (search_tree): Pass around pointers to tree nodes, rather than the
1280         nodes themselves.  Handle VEC_INIT_EXPR.
1281         (no_linkage_check): Adjust for new interface to search_tree.
1282         (mapcar): Handle VEC_INIT_EXPR.
1283         (target_remap): New variable.
1284         (bot_manip): Use it.
1285         (bot_replace): New function.
1286         (break_out_target_exprs): Use it to remap all variables used in a
1287         default argument expression.
1288         * typeck.c (build_modify_expr): Don't crash when outside a
1289         function and presented with an INIT_EXPR assignment
1290         * Makefile.in (tree.o): Depend on splay-tree.h.
1292 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
1294         * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
1295         DECL_BUILT_IN.
1296         (builtin_function): New arg CLASS.  Arg CODE now of type int.  All
1297         callers changed.
1298         Set the builtin's DECL_BUILT_IN_CLASS.
1300 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
1302         * decl.c (pushdecl): Don't make local declarations of extern
1303         variables give the variable a DECL_CONTEXT for the function.
1304         (make_rtl_for_nonlocal_decl): Don't fuss with obstacks.  Simplify.
1305         Don't accidentally make RTL for local declarations.
1306         (emit_local_var): Handle declarations with asm-specifiers here.
1307         
1308 1999-09-23  Mark Mitchell  <mark@codesourcery.com>
1310         * ir.texi: Improve documentation for TARGET_EXPRs.  Discuss
1311         STMT_IS_FULL_EXPR_P.
1313         * cp-tree.h (language_function): Add cannot_inline.
1314         * decl.c (start_function): Restore current_function_cannot_inline
1315         from the saved value.
1316         (save_function_data): Save current_function_cannot_inline.
1317         * decl2.c (start_objects): Change prototype.  Build the function
1318         in function-at-a-time mode.
1319         (finish_objects): Likewise.
1320         (generate_ctor_or_dtor_function): Adjust accordingly.
1321         
1322         * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
1323         * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
1324         Don't call expand_anon_union_decl here
1325         * semantics.c (exapnd_stmt): Call it here, instead.
1326         * typeck.c (mark_addressable): Addressed variables are implicitly
1327         used.
1328         
1329 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1331         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
1332         (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
1333         (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
1334         * cp-tree.h: Add tree checking macros to various tree access
1335         macros. 
1336         * ptree.c (print_lang_decl): Test for function or variable
1337         before accessing template info.
1339 1999-09-23  Jason Merrill  <jason@yorick.cygnus.com>
1341         * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
1342         * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
1343         * decl2.c (lang_f_options): Add -fshort-wchar.
1344         * cp-tree.h: Declare flag_short_wchar.
1345         * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 
1346         int' for wchar_t.
1348 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1350         * ir.texi: Fix formatting errors and typos.
1352 1999-09-22  Mark Mitchell  <mark@codesourcery.com>
1354         * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
1356         * decl.c (pushdecl): Do create a binding for extern "C" functions,
1357         but not for their DECL_ASSEMBLER_NAMEs.
1358         (lookup_name_current_level): Fix formatting.
1359         (xref_tag): Likewise.
1360         * decl2.c (start_objects): Mark static constructors and
1361         destructors as used.
1363 1999-09-22  Jason Merrill  <jason@yorick.cygnus.com>
1365         * decl.c (define_case_label): Don't crash if we're not in a switch.
1367         * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
1368         * lang-options.h: Restore -fthis-is-variable.  Remove help strings
1369         for unsupported flags.
1371 1999-09-21  Jason Merrill  <jason@yorick.cygnus.com>
1373         * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
1374         Accept and warn about -fthis-is-variable.
1376 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
1378         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
1379         CLEANUP_STMT, and SCOPE_STMT.
1381         * decl2.c (lang_decode_option): Adjust, in the wake of recent
1382         changes to option processing.
1384 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1386         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
1387         function pointer from pmfs with no object given.
1388         (convert_for_assignment): Do not return error when converting
1389         pmfs.
1391 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
1393         * lex.c (internal_filename): New variable.
1394         (INTERNAL_FILENAME): New macro.
1395         (init_parse): Allocate internal_filename and mark as root.  Use it
1396         instead of a string constant.
1398 1999-09-21  Nathan Sidwell  <nathan@acm.org>
1400         Reimplement dynamic cast and catch matching.
1401         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
1402         * search.c (dynamic_cast_base_recurse): New function.
1403         (get_dynamic_cast_base_type): New function for dynamic cast.
1404         * rtti.c (build_dynamic_cast_1): Determine source and target
1405         class relationship. Call __dynamic_cast_2.
1406         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
1407         (__user_type_info::dyncast): New dynamic cast dispatcher.
1408         (__user_type_info::sub_kind): New nested enumeration.
1409         (__user_type_info::contained_p): sub_kind predicate.
1410         (__user_type_info::contained_public_p): Likewise.
1411         (__user_type_info::contained_nonpublic_p): Likewise.
1412         (__user_type_info::contained_nonvirtual_p: Likewise.
1413         (__user_type_info::upcast_result): New nested struct.
1414         (__user_type_info::dyncast_result): New nested struct.
1415         (*::do_upcast): New catch function.
1416         (*::do_dyncast): New dynamic cast function.
1417         (__user_type_info::find_public_subobj): New dynamic cast
1418         helper dispatcher.
1419         (*::do_find_public_subobj): New dynamic cast helper function.
1420         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
1421         (__user_type_info::dyncast): Define dynamic cast dispatcher.
1422         (*::do_upcast): Define catch function.
1423         (*::do_dyncast): Define dynamic cast function.
1424         (*::do_find_public_subobj): Define dynamic cast helper function.
1425         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
1426         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
1427         (__dynamic_cast_2): New dynamic cast runtime.
1429 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
1431         * cp-tree.h (finish_stmt_expr): Change prototype.
1432         * expr.c (cplus_expand_expr): Adjust call accordingly.
1433         * init.c (finish_init_stmts): Likewise.
1434         * parse.y (primary): Likewise.
1435         * pt.c (tsubst_copy): Likewise.
1436         * semantics.c (finish_stmt_expr): Don't take two parameters.
1437         Don't remove generated BLOCKs from the block-tree.
1439         Remove support for assigning to `this'.
1440         * NEWS: Note that fact.
1441         * class.c (build_vbase_path): Don't check flag_this_is_variable.
1442         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
1443         (language_function): Remove assigns_this, just_assigned_this, and
1444         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
1445         (base_init_expr): Remove.
1446         (current_vcalls_possible_p): New macro.
1447         (vtbls_set_up_p): Likewise.
1448         (emit_base_init): Change prototype.
1449         * decl.c (finish_destructor_body): New function, split out from
1450         finish_function.
1451         (current_function_assigns_this): Remove.
1452         (current_function_just_assigned_this): Likewise.
1453         (start_function): Don't set them.
1454         (finish_function): Don't check them.  Don't emit
1455         base-initialization code here.  Generate code for destructors when
1456         doing semantic analysis.
1457         (finish_stmt): Don't check current_function_just_assigned_this.
1458         * decl2.c (lang_f_options): Remove this-is-variable.
1459         (lang_decode_option): Likewise.
1460         (grokclassfn): Don't check flag_this_is_variable.
1461         * init.c (emit_base_init): Return the expression generated.
1462         (construct_virtual_bases): Don't push/pop obstacks.  Fix
1463         typo.
1464         (build_new_1): Don't check flag_this_is_variable.
1465         (get_temp_regvar): Don't set DECL_REGISTER.
1466         (build_vec_init): Don't call use_variable.
1467         * lang-options.h: Remove "-fthis-is-variable" and
1468         "-fno-this-is-variable".
1469         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
1470         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
1471         expand_expr_stmt.
1472         * semantics.c (finish_expr_stmt_real): Rename to ...
1473         (finish_expr_stmt): This.  Remove assigned_this parameter.
1474         (begin_if_stmt): Call do_pushlevel before starting the statement.
1475         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
1476         blocks.
1477         (setup_vtbl_ptr): Emit initialization code for bases and members
1478         at semantic-analysis time.  Emit code to initialize vtables in
1479         destructors here.
1480         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
1481         Don't handle CTOR_INITIALIZER any more.
1482         * typeck.c (build_modify_expr): Don't check for assignments to
1483         this.
1484         (c_expand_return): Don't suggest assigning to `this'.
1485         
1486         * Makefile.in (decl.o): Depend on RTL_H.
1487         (decl2.o): Likewise.
1488         (class.o): Likewise.
1489         (call.o): Likewise.
1490         (method.o): Likewise.
1491         (search.o): Likewise.
1492         (tree.o): Likewise.
1493         (pt.o): Likewise.
1495         * decl.c (duplicate_decls): When a builtin function is redeclared
1496         as static, make sure it is mangled correctly.
1498         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
1499         detail about the statement-tree.
1500         
1501 1999-09-20  Nathan Sidwell  <nathan@acm.org>
1503         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
1505 1999-09-20  Nick Clifton  <nickc@cygnus.com>
1507         * decl2.c (lang_decode_option): Extend comment.
1509 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
1511         * typeck.c: Include "tm_p.h".
1513 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
1515         * ir.texi: New file.
1517 1999-09-19  Paul Burchard <burchard@pobox.com>
1519         * semantics.c (expand_stmt): Initialize return value.
1521 1999-09-18  Paul Burchard <burchard@pobox.com>
1523         * gxxint.texi: G++ now implements namespaces.
1524         
1525 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
1527         * decl.c (pop_label): Don't warn about unused labels more than
1528         once.
1529         * semantics.c (finish_goto_stmt): Always marked used labels as
1530         used.
1532         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
1533         even when the declaration is external.
1534         (cp_finish_decl): Adjust call to layout_var_decl.
1535         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
1537 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
1539         * typeck.c (get_member_function_from_ptrfunc): Always consider
1540         virtuality inside member pointer.
1542 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
1544         Turn on function-at-a-time processing.  
1545         * cp-tree.h (doing_semantic_analysis_p): New macro.
1546         (SF_DEFAULT): Define to zero, not SF_EXPAND.
1547         (start_handler_parms): Change prototype.
1548         (expand_start_catch_block): Likewise.
1549         (expand_end_catch_block): Likewise.
1550         (expand_start_eh_spec): Likewise.
1551         (expand_end_eh_spec): Declare.
1552         (finish_handler_parms): Change prototype.
1553         (begin_catch_block): Declare.
1554         (finish_handler): Change prototype.
1555         (do_pushlevel): Declare.
1556         (do_poplevel): Likewise.  
1557         * decl.c (pushlevel): Don't create
1558         binding levels when not doing semantic analysis.
1559         (poplevel): Don't pop them.
1560         (pushdecl): Assert that we are never called when not doing
1561         semantic analysis.
1562         (pushdecl_top_level): Use push_to_top_level.
1563         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
1564         label when expanding.
1565         (cp_finish_decl): Only inject for-scope variables when doing
1566         semantic analysis.  Add comments.
1567         (start_handler_parms): Return the handler parm.
1568         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
1569         already set.  Reinitialize from saved function data if available.
1570         Don't pushlevel when not doing semantic analysis.
1571         (store_parm_decls): Only generate RTL when expanding.  Only
1572         pushdecl when doing semantic analysis.  Set
1573         current_eh_spec_try_block if appropriate.
1574         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
1575         Combine common code.  Don't poplevel when not doing semantic
1576         analysis.
1577         (push_cp_function_context): Don't expand functions without an
1578         explicit call to expand_body.
1579         (mark_lang_function): Make eh_spec_try_block and
1580         x_scope_stmt_stack.  
1581         * except.c (expand_end_eh_spec): Don't
1582         declare.
1583         (process_start_catch_block): Likewise.
1584         (push_eh_cleanup): Use finish_decl_cleanup.
1585         (initialize_handler_parm): New function.
1586         (expand_start_catch_block): Use it.
1587         (expand_end_catch_block): Use tree-generation functions, not
1588         RTL-generation functions.
1589         (expand_start_eh_spec): Likewise.
1590         (expand_end_eh_spec): Likewise.
1591         (expand_exception_blocks): Simplify.
1592         (start_anon_func): Use do_pushlevel.
1593         (end_anon_func): Use do_poplvel.  Call expand_body for the
1594         function.  
1595         * expr.c (do_case): Don't call define_case_label.  
1596         * init.c (create_temporary_var): Set DECL_CONTEXT for local
1597         variables.  
1598         * method.c (emit_thunk): Call expand_body for the
1599         thunk.
1600         (sythesize_method): Likewise.  
1601         * parse.y (handler_args): Give it ttype.
1602         (eat_saved_input): Call expand_body.
1603         (base_init): Use do_pushlevel.
1604         (pending_inline): Call expand_body.
1605         (handler): Adjust calls to finish_handler_parms and
1606         finish_handler.
1607         (handler_args): Don't call expand_start_catch_block.  Return the
1608         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
1609         * parse.c: Regenerated.
1610         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
1611         * semantics.c (do_pushlevel): Give it external linkage.  Build
1612         SCOPE_STMTs.
1613         (do_poplevel): Likewise.
1614         (finish_case_label): Call define_case_label when doing semantic
1615         analysis.
1616         (finish_goto_stmt): Create RTL for labels.
1617         (finish_function_try_block): Set in_function_try_handler
1618         unconditionally.
1619         (finish_function_handler_sequence): Unset it.
1620         (finish_handler_parms): Use expand_start_catch_block even when
1621         building a statement-tree.
1622         (begin_catch_block): New function.
1623         (finish_handler): Move a little RTL-generation logic here.
1624         (finish_decl_cleanup): Allow cleanups for empty declarations.
1625         (finish_named_return_value): Don't pushdecl when not doing
1626         semantic analysis.
1627         (expand_stmt): Don't do semantic analysis for variable
1628         declarations.  Handle START_CATCH_STMT.  Call expand_label
1629         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
1630         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
1631         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
1632         RETURN_INIT and function try blocks.
1633         
1634         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
1635         x_scope_stmt_stack.  Add x_in_charge_parm.
1636         (current_eh_spec_try_block): New macro.
1637         (current_scope_stmt_stack): Likewise.
1638         (current_in_charge_parm): Likewise.
1639         * decl.c (start_function): Initialize current_in_charge_parm.
1640         (finish_function): Use current_in_charge_parm rather than looking
1641         up __in_chrg.
1642         * search.c (expand_indirect_vtbls_init): Likewise.
1644         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
1645         (TRY_BLOCK): Likewise.
1646         (HANDLER): Likewise.
1647         (START_CATCH_STMT): New tree node.
1648         (SCOPE_STMT): Likewise.
1649         * cp-tree.h (SCOPE_BEGIN_P): New macro.
1650         (SCOPE_NULLIFIED_P): Likewise.
1651         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
1652         (struct lang_decl): Add saved_language_function.
1653         (DECL_PENDING_INLINE_INFO): Adjust documentation.
1654         (DECL_PENDING_INLINE_P): New macro.
1655         (TYPE_TI_ARGS): Fix typo in comment.
1656         (DECL_SAVED_TREE): Add to documentation.
1657         (DECL_SAVED_FUNCTION_DATA): New macro.
1658         (START_CATCH_TYPE): Likewise.
1659         (SCOPE_END_P): New macro.
1660         (declare_parm_level): Don't declare.
1661         * decl.c (mark_lang_function): New function, split out from
1662         mark_cp_function_context.
1663         (save_function_data): New function.
1664         (declare_parm_level): Remove.
1665         (finish_function): Use save_function_data to squirrel away
1666         important stuff for later use.
1667         (mark_cp_function_context): Use mark_function_data.
1668         (lang_mark_tree): Likewise.
1669         * lex.c (begin_definition_of_inclass_inline): Set
1670         DECL_PENDING_INLINE_P.
1671         (store_pending_inline): Clear it.
1672         * pt.c (tsubst_decl): Likewise.
1674 1999-09-17  Nathan Sidwell  <nathan@acm.org>
1676         * call.c (perform_implicit_conversion): Deal with error_mark_node.
1678 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
1680         * decl.c (warn_extern_redeclared_static): Don't get confused by
1681         static member functions.
1682         (duplicate_decls): Merge DECL_THIS_STATIC.
1684         * decl.c (expand_static_init): Make sure assignments to local
1685         statics actually occur.
1687 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
1689         * cp-tree.h (poplevel_class): Declare.
1690         * class.c (popclass): Use poplevel_class, not poplevel.
1691         * decl.c (poplevel_class): Don't make it static.  Don't return a
1692         value.
1693         (poplevel): Don't call poplevel_class; abort in a class
1694         binding level is seen.
1695         * semantics.c (finish_translation_unit): Use pop_everything.
1696         * parse.y (member_init): Allow errors.
1697         (pending_inline): Call finish_function.
1698         * parse.c: Regenerated.
1699         * Makefile.in (CONFLICTS): Adjust.
1701 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
1702         
1703         * error.c: Reduce code duplication.
1704         (dump_template_value): New function.
1705         (dump_type_real): Use it.
1706         (dump_decl): Likewise.
1707         (dump_function_name): Likewise.
1708         (dump_function_decl): Don't be too talkative about function return
1709         type variety.
1711 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1713         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
1715         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
1717 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
1719         * decl2.c (finish_file): Also call check_global_declarations for
1720         the pending_statics list.
1722 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
1724         * lex.c (cp_pragma_implementation): Allow #pragma implementation
1725         in header files.
1727 1999-09-15  Richard Henderson  <rth@cygnus.com>
1729         * lex.c (mark_impl_file_chain): Follow the next chain.
1731 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
1733         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
1734         problems with extern "C" functions redeclared as static.
1735         (duplicate_decls): When a builtin is redeclared static, make the
1736         new function have internal linkage.
1737         
1738 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
1740         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
1741         * pt.c (tsubst_copy): Likewise.
1742         * tree.c (search_tree): Likewise.
1743         (mapcar): Likewise.
1745 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1747         * typeck2.c (ack): Don't declare progname.
1749 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
1751         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
1752         filenames with ggc_alloc_string.
1754 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
1756         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
1757         TARGET_EXPR.
1758         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
1759         the TARGET_EXPR.
1760         * cvt.c (build_up_reference): Likewise.
1761         * tree.c (build_cplus_new): Likewise.
1762         (get_target_expr): Likewise.
1763         
1764 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
1766         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
1768 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
1770         * cp-tree.h (build_target_expr): New function.
1771         * call.c (build_conditional_expr): Use build_target_expr.
1772         (convert_like): Likewise.
1773         (build_over_call): Likewise.
1774         * cvt.c (build_up_reference): Likewise.
1775         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
1776         (destroy_local_var): Here.
1777         (build_target_expr): New function.
1778         * tree.c (build_cplus_new): Use it.
1779         (get_target_expr): Likewise.
1781 1999-09-13  Nathan Sidwell  <nathan@acm.org>
1783         * typeck.c (expr_sizeof): Don't decay arrays and functions.
1784         Remove misleading comment.
1785         (build_compound_expr): Don't decay arrays.
1787 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
1789         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
1790         class rvalues again.
1792 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1794         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
1796         * g++spec.c: Include gcc.h.
1797         (lang_specific_driver): Constify a char*.  Call xcalloc, not
1798         xmalloc/bzero.  All calls to the function pointer parameter now
1799         explicitly call `fatal'.
1801 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
1803         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
1804         * cvt.c (ocp_convert): Complete the from and destination types.
1805         Adjust warning about functions always being `true' in conditionals.
1806         * decl.c (duplicate_decls): Don't play funny games with abort.
1807         * error.c (dump_expr): Handle OVERLOADs.
1808         * spew.c (probe_obstack): Remove.
1809         * typeck.c (condition_conversion): Use perform_implicit_conversion.
1810         
1811 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
1813         * cp-tree.h (auto_function, define_function): Adjust prototypes.
1814         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
1815         changed.
1816         (auto_function): Likewise, for CODE arg.
1817         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
1818         (builtin_function): ... here.
1820 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
1822         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
1823         (init_decl_processing): Don't set TREE_PERMANENT for the
1824         error_mark_node.
1825         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
1826         (grokdeclarator): Likewise.
1827         (grokparms): Don't check TREE_PERMANENT when building up lists.
1828         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
1829         (mark_inline_for_output): Likewise.
1830         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
1831         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
1832         * lex.c (check_newline): Don't check ggc_p; it is always one.
1833         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
1834         * spew.c (yylex): Don't copy_node or probe_obstacks for
1835         non-permanent CONSTANTs and STRINGs.
1836         * tree.c (build_cplus_array_type_1): Don't fuss with
1837         TREE_PERMANENT on ARRAY_TYPEs.
1838         
1839         * cp-tree.def (CLEANUP_STMT): New node.
1840         * cp-tree.h (language_function): Add name_declared.
1841         (current_function_name_declared): New macro.
1842         (CLEANUP_DECL): New macro.
1843         (CLEANUP_EXPR): Likewise.
1844         (emit_local_var): Likewise.
1845         (finish_decl_cleanup): New function.
1846         * cvt.c (build_up_reference): Simplify.
1847         (ocp_convert): Remove dead code.
1848         * decl.c (start_decl): Remove call to add_decl_stmt.
1849         (grok_reference_init): Adjust, to handle bindings temporaries to
1850         references.  Remove dead code.
1851         (initialize_local_var): Don't generate RTL for
1852         declarations here, or build cleanups here.  Don't fuss with
1853         obstacks.  Replace expand_start_target_temps calls with explicit
1854         setting of stms_are_full_exprs_p.
1855         (destroy_local_var): New function.
1856         (emit_local_var): Likewise.
1857         (cp_finish_decl): Use them, as appropriate.
1858         (start_function): Announce template functions.
1859         (store_parm_decls): Don't call declare_function_name here.
1860         (finish_stmt): Don't start emit base-initialization code when just
1861         building the statement-tree.
1862         * init.c (create_temporary_var): Move add_decl_stmt call ...
1863         (get_temp_regvar): Here.
1864         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
1865         cp_finish_decl would expect.  Don't call add_decl_stmt.
1866         * semantics.c (begin_compound_stmt): Call declare_function_name,
1867         if appropriate.
1868         (finish_decl_cleanup): New function.
1869         (expand_stmt): Use emit_local_var to output variables.          
1870         (expand_body): Set current_funtion_name_declared.
1871         
1872 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
1874         * cp-tree.h (finish_cleanup_try_block): New function.
1875         * semantics.c (finish_cleanup_try_block): Add comment.
1877 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
1879         * cp-tree.h: Delete declarations for all tree nodes now moved to
1880         global_trees.
1881         * decl.c: Delete their definitions.
1882         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
1883         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
1884         provide defaults.
1885         (init_decl_processing): Call build_common_tree_nodes and
1886         build_common_tree_nodes_2 instead of building their nodes here.
1887         Don't add gc roots for them.
1889 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
1891         * cp-tree.h (language_function): Rename expanding_p to
1892         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
1893         (expanding_p): Adjust accordingly.
1894         (TREE_VIA_PRIVATE): Fix typo in comment.
1895         (DECL_REFERENCE_SLOT): Remove.
1896         (SET_DECL_REFERENCE_SLOT): Likewise.
1897         * decl.c (named_label_uses): Adjust. Remove chicken comment.
1898         (push_overloaded_decl): Don't truncate the chain of bindings when
1899         adding an overloaded function.
1900         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
1901         (initialize_local_var): Fix typo in comment.
1902         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
1903         * decl2.c (start_objects): Make the fact that we are expanding
1904         the generated function right away explicit.
1905         (start_static_storage_duration_function): Likewise.
1906         (finish_file): Fix typo in comment.
1907         * init.c (build_vec_init): Correct bugs in handling cleanups.
1908         * semantics.c (maybe_convert_cond): New function.
1909         (FINISH_COND): Always store the condition, even if there's
1910         a declaration.
1911         (finish_if_stmt_cond): Use maybe_convert_cond.
1912         (finish_while_stmt_cond): Likewise.
1913         (finish_do_stmt): Likewise.
1914         (finish_for_cond): Likewise.
1915         (expand_cond): Adjust.
1916         
1917         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
1918         * init.c (perform_member_init): Remove obstack machinations.
1919         (expand_cleanup_for_base): Likewise.
1920         (finish_init_stmts): Mark the statement-expression as used.
1921         * method.c (emit_thunk): Use tree-generating functions, not
1922         RTL.
1923         (do_build_copy_constructor): Likewise.
1924         (do_build_assign_ref): Likewise.
1925         (synthesize_method): Likewise.  Keep track of line numbers.
1926         * pt.c (tsubst_expr): Handle various kinds of try blocks.
1927         * semantics.c (expand_stmts): Remove.
1928         (begin_function_try_block): Set FN_TRY_BLOCK_P.
1929         (finish_function_try_block): Be careful rechaining 
1930         function try blocks.
1931         (expand_stmt): Loop through all the statements at a given level.
1932         (exapnd_body): Be careful with line-numbers here too.  Prepare for
1933         being called directly from the parser.
1935         * cp-tree.h (finish_function): Adjust prototype.
1936         * decl.c (finish_function): Return the function compiled.
1937         * pt.c (instantiate_decl): Don't play games with obstacks.
1938         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
1939         (search_tree): Likewise.
1940         * typeck.c: Fix typo in comment.
1941         * typeck2.c (store_init_value): Add comment.
1943         * cp-tree.h (CPTI_ATEXIT): New macro.
1944         (atexit_node): Likewise.
1945         * decl.c (destroy_local_static): New function, broken out from ...
1946         (expand_static_init): Here.
1948         * rtti.c (get_tinfo_var): These should always be global
1949         (expand_si_desc): Use tree, not RTL, functions to generate code.
1950         (expand_class_desc): Likewise.
1951         (expand_ptr_desc): Likewise.
1952         (expand_attr_desc): Likewise.
1953         (expand_generic_desc): Likewise.
1954         (synthesize_tinfo_fn): Likewise.
1956 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
1958         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
1959         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
1960         RECHAIN_STMTS. 
1961         (RECHAIN_STMST_FROM_CHAIN): Likewise.
1963         * parse.y (simple_stmt): Fix typo in last change.
1965         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
1966         (STMT_IS_FULL_EXPR_P): Likewise.
1967         (STMT_LINENO_FOR_FN_P): Likewise.
1968         (prep_stmt): New function.
1969         (building_stmt_tree): Tweak for safety.
1970         * pt.c (tsubst_expr): Use prep_stmt throughout.
1971         (add_tree): Move it to semantics.c
1972         * semantics.c (add_tree): Move it here.
1973         (finish_expr_stmt_real): New function.
1974         (finish_expr_stmt): Use it.
1975         (finish_if_stmt_cond): Use FINISH_COND.
1976         (finish_while_stmt_cond): Likewise.
1977         (finish_for_cond): Likewise.
1978         (finish_stmt_tree): Tweak line-number handling.
1979         (prep_stmt): New function.
1980         (expand_stmt): Use it.
1981         
1982         * cp-tree.h (begin_switch_stmt): Adjust prototype.
1983         (finish_switch_cond): Likewise.
1984         * parse.y (simple_stmt): Adjust accordingly.
1985         * parse.c: Regenerated.
1986         * pt.c (tsubst_expr): Adjust accordingly.
1987         * semantics.c (expand_cond): New function.
1988         (FINISH_COND): New macro.
1989         (begin_switch_stmt): Build the SWITCH_STMT here.
1990         (finish_switch_stmt_cond): Not here.
1991         (expand_stmt): Adjust calls to begin_switch_stmt and
1992         finish_switch_cond.  Use expand_cond throughout.
1994         * dump.c (dequeue_and_dump): Dump types for constants.
1995         Describe DECL_ARG_TYPE more intuitively.
1996         Handle ARRAY_REF.
1998         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
1999         (lang_cleanup_tree): Remove.
2000         * lex.c (make_lang_type): Use ggc_alloc to allocate
2001         TYPE_LANG_SPECIFIC.
2003         Reorganize per-function data.
2004         * cp-tree.h (saved_scope): Add function_decl, bindings.
2005         (language_function): Rename binding_level to bindings.
2006         (cp_function_chain): Use the current_function, not the
2007         outer_function_chain.
2008         (current_class_ptr): Make it work, even when there's no 
2009         current function.
2010         (current_class_ref): Likewise.
2011         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
2012         macros.
2013         (clear_temp_name): Remove.
2014         * decl.c (check_function_type): New function, broken out from
2015         start_function.
2016         (current_binding_level): Adjust definition.
2017         (pushlevel): Simplify.
2018         (poplevel): Don't use named_label_uses when we're outside
2019         a function scope.
2020         (mark_saved_scope): Mark function_decl and bindings.
2021         (maybe_push_to_top_level): Don't unconditionally push a new
2022         function context.  Save bindings and the current_function_decl.
2023         Don't clear named_labels.
2024         (pop_from_top_level): Pop function context if appropriate.
2025         (init_decl_processing): Set init_lang_status and free_lang_status,
2026         rather than save_lang_status and restore_lang_status.
2027         (start_function): Take SF_* flags.  Don't clear per-function data.
2028         Reorder and simplify to use new per-function data code.  Add
2029         asserts.
2030         (store_parm_decls): Don't call init_function_start here.
2031         (finish_function): Adjust for new handling of per-function data.
2032         (push_cp_function_context): Simplify.
2033         (mark_cp_function_context): Change binding_level to bindings.
2034         * decl2.c (clear_temp_name): Remove.
2035         (start_objects): Use SF flags to start_function.
2036         (start_static_storage_duration_function): Likewise.
2037         * except.c (start_anon_func): Remove redundant calls to 
2038         push_function_context_to.  Use SF flags to start function.
2039         (end_anon_func): Remove redundant call to pop_function_context
2040         from.
2041         * lex.c (reinit_parse_for_function): Don't initialize per-function 
2042         data.
2043         * method.c (emit_thunk): Clear current_function after calling
2044         assemble_end_function.  Use SF flags for start_function.
2045         (synthesize_method): Use SF flags for start_function.
2046         * parse.c: Regenerated.
2047         * parse.y (fn.defpen): Likewise.
2048         (pending_inline): Clear current_function, even if something goes
2049         wrong.
2050         * pt.c (instantiate_decl): Use SF flags to start_function.
2051         Don't save and restore expanding_p.
2052         (add_tree): Handle the case where we are outside any function.
2053         (end_tree): Likewise.
2054         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
2055         * semantics.c (begin_function_definition): Likewise.
2056         (expand_body): Likewise.
2057         
2058 1999-09-09  Nathan Sidwell  <nathan@acm.org>
2060         * cp-tree.h (convert_to_void): Prototype new function.
2061         (require_complete_type_in_void): Remove prototype.
2062         * cvt.c (convert_to_void): New function.
2063         (ocp_convert): Use convert_to_void.
2064         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
2065         expressions.
2066         * typeck.c (require_complete_type_in_void): Remove function.
2067         (build_compound_expr): Use convert_to_void.
2068         (build_static_cast): Likewise.
2069         (build_c_cast): Likewise.
2070         * semantics.c (finish_expr_stmt): Do not decay full expressions.
2071         
2072         * typeck.c (build_x_compound_expr): Add FIXME.
2074 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
2076         * cp-tree.h (scratch_tree_cons): Remove.
2077         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
2078         and perm_tree_cons with plain tree_cons.
2079         * class.c: Likewise.
2080         * decl.c: Likewise.
2081         * decl2.c: Likewise.
2082         * except.c: Likewise.
2083         * expr.c: Likewise.
2084         * init.c: Likewise.
2085         * lex.c: Likewise.
2086         * method.c: Likewise.
2087         * parse.y: Likewise.
2088         * pt.c: Likewise.
2089         * repo.c: Likewise.
2090         * rtti.c: Likewise.
2091         * search.c: Likewise.
2092         * typeck.c: Likewise.
2093         * parse.c: Regenerated.
2094         * tree.c (build_srcloc): Simplify.
2095         
2096 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
2098         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
2099         Remove next.
2100         (LANG_DECL_PERMANENT): Remove.
2101         * decl.c (duplicate_decls): Don't mess about with obstacks trying
2102         to free memory.
2103         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
2104         * lex.c (free_lang_decl_chain): Remove.
2105         (build_lang_decl): Don't use obstacks.
2106         (retrofit_lang_decl): Likewise.
2107         (copy_lang_decl): Likewise.
2109         * cp-tree.h (saved_scope): Remove old_binding_level and 
2110         function_decl.  Tidy up.
2111         * decl.c (mark_saved_scope): Don't set them.
2112         (maybe_push_to_top_level): Clear memory.
2114         * decl.c (layout_var_decl): Change prototype.  Don't complete
2115         types for external objects.
2116         (check_initializer): Likewise.  Tidy.
2117         (initialize_local_var): Complete types here.
2118         (cp_finish_decl): Not here.  Reorganize a little.
2119         (grokvardecl): Don't complete types here.
2121         * decl.c (start_function): Clear last_dtor_insn and
2122         last_parm_cleanup_insn. 
2123         (push_cp_function_context): Just copy over a little of
2124         the old context, not all of it.
2126         * cp-tree.h (copy_to_permanent): Remove.
2127         (permanent_p): Likewise.
2128         * decl.c (building_typename_type): Don't use copy_to_permanent.
2129         (start_decl): Likewise.
2130         (grok_reference_init): Likewise.
2131         (cp_finish_decl): Likewise.
2132         * init.c (build_new_1): Don't use mapcar.
2133         (build_vec_delete_1): Don't use copy_to_permanent.
2134         (build_vec_init): Likewise.
2135         * parse.y (primary): Likewise.
2136         * parse.c: Regenerated.
2137         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
2138         (lookup_template_class): Likewise.
2139         (tsubst_friend_function): Likewise.
2140         (instantiate_class_template): Likewise.
2141         (tsubst_decl): Likewise.
2142         (tsubst): Likewise.
2143         (instantiate_template): Likewise.
2144         (unify): Likewise.
2145         * rtti.c (get_tinfo_fn): Likewise.
2146         (build_dynamic_cast): Likewise.
2147         * semantics.c (finish_if_stmt_cond): Likewise.
2148         (finish_while_stmt_cond): Likewise.
2149         (finish_do_stmt): Likewise.
2150         (finish_for_cond): Likewise.
2151         (finish_for_expr): Likewise.
2152         (finish_cleanup): Likewise.
2153         (add_decl_stmt): Likewise.
2154         (finish_named_return_value): Likewise.
2155         (finish_qualified_call_expr): Likewise.
2156         * tree.c (perm_manip): Remove.
2157         (build_exception_variant): Don't use copy_to_permanent.
2158         (permanent_p): Remove.
2159         (copy_to_permament): Remove.
2160         (build_min_nt): Don't use copy_to_permanent.
2161         (build_min): Likewise.
2162         (min_tree_cons): Likewise.
2163         * typeckc.c (build_static_cast): Likewise.
2164         (build_reinterpret_cast): Likewise.
2165         (build_const_cast): Likewise.
2166         
2167 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
2169         * decl.c (ggc_p): Set it to 1.
2170         (mark_saved_scope): Add prototype.
2172 1999-09-07  Richard Henderson  <rth@cygnus.com>
2174         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
2175         * typeck.c (self_promoting_args_p): Delete.
2177 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
2179         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
2180         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
2182 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
2184         * Makefile.in (tree.o): Depend on ggc.h.
2185         * class.c (make_method_vec): Remove.
2186         (free_method_vec): Likewise.
2187         (free_method_vecs): Remove.
2188         (add_method): Don't use them.
2189         * cp-tree.def (PTRMEM_CST): Make it longer.
2190         (TEMPLATE_PARM_INDEX): Make it shorter.
2191         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
2192         (template_parm_index): Remove RTL field.
2193         (ptrmem_cst): Add RTL field.
2194         (finish_function): Removed parameter.
2195         (process_next_inline): Change prototype.
2196         (init_cplus_unsave): Rename to init_tree.
2197         (binding_init): Remove.
2198         * decl.c (free_binding_nodes): Remove.
2199         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
2200         (pop_binding): Don't use free_binding_nodes.
2201         (free_binding_vecs): Remove.
2202         (store_bindings): Don't use them.
2203         (pop_from_top_level): Likewise.
2204         (lookup_namespace_name): Simplify.
2205         (build_typename_type): Don't use obstack_free.
2206         (unqualified_namespace_lookup): Simplify.
2207         (lookup_name_real): Simplify.
2208         (start_function): Remove comment about leaks.
2209         (finish_function): Removed nested parameter.  Call
2210         expand_end_bindings even when building_stmt_tree.
2211         Call ggc_push_context and ggc_pop_context around
2212         rest_of_compilation, if necessary.
2213         (mark_cp_function_context): Handle a NULL language-context.
2214         (lang_mark_false_label_stack): Fix typo.
2215         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
2216         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
2217         pointer to method types.
2218         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
2219         * decl2.c (finish_objects): Adjust call to finish_function.
2220         (finish_static_store_duration_function): Likewise.
2221         (do_nonmember_using_decl): Remove call to binding_init.
2222         * except.c (end_anon_func): Adjust call to finish_function.
2223         * lex.c (mark_impl_file_chain): New function.
2224         (init_parse): Call init_tree, not init_cplus_unsave.
2225         Add GC roots.
2226         (cp_pramga_interface): Use xmalloc, not permalloc.
2227         (cp_pragma_implementation): Likewise.
2228         (begin_definition_of_inclass_inline): Simplify.
2229         (process_next_inline): Adjust prototype.
2230         (do_scoped_id): Don't call binding_init.
2231         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
2232         * method.c (emit_thunk): Adjust call to finish_function.
2233         (synthesize_method): Likewise.
2234         * parse.y (%union): Add a new `pi' variant.
2235         (PRE_PARSED_FUNCTION_DECL): Use it.
2236         (fn.defpen): Likewise.
2237         (fndef): Adjust call to finish_function.
2238         * pt.c (instantiate_decl): Likewise.
2239         * rtti.c (syntheisze_tinfo_fn): Likewise.
2240         * semantics.c (expand_body): Likewise.
2241         * tree.c: Include ggc.h.
2242         (mark_list_hash): New function.
2243         (binding_init): Remove.
2244         (init_cplus_unsave): Rename to ...
2245         (init_tree): This.  Add GC roots.
2246         
2247 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
2249         Get ready for garbage collection.
2250         * Makefile.in (CXX_TREE_H): Add varray.h
2251         (lex.o): Depend on ggc.h.
2252         (decl.o): Likewise.
2253         (decl2.o): Likewise.
2254         (method.o): Likewise.
2255         (search.o): Likewise.
2256         (pt.o): Likewise.
2257         (repo.o): Likewise.
2258         * class.c: Include ggc.h.
2259         (current_class_name): Remove.
2260         (current_class_type): Likewise.
2261         (current_access_specifier): Likewise.
2262         (previous_class_type): Likewise.
2263         (previous_class_values): Likewise.
2264         (class_cache_firstobj): Likewise.
2265         (current_lang_base): Likewise.
2266         (current_lang_stack): Likewise.
2267         (current_lang_stacksize): Likewise.
2268         (lang_name_c): Likewise.
2269         (lang_name_cplusplus): Likewise.
2270         (lang_name_java): Likewise.
2271         (current_lang_name): Likewise.
2272         (base_layout_decl): Likewise.
2273         (access_default_node): Likewise.
2274         (access_public_node): Likewise.
2275         (access_protected_node): Likewise.
2276         (access_private_node): Likewise.
2277         (access_default_virtual_node): Likewise.
2278         (access_public_virtual_node): Likewise.
2279         (access_protected_virtual_node): Likewise.
2280         (access_private_virtual_node): Likewise.
2281         (signed_zero_node): Likewise.
2282         (init_class_processing): Don't build base_layout_decl.
2283         (push_lang_context): Adjust now that current_lang_base is a varray.
2284         (pop_lang_context): Likewise.
2285         * cp-tree.h: Include varray.h.
2286         (cp_global_trees): Add access_default, access_public,
2287         access_protected, access_private, access_default_virtual,
2288         access_public_virtual, access_protected_virtual,
2289         access_private_virtual, ctor_identifier, delta2_identifier, 
2290         delta_identifier, dtor_identifier, in_charge_identifier,
2291         index_identifier, nelts_identifier, this_identifier,
2292         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
2293         lang_name_c, lang_name_cplusplus, lang_name_java,
2294         empty_except_spec, null, jclass, minus_one, terminate.
2295         (saved_scope): Move here from decl.c.  Define globals in terms of
2296         saved_scope: current_namespace, current_class_name,
2297         current_class_type, current_access_specifier, current_lang_stack,
2298         current_lang_base, current_lang_name, current_function_parms,
2299         current_template_parms, processing_template_decl,
2300         processing_specialization, processing_explicit_instantiation,
2301         previous_class_type, previous_class_values, class_cache_firstobj.
2302         (scope_chain): New variable.
2303         (init_pt): New function.
2304         * decl.c (current_namespace): Remove.
2305         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
2306         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
2307         (delta_identifier, delta2_identifier): Likewise.
2308         (pfn_or_delta2_identifier, tag_identifier): Likewise
2309         (vt_off_identifier, empty_except_spec, null_node): Likewise.
2310         (current_function_parms, current_lang_base): Remove.
2311         (current_lang_stack, previous_class_values): Remove.
2312         (class_binding_level): Macroize.
2313         (saved_scope): Remove.
2314         (current_saved_scope): Rename to scope_chain.
2315         (mark_saved_scope): Adjust for new scope structure.
2316         (maybe_push_to_top_level): Likewise.
2317         (pop_from_top_level): Likewise.
2318         (duplicate_decls): Adjust now that current_lang_base is a varray.
2319         (build_typename_type): Call ggc_add_tree_hash_table_root.
2320         (init_decl_processing): Call init_pt.  Call push_to_top_level to
2321         set up globals.  Add GC roots.
2322         (xref_basetypes): Adjust now that current_lang_base is a varray.
2323         * decl.h (this_identifier): Remove.
2324         (in_charge_identifier): Likewise.
2325         * decl2.c: Don't include varray.h.
2326         (current_namespace): Remove.
2327         (init_decl2): Add GC roots.
2328         * except.c (Terminate): Remove. 
2329         (init_exception_processing): Use terminate_node instead.
2330         (build_terminate_handler): Likewise.
2331         * init.c (nc_nelts_field_id): Remove.
2332         (minus_one): Likewise.
2333         (init_init_processing): Use minus_one_node and nelts_identifier
2334         instead.  Add GC roots.
2335         (jclass_node): Remove.
2336         (build_new_1): Use nelts_identifier.
2337         (build_vec_init): Likewise.
2338         (build_vec_delete): Likewise.
2339         * lex.c: Include ggc.h.
2340         (defarg_fn): Move declaration early.
2341         (defarg_parms): Likewise.
2342         (init_parse): Add GC roots.
2343         (handle_cp_pragma): Remove redundant declaration of
2344         pending_vtables.
2345         * method.c: Include ggc.h.
2346         (btypelist): Make it a varray.  All uses changed.
2347         (ktypelist): Likewise.
2348         (init_method): Add GC roots.
2349         * pt.c: Don't include varray.h.  Include ggc.h.
2350         (current_template_parms): Remove.
2351         (processing_template_decl): Likewise.
2352         (processing_specialization): Likewise.
2353         (processing_explicit_instantiation): Likewise.
2354         (init_pt): New function.
2355         * repo.c: Include ggc.h.
2356         (init_repo): Add GC roots.
2357         * search.c: Don't include varray.h.
2358         (_vptr_name): Remove.
2359         (lookup_field_1): Use vtpr_identifier instead.
2360         (expand_indirect_vtbls_init): Remove redundant declaration of
2361         in_charge_identifier.
2362         (init_search_processing): Use vptr_identifier.
2363         
2364 1999-09-05  Richard Henderson  <rth@cygnus.com>
2365             Bernd Schmidt <bernds@cygnus.co.uk>
2366             Mark Mitchell  <mark@codesourcery.com>
2368         * Makefile.in (parse.o): Depend on ggc.h.
2369         (decl2.o): Depend on ggc.h.
2370         (init.o): Depend on ggc.h.
2371         * cp-tree.h (init_decl2): Declare.
2372         (cp_parse_init): Likewise.
2373         * decl.c (ggc_p): Define to zero.
2374         (mark_saved_scope): New function.
2375         (init_decl_processing): Call cp_parse_init, and cp_decl2.
2376         Register GC roots.
2377         (expand_static_init): Add GC roots.
2378         * decl2.c: Include ggc.h.
2379         (init_decl2): New function.
2380         * init.c: Include ggc.h.
2381         (init_init_processing): Add GC roots.
2382         * parse.y: Include ggc.h.
2383         (cp_parse_init): New function.
2384         
2385 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
2387         * decl.c (init_decl_processing): Set mark_lang_status.
2388         (lang_mark_false_label_stack): Adjust prototype.
2389         * decl2.c (grok_function_init): Remove extraneous declaration of
2390         abort_fndecl.
2392         * Make-lang.in (cc1plus): Remove dependency on GGC.
2393         * Makefile.in (OBJS): Don't mention ggc-simple.o.
2394         (OBJDEPS): Don't mention ggc-simple.o.
2396         * Make-lang.in (cc1plus): Depend on $(GGC).
2397         * Makefile.in (OBJS): Add ggc-simple.o.
2398         (OBJDEPS): Likewise.
2399         * cp-tree.h (language_function): Rename members to `x_' versions;
2400         we now have x_named_labels, x_ctor_label, x_dtor_label,
2401         x_base_init_list, x_member_init_list, x_base_init_expr,
2402         x_current_class_ptr, x_current_class_ref, x_last_tree,
2403         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
2404         x_result_rtx. 
2405         (dtor_label, ctor_label, current_base_init_list,
2406         current_member_init_list, base_init_expr, current_class_ptr,
2407         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
2408         * decl.c: Include ggc.h.
2409         (last_dtor_insn): Adjust to use x_ names.
2410         (last_parm_cleanup_insn): Likewise.
2411         (original_result_rtx): Likewise.
2412         (named_labels): Likewise.
2413         (mark_binding_level): New function.
2414         (mark_cp_function_context): Likewise.
2415         (mark_false_label_stack): Likewise.
2416         (lang_mark_tree): Likewise.
2417         (lang_cleanup_tree): Likewise.
2418         
2419 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
2421         * Makefile.in (CXX_TREE_H): Include function.h.
2422         (decl.o): Don't depend on function.h.
2423         (decl2.o): Likewise.
2424         (typeck.o): Likewise.
2425         (init.o): Likewise.
2426         (method.o): Likewise.
2427         * cp-tree.h: Include function.h.
2428         (cp_function): Rename to language_function.  Remove next.
2429         (cp_function_chain): Make it a macro, not a variable.
2430         (push_cp_function_context): Don't declare.
2431         (pop_cp_function_context): Likewise.
2432         * decl.c: Don't include function.h.
2433         (push_cp_function_context): Make it static.  Make it suitable for
2434         a save_lang_status callback.
2435         (pop_cp_function_context): Likewise.
2436         (maybe_push_to_top_level): Call push_function_context_to, not
2437         push_cp_function_context.
2438         (pop_from_top_level): Call pop_function_context_from, not
2439         pop_cp_function_context.
2440         (init_decl_processing):  Set save_lang_status and
2441         restore_lang_status.  Call push_function_context_to, not
2442         push_cp_function_context.
2443         (cp_function_chain): Remove.
2444         * decl2.c: Don't include function.h.
2445         * except.c: Don't include function.h.
2446         (start_anon_func): Call push_function_context_to, not
2447         push_cp_function_context.
2448         (end_anon_func):  Call pop_function_context_from, not
2449         pop_cp_function_context.
2450         * init.c: Don't include function.h.
2451         * lex.c (begin_definition_of_inclass_inline): Call
2452         push_function_context_to, not push_cp_function_context. 
2453         (process_next_inline):  Call pop_function_context_from, not
2454         pop_cp_function_context.
2455         * method.c: Don't include function.h.
2456         (synthesize_method): Call push_function_context_to, not
2457         push_cp_function_context.  Call pop_function_context_from, not
2458         pop_cp_function_context.
2459         * typeck.c: Don't include function.h.
2460         
2461         * decl.c (expand_static_init): Tweak handling of static
2462         initializations for objects without constructors.
2464 1999-09-03  Nathan Sidwell  <nathan@acm.org>
2466         * typeck.c (build_indirect_ref): Reject dereference of pointer to
2467         void.
2469 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
2471         * cp-tree.h (cp_function): Move here, from decl.c.
2472         (cp_function_chain): Declare.
2473         (dtor_label): New macro, instead of variable.
2474         (ctor_label): Likewise.
2475         (current_base_init_list): Likewise.
2476         (current_member_init_list): Likewise.
2477         (base_init_expr): Likewise.
2478         (current_class_ptr): Likewise.
2479         (current_class_ref): Likewise.
2480         (last_tree): Likewise.
2481         (last_expr_type): Likewise.
2482         (current_function_returns_value): Likewise.
2483         (current_function_returns_null): Likewise.
2484         (current_function_just_assigned_this): Likewise.
2485         (current_function_parms_stored): Likewise.
2486         (temp_name_counter): Likewise.
2487         (static_labelno): Likewise.
2488         (expanding_p): Likewise.
2489         (stmts_are_full_exprs_p): Likewise.
2490         (in_function_try_handler): Likewise.
2491         (lang_type): Remove nested type_flags.  All uses changed.
2492         * call.c (ctor_label): Remove.
2493         (dtor_label): Likewise.
2494         * class.c (current_class_ptr): Remove.
2495         (current_class_ref): Likewise.
2496         * decl.c (static_labelno): Remove.
2497         (dtor_label): Likewise.
2498         (last_dtor_insn): New macro, instead of variable.
2499         (last_parm_cleanup_insn): Likewise.
2500         (original_result_rtx): Likewise.
2501         (in_function_try_handler): Remove.
2502         (named_label_uses): New macro, instead of variable.
2503         (named_labels): Likewise.
2504         (current_function_returns_value): Remove.
2505         (current_function_returns_null): Likewise.
2506         (current_function_assigns_this): New macro, instead of variable.
2507         (current_function_just_assigned_this): Likewise.
2508         (current_binding_level): Likewise.
2509         (init_decl_processing): Call push_cp_function_context.
2510         (cp_function): Move to cp-tree.h
2511         (cp_function_chain): Make it global.
2512         (temp_name_counter): Remove.
2513         (push_cp_function_context): Simplify.
2514         (pop_cp_function_context): Likewise.
2515         * decl2.c (temp_name_counter): Remove.
2516         * init_c (current_base_init_list): Likewise.
2517         (current_member_init_list): Likewise.
2518         (base_init_expr): Likewise.
2519         * method.c (static_labelno): Likewise.
2520         * pt.c (last_tree): Likewise.
2521         * semantics.c (expanding_p): Likewise.
2522         (stmts_are_full_exprs_p): Likewise.
2523         (last_expr_type): Likewise.
2524         * typeck.c (dtor_label): Likewise.
2525         (ctor_label): Likewise.
2526         
2527 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
2529         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
2530         (arg_assoc_class): Use arg_assoc_template_arg for template
2531         arguments. 
2532         (arg_assoc): Likewise.
2533         * pt.c (mangle_class_name_for_template): Allow member template
2534         template arguments.
2536 1999-09-02  Nathan Sidwell  <nathan@acm.org>
2538         * call.c (build_conditional_expr): Warn on enum mismatches.
2539         (convert_arg_to_ellipsis): Move non-pod check to after
2540         conversion.
2542 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2544         * gxx.gperf (hash, is_reserved_word): Add prototypes.
2546         * init.c (build_vec_init): Initialize variable `try_block'.
2548         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
2549         Likewise for bzero/memset.
2550         (token_getch, token_put_back): Add static prototypes.  Remove
2551         `inline' from the definitions.
2552         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
2554 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
2556         * cp-tree.h (lang_type): Move align into type_flags.
2557         (CLASSTYPE_ALIGN): Adjust accordingly.
2558         * call.c (direct_reference_binding): Remove misleading comment.
2560 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2562         * parse.y (language_string): Constify.
2564 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2566         * repo.c (getpwd): Don't prototype.
2567         * xref.c (getpwd): Likewise
2569 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2571         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
2572         Remove hacks for stuff which now comes from libiberty.
2574 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
2576         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
2578 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
2580         * cp-tree.h (begin_init_stmts): Declare.
2581         (finish_init_stmts): Likewise.
2582         * cvt.c (build_up_reference): Wrap the declaration of a temporary
2583         in a statement-expression so that we will see it when expanding
2584         tree structure later.
2585         * init.c (begin_init_stmts): Don't make it static.
2586         (finish_init_stmts): Likewise.
2588         * cp-tree.h (start_handler_parms): New function.
2589         (expand_start_catch_block): Take only one parameter.
2590         (start_handler_parms): New function.
2591         * decl.c (start_handler_parms): Define it.
2592         * except.c (process_start_catch_block): Take only one parameter.
2593         Don't call grokdeclarator here.
2594         (expand_start_catch_block): Don't call grokdeclarator here,
2595         either.
2596         * parse.y (handler_args): Adjust call to
2597         expand_start_catch_block.  Use start_handler_parms.
2598         * pt.c (push_template_decl_real): Make permanent lists have
2599         permanent elements.
2600         (tsubst_expr): Adjust calls to expand_start_catch_block
2601         appropriately.
2602         * semantics.c (expand_stmt): Likewise.
2603         
2604 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
2606         * pt.c (push_template_decl_real): Use template declaration from
2607         class type if it exists.
2609 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
2611         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
2612         (maybe_inject_for_scope_var): Declare it.
2613         (initialize_local_var): Likewise.
2614         * decl.c (maybe_inject_for_scope_var): Make it global.
2615         (initialize_local_var): Likewise.  Move cleanup handling here,
2616         from cp_finish_decl.
2617         (make_rtl_for_nonlocal_decl): Use
2618         push_obstacks_nochange/pop_obstacks, rather than
2619         end_temporary_allocation/resume_temporary_allocation.
2620         (cp_finish_decl): Try to complete the type of a variable when it
2621         is declared.  Move cleanup-handling to initialize_local_var.
2622         (expand_static_init): Use tree-building code, rather than
2623         RTL-building code.
2624         * decl2.c (get_temp_name): Assert non-initializedness of
2625         temporaries.
2626         * init.c (create_temporary_var): Move RTL-assigning code to ...
2627         (get_temp_regvar): Here.
2628         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
2629         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
2630         call initialize_local_var to generate initialization code.
2631         
2632 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2634         * cp-tree.h (fndecl_as_string, type_as_string,
2635         type_as_string_real, args_as_string, decl_as_string,
2636         expr_as_string, code_as_string, language_as_string,
2637         parm_as_string, op_as_string, assop_as_string, cv_as_string,
2638         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
2640         * errfn.c (cp_printer): Likewise.
2642         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
2643         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
2644         cp_file_of, code_as_string, language_as_string, parm_as_string,
2645         op_as_string, assop_as_string, args_as_string, cv_as_string):
2646         Likewise.
2648         * tree.c (lang_printable_name): Likewise.
2650 1999-08-28  Richard Henderson  <rth@cygnus.com>
2652         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
2654 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
2656         * cp-tree.h (strip_array_types): New function.
2657         * decl.c (maybe_deduce_size_from_array_init): New function, split
2658         out from cp_finish_decl.
2659         (layout_var_decl): Likewise.
2660         (maybe_commonize_var): Likewise.
2661         (maybe_inject_for_scope_var): Likewise.
2662         (initialize_local_var): Likewise.
2663         (build_cleanup_on_safe_obstack): Likewise.
2664         (check_initializer): Likewise.
2665         (make_rtl_for_nonlocal_decl): Likewise.
2666         (cp_finish_decl): Use them.
2667         * typeck.c (strip_array_types): New function.
2668         
2669         * cp-tree.def (LABEL_STMT): New tree node.
2670         * cp-tree.h (LABEL_STMT_LABEL): New macro.
2671         (shadow_label): Remove.
2672         (declare_local_label): New function.
2673         (finish_label_decl): Likewise.
2674         * decl.c (make_label_decl): New function, split out from
2675         lookup_label.
2676         (shadowed_labels): Remove.
2677         (binding_level): Add shadowed_labels.
2678         (clear_binding_level): Remove.
2679         (push_binding_level): Just bzero the new binding level.
2680         (pushlevel): Fix indentation.
2681         (pop_label): New function.
2682         (pop_labels): Likewise, split out from poplevel.
2683         (poplevel): Pop local labels.  Use pop_labels.
2684         (maybe_push_to_top_level): Don't clear shadowed_labels.
2685         (lookup_label): Use make_label_decl.
2686         (shadow_label): Remove.
2687         (declare_local_label): New function.
2688         (define_label): Simplify.
2689         (start_function): Don't clear shadowed_labels.
2690         (cp_function): Remove shadowed_labels.
2691         (push_cp_function_context): Don't save shadowed_labels.
2692         (pop_cp_function_context): Don't restore it.
2693         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
2694         * parse.y (label_decl): Use finish_label_decl.
2695         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
2696         declarations.
2697         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
2698         building_stmt_tree.
2699         (finish_label_decl): New function.
2700         (expand_stmt): Handle LABEL_STMTs and local label declarations.
2701         
2702 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
2704         * decl.c (lookup_label): Build labels on the permanent obstack
2705         when building statement trees.  Don't build RTL for labels when
2706         building statement trees.
2707         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
2708         building statement trees.
2709         (finish_label_stmt): Likewise.
2710         (expand_stmt): Adjust accordingly.
2711         * pt.c (tsubst_expr); Likewise.
2712         (do_decl_instantiation): Robustify.
2713         
2714         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
2715         * tree.c (build_cplus_new): Set it.
2716         * expr.c (cplus_expand_expr): Use it.
2717         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
2718         
2719         * decl.c (store_parm_decls): Reset immediate_size_expand.
2720         (finish_function): Likewise.
2721         
2722         * tree.c (cplus_unsave_expr_now): Don't return a value.
2724         * semantics.c (do_poplevel): Always initialize the return value.
2726 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
2728         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
2729         * tree.h (cplus_unsave_expr_now) : Same.
2731 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
2733         * decl.c (grokdeclarator): Amend comment.
2734         * except.c (expand_start_catch_block): Call push_template_decl for
2735         catch-block parameters.
2736         * method.c (synthesize_method): Build an empty compound statement
2737         for the body of a constructor.
2739 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
2741         * tree.c (cp_build_qualified_type_real): If we're asking for the
2742         same quals we already have, just return.
2744 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
2746         * cp-tree.def (SUBOBJECT): New tree node.
2747         * cp-tree.h (CLEANUP_P): New macro.
2748         (SUBOBJECT_CLEANUP): Likewise.
2749         (keep_next_level): Add parameter.
2750         (get_temp_regvar): Don't declare.
2751         (emit_base_init): Remove parameter.
2752         (expand_aggr_init): Rename to build_aggr_init.
2753         (expand_vec_init): Rename to build_vec_init.
2754         (do_pushlevel): Remove.
2755         (do_poplevel): Likewise.
2756         (finish_cleanup): New function.
2757         (finish_subobject): Likewise.
2758         (stmts_are_full_exprs_p): New variable.
2759         * decl.c (keep_next_level): Add parameter.
2760         (cp_finish_decl): Use build_aggr_init, not
2761         expand_aggr_init.  Use finish_expr_stmt to expand the code.
2762         (expand_static_init): Use tree-generating, not RTL-generating,
2763         functions to handle the initialization.
2764         (start_function): Remove dead code.  Always have a momentary
2765         obstack inside the function, even before hitting the first curly
2766         brace.
2767         (cplus_expand_expr_stmt): Move calls to
2768         expand_{start,end}_target_temps into semantics.c.
2769         (cp_function): Add stmts_are_full_exprs_p.
2770         (push_cp_function_context): Save it.
2771         (pop_cp_function_context): Restore it.
2772         * decl2.c (get_temp_regvar): Move to init.c.
2773         (do_static_initialization): Use build_{aggr,vec}_init.
2774         (do_static_destruction): Fix typo in comment.
2775         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
2776         * except.c (expand_throw): Use create_temporary_var.
2777         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
2778         * init.c (expand_vec_init_try_block): Remove.
2779         (expand_vec_init_catch_clause): Likewise.
2780         (get_temp_regvar): New function.
2781         (begin_init_stmts): Likewise.
2782         (finish_init_stmts): Likewise.
2783         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
2784         structure here.
2785         (emit_base_init): Likewise.  Remove unused parameter.
2786         (expand_virtual_init): Likewise.
2787         (expand_cleanup_for_base): Use finish_subobject.
2788         (expand_aggr_vbase_init_1): Simplify.
2789         (construct_virtual_bases): Use tree-generating functions to build
2790         up initialization.
2791         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
2792         (expand_default_init): Likewise.
2793         (expand_aggr_init_1): Likewise.
2794         (expand_vec_init): Rename to build_vec_init.
2795         * method.c (do_build_copy_constructor): Use tree-generating
2796         functions.  Don't call clear_last_expr.
2797         (do_build_assign_ref): Likewise.
2798         (synthesize_method): Call clear_last_expr here.
2799         * parse.y (base_init): Don't call clear_last_expr here.
2800         (nodecls): Likewise.
2801         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
2802         * semantics.c (do_pushlevel): Move to here.
2803         (do_poplevel): Likewise.
2804         (stmts_are_full_exprs_p): New variable.
2805         (finish_expr_stmt): Handle logic for temoprary cleanup here.
2806         (finish_for_stmt): Use finish_expr_stmt.
2807         (finish_cleanup): New function.
2808         (finish_function_try_block): Fix indentation.
2809         (finish_subobject): New function.
2810         (setup_vtbl_ptr): Call keep_next_level here.
2811         (finish_stmt_expr): Handle a block with no scope inside the
2812         statement-expression.
2813         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
2814         SUBOBJECT.
2815         * tree.c (search_tree): Handle INIT_EXPR.
2816         (mapcar): Likewise.
2817         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
2818         * typeck2.c (store_init_value): Change expand_aggr_init to
2819         build_aggr_init in comment.
2820         
2821 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
2823         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
2825 1999-08-25  Nathan Sidwell  <nathan@acm.org>
2827         * decl2.c (handle_class_head): Be graceful about additional
2828         scope qualifiers. Adjust comments to reflect reality.
2830 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
2832         * call.c (build_conditional_expr): Fix typo.
2833         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
2834         lvalue before trying to mess with the sides.
2836         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
2838 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
2840         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
2842 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
2844         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
2845         Return arbitrary pointer or NULL.
2846         (check_eh_spec): Call __throw_type_match_rtti_2.
2847         * tinfo.h (*::dcast): Return int.  Add valp parm.
2848         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
2849         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
2850         (__throw_type_match_rtti): Now just a wrapper.
2852         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
2853         (init_exception_processing): Don't initialize them.
2855 1999-08-23  Paul Burchard <burchard@pobox.com>
2857         * decl.c (check_default_argument): Fix typo.
2859 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
2861         * cp-tree.def (STMT_EXPR): Fix typo in node name.
2863         * dump.c (dump_next_stmt): New function.
2864         (dequeue_and_dump): Use it.
2865         
2866         * pt.c (tsubst_copy): Make sure to initialize return value for a
2867         STMT_EXPR, even when processing_template_decl.
2868         * semantics.c (finish_stmt_expr): A statement-expression whose
2869         last statement is not an expression-statement has type `void'.  
2870         
2871 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
2873         * semantics.c (finish_stmt_expr): Fix typo in comment.
2874         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
2875         (mapcar): Likewise.
2876         * init.c (build_vec_delete_1): Make the children of a permanent
2877         BIND_EXPR permanent.
2878         * pt.c (register_specialization): Don't register a specialization
2879         more than once.
2880         
2881 1999-08-18  Andrew Haley  <aph@cygnus.com>
2883         * method.c (process_overload_item): Call build_mangled_C9x_name ()
2884         for all integer parameter types larger than long long.
2886 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
2888         * pt.c (redeclare_class_template): Merge default template
2889         arguments in both directions.
2891         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
2892         compiler_error message.
2894 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
2896         * cp-tree.h: Declare flag_use_repository.
2897         * pt.c (do_decl_instantiation): Don't complain about duplicate
2898         instantiation with -frepo.
2899         (do_type_instantiation): Likewise.
2901         * pt.c (push_template_decl_real): Complain about everything
2902         that isn't a valid template.
2904         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
2905         affect inlines.
2907 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
2909         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
2910         * decl2.c (build_expr_from_tree): Handle it.
2911         * error.c (dump_expr): Likewise.
2912         * pt.c (for_each_template_parm): Likewise.
2913         (tsubst_copy): Likewise.
2914         * tree.c (search_tree): Likewise.
2915         * semantics.c (finish_pseudo_destructor_call): Create it.
2916         
2917 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
2919         * search.c (setup_class_bindings): Robustify.
2920         * typeck.c (common_type): Use same_type_p, not pointer equality,
2921         to compare types.
2923         * cp-tree.h (build_lang_field_decl): Remove.
2924         * class.c (build_vtable): Replace calls to build_lang_field_decl
2925         with build_lang_decl.
2926         (prepare_fresh_vtable): Likewise.
2927         (finish_struct_1): Likewise.
2928         (init_class_processing): Likewise.
2929         * decl.c (push_using_decl): Likewise.
2930         (init_decl_processsing): Likewise.
2931         (grokvardecl): Likewise.
2932         (build_ptrmemfunc_type): Likewise.
2933         (grokdeclarator): Likewise.
2934         (build_enumerator): Likewise.
2935         * decl2.c (grok_x_components): Likewise.
2936         (do_class_using_decl): Likewise.
2937         * except.c (call_eh_info): Likewise.
2938         * init.c (init_init_processing): Likewise.
2939         * rtti.c (expand_class_decl): Likewise.
2940         * tree.c (build_base_fields): Likewise.
2941         (build_vbase_pointer_fields): Likewise.
2942         * lex.c (build_lang_decl): Build declarations on the permanent
2943         obstack if we're building statmeent trees.
2944         (retrofit_lang_decl): Handle both the full lang_decl and also the
2945         smaller lang_decl_flags here.
2946         (build_lang_field_decl): Remove.
2947         * pt.c (push_template_decl_real): Issue errors for variable
2948         declarations that are not static members.
2950 1999-08-18  Richard Henderson  <rth@cygnus.com>
2952         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
2953         (mapcar): Likewise.
2955 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
2957         * cp-tree.h (back_end_hook): New variable.
2958         * decl2.c (back_end_hook): Define it.
2959         (finish_file): If it's non-NULL, call it.
2961         * decl.c (add_decl_to_level): New function.
2962         (push_local_binding): Use it.
2963         (find_binding): Fix typo in comment.
2964         (pushdecl): Use add_decl_to_level.  Put templates on the
2965         corresponding namespace-scope binding levels.
2966         * dump.c (dequeue_and_dump): Print the specializations of a
2967         template.
2968         * pt.c (push_template_decl_real): Don't push a template multiple
2969         times.
2971 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
2973         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
2974         (CALL_DECLARATOR_QUALS): Likewise.
2975         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
2976         * decl.c (grokdeclarator): Adjust to use them.
2977         * decl2.c (grokfield): Likewise.
2978         (reparse_absdcl_as_casts): Likewise.
2979         * lex.c (make_call_declarator): Likewise.
2980         (set_quals_and_spec): Likewise.
2981         * pt.c (tsubst): Likewise.
2982         * tree.c (mapcar): Remove special hack to handle third operand of
2983         a CALL_EXPR.
2985 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
2987         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
2988         * class.c (build_vtable): Use build_lang_field_decl to build the
2989         VAR_DECLs for vtables.
2990         (prepare_fresh_vtable): Likewise.
2991         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
2992         CAN_HAVE_FULL_LANG_DECL_P.
2993         (push_using_decl): Use build_lang_decl to build USING_DECLs.
2994         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
2995         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
2996         (build_lang_field_decl): Likewise.
2997         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
2998         to copy.
2999         
3000         * cp-tree.def (STMT_EXPR): New tree node.
3001         * cp-tree.h (STMT_EXPR_STMT): New macro.
3002         (store_return_init): Change prototype.
3003         (finish_named_return_value): New function.
3004         (expand_stmt): Likewise.
3005         (expand_body): Likewise.
3006         (begin_stmt_tree): Likewise.
3007         (finish_stmt_tree): Likewise.
3008         (expanding_p): New variable.
3009         (last_expr_type): Likewise.
3010         (building_stmt_tree): New macro.
3011         * decl.c (start_function): Use building_stmt_tree, not
3012         processing_template_decl, where appropriate.
3013         (store_parm_decls): Likewise.
3014         (store_return_init): Move most of the body to semantics.c.
3015         (finish_function): Use building_stmt_tree.
3016         (finish_stmt): Clear last_expr_type here.
3017         (cp_function): Add expanding_p, last_tree, last_expr_type.
3018         (push_cp_function_context): Save them.
3019         (pop_cp_function_context): Restore them.
3020         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
3021         * error.c (dump_expr): Handle STMT_EXPR.
3022         * except.c (expand_start_catch_block): Use building_stmt_tree.
3023         Use add_decl_stmt.
3024         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
3025         (do_case): Move add_tree call to semantics.c.
3026         * parse.y (return_init): Use finish_named_return_value.
3027         (for.init.statement): Use finish_expr_stmt.
3028         * parse.c: Regenerated.
3029         * pt.c (do_pushlevel): Move to semantics.c.
3030         (do_poplevel): Likewise.
3031         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
3032         (tsubst_expr): Don't expand all the way to RTL here.  Handle
3033         RETURN_INIT and CTOR_INITIALIZER.
3034         (instantiate_decl): Call expand_body after tsubst'ing into
3035         DECL_SAVED_TREE.
3036         * semantics.c (expand_stmts): New function.
3037         (expanding_p): New variable.
3038         (last_expr_type): Likewise.
3039         (finish_expr_stmt): Use building_stmt_tree.
3040         (begin_if_stmt): Likewise.
3041         (finish_if_stmt_cond): Likewise.
3042         (finish_then_clause): Likewise.
3043         (begin_else_clause): Likewise.
3044         (finish_else_clause): Likewise.
3045         (begin_while_stmt): Likewise.
3046         (finish_while_stmt_cond): Likewise.
3047         (finish_while_stmt): Likewise.
3048         (finish_do_body): Likewise.
3049         (finish_do_stmt): Likewise.
3050         (finish_return_stmt): Likewise.
3051         (begin_for_stmt): Likewise.
3052         (fnish_for_init_stmt): Likewise.
3053         (finish_for_cond): Likewise.
3054         (finish_for_expr): Likewise.
3055         (finish_for_stmt): Likewise.
3056         (finish_break_stmt): Likewise.
3057         (finish_continue_stmt): Likewise.
3058         (finish_switch_cond): Likewise.
3059         (finish_switch_stmt): Likewise.
3060         (finish_case_label): Call add_tree here if necessary.
3061         (finish_goto_statement): Use building_stmt_tree.
3062         (begin_try_block): Likewise.
3063         (begin_function_try_block): Likewise.
3064         (finish_try_block): Likewise.
3065         (finish_function_try_block): Likewise.
3066         (finish_handler_sequence): Likewise.
3067         (finish_function_handler_sequence): Likewise.
3068         (begin_handler): Likewise.
3069         (finish_handler_parms): Likewise.
3070         (finish_handler): Likewise.
3071         (begin_compound_stmt): Likewise.
3072         (finish_compound_stmt): Likewise.
3073         (finish_asm_stmt): Likewise.
3074         (finish_label_stmt): Likewise.
3075         (finish_named_return_value): New function.
3076         (setup_vtbl_ptr): Moved here from decl2.c.
3077         (do_pushlevel): Moved here from pt.c.
3078         (do_poplevel): Likewise.
3079         (begin_stmt_expr): Use building_stmt_tree.
3080         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
3081         when building_stmt_tree.
3082         (begin_stmt_tree): New function.
3083         (finish_stmt_tree): Likewise.
3084         (expand_stmt): Likewise.
3085         (expand_body): Likewise.
3086         * tree.c (build_cplus_method_type): Make sure the argument types
3087         end up on the same obstack as the METHOD_TYPE.
3088         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
3089         THROW_EXPR, STMT_EXPR.
3090         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
3091         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
3092         sorry, if an unsupported node is encountered.
3093         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
3094         (c_expand_return): Don't call add_tree here.
3095         
3096 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
3098         * pt.c (check_default_tmpl_args): Don't check in local scopes.
3099         (tsubst_decl): Make sure the declaration is on a saveable
3100         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
3101         variable.
3102         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
3103         
3104 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
3106         Speed up Koenig lookup.
3107         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
3108         to return namespaces we've looked at.
3109         * decl2.c (lookup_using_namespace): Likewise.
3110         (add_function): Don't call ovl_member.
3111         (lookup_arg_dependent): Initialize k.namespaces to the list of 
3112         namespaces seen in unqualified lookup.
3113         * call.c (equal_functions): Move here from tree.c.
3114         (joust): Use it to handle duplicate candidates.
3115         * tree.c (ovl_member): Use ==.
3117 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
3119         * cp-tree.def (DECL_STMT): Make it smaller.
3120         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
3121         (lang_decl): ... here.  Add next.
3122         (DECL_SAVED_TREE): Adjust accordingly.
3123         (DECL_IMPLICIT_TYPEDEF_P): New macro.
3124         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
3125         (DECL_STMT_DECL): Likewise.
3126         (create_implicit_typedef): New function.
3127         (maybe_push_decl): Likewise.
3128         (tsubst_default_argument): New function.
3129         (at_function_scope_p): Likewise.
3130         (add_decl_stmt): Likewise.
3131         (push_permanent_obstack): Likewise.
3132         * call.c (convert_default_arg): Use tsubst_default_argument.
3133         * class.c (add_method): Use push_permanent_obstack.
3134         (build_self_reference): Create a TEMPLATE_DECL for the
3135         self-reference, if necessary.
3136         * decl.c (pseudo_global_level_p): Only look at the current binding
3137         level.
3138         (push_binding): Use push_permanent_obstack.
3139         (create_implicit_typedef): New function.
3140         (pushtag): Use it.
3141         (duplicate_decls): Use push_permanent_obstack.
3142         (maybe_push_decl): New function.
3143         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
3144         (start_decl_1): Remove dead code.
3145         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
3146         pseudo_global_level_p.
3147         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
3148         template.
3149         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
3150         pseudo_global_level_p.
3151         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
3152         a template.
3153         (get_sentry): Use push_permanent_obstack.
3154         * dump.c (dequeue_and_dump): Enable DECL_STMT.
3155         * except.c (call_eh_info): Use push_permanent_obstack.
3156         (build_eh_type_ref): Likewise.
3157         (do_pop_exception): Likewise.
3158         (expand_eh_spec): Likewise.
3159         (alloc_eh_object): Likewise.
3160         (expand_throw): Likewise.
3161         * init.c (build_java_class_ref): Likewise.
3162         * lex.c (get_time_identifier): Likewise.
3163         (free_lang_decl_chain): Correct type.
3164         (retrofit_lang_decl): Adjust accordingly.
3165         (build_lang_field_decl): Likewise.
3166         * lex.h (free_lang_decl_chain): Likewise.
3167         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
3168         * parse.c: Regenerated.
3169         * pt.c (tsubst_default_arguments): New function.
3170         (retrieve_local_specialization): Likewise.
3171         (register_local_specialization): Likewise.
3172         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
3173         pseudo_global_level_p to determine whether or not a template is
3174         primary.
3175         (lookup_template_class): Likewise.  Use create_implicit_typedef.
3176         (instantiate_class_template): Call tsubst_default_arguments for
3177         member functions, if appropriate.
3178         (tsubst_default_argument): New function.
3179         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
3180         * search.c (at_function_scope_p): New function.
3181         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
3182         (finish_label_stmt): Likewise.
3183         (add_decl_stmt): New function.
3184         (begin_class_definition): Likewise.
3185         (finish_typeof): Likewise.
3186         * tree.c (copy_template_template_parm): Likewise.
3187         (copy_to_permanent): Likewise.
3188         (push_permanent_obstack): Define.
3189         (mark_addressable): Use it.
3190         * typeck.c (mark_addressable): Likewise.
3191         
3192 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
3194         * cp-tree.h (init_cplus_unsave): New.
3195         (cplus_unsave_expr_now): New.
3196         * lex.c (init_parse): Call init_cplus_unsave.
3197         * tree.c (init_cplus_unsave): New.
3198         (cplus_unsave_expr_now): New.
3200 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
3202         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
3203         decl_constant_value to simplify array bounds.
3205 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
3207         * lang-options.h: Add -fms-extensions.
3208         * cp-tree.h: Declare flag_ms_extensions.
3209         * decl2.c: Define it.
3210         * class.c (instantiate_type): Don't complain about taking the address
3211         of a bound member function if -fms-extensions.
3212         * typeck.c (build_unary_op): Likewise.
3213         * decl.c (grokdeclarator): Or about implicit int.
3214         * init.c (resolve_offset_ref): Or about implicit '&'.
3216 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
3218         * cp-tree.h (minimal_parse_mode): Remove.
3219         (finish_label_stmt): New function.
3220         * decl.c (saved_scope): Remove minimal parse mode.
3221         (maybe_push_to_top_level): Don't save it.
3222         (pop_from_top_level): Don't restore it.
3223         (define_label): Split out template-handling code to semantics.c.
3224         (start_decl): Don't use minimal_parse_mode.
3225         (cp_finish_decl): Likewise.
3226         (start_function): Don't increment it.
3227         (store_return_init): Don't use it.
3228         (finish_function): Don't decrement it.
3229         * parse.y (label_colon): Use finish_label_stmt throughout.
3230         * parse.c: Regenerated.
3231         * pt.c (minimal_parse_mode): Don't define it.
3232         (tsubst_expr): Use finish_label_stmt.
3233         * semantics.c (finish_label_stmt): New function.
3235         * dump.c (queue): Be careful when computing bitmasks.
3236         (dequeue_and_dump): Describe binfos as binfos, not as
3237         vectors.
3238         
3239         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
3240         throughout.     
3241         * parse.c: Regenerated.
3242         
3243         * Make-lang.in (CXX_SRCS): Remove sig.c.
3244         * Makefile.in (CXX_OBJS): Remove sig.o.
3245         (sig.o): Remove.
3246         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
3247         (CPTI_SIGNATURE_TYPE): Likewise.
3248         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
3249         (opaque_type_node): Likewise.
3250         (signature_type_node): Likewise.
3251         (sigtable_entry_type): Likewise.
3252         (flag_handle_signatures): Likewise.
3253         (lang_type): Remove is_signature, is_signature_pointer,
3254         is_signature_reference, has_opaque_typedecls,
3255         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
3256         signature_pointer_to, signature_reference_to.
3257         (IS_SIGNATURE): Remove.
3258         (SET_SIGNATURE): Remove.
3259         (CLEAR_SIGNATURE): Remove.
3260         (IS_SIGNATURE_POINTER): Remove.
3261         (IS_SIGNATURE_REFERENCE): Remove.
3262         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
3263         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
3264         (CLASSTYPE_SIGNATURE): Remove.
3265         (SIGNATURE_TYPE): Remove.
3266         (SIGNATURE_METHOD_VEC): Remove.
3267         (SIGNATURE_POINTER_TO): Remove.
3268         (SIGNATURE_REFERENCE_TO): Remove.
3269         (lang_decl_flags): Remove is_default_implementation.  Rename
3270         memfunc_pointer_to to saved_tree.
3271         (IS_DEFAULT_IMPLEMENTATION): Remove.
3272         (DECL_MEMFUNC_POINTER_TO): Remove.
3273         (DECL_MEMFUNC_POINTING_TO): Remove.
3274         (DECL_SAVED_TREE): Adjust definition.
3275         (tag_types): Remove signature_type_node.
3276         (SIGNATURE_FIELD_NAME): Remove.
3277         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
3278         (SIGNATURE_OPTR_NAME): Likewise.
3279         (SIGNATURE_SPTR_NAME): Likewise.
3280         (SIGNATURE_POINTER_NAME): Likewise.
3281         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
3282         (SIGNATURE_REFERENCE_NAME): Likewise.
3283         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
3284         (SIGTABLE_PTR_TYPE): Likewise.
3285         (SIGTABLE_NAME_FORMAT): Likewise.
3286         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
3287         (SIGTABLE_TAG_NAME): Likewise.
3288         (SIGTABLE_VB_OFF_NAME): Likewise.
3289         (SIGTABLE_VT_OFF_NAME): Likewise.
3290         (finish_base_specifiers): Change prototype.
3291         (build_signature_pointer_type): Remove.
3292         (build_signature_reference_type): Remove.
3293         (build_signature_pointer_constructor): Remove.
3294         (build_signature_method_call): Remove.
3295         (build_optr_ref): Likewise.
3296         (append_signature_fields): Likewise.
3297         (signature_error): Likewise.
3298         * call.c (build_this): Remove signature support.
3299         (build_over_call): Likewise.
3300         (build_new_method_call): Likewise.
3301         * class.c (add_implicitly_declared_members): Likewise.
3302         (finish_struct_1): Likewise.
3303         (finish_struct): Likewise.
3304         * cvt.c (cp_convert_to_pointer): Likewise.
3305         (convert_to_pointer_force): Likewise.
3306         (ocp_convert): Likewise.
3307         * decl.c (sigtable_decl_p): Remove.
3308         (init_decl_processing): Remove support for signatures.
3309         (cp_finish_decl): Likewise.
3310         (grokdeclarator): Likewise.
3311         (grokparms): Likewise.
3312         (xref_tag): Likewise.
3313         (start_function): Likewise.
3314         (start_method): Likewise.
3315         * decl2.c (finish_sigtable_vardecl): Remove.
3316         (flag_handle_signatures): Remove.
3317         (lang_f_options): Remove handle-signatures.
3318         (grokfield): Remove support for signatures.
3319         (grokbitfield): Likewise.
3320         (finish_file): Likewise.
3321         (reparse_absdcl_as_casts): Likewise.
3322         * error.c (dump_type_real): Likewise.
3323         (dump_function_decl): Likewise.
3324         * friend.c (make_friend_class): Likewise.
3325         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
3326         * hash.h: Regenerated.
3327         * init.c (build_new_1): Remove support for signatures.
3328         * lang-options.h: Remove -fhandle-signatures,
3329         -fno-handle-signatures. 
3330         * lex.c (init_parse): Remove support for signatures.
3331         (yyprint): Likewise.
3332         * lex.h (rid): Remove RID_SIGNATURE.
3333         * method.c (build_decl_overload_real): Remove support for
3334         signatures. 
3335         (hack_identifier): Likewise.
3336         * parse.y (base_class): Likewise.
3337         (base_class.1): Likewise.
3338         (access_specifier): Likewise.
3339         * search.c (lookup_member): Likewise.
3340         * semantics.c (finish_qualified_object_call_expr): Likewise.
3341         (finish_template_type_parm): Likewise.
3342         (begin_class_definition): Likewise.
3343         (finish_base_specifier): Likewise.
3344         * sig.c: Remove.
3345         * tree.c (build_cplus_method_type): Remove support for signatures.
3346         * typeck.c (require_complete_type): Likewise.
3347         (c_sizeof): Likewise.
3348         (c_alignof): Likewise.
3349         (build_object_ref): Likewise.
3350         (build_component_ref): Likewise.
3351         (build_indirect_ref): Likewise.
3352         (build_c_cast): Likewise.
3353         (build_modify_expr): Likewise.
3354         (convert_for_initialization): Likewise.
3355         * typeck2.c (signature_error): Remove.
3356         (store_init_value): Remove support for signatures.
3357         (digest_init): Likewise.
3358         (build_x_arrow): Likewise.
3359         (build_functional_cast): Likewise.
3360         * xref.c (GNU_xref_decl): Likewise.
3361         
3362 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
3364         * lex.c (do_identifier): Remove unnecessary lookup of class field.
3366 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
3368         * decl2.c (set_decl_namespace): Do not complain about non-matching
3369         decls if processing a template.
3371 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
3373         * decl.c (build_ptrmemfunc_type): Handle qualified
3374         pointer-to-member types here.
3375         * tree.c (cp_build_qualified_type_real): Simplify handling here.
3377 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3379         * lex.c (lang_identify): Likewise.
3381 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
3383         * Makefile.in: Update dependencies.
3384         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
3385         NULL_RTX.
3386         * decl.c: Include "function.h"
3387         (cleanup_label, return_label): Delete declarations.
3388         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
3389         (finish_function): Rename last_parm_insn variable to
3390         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
3391         * decl2.c: Include "function.h".
3392         (rtl_expr_chain): Delete declaration.
3393         * method.c: Include "function.h"
3394         * tree.c (build_vbase_pointer_fields): Don't initialize
3395         DECL_SAVED_INSNS with NULL_RTX.
3396         * typeck.c: Include "function.h"
3398 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
3400         * semantics.c (begin_function_try_block, finish_function_try_block,
3401         finish_function_handler_sequence): New fns.
3402         * parse.y (function_try_block): Use them.
3403         * pt.c (instantiate_decl): Likewise.
3405         * cp-tree.h: Declare in_function_try_handler.
3406         * decl.c: Define it.
3407         (start_function): Clear it.
3408         (struct cp_function, push_cp_function_context): Save it.
3409         (pop_cp_function_context): Restore it.
3410         * parse.y (function_try_block): Set and clear it.
3411         * except.c (expand_end_catch_block): Rethrow if we reach the end
3412         of a function-try-block handler in a ctor or dtor.
3413         * typeck.c (c_expand_return): Complain about returning from a
3414         function-try-block handler of a ctor.
3416         * parse.y (function_try_block): Call end_protect_partials
3417         before expand_start_all_catch.
3419 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
3421         * decl.c (struct binding_level): Add eh_region field.
3422         (push_binding_level): Set it.
3423         (define_label): Complain about jumping into an EH block.
3425         * ptree.c (print_lang_type): Print the real type of a PMF.
3426         Print what exceptions a fn type throws.
3428 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3430         * class.c (count_fields, add_fields_to_vec): Add static prototype.
3432         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
3433         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
3434         char*.
3436         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
3437         Constify a char*.
3439         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
3440         char*.
3442         * dump.c (queue_and_dump_index, dump_int, dump_string,
3443         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
3444         a char*.
3445         (dump_stmt): Add static prototype.
3447         * errfn.c (cp_thing): Constify a char*.
3449         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
3450         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
3451         dump_expr): Constify a char*.
3453         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
3454         read_line_number): Add static prototype.
3455         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
3456         (real_yylex): Move label `letter' into the scope where it is used.
3458         * method.c (build_mangled_template_parm_index, build_overload_int,
3459         build_decl_overload_real, get_id_2): Constify a char*.
3461         * search.c (check_final_overrider): Make static.
3463         * typeck.c (composite_pointer_type): Constify a char*.
3465 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
3467         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
3468         we're looking at a class.
3470         * decl.c (lookup_name_real): Set the complain flag if we're
3471         looking for a namespace member.
3473         * lex.c (real_yylex): We can have a number with no digits.
3475         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
3477         * search.c (binfo_from_vbase): New fn.
3478         * cp-tree.h: Declare it.
3479         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
3480         from pointer to member of virtual base.  
3481         * typeck.c (get_delta_difference): Likewise.
3483 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
3485         * pt.c (tsubst): Use build_index_type to build in-template array
3486         index type.  Fixes g++.oliva/dwarf1.C.
3487         * decl.c (grokdeclarator): Likewise, just for consistency, as it
3488         doesn't seem to trigger the bug without it.
3490 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
3492         * typeck2.c (add_exception_specifier): Use complete_type.
3494 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
3496         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
3497         (dump_binary_op): Bulletproof.
3498         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
3499         * tree.c (search_tree): Don't enumerate all the nodes of classes
3500         `1', `2', and `<'; handle them generically.  Don't be sorry about
3501         "unrecognized tree codes"; just abort.
3502         (no_linkage_check): Don't do linkage checks for templates.
3503         
3504         * tree.c (cp_build_qualified_type_real): Handle
3505         pointer-to-member-function types correctly.
3507 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
3509         * decl.c (pushdecl): Only give an error for shadowing a parm 
3510         from *this* function.
3512 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
3514         * typeck2.c: Update URLs and mail addresses.
3516 1999-08-04  Nathan Sidwell  <nathan@acm.org>
3518         * cp-tree.h (empty_except_spec): New global var.
3519         (compexcepttypes): Remove prototype.
3520         (comp_except_specs): Prototype new global function.
3521         (add_exception_specifier): Prototype new global function.
3522         * decl.c (empty_except_spec): Define new global var.
3523         (duplicate_decls): Use comp_except_specs, reword error message.
3524         (init_decl_processing): Initialize empty_except_spec.
3525         Adjust build_exception_variant calls.
3526         * parse.y (exception_specification_opt): Use empty_except_spec.
3527         (ansi_raise_identifier): Call check_for_new_type.
3528         (ansi_raise_identifiers): Use add_exception_specifier.
3529         * pt.c (tsubst): Use add_exception_specifier to build exception
3530         specifier.
3531         * search.c (check_final_overrider): New static function, broken
3532         out of get_matching_virtual. Check throw specifiers, reword
3533         diagnostics.
3534         (get_matching_virtual): Use check_final_overrider.
3535         * tree.c (build_exception_variant): Use comp_except_specs.
3536         * typeck.c (compexcepttypes): Remove.
3537         (comp_except_types): New static function, helper for
3538         comp_except_specs. Compare two types as exception specifiers.
3539         (comp_except_specs): New global function, compare two exception
3540         specifiers.
3541         (comptypes): Adjust for comp_except_specs.
3542         * typeck2.c (add_exception_specifier): New global function.
3543         
3544         * class.c (check_for_override): Reword error message.
3546 1999-08-03  Nathan Sidwell  <nathan@acm.org>
3548         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
3549         * cp-tree.h (struct lang_type): Added non_pod_class flag.
3550         (CLASSTYPE_NON_POD_P): New macro to access it.
3551         * class.c (finish_struct_1): Determine non-PODness.
3552         Check for arrays of pointers (-Weffc++).
3553         Remove array inspection duplicated code.
3554         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
3555         Use CLASSTYPE_NON_POD_P.
3557 1999-08-03  Nathan Sidwell  <nathan@acm.org>
3559         * class.c (duplicate_tag_error): Preserve template information.
3561 1999-08-03  Nathan Sidwell  <nathan@acm.org>
3563         * decl.c (start_enum): Show location of previous definition.
3564         * parse.y (enumlist_opt): New reduction.
3565         (structsp): Simplify enum rules to use enumlist_opt.
3567 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
3569         * lex.c (yyprint): Handle PFUNCNAME.
3571         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
3572         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
3574 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
3576         * decl.c (start_decl): Set attributes before duplicate_decls call.
3578 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
3580         * Make-lang.in (CXX_SRCS): Add dump.c.
3581         * Makefile.in (CXX_OBJS): Add dump.o.
3582         (dump.o): New target.
3583         * cp-tree.h (DECL_CONV_FN_P): Document.
3584         (DECL_OVERLOADED_OPERATOR_P): New function.
3585         (TYPE_PTRMEM_CLASS_TYPE): New macro.
3586         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
3587         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
3588         (ASM_VOLATILE_P): New macro.
3589         (STMT_LINENO): Likewise.
3590         (cp_namespace_decls): New function.
3591         (dump_node_to_file): New function.
3592         * decl.c (cp_namespace_decls): New function.
3593         (walk_namespaces_r): Use it.
3594         (wrapup_globals_for_namespace): Likewise.
3595         * decl2.c (flag_dump_translation_unit): New variable.
3596         (lang_decode_option): Handle -fdump-translation-unit.
3597         (finish_file): If flag_dump_translation_unit is set, dump the
3598         translation unit.
3599         * dump.c: New file.
3600         * lang-options.h: Add -fdump-translation-unit.
3601         * pt.c (tsubst_template_parms): Robustify.
3602         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
3603         (tsubst_expr): Use STMT_LINENO.
3604         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
3605         for invalid cv-qualifiers even while building templates.
3606         
3607 1999-08-02  Richard Henderson  <rth@cygnus.com>
3609         * call.c: Include defaults.h instead of expr.h.
3610         * decl.c: Likewise.
3611         * pt.c: Likewise.
3612         * typeck.c: Include defaults.h.
3614 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
3616         * lex.c (errorcount, sorrycount): Don't declare.
3617         * repo.c (errorcount, sorrycount): Likewise.
3618         * typeck2.c (errorcount, sorrycount): Likewise.
3620 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
3622         * call.c (convert_default_arg, build_over_call): Change all uses of
3623         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
3624         Ensure expr.h is included.
3625         * decl.c (grokparams): Ditto.
3626         * pt.c (tsubst_decl): Ditto.
3627         * typeck.c (convert_arguments): Ditto.
3629 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
3631         * class.c (mark_overriders): Fix order of args to overrides.
3632         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
3633         functions with the same name.
3635 1999-08-02  Richard Henderson  <rth@cygnus.com>
3637         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
3639 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
3641         * call.c (build_conditional_expr): Fix typo in comment.
3643 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
3645         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
3646         case_stack; use in_control_zone_p.
3647         * typeck.c (c_expand_return): Likewise.
3649 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
3651         * except.c (catch_clauses): Delete declaration.
3653 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
3655         * call.c (build_conditional_expr): Call convert_from_reference to
3656         avoid reference/non-reference type confusion.  Fix typo.
3658 1999-07-30  Richard Henderson  <rth@cygnus.com>
3660         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
3661         * cp-tree.h (initializer_constant_valid_p): Remove.
3663 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
3665         * call.c (conditional_conversion): Don't build BASE_CONVs for
3666         conversions between things that have the same type.
3667         (build_conditional_expr): Tweak.
3668         (convert_like): Some BASE_CONVs really do require the generation
3669         of code.
3670         
3671         * init.c (perform_member_init): Don't go through build_modify_expr
3672         for simple initializations.
3674 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
3676         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
3677         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
3678         virtual functions and MI.  Simplify.
3680         * method.c: Remove prototype for largest_union_member.
3681         * pt.c (determine_specialization): Fix uninitialized warning.
3682         * lex.c (real_yylex): Likewise.
3684 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
3686         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
3687         here too.
3689         * cp-tree.h (BINFO_VIRTUALS): Document new format.
3690         * class.c (modify_one_vtable): Change prototype accordingly.
3691         (modify_all_vtables): Likewise.
3692         (modify_all_direct_vtables): Likewise.
3693         (modify_all_indirect_vtables): Likewise.
3694         (build_vtable_entry_for_fn): New function.
3695         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
3696         (modify_vtable_entry): Likewise.
3697         (add_virtual_function): Likewise.
3698         (build_vtbl_initializer): New function.
3699         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
3700         (fixup_vtable_deltas1): Likewise.
3701         (fixup_vtable_deltas): Likewise.
3702         (override_one_vtable): Likewise.
3703         (finish_struct_1): Likewise.
3705         * error.c (dump_expr): Likewise.
3706         * search.c (get_abstract_virtuals_1): Likewise.
3707         (get_abstract_virtuals): Likewise.
3708         (expand_upcast_fixups): Likewise.
3709         * tree.c (debug_binfo): Likewise.
3710         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
3711         __pure_virtual here.
3712         
3713 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
3715         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
3716         as per 1999-07-26 change.
3718         * typeck.c (c_sizeof): Don't allow non-static data members.
3719         (expr_sizeof): Likewise.
3721 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
3723         * input.c (feed_input): Only touch lineno and input_filename
3724         if !USE_CPPLIB.  Save the old values before setting the new ones.
3726         * input.c (feed_input): Add file, line parms.
3727         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
3728         (real_yylex): Check linemode before input_redirected().
3730         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
3731         from op new to warning.
3733 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
3735         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
3736         * call.c: All uses changed.
3737         * typeck.c: Likewise.
3739 1999-07-26  Nathan Sidwell  <nathan@acm.org>
3741         * exception.cc (__cplus_type_matcher): Match __eh_matcher
3742         prototype.
3744 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
3746         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
3747         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
3748         (strip_top_quals): Declare.
3749         (ncp_convert): Likewise.
3750         (type_after_usual_arithmetic_converions): Likewise.
3751         (composite_pointer_type): Likewise.
3752         * call.c (strip_top_quals): Don't make it static.
3753         (promoted_arithmetic_type_p): New function.
3754         (conditional_conversion): Likewise.
3755         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
3756         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
3757         for converting a type to itself.
3758         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
3759         (implicit_conversion): Make sure the from and to types are
3760         complete.
3761         (add_builtin_candidate): Correct handling of ?: operator.
3762         (add_builtin_candidates): Improve documentation.
3763         (build_conditional_expr): New function.
3764         (can_convert): Implement in terms of can_convert_arg.
3765         (ncp_convert): New function.
3766         * typeck.c (type_after_usual_arithmetic_conversions): New
3767         function, split out from common_type.
3768         (composite_pointer_type): New function, split out from
3769         build_conditional_expr.
3770         (common_type): Use type_after_usual_arithmetic_conversions.
3771         Remove redundant attribute merging.
3772         (comptypes): Tidy.  Handle COMPLEX_TYPE.
3773         (build_binary_op_nodefault): Use null_ptr_cst_p.
3774         (build_conditional_expr): Remove.
3775         (convert_for_assignment): Use new conversion functions.
3776         
3777         * cp-tree.h (abstract_virtuals_error): Change declaration.
3778         * typeck2.c (abstract_virtuals_error): Check to see if an error
3779         ocurred, and return a boolean value accordingly.
3780         (build_functional_cast): Adjust accordingly.
3781         * class.c (finish_struct_1): Likewise.
3782         * cvt.c (ocp_convert): Likewise.
3783         * decl.c (cp_finish_decl): Likewise.
3784         (grokparams): Likewise.
3785         (grok_op_properties): Likewise.
3786         (start_function): Likewise.
3787         * init.c (build_new_1): Likewise.
3789         * pt.c (unify): Don't get confused by pointers-to-member functions.
3791         * search.c (build_cplus_new): Robustify.
3792         
3793 1999-07-24  Richard Henderson  <rth@cygnus.com>
3795         * gxx.gperf (__builtin_va_arg): New.
3796         * parse.y (VA_ARG): New token.
3797         (unary_expr): Recognize it.
3799 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
3801         * g++FAQ.texi: Deleted per Joe Buck's request.
3802         * Makefile.in: Corresponding changes.
3804 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
3806         * lex.c: Sync with C frontend.
3807         (whitespace_cr): New fn.
3808         (skip_white_space): Use it.
3809         (init_parse): Reorder.
3810         (yyprint): Support CONSTANT.
3811         (pragma_getc, pragma_ungetc): Bring back.
3812         (read_line_number): Change in_system_header directly.
3813         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
3814         (parse_float): Update to C version.
3815         (yylex): Handle '$' under the letter case.
3816         Remove looking_for_typename handling.
3817         Support hex floating point constants.
3818         Follow C's lead for choosing type of integer constants.
3819         Rearrange stuff to match C frontend.
3820         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
3821         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
3823 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
3825         * call.c (reference_binding): Tweak.
3826         (mayble_handle_implicit_object): Use direct_reference_binding to
3827         create the right implicit conversion sequence.
3829 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
3831         * pt.c (convert_nontype_argument): Don't call decl_constant_value
3832         if we're converting to a reference type.
3834         * call.c (NEED_TEMPORARY_P): New macro.
3835         (standard_conversion): Set it, for derived-to-base conversions.
3836         (reference_related_p): New function.
3837         (reference_compatible_p): Likewise.
3838         (convert_class_to_reference): Likewise.
3839         (direct_reference_binding): Likewise.
3840         (reference_binding): Rework for standards-compliance.
3841         (convert_like): Adjust accordingly.
3842         (maybe_handle_ref_bind): Simplify; the right conversion sequences
3843         are now built up in reference_binding.
3844         (initialize_reference): New function.
3845         * cp-tree.h (ICS_USER_FLAG): Document.
3846         (ICS_THIS_FLAG): Likewise.
3847         (ICS_BAD_FLAG): Likewise.
3848         (NEED_TEMPORARY_P): Likewise.
3849         (cp_lvalue_kind): New type.
3850         (real_lvalue_p): Return it.
3851         * error.c (dump_expr): Provide more accurate representation for
3852         AGGR_INIT_EXPRs.
3853         * init.c (expand_default_init): Do not try to perform implicit
3854         conversions for a brace-enclosed initializer.
3855         * search.c (lookup_conversions): Document.
3856         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
3857         appropriately.
3858         (real_lvalue_p): Adjust accordingly.
3859         (lvalue_p): Likewise.
3860         (build_cplus_new): Don't allow the creation of an abstract class.
3861         * typeck.c (convert_for_initialization): Use initialize_reference.
3862         
3863 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
3865         * lex.c (real_yylex) : Correct the test for overflow when lexing
3866         integer literals.
3868 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
3870         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
3871         not DECL_BUILT_IN, to determine if a function is internally declared.
3872         (duplicate_decls): Likewise.  Improve handling of builtins.
3873         (push_overloaded_decl): Remove special handling of builtins.
3875         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
3877         * decl.c (grokdeclarator): Pull out decl_constant_value in
3878         templates, too.
3880         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
3881         * cp-tree.h, pt.c, semantics.c: Adjust.
3882         * method.c (largest_union_member): Remove.
3884         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
3886         * lex.c (token_getch, token_put_back): New fns.
3887         (real_yylex): Use them.
3889         * lex.c (lang_init): Generalize.
3890         (lang_init_options): Tell cpplib this is C++.
3891         (nextchar): Remove.  Replace uses with put_back.
3892         (skip_white_space): Handle linemode here.  Optimize for cpplib.
3893         (extend_token_buffer_to): New fn.
3894         (extend_token_buffer): Use it.
3895         (read_line_number, check_newline): Just deal with tokens.
3896         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
3897         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
3898         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
3899         * parse.y (PAREN_STAR_PAREN): Remove.
3900         * input.c: Don't use the putback machinery with cpplib.
3901         (sub_getch): Fold back into getch.
3902         (getch): Don't handle linemode here.
3903         (feed_input): Unget any text in the token buffer.
3905         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
3906         nextyychar, nextyylval): Remove.
3908 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
3909             Jason Merrill  <jason@yorick.cygnus.com>
3911         * lex.c (indent_level): New variable.
3912         (init_parse): Set cpp_token to CPP_DIRECTIVE.
3913         (consume_string): Make this smart about USE_CPPLIB.
3914         (yyungetc): Use put_back function.
3915         (pragma_getc, pragma_ungetc): Functions deleted.
3916         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
3917         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
3918         pragma_ungetc.
3919         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
3920         Also, clean up cases where we redundantly set token_buffer[0].
3921         (read_line_number): New fn.
3922         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
3923         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
3924         (sub_getch): Conditionalize out code that's not appropriate if
3925         USE_CPPLIB.
3926         (put_back): Rewrite in case USE_CPPLIB is defined.
3927         (input_redirected): Ditto.
3929 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
3931         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
3932         c_global_trees and accessor macros defined in c-common.h.
3933         (cp_tree_index): New enumeration.
3934         (cp_global_trees): Declare new array.  Add accessor macros for it, and
3935         delete declarations of tree nodes replaced by it.
3936         (builtin_function): Delete macro, add declaration for new function.
3937         Include c-common.h.
3938         * decl.c: Delete definitions for tree nodes that were replaced by
3939         cp_global_trees and c_global_trees.
3940         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
3941         to generate the common builtins here.
3942         (builtin_function): New function.
3943         * decl2.c (abort_fndecl): Delete declaration.
3944         * except.c (expand_builtin_return_address): Delete declaration.
3945         (builtin_return_address_fndecl): Delete variable.
3946         (const_ptr_type_node): Delete declaration.
3947         * lex.c (cons_up_default_function): Delete declaration of
3948         void_list_node.
3949         * parse.y (void_list_node): Delete declaration.
3950         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
3951         Delete variables.
3952         (const_string_type_node): Delete declaration.
3953         * search.c (abort_fndecl): Delete declaration.
3954         * Makefile.in: Update dependencies.
3956 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
3958         * pt.c (check_default_tmpl_args): Move test for missing default
3959         arguments here, from ...
3960         (end_template_parm_list): Here.
3962 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
3964         * decl.c (lookup_nested_type): Remove.
3965         (pushtag): Don't call it.
3967 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
3969         * Makefile.in (INTERFACE): Bump to 2.
3971 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
3972         
3973         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
3974         instructions to gcc.gnu.org.  Removed e-mail address.
3976 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
3978         * pt.c (determine_specialization): Tighten error-checking.
3979         (end_template_parm_list): Likewise.
3981 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
3983         * pt.c (check_default_tmpl_args): Handle friends defined in the
3984         class just like member functions defined in the class.
3986 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
3987             Jason Merrill  <jason@yorick.cygnus.com>
3989         * cp-tree.h (struct lang_decl): Added field for storing sorted
3990         FIELD_DECLs (used in TYPE_DECLs).
3991         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
3992         (DECL_SORTED_FIELDS): New macro.
3993         * class.c (method_name_cmp): New function.
3994         (finish_struct_methods): Modified to support sorting and searching
3995         methods.
3996         (finish_struct_anon): Changed code in inner loop to use ELT rather 
3997         than UELT (which required an extra indirection for every reference).
3998         (field_decl_cmp): New function to support sorting FIELD_DECLs.
3999         (finish_struct_1): Sort fields.
4000         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
4001         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
4002         Also, switch to using array indexing rather than a changing pointer.
4003         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
4004         DECL_SORTED_FIELDS.
4006 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
4008         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
4009         casts in system headers or extern "C" blocks.
4011         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
4012         errors to pedwarn.
4014 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
4016         * decl2.c (write_virtuals): Deleted declaration.
4017         * cp-tree.h (write_virtuals): Deleted extern declaration.
4018         * class.c (finish_struct_1): Removed #if 0'd code that mentions
4019         write_virtuals.
4020         * semantics.c (begin_class_definition): Rewrite code to not depend
4021         on write_virtuals.
4023         * lex.c (cp_pragma_interface): New function.
4024         (cp_pragma_implementation): Likewise.
4025         (handle_cp_pragma): Call them.
4027         * typeck.c (comptypes): Simplify C code in look_hard.
4029         * xref.c (PALLOC): Use xcalloc, not calloc.
4030         (SALLOC): Use xmalloc, not malloc.
4032         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
4034         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
4035         is NO_DEBUG.
4037         * decl.c (duplicate_decls): If a redeclaration doesn't match the
4038         initial declaration, then don't save the inline info and by all
4039         means don't mark the function as a builtin function.
4041         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
4042         CURRENT_CLASS_TYPE is 0.
4044         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
4045         NULL_TREE.
4047         * ptree.c (print_lang_type): Added vtable-needs-writing.
4049 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
4051         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
4053 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
4055         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
4056         Merged into c-common.
4058 1999-07-05  Dave Brolley  <brolley@cygnus.com>
4060         * lex.c (errorcount): Declare it.
4061         (finish_parse): Update errorcount for when using CPPLIB.
4063 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
4065         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
4066         parameters.
4067         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
4068         * decl.c (push_class_binding): Use it.
4069         (lookup_name_real): Likewise.
4071 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
4073         * cp-tree.h (widest_integer_literal_type_node,
4074         widest_unsigned_literal_type) : New.
4075         * decl.c (widest_integer_literal_type_node,
4076         widest_unsigned_literal_type) : New.
4077         (init_decl_processing): Handle/use the two new types.
4078         * lex.c (real_yylex): Same.
4079         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
4080         Same. 
4082 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
4084         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
4085         to anonymous cv-qualified types.
4087 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
4089         * lex.c (real_yylex) : Change integer literal overflow handling to
4090         be like c-lex.c.
4092         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
4094 1999-06-28  Richard Henderson  <rth@cygnus.com>
4096         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
4098 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
4100         * error.c (dump_type_real): Handle TREE_LIST again.
4102         * typeck.c (comp_target_parms): Don't complain about 
4103         converting from () to (...) if !flag_strict_prototype.
4105         * decl.c (grokdeclarator): Update the names of all variants when
4106         de-anonymizing.
4108 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
4110         * init.c (expand_aggr_vbase_init): Rename to
4111         construct_virtual_bases.  Conditionalize construction here, 
4112         rather than ...
4113         (emit_base_init): Here.
4115 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
4117         * semantics.c (finish_asm_statement): Apply decay conversions to
4118         input operands.
4120         * decl.c (expand_static_init): When building an anonymous function
4121         for use with atexit, compute its body before and after entering
4122         the function.
4124         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
4125         EXIT_EXPR.
4126         
4127 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
4129         * init.c (expand_aggr_vbase_init): Add flag parameter.
4130         (build_partial_cleanup_for): Remove, inlining into ..
4131         (expand_cleanup_for_base): ... here.  Take flag parameter.
4132         (emit_base_init): Pass the in_chrg parameter to
4133         emit_aggr_vbase_init. 
4134         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
4135         
4136 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
4138         * decl2.c (import_export_decl): Use same_type_p, rather than
4139         relying on pointer-equality for types.
4141         * method.c (do_build_copy_constructor): Simplify.
4143         * call.c (build_method_call): Remove bogus code for two-argument
4144         delete.
4145         * init.c (build_new_1): Expand on comment, and remove dead code.
4147         * init.c (expand_cleanup_for_base): New function, split out
4148         from ...
4149         (emit_base_init): Here.
4150         (expand_aggr_vbase_init): Use it.
4152 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
4154         * cp-tree.h (class_cache_firstobj): Declare.
4155         (maybe_push_cache_obstack): Rename to push_cache_obstack.
4156         * class.c (permanent_obstack): Remove declaration.
4157         (class_cache_firstobj): Make it global.
4158         (add_method): Don't use permanent_obstack directly.
4159         (pushclass): Only free the class_cache_obstack if we know how far
4160         back to free it.
4161         (maybe_push_cache_obstack): Rename to push_cache_obstack.
4162         * decl.c: Remove dead comment.
4163         (saved_scope): Add class_cache_firstobj.
4164         (push_to_top_level): Save it.
4165         (pop_from_top_level): Restore it.
4166         (push_class_level_binding): Use push_cache_obstack, not
4167         maybe_push_cache_obstack.
4168         * search.c (push_class_decls): Likewise.
4169         
4170 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4172         * pt.c (tsubst_friend_function): Push into namespace of friend
4173         function before pushdecl'ing it.
4175 1999-06-14  Nathan Sidwell  <nathan@acm.org>
4177         * call.c (build_new_op): Remove REF_BIND from all operands.
4179 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
4181         * init.c (build_new_1): Look up operator delete even if there was
4182         no explicit new placement.
4184 1999-06-08  Nathan Sidwell  <nathan@acm.org>
4186         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
4187         of ...
4188         (build_throw): ... here. Call it.
4189         (process_start_catch_block): Call it.
4191 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
4193         * search.c (convert_pointer_to_single_level): Reimplement without
4194         using get_binfo.
4196 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
4198         * method.c (is_back_referenceable_type): Back-reference bools when
4199         not squangling.
4201 1999-06-07  Dave Brolley  <brolley@cygnus.com>
4203         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
4204         * input.c (putback_buffer): New structure type.
4205         (putback): Replaces putback_char member.
4206         (putback): Replaces putback_char static variable.
4207         (feed_input): Use putback.
4208         (end_input): Use putback.
4209         (sub_getch): Use putback.
4210         (put_back): Use putback.
4212 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
4214         * decl.c (grokdeclarator): Fix typo in last change.
4216 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
4218         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
4219         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
4221 1999-06-04  Nathan Sidwell  <nathan@acm.org>
4223         * except.c (build_throw): Check throw expression validity.
4225 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
4227         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
4228         just because flag_signed_bitfields is false.
4230 1999-06-03  Nathan Sidwell  <nathan@acm.org>
4232         * semantics.c (begin_class_definition): Update the struct's
4233         location here ...
4234         * class.c (finish_struct): ... rather than here.
4236         * decl.c (make_typename_type): Don't rely on uninitialized
4237         variable.
4239 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4241         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
4243 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
4245         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
4246         and friends rather than messing with current_obstack directly.
4247         (cp_build_qualified_type_real): Rework ARRAY_TYPE
4248         allocation to match practice throughout the rest of the 
4249         compiler.
4251 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
4253         * lex.c (make_lang_type): Create TYPE_BINFO for
4254         TEMPLATE_TYPE_PARMs just like for non-template types.
4256         * decl.c (start_decl): Move checks on initialization to ...
4257         (cp_finish_decl): Here.  Tidy formatting slightly.
4259 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
4261         * decl.c (add_binding): Don't complain about a redeclaration of a
4262         semantically identical typedef in a local scope.
4264 1999-05-28  Nathan Sidwell  <nathan@acm.org>
4266         * decl.c (complete_array_type): Allocate off same obstack. Fix
4267         DO_DEFAULT comment to match reality.
4269         * friend.c (make_friend_class): Fix diagnostic typo.
4271 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
4273         * decl.c (lookup_namespace_name): Handle getting a
4274         TEMPLATE_ID_EXPR.
4275         (expand_static_init): Don't call pushdecl for implicitly declared
4276         `atexit' used to register destructors.
4278 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
4280         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
4281         intialize a vtable.
4283         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
4284         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
4285         by combining TEMPLATE_INFO and LEVEL into a single union.
4286         (DECL_TEMPLATE_INFO): Reformat.
4287         (DECL_SAVED_TREE): Document.
4288         (DECL_TEMPLATE_INJECT): Remove.
4289         * class.c (finish_struct): Remove code to deal with
4290         DECL_TEMPLATE_INJECT. 
4292         * decl.c (maybe_process_template_type_declaration): Handle all new
4293         types in templates uniformly.
4294         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
4295         DECL_CONTEXT.
4296         * pt.c (lookup_template_class): Inject template instantiations of
4297         forward-declarations.
4298         (instantiate_class_template): Remove code processing
4299         DECL_TEMPLATE_INJECT.
4300         
4301         * pt.c (lookup_template_class): Tweak lookup to find member
4302         templates.
4304         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
4305         ASM_CV_QUAL.
4306         * semantics.c (finish_asm_stmt): Make strings permanent if they're
4307         used in a template.
4308         
4309 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
4311         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
4312         parts of pointer to data member types.
4314 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
4316         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
4317         and then make it look like `abort'.  Just use `abort' instead.
4318         
4319         * typeck.c (build_static_cast): Don't allow static_casts that cast
4320         away constness.
4321         (casts_away_constness_r): New function.
4322         (casts_away_constness): Likewise.
4324         * decl.c (lookup_tag): Remove code no longer needed after
4325         name-lookup improvements.
4326         * decl2.c (handle_class_head): Make error-recovery more robust.
4327         * friend.c (make_friend_class): Reject templated typename types.
4328         * lex.c (is_global): A template parameter isn't global.
4329         * parse.y (class_head): Robustify.
4330         * parse.c: Regenerated.
4331         
4332 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
4334         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
4335         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
4336         
4337         * cp-tree.h (push_nested_namespace): Declare.
4338         (pop_nested_namespace): Likewise.
4339         * decl.c (push_nested_namespace): New function.
4340         (pop_nested_namespace): Likewise.
4341         * pt.c (instantiate_class_template): Use them.
4343         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
4345         * cp-tree.h (cplus_expand_constant): Declare.
4346         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
4347         converted from one pointer-to-object type to another.
4348         * expr.c (cplus_expand_constant): Don't make it static.
4349         * typeck.c (build_component_ref): Don't crash when presented with
4350         a component which is a TEMPLATE_DECL.
4351         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
4352         cast from a pointer-to-member constant to its own type does not
4353         result in a valid non-type template argument.
4355 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
4356             Nathan Sidwell  <nathan@acm.org>
4357         
4358         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
4359         * cp-tree.h: Fix typo in documentation on pointers-to-members.
4360         (cp_build_qualified_type): Make it a macro.
4361         (cp_build_qualified_type_real): Declare.
4362         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
4363         problem with template parameters and restrict-qualification.
4364         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
4365         * hash.h: Regenerated.
4366         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
4367         the enumeration.
4368         (NORID): Remove definition.
4369         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
4370         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
4371         (fn_type_unification): Check that the function type resulting from
4372         the deduction is legal.
4373         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
4374         (unify): Use cp_build_qualified_type_real.
4375         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
4376         (cp_build_qualified_type): Rename to ...
4377         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
4378         and modify appropriately.
4379         
4380         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
4381         reveal optimization opportunities.
4383         * pt.c (tsubst): Don't issue error messages when we're not
4384         complaining, even if we see a qualified function type.
4385         (check_cv_quals_for_unify): Don't allow a qualified function
4386         type.
4388 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
4390         * class.c (instantiate_type): Downgrade errors for object-dependent
4391         memfn refs to pedwarn.
4393 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
4395         * decl.c (grokdeclarator): Don't treat [] as indicating a
4396         zero-sized array in a typedef.
4398         * call.c (build_object_call): Don't look at DECL_NAME for a type.
4399         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
4400         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
4402         * pt.c (for_each_template_parm): Rework to match documentation.
4403         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
4405 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
4407         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
4409         * class.c (finish_base_struct): Allow non-COM bases for COM classes
4410         except at the leftmost position.
4411         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
4412         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
4413         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
4415         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
4416         (build_cplus_new): Make sure that what we return is of the right type.
4418 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
4420         * cp-tree.h (make_ptrmem_cst): New function.
4421         * expr.c (cplus_expand_constant): Split out from ...
4422         (cplus_expand_expr): Here.  Use cplus_expand_constant.
4423         (init_cplus_expand): Set lang_expand_constant.
4424         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
4426         * tree.c (make_ptrmem_cst): Define.
4427         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
4428         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
4430 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
4432         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
4434         * decl2.c (start_static_storage_duration_function): Fix comment.
4435         (finish_file): Create static storage duration functions lazily.
4437 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
4439         Implement anonymous structs.
4440         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
4441         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
4442         * class.c (finish_struct_1): Remove redundant check for anon struct.
4443         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
4444         (check_tag_decl): Check for anonymous struct here.
4445         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
4446         * init.c (sort_member_init, emit_base_init): Handle getting fields
4447         as well as names in current_member_init_list.
4448         (perform_member_init): Handle getting an anon aggr.
4449         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
4450         (do_build_copy_constructor): Likewise.
4452 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
4454         * tree.c (cp_build_qualified_type): Don't allow qualified function
4455         types.
4457 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
4459         * gxxint.texi: Fix typo.
4461 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
4463         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
4464         * class.c (finish_struct_1): Use CLASS_TYPE_P.
4465         * ptree.c (print_lang_type): Likewise.
4466         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
4467         IS_AGGR_TYPE_CODE.
4468         * typeck2.c (digest_init): Likewise.
4470 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
4472         * call.c (joust): Compare the types of the conv ops, not the
4473         target types of the conversions.
4475 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
4477         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
4478         was not given.
4480 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
4482         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
4483         * decl.c (grokfndecl): Don't allow inline declarations of friend
4484         template specializations, or friend template specializations with
4485         default arguments.
4486         * pt.c (tsubst): Handle substitution into array types that does
4487         not yield a fixed upper bound, even when not processing a
4488         template.
4489         (tsubst_copy): Deal with the fact that the second operand to a
4490         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
4491         * search.c (marked_pushdecls_p): Don't descend into
4492         TEMPLATE_TYPE_PARMs and the like.
4493         (unmarked_pushdecls_p): Likewise.
4494         
4495         * call.c (build_over_call): Don't throw away
4496         initializations/copies of empty classes; use MODIFY_EXPR and
4497         INIT_EXPR as for non-empty classes.
4498         * class.c (finish_struct_1): Put the padding byte for an empty
4499         class on the TYPE_NONCOPIED_PARTS list for the class.
4501 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
4503         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
4504         indicate a reference to a field that is a qualified name.
4506 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
4508         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
4509         ASM_OUTPUT_CONSTRUCTOR.
4511         * friend.c (do_friend): Add attrlist arg.  Remove support for
4512         getting a non-decl as 'decl'.
4513         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
4514         rtl.
4515         (grokdeclarator): Adjust.
4516         * cp-tree.h: Adjust.
4518 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
4520         * cp-tree.h (permanent_p): New function.
4521         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
4522         possibly complex tree node.
4523         * tree.c (mapcar): Adjust comments, and follow coding standards in
4524         conditional.
4525         (permanent_p): New function.
4527 1999-05-13  Per Bothner  <bothner@cygnus.com>
4529         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
4530         primitive Java types, if we actually see `extern "Java"'.
4532 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
4534         * lang-specs.h: Pass -$ to the preprocessor.
4536 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
4538         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
4539         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
4540         (resolve_offset_ref): Don't handle a raw baselink.
4541         * cvt.c (build_expr_type_conversion): Likewise.
4542         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
4543         convert_for_initialization): Likewise.
4544         * class.c (instantiate_type): Handle seeing a baselink under an
4545         OFFSET_REF.
4546         * error.c (dump_expr): Likewise.        
4547         * pt.c (for_each_template_parm): Likewise.
4548         (resolve_overloaded_unification): Likewise.
4549         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
4550         * typeck.c (expr_sizeof): Also complain about other permutations
4551         of overloaded functions.
4553 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
4555         * init.c (resolve_offset_ref): Don't return a raw method.
4556         Use BASELINK_P.
4557         * typeck.c (decay_conversion): Don't handle a raw method.
4558         Resolve all OFFSET_REFs.
4559         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
4560         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
4561         same_type_p for pmf bits.  Don't use build_binary_op to compare
4562         raw pointers to methods.
4563         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
4564         to decide when to call resolve_offset_ref.
4565         (build_c_cast, convert_for_initialization): Likewise.
4566         * cvt.c (build_expr_type_conversion): Likewise.
4568 1999-05-06  Nathan Sidwell  <nathan@acm.org>
4570         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
4572 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
4574         * decl2.c (start_objects): Don't let static constructors and
4575         destructors get inlined.
4577         * parse.y (nested_name_specifier): Make sure ordinary types are
4578         complete, just like template types.
4579         * parse.c: Regenerated.
4581         * pt.c (check_explicit_specialization): Improve error messages.
4583 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4585         * typeck.c (string_conv_p): Use same_type_p to check whether we
4586         try to convert between char and wchar_t.
4588 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
4590         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
4591         lookup to error_mark_node here.
4592         (lookup_member): Revise documentation.  Add comments.  Don't set
4593         the TREE_TYPE to error_mark_node here, and don't build up an extra
4594         TREE_LIST for ambiguous lookups.
4595         (setup_class_bindings): Adjust accordingly.
4596         (push_class_decls): Revise out-of-date comments.
4597         
4598         * typeck.c (build_const_cast): Tighten checks for legality.
4600 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4602         * init.c (build_member_call): Lookup names coming from
4603         namespace-scoped LOOKUP_EXPR.
4605 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
4607         * gxxint.texi: Add documentation for 'I'.
4609 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4611         * tinfo.cc (operator==): Qualify type_info with std::.
4613 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
4615         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
4616         (DECL_COMDAT): Remove definition.
4618 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
4620         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
4621         change.
4623 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
4625         * class.c (build_vtable): Use build_lang_decl when building
4626         vtables, not just build_decl.
4627         (prepare_fresh_vtable): Likewise.
4628         * decl.c (wrapup_globals_for_namespace): Mark vtables as
4629         DECL_EXTERNAL when calling wrapup_global_declarations.
4630         * decl2.c (priority_info_s): Add initializations_p and
4631         destructions_p members.
4632         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
4633         when deciding what vtables to write out.
4634         (ssdf_decls): New variable.
4635         (ssdf_decls_used): Likewise.
4636         (start_static_storage_duration_function): Deal with being called
4637         multiple times.  Avoid inlining this function.
4638         (generate_inits_for_priority): Deal with reuse of priority map.
4639         (get_priority_info): Clear initializations_p and destructions_p.
4640         (do_static_initialization): Tweak comment.
4641         (do_static_destruction): Likewise.  Fix condition on sentries for
4642         destruction.
4643         (generate_ctor_or_dtor_function): Call all of the static storage
4644         duration functions.
4645         (generate_ctor_or_dtor_function_for_priority): Check
4646         initializations_p and destructions_p to see what priorities need
4647         initialization functions.
4648         (finish_file): Rework to generate multiple static storage duration
4649         functions, rather than just one.
4651         * typeck.c (build_const_cast): Tweak last change to handle
4652         templates correctly.
4654         * typeck.c (build_const_cast): Disallow use of const_cast to
4655         anything but a pointer or reference type.
4657 1999-04-30  Nathan Sidwell  <nathan@acm.org>
4659         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
4660         signature type.
4662 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
4664         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
4665         (finish_file): Indent comments properly.
4667 1999-04-29  Richard Henderson  <rth@cygnus.com>
4669         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
4670         (do_static_destruction): Likewise.
4672 1999-04-29  Nathan Sidwell  <nathan@acm.org>
4674         * cp-tree.h (TYPE_NOTHROW_P): New macro.
4675         * decl2.c (delete_sanity): Warn on deleting void *.
4676         * init.c (build_new_1): Use TYPE_NOTHROW_P.
4677         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
4678         throwing operator new.
4680 1999-04-28  Nathan Sidwell  <nathan@acm.org>
4682         * cp-tree.h (build_component_addr): Remove prototype.
4683         * typeck.c (build_component_addr): Make static. Remove MSG
4684         argument.
4685         (build_component_addr): Remove MSG parameter, clean up
4686         comment.
4687         (build_x_function_call): Use cp_error.
4688         (build_unary_op): Adjust call of build_component_addr.
4690 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
4692         * pt.c (tsubst_friend_class): Check for NULL.
4694 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
4696         * search.c (binfo_for_vtable): Initialize bfvi.var.
4698 1999-04-27  Nathan Sidwell  <nathan@acm.org>
4700         * rtti.c (build_x_typeid): Check rtti is enabled.
4702 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
4704         * search.c (is_subobject_of_p): Make sure we're looking at the
4705         right baseclasses.
4707 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
4709         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
4711 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
4713         * decl2.c (finish_file): Tweak handling of extern inlines so that
4714         they are not unnecessarily put out.
4716         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
4717         such as base classes.
4719 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
4721         * tree.c (build_exception_variant): Fix typo: use the chain of U,
4722         not trying V, while cycling through U.
4724 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
4726         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
4727         preserves_first_arg.  Enlarge dummy accordingly.
4728         (DECL_TINFO_FN_P): New macro.
4729         (SET_DECL_TINFO_FN_P): Likeiwse.
4730         (DECL_RETURNS_FIRST_ARG): Remove.
4731         (DECL_PRESERVES_THIS): Likewise.
4732         (DECL_INIT_PRIORITY): New macro.
4733         (finish_struct_1): Change prototype.
4734         (cat_namespace_levels): Remove prototype.
4735         (vtable_decl_p): New prototype.
4736         (vtype_decl_p): Likewise.
4737         (sigtable_decl_p): Likewise.
4738         (walk_globals_pred): New typedef.
4739         (walk_globals_fn): Likewise.
4740         (walk_globals): New prototype.
4741         (walk_namespaces_fn): New typedef.
4742         (walk_namespaces): New prototype.
4743         (wrapup_globals_for_namespace): Likewise.
4744         (walk_vtables): Remove prototype.
4745         (walk_sigtables): Likewise.
4746         (instantiate_pending_templates): New prototype.
4747         * class.c (finish_struct_1): Don't return a value.
4748         * decl.h (pending_statics): Remove declaration.
4749         * decl.c (walk_namespaces_r): New function.
4750         (walk_globals_r): Likewise.
4751         (vtable_decl_p): Likewise.
4752         (vtype_decl_p): Likewise.
4753         (sigtable_decl_p): Likewise.
4754         (walk_namespaces): Likewise.
4755         (walk_globals_data): New type.
4756         (walk_globals): New function.
4757         (wrapup_globals_for_namespace): Likewise.
4758         (expand_static_init): Remove assertion.  Remove redundancy in
4759         conditional.  Don't put static data members in static_aggregates
4760         Tidy.
4761         (finish_function): Remove redundancy in conditional.  Don't set
4762         DECL_RETURNS_FIRST_ARG.
4763         (cat_namespace_levels): Remove.
4764         * decl2.c: Include splay-tree.h and varray.h.
4765         (priority_info_s): New structure.
4766         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
4767         conventions.
4768         (prune_vtable_vardecl): Likewise.
4769         (finish_sigtable_vardecl): Likewise.
4770         (setup_initp): Remove.
4771         (do_dtors): Remove.
4772         (do_ctors): Remove.
4773         (start_static_storage_duration_function): New function.
4774         (generate_inits_for_priority): Likewise.
4775         (finish_static_storage_duration_function): Likewise.
4776         (get_priority_info): Likewise.
4777         (do_static_initialization): Likewise.
4778         (do_static_destruction): Likewise.
4779         (do_static_initialization_and_destruction): Likewise.
4780         (generate_ctor_or_dtor_function): Likewise.
4781         (generate_ctor_and_dtor_functions_for_priority): Likewise.
4782         (pending_statics): Make it a varray.
4783         (pending_statics_used): New variable.
4784         (saved_inlines): Make it a varray.
4785         (saved_inlines_used): New variable.
4786         (finish_static_data_member): Change method of updating
4787         pending_statics.
4788         (mark_inline_for_output): Remove #if 0'd code.  Change method of
4789         updating saved_inlines.
4790         (walk_vtables): Remove.
4791         (walk_sigtables): Likewise.
4792         (import_export_decl): Use DECL_TINFO_FN_P.
4793         (pending_templates): Remove declaration.
4794         (maybe_templates): Likewise.
4795         (static_aggregates_initp): Likewise.
4796         (setup_initp): Likewise.
4797         (finish_objects): Simplify.
4798         (INITIALIZE_P_IDENTIFIER): New macro.
4799         (PRIORITY_IDENTIFIER): New macro.
4800         (SSDF_IDENTIFIER): New macro.
4801         (initialize_p_decl): New variable.
4802         (priority_decl): Likewise.
4803         (ssdf_decl): Likewise.
4804         (priority_info_map): Likewise.
4805         (finish_file): Recode output of static intializers and other
4806         file-scope finalization tasks.
4807         * error.c (OB_END_TEMPLATE_ID): New macro.
4808         (dump_type_real): Use it.
4809         (dump_decl): Likewise.
4810         (dump_function_name): Likewise.
4811         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
4812         interface.
4813         (check_newline): Use walk_globals, not walk_vtables.
4814         * pt.c (pending_tempalte_expansions): Remove.
4815         (set_vardecl_interface_info): Likewise.
4816         (pending_templates): Make static.
4817         (maybe_templates): Likewise.
4818         (instantiate_class_template): Adjust call to finish_struct_1.
4819         (instantiate_pending_templates): New function.
4820         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
4821         * tree.c (static_aggregates_initp): Remove.
4822         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
4823         instead.
4824         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
4826         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
4827         with the RTL code RETURN.
4828         * hash.h: Regenerated.
4829         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
4830         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
4831         * parse.c: Regenerated.
4832         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
4833         it.
4834         (inline_parm_levels): New variable.
4835         (inline_parm_levels_used): Likewise.
4836         (maybe_begin_member_template_processing): Update them.
4837         (maybe_end_member_template_processing): Use them, rather than
4838         guessing how many levels to pop.
4840         * decl.c (make_typename_type): Tighten error-checking.
4842 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
4844         * cp-tree.h (build_binary_op): Remove unneeded parameter.
4845         * class.c (build_vrable_entry_ref): Adjust call to
4846         build_binary_op.
4847         * decl.c (expand_static_init): Likewise.
4848         (grokdeclarator): Likewise.
4849         (finish_function): Likewise.
4850         * decl2.c (delete_sanity): Likewise.
4851         (do_dtors): Likewise.
4852         (do_ctors): Likewise.
4853         * error.c (dump_type_suffix): Likewise.
4854         * expr.c (cplus_expand_expr): Likewise.
4855         * init.c (resolve_offset_ref): Likewise.
4856         (build_new): Likewise.
4857         (build_new_1): Likewise.
4858         (build_vec_delete_1): Likewise.
4859         (expand_vec_init_catch_clause): Likewise.
4860         (build_delete): Likewise.
4861         * pt.c (tsubst): Likewise.
4862         * rtti.c (synthesize_tinfo_fn): Likewise.
4863         * search.c (expand_upcast_fixups): Likewise.
4864         (expand_direct_vtbls_init): Likewise.
4865         * typeck.c (get_member_function_from_ptrfunc): Likewise.
4866         (build_binary_op_nodefault): Likewise.
4867         (point_int_sum): Likewise.
4868         (pointer_diff): Likewise.
4869         (build_unary_op): Likewise.
4870         (build_modify_expr): Likewise.
4871         (get_delta_difference): Likewise.
4872         (build_ptrmemfunc): Likewise.
4873         (expand_ptrmemfunc_cst): Likewise.
4875 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
4877         * decl.c (grokfndecl): Always call cplus_decl_attributes.
4878         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
4880 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
4882         * cp-tree.h (finish_static_data_member_decl): New function.
4883         * decl2.c (finish_static_data_member_decl): Split out from ...
4884         (grokfield): Here.
4885         * pt.c (instantiate_class_template): Use it here instead of
4886         trying to fake it.
4887         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
4888         finish_static_data_member_decl will do that.  Explicit set
4889         DECL_EXTERNAL to match non-template processing.
4891 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
4893         * cp-tree.h (finish_class_definition): Add parameter.
4894         * parse.y (structsp): Use it.  Don't call pop_scope here.
4895         * parse.c: Regenerated.
4896         * semantics.c (finish_class_definition): Pop it here.
4898 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
4900         * decl.c (xref_tag): Revise handling of nested template
4901         declarations.
4902         * pt.c (check_explicit_specialization): Tweak handling of friend
4903         templates in template classes.
4904         (tsubst_friend_class): Handle friend declarations for nested
4905         member template classes.
4907 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
4909         * class.c (finish_struct): Remove unused variable.
4910         (pushclass): Likewise.
4911         (invalidate_class_lookup_cache): Likewise.
4912         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
4913         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
4914         doesn't get obliterated.
4915         (make_typename_type): Handle template classes correctly.
4917         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
4918         (storetags): Declare.
4919         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
4920         (pushclass): Likewise.  Use storetags to install tag declarations,
4921         not pushtag.
4922         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
4923         * decl.c (storetags): Make it global.
4924         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
4925         implicit typename declaration.
4926         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
4927         * method.c (hack_identifier): Likewise.
4928         * search.c (lookup_member): Likewise.
4930         * decl.c (warn_about_implicit_typename_lookup): New function.
4931         (lookup_name_real): Use it.  Rework handling of implicit typename
4932         extension.
4934 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
4936         * cp-tree.h (lookup_nested_field): Remove.
4937         * class.c (push_nested_class): Handle UNION_TYPEs.
4938         (pop_nested_class): Likewise.
4939         * decl.c (lookup_name_real): Don't call lookup_nested_field.
4940         (start_decl): Use push_nested_class, not just pushclass.
4941         (cp_finish_decl): Use pop_nested_class, not just popclass.
4942         * search.c (lookup_nested_field): Remove.
4944         * cp-tree.h (lang_type): Add documentation.
4945         * decl2.c (handle_class_head): Create template declarations here,
4946         as appropriate.
4947         * parse.y (class_head): Return whether or not we entered a new
4948         scope, as well as the type named.
4949         (named_class_head): Likewise.
4950         (named_complex_class_head_sans_basetype): Likewise.
4951         (structsp): Adjust accordingly.  Pop scope when required.
4952         * parse.c: Regenerated.
4953         * pt.c (check_default_tmpl_args): Robustify.
4954         (redeclare_class_template): Likewise.
4955         (instantiate_class_template): An instantiation of an
4956         anonymous union is itself an anonymous union.
4957         * semantics.c (begin_class_definition): Don't create template
4958         declarations here.
4960 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
4962         * parse.y (after_type_declarator_intern): New nonterminal.
4963         (after_type_declarator): Use it.
4964         (direct_after_type_declarator): Likewise.  Move above
4965         nonnested_type to fix reduce/reduce conflict resolution.
4966         (declmods): Reducing from just 'attributes' has EMPTY precedence.
4967         * Makefile.in (CONFLICTS): Update.
4969         * decl.c (define_label): Downgrade error for jumping over a
4970         non-POD decl to pedwarn.
4972 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
4974         * cp-tree.h (popclass): Change declaration.
4975         (pop_nested_class): Likewise.
4976         (poplevel_class): Remove declaration.
4977         * call.c (convert_default_argument): Pass no arguments to
4978         popclass.
4979         * class.c (finish_struct_1): Likewise.
4980         (finish_struct): Likewise.
4981         (popclass): Remove argument.  Simplify code accordingly.
4982         (pop_nested_class): Likewise.
4983         * decl.c (poplevel_class): Declare it here, and make it static.
4984         (poplevel): Handle class scopes.
4985         (poplevel_class): Don't take an rgument.  Simplify.
4986         (pop_everything): Pass no arguments to pop_nested_class.
4987         (cp_finish_decl): Pass no arguments to popclass.
4988         (grokdeclarator): Pass no arguments to pop_nested_class.
4989         (finish_function): Likewise.
4990         * decl2.c (grokfield): Likewise.
4991         (pop_scope): Pass no arguments to popclass.
4992         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
4993         * pt.c (instantiate_class_template): Move call to pushclass, and
4994         document.  Pass no arguments to popclass.
4995         (regenerate_decl_from_template): Likewise.
4997 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
4999         * typeck.c (build_unary_op): Handle taking the address of a unique
5000         bound non-static member function.
5002 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
5004         * lang-options.h (-Wdeprecated): New flag.
5005         * decl2.c (warn_deprecated): New flag.
5006         (lang_decode_option): Deprecated this-is-variable,
5007         external-templates, alt-external-templates.
5008         Support -Wdeprecated.
5009         * errfn.c (cp_deprecated): New function.
5011 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
5013         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
5014         of the decls themselves.
5016         * pt.c (tsubst_function_type): Copy attributes over.
5018         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
5019         and com_interface.
5020         * cp-tree.h: Add prototype.
5021         * decl.c (init_decl_processing): Set valid_lang_attribute.
5023 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
5025         * class.c (finish_struct_1): Look at the const-ness of the field's
5026         type, not the TREE_READONLY-ness of the declaration.
5027         * method.c (synthesize_method): Likewise.
5028         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
5029         creating new declarations.
5031 1999-04-13  Mike Stump  <mrs@wrs.com>
5033         * decl2.c (import_export_decl): Because vtables always reference
5034         virtual functions, even if they are inlined, don't allow
5035         -fno-implement-inlines to not emit them, instead, emit them with
5036         the vtable.
5037         * decl.c (start_function): Likewise.
5039 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
5041         * cp-tree.h (struct lang_type): Add com_interface.
5042         (CLASSTYPE_COM_INTERFACE): New macro.
5043         * class.c (set_rtti_entry): COM interface classes have no RTTI
5044         entries in their vtables; adjust.
5045         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
5046         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
5047         finish_struct_1): Likewise.
5048         * decl2.c (mark_vtable_entries): Likewise.
5049         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
5050         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
5051         expand_upcast_fixups): Likewise.
5052         * tree.c (debug_binfo): Likewise.
5054         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
5055         * typeck.c (comptypes): If we get it, ignore attributes.
5056         * class.c (instantiate_type): Use BASELINK_P.  Change complain
5057         parameter to flags; 2 means ignore attributes.
5058         * call.c (build_op_delete_call): Pass it.
5060         * decl.c (xref_tag): Only complain once about using a typedef-name
5061         with 'struct'.  Downgrade to pedwarn.
5063         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
5065         * parse.y (absdcl_intern): New nonterminal.
5066         (absdcl, direct_abstract_declarator): Use it.
5068         * pt.c (lookup_template_class): Look through implict typename.
5070 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
5072         * friend.c (add_friend): Deal gracefully with error_mark_node.
5073         * method.c (build_overload_value): Handle pointers-to-members as
5074         template parameters.
5076         * decl.c (push_binding): Fix typo in comment.
5078 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
5080         * error.c (dump_type_real): If a typename is a template-id, put
5081         out the template arguments.
5082         (dump_expr): Handle TEMPLATE_ID_EXPR.
5083         * pt.c (lookup_template_class): Now that full arguments are
5084         available everywhere, remove code that tried to guess them.
5086 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
5088         * decl.c (make_typename_type): Complain if we don't find a type
5089         when trying to make a typename type for a non-template type.
5091 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
5093         * decl.c (start_decl): Pass attributes to grokdeclarator.
5094         (grokdeclarator): Handle attributes on constructor-syntax
5095         initializers.
5097 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
5099         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
5100         don't have types.
5102         * search.c (template_self_reference_p): Tweak.
5104 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
5106         * init.c (build_offset_ref): Don't build yet another weird data
5107         structure to describe overloaded functions.
5109 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
5111         * cp-tree.h (BASELINK_P): New macro.
5112         (SET_BASELINK_P): Likewise.
5113         * init.c (build_member_call): Remove needless assignment in if
5114         statement.
5115         * search.c (lookup_field_r): Fix handling when we are looking
5116         specifically for a type; these are not hidden by functions and
5117         variables.
5118         (lookup_member): Use SET_BASELINK_P.
5119         * tree.c (is_overloaded_fn): Use BASELINK_P.
5120         (really_overloaed_fn): Likewise.
5121         (get_first_fn): Likewise.
5123 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
5125         * decl.c (lookup_name_current_level): Tweak, and improve
5126         documentation.
5128         * class.c (maybe_fixup_vptrs): Remove declaration.
5129         (build_class_init_list): Likewise.
5130         * decl.c (pushdecl_class_level): Call check_template_shadow here
5131         ...
5132         (push_class_level_binding): ... not here.
5133         * search.c (dfs_push_type_decls): Only avoid
5134         template-self-reference TYPE_DECLs if they are from base classes.
5136 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
5138         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
5139         nodes.  Tidy.
5141 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
5143         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
5144         (finish_struct_1): Don't call build_class_init_list.
5146 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
5148         * tinfo.h (__class_type_info): Fix illegal declaration.
5150         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
5151         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
5152         (IDENTIFIER_CLASS_VALUE): Improve documentation.
5153         (is_properly_derived_from): Declare.
5154         (invalidate_class_lookup_cache): Likewise.
5155         (maybe_maybe_note_name_used_in_class): Likewise.
5156         (note_name_declared_in_class): Likewise.
5157         (push_using_decl): Remove duplicate declaration.
5158         (id_in_current_class): Remove declaration.
5159         (push_class_binding): Change prototype.
5160         (clear_identitifer_class_values): Declare.
5161         * call.c (is_properly_derived_from): Make it global.
5162         (build_new_function_call): Be careful about updating candidates.
5163         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
5164         asked to make illegal calls.
5165         * class.c: Include splay-tree.h.
5166         (class_stack_node): Add names_used slot.
5167         (check_member_decl_is_same_in_complete_scope): Remove.
5168         (add_method): Fix comment.  Push the declaration into class
5169         scope.
5170         (finish_struct_1): When popping the class, pop the bindings too.
5171         Remove check for data member/function member conflict.
5172         (finish_struct): Remove calls to
5173         check_member_decl_is_same_in_complete_scope.  Change calls to
5174         popclass.
5175         (pushclass): Clear names_used in the class stack entry.
5176         Use invalidate_class_lookup_cache to remove cached entries, rather
5177         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
5178         before entering a new class.  Remove dead code.  Don't mess with
5179         current_function_decl when pushing declarations.
5180         (invalidate_class_lookup_cache): New function, split out from ...
5181         (popclass): Here.  Clean up names_used on our way out.
5182         (instantiate_type): Adjust.
5183         (build_self_reference): Don't push the declaration here.
5184         (maybe_note_name_used_in_class): New function.
5185         (note_name_declared_in_class): Likewise.
5186         * decl.c (add_binding): Change prototype.
5187         (find_class_binding_level): New function.
5188         (innermost_nonclass_level): Likewise.
5189         (current_binding_level): Update documentation.
5190         (inner_binding_level): Remove.  Replace with current_binding_level
5191         throughout.
5192         (push_binding_level): Remove special handling of
5193         class_binding_level.
5194         (pop_binding_level): Likewise.  Use find_class_binding_level.
5195         (suspend_binding_level): Likewise.
5196         (global_bindings_p): Use innermost_nonclass_level.
5197         (toplevel_bindings_p): Likewise.
5198         (namespace_bindings_p): Likewise.
5199         (pseudo_global_level_p): Likewise.
5200         (push_binding): Clear INHERITED_VALUE_BINDING_P.
5201         (add_binding): Check for illegal multiple declarations.  Return a
5202         value indicating whether or not the new binding was legal.
5203         (push_local_binding): Skip over class binding levels.  Check
5204         return value from add_binding.
5205         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
5206         note_name_declared_in_class.
5207         (pushlevel_class): Remove "fake out the rest of the compiler"
5208         code.
5209         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
5210         (clear_identifier_class_values): New function.
5211         (pop_from_top_level): Use it.
5212         (pop_everything): Tweak.
5213         (maybe_process_template_type_declaration): Don't push the
5214         declaration for the template here.
5215         (pushtag): Don't push tag declarations into class scope here.
5216         (pushdecl): Apply DeMorgan's law for readability.
5217         (pushdecl_class_level): Remove special-case code for
5218         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
5219         (push_class_level_bindng): Deal with inherited bindings.
5220         (lookup_name_real): Remove special-case code for
5221         TYPE_BEING_DEFINED, and some implicit typename magic.
5222         (grokdeclarator): Handle COMPONENT_REF for a template function.
5223         (build_enumerator): Don't call pushdecl_class_level here.
5224         (id_in_current_class): Remove.
5225         * decl2.c (grokfield): Don't call pushdecl_class_level or
5226         check_template_shadow.
5227         * errfn.c (cp_file_of): Don't declare.
5228         (cp_line_of): Likewise.
5229         * error.c (dump_decl): Handle an OVERLOAD.
5230         (cp_file_of): Likewise.
5231         (cp_line_of): Likewise.
5232         * init.c (build_member_call): Handle a COMPONENT_REF.
5233         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
5234         pushdecl_class_level.
5235         * method.c (hack_identifier): Build COMPONENT_REFs for references
5236         to member templates as well as member functions.  Remove dead
5237         code.
5238         * parse.y (left_curly): Remove.
5239         (nonnested_type): Call maybe_note_name_used_in_class, not
5240         pushdecl_class_level.
5241         * parse.c: Regenerated.
5242         (nested_name_specifier_1): Likewise.
5243         * pt.c (check_explicit_specialization): Adjust, for robustness.
5244         (check_template_shadow): Handle OVERLOADs.
5245         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
5246         TEMPLATE_DECL, if appropriate.
5247         * search.c (envelope_add_decl): Remove.
5248         (dfs_pushdecls): Likewise.
5249         (dfs_compress_decls): Likewise.
5250         (dfs_push_decls): New function.
5251         (dfs_push_type_decls): Likewise.
5252         (setup_class_bindings): Likewise.
5253         (template_self_reference_p): Likewise.
5254         (lookup_field_r): Use it.
5255         (looup_member): Remove old comment.  Deal with ambiguity.
5256         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
5257         and remove envelope processing.
5258         * semantics.c (begin_class_definition): Let pushclass push
5259         declarations for base classes.
5260         (finish_member_declaration): Push declarations into class scope.
5261         * typeck.c (build_component_ref): Just put an OVERLOAD into the
5262         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
5263         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
5264         * Makefile.in (class.o): Depend on splay-tree.h.
5266 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
5268         * cvt.c (convert_pointer_to_real): Use same_type_p.
5269         * typeck.c (comp_target_types): Use same_type_p.
5271 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
5273         * semantics.c (begin_inline_definitions,
5274         finish_inline_definitions): Rename from finish_default_args and
5275         begin_inline_definitions, respectively, to something that isn't a
5276         total lie.  :)
5277         * parse.y (structsp): Adjust.
5279         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
5280         (list_hash_lookup): Likewise.
5281         (hash_tree_chain): Adjust.
5282         * pt.c (tsubst): Adjust.
5283         (tsubst_arg_types): Use plain hash_tree_cons.
5284         * cp-tree.h (hash_tree_cons_simple): Lose.
5285         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
5287 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5289         * Makefile.in (hash.h): Generate using gperf language 'C', not
5290         'KR-C', so gperf uses the `const' keyword on strings.
5292         * gxx.gperf (resword): Const-ify a char*.
5294 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
5296         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
5297         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
5298         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
5299         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
5300         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
5301         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
5302         tree.c: Adjust.
5304 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
5306         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
5308 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
5310         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
5312 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
5314         * cp-tree.h (add_friend): Declare.
5315         (add_friends): Likewise.
5316         * friend.c (add_friend): Make it global.  Don't add to
5317         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
5318         (add_friends): Make it global.
5319         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
5320         befriending class is a template.
5321         * parse.y (component_decl_1): Fix typo in comment.
5322         * parse.c: Regenerated.
5323         * pt.c (instantiate_class_template): Use add_friend and
5324         add_friends rather that duplicating some of their functionality
5325         here.
5327 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
5329         * call.c (build_field_call): Unify 'this' and non-'this' cases.
5331         * typeck.c (build_indirect_ref): Check for 'this' sooner.
5333 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5335         * call.c (op_error): Const-ify a char*.
5336         (add_candidate, source_type, add_warning): Add static prototype.
5337         (print_z_candidates): Const-ify a char*.
5339         * class.c (resolve_address_of_overloaded_function,
5340         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
5341         (get_vtable_name, finish_struct_1): Const-ify a char*.
5343         * cvt.c (convert_to_reference): Likewise.
5345         * decl.c (redeclaration_error_message, record_builtin_type,
5346         record_unknown_type, member_function_or_else, bad_specifiers):
5347         Likewise.
5348         (find_binding, select_decl, unqualified_namespace_lookup,
5349         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
5350         Add static prototype.
5351         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
5352         implicitly_declare, record_builtin_java_type, define_function,
5353         grok_op_properties, tag_name): Const-ify a char*.
5355         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
5356         (define_function, finish_builtin_type): Const-ify a char*.
5357         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
5358         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
5359         (file_name_nondirectory): Const-ify a char*.
5360         (init_filename_times): Don't prototype.
5361         (compiler_error): Prototype.
5362         (yyerror, init_repo): Const-ify a char*.
5363         (build_srcloc): Don't prototype.
5364         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
5365         Const-ify a char*.
5366         (warn_for_assignment): Don't prototype.
5367         (convert_for_initialization, readonly_error, check_for_new_type,
5368         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
5369         Const-ify a char*.
5371         * decl2.c (acceptable_java_type, output_vtable_inherit,
5372         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
5373         merge_functions, decl_namespace, validate_nonmember_using_decl,
5374         do_nonmember_using_decl): Add static prototype.
5375         (lang_f_options): Const-ify a char*.
5376         (finish_builtin_type): Likewise.
5377         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
5378         prototype.
5380         * errfn.c: Include cp-tree.h.
5381         (cp_thing): Add static prototype.
5382         (compiler_error): Don't protoptype.
5383         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
5384         passing it to `cp_thing'.
5386         * error.c (interesting_scope_p): Add static prototype.
5388         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
5389         a char*.
5391         * init.c (compiler_error): Don't prototype.
5392         (member_init_ok_or_else): Const-ify a char*.
5393         (build_java_class_ref): Add static prototype.
5395         * lex.c (compiler_error): Don't prototype.
5396         (get_time_identifier, interface_strcmp, extend_token_buffer,
5397         handle_cp_pragma): Const-ify a char*.
5398         (is_global, init_filename_times): Add static prototype.
5399         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
5400         (compiler_error): Change from fixed args to variable args.
5401         (yyerror): Const-ify a char*.
5403         * parse.y (cond_stmt_keyword): Const-ify a char*.
5404         (parse_decl): Add static prototype.
5406         * pt.c (template_args_equal, print_template_context): Likewise.
5407         (print_candidates, check_default_tmpl_args): Const-ify a char*.
5408         (instantiate_class_template): Likewise.
5410         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
5412         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
5413         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
5415         * search.c (lookup_field_info, lookup_member): Likewise.
5416         (lookup_member): Cast the first argument of `bzero' to a PTR.
5418         * sig.c (compiler_error): Don't prototype.
5419         (build_signature_pointer_or_reference_nam): Const-ify a char*.
5420         (get_sigtable_name, build_member_function_pointer): Likewise.
5422         * tree.c (compiler_error): Don't prototype.
5423         (no_linkage_helper, build_srcloc): Add static prototype.
5424         (build_vbase_pointer_fields): Const-ify a char*.
5425         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
5427         * typeck.c (compiler_error): Don't prototype.
5428         (convert_for_assignment): Const-ify a char*.
5429         (comp_cv_target_types): Add static prototype.
5430         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
5431         build_component_addr, build_unary_op, convert_for_initialization):
5432         Const-ify a char*.
5434         * typeck2.c (ack): Add static prototype and change from fixed args
5435         to variable args.
5436         (readonly_error, check_for_new_type): Const-ify a char*.
5438         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
5439         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
5440         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
5441         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
5442         gen_assign, GNU_xref_member): Const-ify a char*.
5444 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5446         * gxxint.texi: Remove old discussion on copying virtual bases.
5448 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
5450         * Make-lang.in: Remove all references to g++.o/g++.c.
5451         Link g++ from gcc.o.
5453 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
5455         * decl2.c (comdat_linkage): Treat vtables like functions.
5457 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
5459         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
5461 1999-03-25  Nathan Sidwell  <nathan@acm.org>
5463         * decl.c (init_decl_processing): Add `signed' type as a synonym
5464         for `int'.
5466 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
5468         * typeck.c (common_type): Handle cv-qual unification for pointers
5469         to members.
5471         * decl.c (unqualified_namespace_lookup): Return error_mark_node
5472         on error.
5473         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
5474         * lex.c (do_identifier): If we got error_mark_node, call
5475         lookup_name again.
5477 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5479         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
5480         classes.
5482 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
5484         * decl.c (lookup_name_real): Do nested field lookup regardless of
5485         TYPE_BEING_DEFINED.
5487 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
5489         * cp-tree.h (lang_type): Remove has_assignment and
5490         has_real_assignment.  Add befriending_classes.
5491         (TYPE_HAS_ASSIGNMENT): Remove.
5492         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
5493         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
5494         (lang_decl): Document.
5495         (DECL_BEFRIENDING_CLASSES): New macro.
5496         (FRIEND_NAME): Move declaration to more obvious location.
5497         (FRIEND_DECLS): Likewise.
5498         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
5499         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
5500         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
5501         (grok_op_properties): Likewise.
5502         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
5503         (add_friend): Likewise.  Don't do weird things with assignment
5504         operators.  Update DECL_BEFRIENDING_CLASSES.
5505         (add_friends): Don't do weird things with assignment operators.
5506         (make_friend_class): Likewise.  Update
5507         CLASSTYPE_BEFRIENDING_CLASSES.
5508         * pt.c (instantiate_class_template): Don't set
5509         TYPE_HAS_ASSIGNMENT.
5510         (tsubst_copy): Substitute the TREE_TYPE for more unary
5511         expressions.
5512         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
5513         * search.c (protected_accessible_p): New function.
5514         (friend_accessible_p): Likewise.
5515         (accessible_p): Use them.
5517 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
5519         * pt.c (convert_nontype_argument): Don't create things that aren't
5520         PTRMEM_CSTs when applying a qualification conversion to a
5521         PTRMEM_CST.
5523 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
5525         * Makefile.in (OBJS): Don't mention hash.o.
5526         (OBJDEPS): Likewise.
5528 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
5530         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
5531         * decl.c (expand_static_init): Make sure we don't add any after
5532         then.
5534         * decl.c (cp_finish_decl): Move intelligence about handling
5535         DECL_COMDAT for variables from here...
5536         * decl2.c (comdat_linkage): ...to here.
5537         (maybe_make_one_only): Tweak.
5538         (import_export_decl): Call comdat_linkage for variables, too.
5539         (finish_file): Handle template statics properly.
5541 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
5543         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
5544         Document internals of pointer-to-member-functions.
5545         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
5546         (PFN_FROM_PTRMEMFUNC): Likewise.
5547         (build_type_conversion): Remove unused parameter.
5548         (build_ptrmemfunc1): Declare.
5549         (expand_ptrmemfunc_cst): New function.
5550         (delta2_from_ptrmemfunc): Likewise.
5551         (pfn_from_ptrmemfunc): Likewise.
5552         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
5553         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
5554         (convert_to_reference): Remove unused parameter to
5555         build_type_conversion.
5556         (ocp_convert): Likewise.
5557         (build_user_type_conversion): Likewise.
5558         * error.c (dump_expr): Handle NULL pointer-to-member functions.
5559         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
5560         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
5561         open when handling pointer-to-member functions.
5562         * pt.c (convert_nontype_argument): Clean up error messages.  Be
5563         more stringent with pointers-to-members.
5564         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
5565         (build_unary_op): Tidy ever-so-slightly.
5566         (build_conditional_expr): Remove extra parameter to
5567         build_type_conversion.
5568         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
5569         we're using.
5570         (expand_ptrmemfunc_cst): Define.
5571         (delta2_from_ptrmemfunc): Likewise.
5572         (pfn_from_ptrmemfunc): Likewise.
5574 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
5576         * init.c (build_member_call): Handle template-id expressions
5577         correctly.
5578         * typeck.c (build_x_function_call): Likewise.
5580 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
5582         * friend.c (make_friend_class): Avoid core dump when
5583         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
5585 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
5587         * decl.c (start_function): Suppress normal linkage heuristics
5588         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
5590 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
5592         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
5593         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
5595 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5597         * parse.y (named_complex_class_head_sans_basetype):
5598         Do not push a scope for error_mark_node.
5599         (maybe_base_class_list): Likewise.
5601         * decl.c (start_decl): Check for error_mark_node as a type.
5602         Detected by g++.brendan/array-refs.C.
5603         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
5604         (maybe_build_cleanup_1): Likewise.  Detected by
5605         g++.jason/incomplete1.C.
5607         * tree.c (build_dummy_object): Use void_zero_node instead of the
5608         error_mark_node.
5609         (is_dummy_object): Check for such a node.
5610         Detected by g++.bob/inherit1.C
5612 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
5614         * method.c (old_backref_index): Split out...
5615         (flush_repeats): From here.  Rename back from try_old_backref.
5616         (build_mangled_name): Put back some old-style repeat handling.
5618 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5620         * lex.c: Don't include setjmp.h.
5621         (parse_float): New static function.
5622         (pf_args): New struct.
5623         (real_yylex): Use them in call to `do_float_handler'.
5625 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
5627         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
5628         * tree.c (layout_basetypes): Not here.
5629         * search.c (dfs_search): Remove; no longer used.
5631 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
5633         * decl2.c (validate_nonmember_using_decl): Issue sensible
5634         error-messages on bogus qualifiers.
5636 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
5638         * call.c (add_function_candidate): Fix uninitialized variable.
5640         * Makefile.in (search.o): Add dependency on varray.h.
5642 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
5644         * decl.c (duplicate_decls): Use same_type_p.
5645         * method.c (try_old_backref): Renamed from flush_repeats.  Use
5646         same_type_p.  Don't try to handle repeats.  Return success.
5647         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
5648         calls from old-style code, too.
5649         (check_ktype): Use same_type_p.
5650         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
5651         (build_qualified_name): Simplify logic.
5652         (process_overload_item): Strip typedefs and quals at the top.
5653         (build_mangled_name_for_type_with_Gcode): Remove call to
5654         type_canonical_variant.
5655         (build_mangled_name): Likewise.  Remove support for old-style
5656         repeats, which have been disabled since 2.7.2.  Don't mess with
5657         TREE_USED.
5658         (build_decl_overload_real): Don't mess with TREE_USED.
5660 1999-03-13  Nathan Sidwell  <nathan@acm.org>
5662         * error.c (cp_printers): Add 'F' escape character.
5663         (dump_type_real): Remove TREE_LIST (fnargs) printing.
5664         Functionality moved to dump_parameters.
5665         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
5666         (dump_function_decl): Extend meaning of V parameter.  Use
5667         dump_parameters and dump_exception_spec.
5668         (dump_parameters): New static function.
5669         (dump_exception_spec): New static function.
5670         (fndecl_as_string): Change argument semantics.  Use
5671         dump_function_decl directly.
5673         * sig.c (build_signature_table_constructor): Use cp_error.
5675 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5677         * semantics.c (finish_switch_cond): Handle error cases gracefully.
5678         Detected by g++.law/enum5.C.
5680         * typeck.c (build_modify_expr): Check for errors after resolving
5681         offsets.  Detected by g++.brendan/static1.C.
5683         * decl.c (complete_array_type): Ignore initial_value if it is an
5684         error.  Detected by g++.benjamin/17930.C.
5686         * typeck2.c (process_init_constructor): Return error if one argument
5687         is in error.  Detected by g++.benjamin/13478.C.
5689 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5691         * decl.c (select_decl): Allow class templates when we need types.
5692         * decl2.c (ambiguous_decl): Likewise.
5694 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
5696         * lex.c (do_identifier): Correct call to enforce_access.
5697         * search.c (accessible_p): Tweak comment.
5699 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
5701         * semantics.c (begin_class_definition): Call build_self_reference.
5702         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
5704         * search.c (assert_canonical_unmarked): Fix typo in prototype.
5706         * search.c (dfs_canonical_queue): New function.
5707         (dfs_assert_unmarked_p): Likewise.
5708         (assert_canonical_unmarked): Likewise.
5709         (access_in_type): Use it.
5710         (accessible_p): Likewise.  Walk the whole tree when umarking.
5712         * sig.c (build_signature_table_constructor): Use accessible_p
5713         instead of compute_access.
5715 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
5717         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
5719 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
5721         * cp-tree.h (flag_access_control): Declare.
5722         (TREE_VIA_PPUBLIC): Document.
5723         (DECL_NONSTATIC_MEMBER_P): New macro.
5724         (enforce_access): Return an indication of whether or not access
5725         was permitted.
5726         (build_self_reference): Change prototype.
5727         (compute_access): Replace with ...
5728         (accessible_p): New function.
5729         (dfs_walk): Change prototype.
5730         (dfs_unmark): Likewise.
5731         (markedp): Likewise.
5732         * call.c (enforce_access): Use accessible_p.
5733         * class.c (build_self_reference): Insert the declaration into the
5734         list of members for this type, and make it public.
5735         * decl.c (xref_basetypes): Avoid ill-timed recursion.
5736         * init.c (build_offset_ref): Use lookup_member, not three separate
5737         name-lookups.  Call enforce_access rather than checking for
5738         illegal accesses here.
5739         (resolve_offset_ref): Likewise.
5740         * lex.c (do_identifier): Likewise.
5741         * method.c (hack_identifier): Likewise.
5742         * parse.y (self_reference): Remove.
5743         (opt_component_decl_list): Don't use it.
5744         * parse.c: Regenerated.
5745         * pt.c (print_candidates): Generalize to handle lists of
5746         overloaded functions.
5747         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
5748         not set.
5749         (get_template_base): Use new calling convention for dfs_walk.
5750         * search.c: Include varray.h.  Add prototypes.
5751         (dfs_walk): Accept a data pointer to pass to the work functions.
5752         All callers changed.  All work functions changed.
5753         (breadth_first_search): Rename to bfs_walk, and make consistent
5754         with dfs_walk.
5755         (dfs_walk_real): New function.
5756         (canonical_binfo): New function.
5757         (context_for_name_lookup): Likewise.
5758         (shared_marked_p): Likewise.
5759         (shared_unmarked_p): Likewise.
5760         (lokup_field_queue_p): Likewise.
5761         (lookup_field_r): Generalize to handle both functions and fields.
5762         (lookup_field): Just call lookup_member.
5763         (lookup_fnfields): Likewise.
5764         (lookup_member): Move body of lookup_field here and generalize.
5765         (dfs_accessible_queue_p): Likewise.
5766         (dfs_accessible_p): Likewise.
5767         (dfs_access_in_type): Likewise.
5768         (access_in_type): Likewise.
5769         (compute_access): Remove, and replace with ...
5770         (accessible_p): New function.
5771         (vbase_types): Remove.
5772         (vbase_decl_ptr_intermediate): Likewise.
5773         (vbase_decl_ptr): Likewise.
5774         (vbase_init_result): Likewise.
5775         (closed_envelopes): Likewise.
5776         (bvtable): Likewise.
5778 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
5780         * call.c (add_function_candidate): Check for proper number of args
5781         before checking the validity of those args.
5783 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
5785         * cp-tree.h (struct lang_type): Add anon_union field.
5786         (ANON_UNION_TYPE_P): Use it instead of examining type.
5787         (SET_ANON_UNION_TYPE_P): New macro.
5788         * decl.c (check_tag_decl): Use it.
5790         * search.c (compute_access): Handle non-type contexts earlier, and
5791         handle NULL_TREE.
5793         * tree.c (build_exception_variant): Use copy_to_permanent.
5795         * decl2.c (setup_initp): Give statics with no priority the default
5796         priority here.
5797         (do_dtors, do_ctors, finish_file): Remove special handling of
5798         non-prioritized statics.
5800 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
5802         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
5803         * decl.c (make_typename_type): Don't issue an error if an
5804         immediate lookup fails; it migt be resolved later.
5805         * friend.c (is_friend): Add comment.
5806         * search.c (breadth_first_search): Add POSTFN and DATA
5807         parameters.  Tidy.  All callers changed.
5808         (lookup_field_queue_p): New function.
5809         (lookup_field_r): Likewise.
5810         (lookup_field_post): Likewise.
5811         (lookup_field): Use them, via breadth_first_search, instead of
5812         duplicating logic.
5813         (compute_access): Robustify.
5814         (lookup_fnfield_info): New structure.
5816 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
5818         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
5820 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
5822         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
5823         cc happy.
5825         * decl2.c (import_export_class): Also return if
5826         CLASSTYPE_INTERFACE_ONLY is set.
5828 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5830         * decl.c (push_overloaded_decl): Only overwrite the old binding if
5831         there was one.
5832         * decl2.c (do_local_using_decl): Fix loop termination.
5834 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
5836         * cp-tree.h (determine_specialization): Don't declare.
5837         * pt.c (determine_specialization): Make it static.  Eliminate
5838         complain parameter.  Note that decl is always non-NULL now, and
5839         simplify accordingly.
5841         * decl.c (maybe_push_to_top_level): Always call
5842         push_cp_function_context.
5843         (pop_from_top_level): Always call pop_cp_function_context.
5845 1999-02-26  Nathan Sidwell  <nathan@acm.org>
5847         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
5848         diagnostics.
5849         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
5850         * init.c (build_new_1): Extra arg to complete_type_or_else.
5851         (build_delete): Likewise.
5852         * typeck.c (require_complete_type): Likewise.
5853         (pointer_int_sum): Likewise.
5854         (pointer_diff): Likewise.
5855         (build_component_ref): Likewise.
5857         * typeck2.c (incomplete_type_error): Always use cp_error.
5858         Show declaration of undefined type, if appropriate.
5859         Deal with UNKNOWN_TYPE nodes.
5861         * typeck.c (require_complete_type): Use TYPE_SIZE as
5862         size_zero_node to mean incomplete type.
5863         (require_complete_type_in_void): New function.
5864         (build_compound_expr): Call complete_type_in_void for LHS.
5865         (build_c_cast): Call complete_type_in_void for void cast.
5866         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
5867         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
5868         require_complete_type_in_void.  Call it.
5869         * cp-tree.h (require_complete_type_in_void): Prototype new function.
5871         * typeck.c (convert_arguments): Use alternative format for
5872         function decls.  Don't require_complete_type here.  Simplify
5873         diagnostic printing.
5874         (convert_for_initialization): Don't require_complete_type on RHS yet.
5875         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
5877         * call.c (build_over_call): Cope with qualified void return type.
5878         * semantics.c (finish_call_expr): Likewise.
5879         * typeck.c (build_function_call_real): Likewise.
5880         (c_expand_return): Likewise.
5881         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
5883         * call.c (print_z_candidates): Use alternate print format, to be
5884         consistent with (pt.c) print_candidates.
5885         * method.c (hack_identifier): List candidate members.
5886         * search.c (lookup_field): Build ambiguous list, and show it, if
5887         ambiguous.
5889 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
5891         * typeck.c (decay_conversion): Don't confuse constant array
5892         variables with their initializers.
5894         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
5895         merging decls.
5896         * pt.c (regenerate_decl_from_template): Tweak for clarity.
5897         (instantiate_decl): Mark a decl instantiated before regenerating
5898         it to avoid recursion.
5899         * tree.c (mapcar): Don't call decl_constant_value unless we know
5900         something is TREE_READONLY_DECL_P.
5902         * class.c (check_for_override): Don't stop checking when we find
5903         the first overridden function.  Delete #if 0'd code.
5904         * search.c (get_matching_virtual): Likewise.
5906 1999-02-25  Richard Henderson  <rth@cygnus.com>
5908         * lang-specs.h: Define __FAST_MATH__ when appropriate.
5910 1999-02-24  Mike Stump  <mrs@wrs.com>
5912         * typeck.c (convert_for_assignment): Allow boolean integral constant
5913         expressions to convert to null pointer.
5915 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
5917         * decl.c (lookup_namespace_name): Resolve namespace aliases.
5919         * class.c (push_nested_class): Allow namespaces.
5921         * decl2.c (set_decl_namespace): Add friendp parameter.
5922         * decl.c (grokfndecl): Pass it.
5923         (grokvardecl): Likewise.
5924         * cp-tree.h: Change declaration.
5926 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
5928         * pt.c (tsubst): Allow an array of explicit size zero.
5930 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
5932         * errfn.c: Change varargs code to look like toplev.c.
5934         * method.c (process_modifiers): Don't prepend 'U' for char or
5935         wchar_t.
5937 1999-02-20  Craig Burley  <craig@jcb-sc.com>
5939         * Make-lang.in (cplib2.ready): Don't consider updating
5940         cplib2 stuff if the current directory isn't writable, as
5941         it won't work (such as during a `make install').
5943 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
5945         * decl2.c (start_objects): Make file scope constructors and
5946         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
5947         ASM_OUTPUT_DESTRUCTOR are defined.
5949 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
5951         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
5952         (fn_type_unification): Adjust prototype.
5953         (lookup_fnfields_1): Declare.
5954         * call.c (add_template_candidate_real): Adjust call to
5955         fn_type_unification.
5956         * class.c (add_method): Don't allow duplicate declarations of
5957         constructors or destructors.
5958         (resolve_address_of_overloaded_function): Remove unused variable.
5959         Adjust call to fn_type_unification.
5960         * decl.c (grokfndecl): Be more robust in the face of illegal
5961         specializations.
5962         * decl2.c (check_classfn): Remove hokey handling of member
5963         templates.
5964         * pt.c (determine_specialization): Improve comments.  Adjust to
5965         handle template argument deduction as per the standard.
5966         (check_explicit_specialization): Fix comment spacing.  Handle
5967         type-conversion operators correctly.  Improve error-recovery.
5968         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
5969         (get_bindings_real): Simplify handling of static members.
5970         * search.c (lookup_fnfields_1): Make it have external linkage.
5971         * typeck.c (compparms): Fix comment.
5972         (build_unary_op): Don't try to figure out which template
5973         specialization is being referred to when when the address-of
5974         operator is used with a template function.
5976 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5978         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
5979         keyword to match an analogous change at the top level.
5981         * tree.c (lvalue_or_else): Likewise.
5983 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
5985         * decl.c (xref_basetypes): Comment.
5986         * pt.c (instantiate_class_template): Use xref_basetypes.
5988 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
5990         * cp-tree.h (tsubst): Change prototype.
5991         (tsubst_expr): Likewise.
5992         (tsubst_copy): Likewise.
5993         (type_unification): Remove prototype.
5994         * call.c (convert_default_arg): Adjust call to tsubst_expr.
5995         * class.c (resolve_address_of_overloaded_function): Just use
5996         fn_type_unification.
5997         * decl.c (grokdeclarator): Adjust call to tsubst.
5998         * method.c (build_template_parm_names): Likewise.
5999         * pt.c (GTB_VIA_VIRTUAL): New macro.
6000         (GTB_IGNORE_TYPE): Likewise.
6001         (resolve_overloaded_unification): Add `complain' parameter.
6002         (try_one_overload): Likewise.
6003         (tsubst_template_arg_vector): Likewise.
6004         (tsubst_template_parms): Likewise.
6005         (tsubst_aggr_type): Likewise.
6006         (tsubst_arg_types): Likewise.
6007         (tsubst_call_declarator_parms): Likewise.
6008         (unify): Remove explicit_mask.
6009         (type_unification_real): Likewise.
6010         (get_template_base_recursive): Likewise.
6011         (coerce_template_template_parms): Provide prototype.
6012         (tsubst_function_type): Likewise.
6013         (try_class_unification): New function.
6014         All callers changed to use new complain parameter.
6015         (get_template_base): Use try_class_unification.
6016         (unify): Adjust handling of classes derived from template types.
6017         (fn_type_unification): Substitute explicit arguments before
6018         unification.
6020 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
6022         * decl.c (pushdecl): Remove dead code.
6024 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
6026         * decl2.c (finish_objects): Fix code I missed in previous change.
6028 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
6030         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
6031         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
6033         * pt.c (maybe_process_partial_specialization): Complain about
6034         'template <>' on non-specialization.
6036 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
6038         * decl.c (grokdeclarator): Catch wierd declarators.
6039         * decl2.c (finish_file): Don't abort because of namespace parsing
6040         failure.
6041         (check_decl_namespace): Remove.
6043 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
6045         * cp-tree.h (get_template_base): Don't declare.
6046         (dfs_walk): Declare.
6047         (dfs_unmark): Likewise.
6048         (markedp): Likewise.
6049         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
6050         targs to get_template_base.
6051         (get_template_base_recursive): Move here from search.c.  Check to
6052         see that the base found can be instantiated to form the desired
6053         type.
6054         (get_template_base): Likewise.
6055         (get_class_bindings): Simplify.
6056         * search.c (get_template_base_recursive): Move to pt.c.
6057         (get_template_base): Likewise.
6058         (markedp): Make it global.
6059         (dfs_walk): Likewise.
6060         (dfs_unmark): Likewise.
6062 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
6064         * pt.c (maybe_process_partial_specialization): Complain about
6065         specialization in wrong namespace.
6066         * tree.c (decl_namespace_context): New fn.
6068 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
6070         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
6071         * pt.c (coerce_template_template_parms): Handle nested
6072         template template parameters.
6074 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
6076         * typeck2.c: Update email addresses.
6078 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
6080         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
6081         turned off.
6083 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
6085         * lex.c (retrofit_lang_decl): Split out...
6086         (build_lang_decl): From here.
6087         * decl.c (pushdecl): Call it for functions generated by the middle
6088         end that don't have DECL_LANG_SPECIFIC.
6089         * cp-tree.h: Declare it.
6091         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
6092         (start_objects, finish_objects): Only use special
6093         init_priority code if the user specified a priority.
6094         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
6095         objects.
6097 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
6099         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
6100         mkstemp.o.  Get them from libiberty now.
6101         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
6103 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
6105         * decl2.c (lang_decode_option): Use read_integral_parameter.
6107 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
6109         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
6110         before calling complete_type_or_else.
6112 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6114         * input.c (inline): Don't define, its handled by system.h.
6116 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
6118         * decl2.c: Don't define flag_no_ident here.  Don't process
6119         -f(no-)ident here.
6120         * cp-tree.h: Don't declare flag_no_ident here.
6121         * lang-specs.h: Map -Qn to -fno-ident.
6123 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
6125         * cp-tree.h (struct tree_binding): Replace scope field with a union.
6126         (BINDING_SCOPE): Adjust.
6127         * decl.c (BINDING_LEVEL): Adjust.
6129 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
6131         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
6132         member constants.
6134         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
6135         a ctor initializer.
6137         * tree.c (equal_functions): Fix name in prototype.
6139         * decl.c (push_local_binding): Add FLAGS argument.
6140         (pushdecl, push_overloaded_decl): Pass it.
6141         * decl2.c (do_local_using_decl): Likewise.
6142         * cp-tree.h: Adjust prototype.
6143         * decl.c (poplevel): Fix logic.
6145         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
6146         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
6147         (cat_namespace_levels): Don't loop forever.
6149 1999-01-25  Richard Henderson  <rth@cygnus.com>
6151         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
6153 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
6155         * class.c (resolve_address_of_overloaded_function): Mark the
6156         chosen function used.
6158         * call.c (build_call): Make sure that a function coming in has
6159         been marked used already.
6160         * decl.c (expand_static_init): Call mark_used instead of
6161         assemble_external.
6162         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
6163         alloc_eh_object, expand_throw): Likewise.
6164         * init.c (build_builtin_delete_call): Likewise.
6165         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
6166         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
6167         expand_generic_desc): Likewise.
6169 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6171         * tree.c (equal_functions): New function.
6172         (ovl_member): Call it.
6174 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
6176         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
6178 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6180         * decl.c (decls_match): Return 1 if old and new are identical.
6181         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
6183 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
6185         * decl.c (start_function): Make member functions one_only on windows.
6186         * decl2.c (import_export_decl): Likewise.
6188         * decl.c (grokdeclarator): Don't complain about implicit int in
6189         a system header.  Change same-name field check to not complain in
6190         a system header instead of within extern "C".
6192 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
6194         * cp-tree.h (PUSH_GLOBAL): New macro.
6195         (PUSH_LOCAL): Likewise.
6196         (PUSH_USING): Likewise.
6197         (namespace_bindings_p): Declare.
6198         (push_overloaded_decl): Likewise.
6199         * decl.c (push_overloaded_decl): Don't make it static.  Check for
6200         illegal declarations after using declarations here.
6201         (namespace_bindings_p): Likewise.
6202         (duplicate_decls): Don't consider declarations from different
6203         namespaces to be the same.
6204         (pushdecl): Use symbolic PUSH_ constants in calls to
6205         push_overloaded_decl.
6206         (push_overloaded_decl_1): Likewise.
6207         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
6208         (do_nonmember_using_decl): Check for illegal using declarations
6209         after ordinary declarations here.
6210         (do_local_using_decl): Call pushdecl to insert declarations.
6212 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
6214         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
6216 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
6218         * tree.c (build_cplus_array_type_1): Don't call build_array_type
6219         for types involving template parameters.
6221         * cp-tree.h (PARM_DECL_EXPR): Delete.
6222         (convert_default_arg): Change prototype.
6223         (check_default_argument): Declare.
6224         (search_tree): Likewise.
6225         * call.c (convert_default_arg): Take the function to which the
6226         default argument belongs as a parameter, and do any necessary
6227         instantiation here, instead of ...
6228         (build_over_call): Here.
6229         * decl.c (local_variable_p): New function.
6230         (check_default_argument): Likewise, split out and tidied from ...
6231         (grokparms): Here.
6232         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
6233         * pt.c (tsubst_call_declarator_parms): New function.
6234         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
6235         with CALL_EXPRs, rather than trying to be clever.
6236         (tsubst): Use tsubst_call_declarator_parms.
6237         * tree.c (search_tree): Don't make it static.
6238         * typeck.c (convert_arguments): Use new interface to
6239         convert_default_arg.
6241 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
6243         * error.c (dump_function_decl): Don't print the argument types for
6244         a function when the verbosity level is negative.
6246         * call.c (build_over_call): Check format attributes at call-time.
6248         * pt.c (tsubst_copy): Fix comment.
6249         (unify): Don't allow unification with variable-sized arrays.
6251         * semantics.c (finish_stmt_expr): When processing a template make
6252         the BIND_EXPR long-lived.
6254 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
6256         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
6257         (import_export_vtable): Not here.
6259 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
6261         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
6262         non-static member function.
6264 1999-01-18  Nathan Sidwell  <nathan@acm.org>
6266         * class.c (instantiate_type): Only diagnose illegal address of member
6267         function if complaining.
6269         * decl.c (lookup_name_real): Remove duplicate code.
6271 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
6273         * tree.c (copy_template_template_parm): Use permanent_obstack.
6275 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
6277         * pt.c (unify): Remove restrictions on deduction of argument
6278         of template template parameters.
6280 1999-01-18  Nathan Sidwell  <nathan@acm.org>
6282         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
6284         * class.c (resolve_address_of_overloaded_function): Show list of
6285         all candidates, when none of them match.
6287 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
6289         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
6290         definition of 'casting away const' in reinterpret_cast<>.
6292 1999-01-18  Graham  <grahams@rcp.co.uk>
6294         * cvt.c: Add include for decl.h, remove extern for
6295         static_aggregates which is now provided by decl.h.
6297         * Makefile.in (cvt.o): Add dependency for decl.h and missing
6298         dependencies for convert.h and flags.h.
6300 1999-01-18  Nathan Sidwell  <nathan@acm.org>
6302         * decl2.c (do_dtors): Set current location to that of the
6303         decl, for sensible diagnostics and debugging.
6304         (check_classfn): Issue `incomplete type' error, if
6305         class is not defined.
6307 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
6309         * cp-tree.h: Add prototype for bound_pmf_p.
6311 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
6312             Manfred Hollstein <manfred@s-direktnet.de>
6314         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
6315         -Wreturn-type.
6317 1999-01-16  Nathan Sidwell  <nathan@acm.org>
6319         * cp-tree.h (struct lang_type): Added has_mutable flag.
6320         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
6321         (TYPE_HAS_MUTABLE_P): New macro to read it.
6322         (cp_has_mutable_p): Prototype for new function.
6323         * class.c (finish_struct_1): Set has_mutable from members.
6324         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
6325         it contains a mutable.
6326         * typeck.c (cp_has_mutable_p): New function.
6328 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
6330         * pt.c (process_template_parm): Ignore top-level qualifiers on
6331         non-type parameters.
6333         * decl.c (start_function): Use current_function_parms in the call
6334         to require_complete_type_for_parms, not the probably empty
6335         DECL_ARGUMENTS.
6337 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
6339         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
6341         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
6342         that we don't suppress the other copies.
6343         * lex.c (handle_cp_pragma): Likewise.
6345 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
6347         * decl.c (grokdeclarator): Undo 1998-12-14 change.
6348         * tree.c (build_cplus_array_type_1): Likewise.
6349         * pt.c (instantiate_class_template): Remove misleading comment.
6350         (tsubst_aggr_type): Substitute if there are template parameters,
6351         regardless of whether or not they use template arguments.
6352         (unify): Likewise, but for unification.
6354 1999-01-12  Richard Henderson  <rth@cygnus.com>
6356         * cp-tree.h (flag_permissive): Declare extern.
6358 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
6360         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
6361         here.
6362         (lang_type): Add is_partial_instantiation.  Decrease width of
6363         dummy.
6364         (PARTIAL_INSTANTIATION_P): New macro.
6365         (OPERATOR_TYPENAME_P): Remove.
6366         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
6367         OPERATOR_TYPENAME_P.
6368         (grok_op_properties): Likewise.
6369         * friend.c (do_friend): Handle friends that are member functions
6370         correctly.
6371         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
6372         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
6373         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
6374         any more partial instantiation than is absolutely necessary for
6375         implicit typename.  Set PARTIAL_INSTANTIATION_P.
6376         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
6377         * semantics.c (begin_class_definition): Handle partial
6378         specializations of a type that was previously partially
6379         instantiated.
6381 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
6383         * g++spec.c (LIBSTDCXX): Provide default definition.
6384         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
6386 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6388         * Make-lang.in (g++.o): Depend on prefix.h.
6390 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
6392         * tree.c (bound_pmf_p): New fn.
6393         * typeck.c (build_c_cast): Use it.
6395         * decl.c (grok_op_properties): Use same_type_p.
6397 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6399         * Makefile.in (cvt.o): Depend on toplev.h.
6401         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
6403         * cvt.c: Include toplev.h.
6405         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
6406         definitions.
6408         * init.c (expand_vec_init): Initialize variable `itype'.
6410         * lex.c (yyerror): Cast the argument passed to a ctype function to
6411         an unsigned char.
6413         * method.c (build_mangled_C9x_name): Wrap prototype and definition
6414         in "HOST_BITS_PER_WIDE_INT >= 64".
6416         * typeck.c (build_binary_op): Mark parameter `convert_p' with
6417         ATTRIBUTE_UNUSED.
6419 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
6421         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
6422         * tree.c (build_exception_variant): Don't crash on empty throw
6423         specs.
6425 1998-12-18  DJ Delorie  <dj@cygnus.com>
6427         * cvt.c (convert_to_reference): Check for both error_mark_node
6428         and NULL_NODE after call to convert_for_initialization.
6430 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
6432         * error.c (interesting_scope_p): New fn.
6433         (dump_simple_decl): Use it.
6434         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
6435         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
6437 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
6439         * class.c (resolve_address_of_overloaded_function): Do conversion
6440         to correct type here, rather than ...
6441         (instantiate_type): Here.
6443         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
6444         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
6445         (decl_template_parm_p): Remove.
6446         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
6447         parameter.
6448         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
6449         * pt.c (push_inline_template_parms_recursive): Set it.
6450         (decl_template_parm_p): Remove.
6451         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
6452         (process_template_parm): Set it.
6454 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
6456         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
6457         if configured with cpplib.
6459 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
6461         * decl.c (poplevel): Make sure ns_binding is initialized.
6463         * decl.c (finish_function): Undo inadvertent change in previous
6464         patch.
6466 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
6468         * class.c (pushclass): Tweak handling of class-level bindings.
6469         (resolve_address_of_overloaded_function): Update pointer-to-member
6470         handling.
6471         (instantiate_type): Likewise.
6472         * cvt.c (cp_convert_to_pointer): Likewise.
6473         * decl.c (pop_binding): Take the DECL to pop, not just the name.
6474         Deal with `struct stat' hack.
6475         (binding_level): Add to documentation.
6476         (push_binding): Clear BINDING_TYPE.
6477         (add_binding): New function.
6478         (push_local_binding): Use it.
6479         (push_class_binding): Likewise.
6480         (poplevel): Adjust calls to pop_binding.
6481         (poplevel_class): Likewise.
6482         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
6483         declarations to current binding level.
6484         (push_class_level_binding): Likewise.
6485         (push_overloaded_decl): Adjust handling of OVERLOADs in local
6486         bindings.
6487         (lookup_namespace_name): Don't crash when confronted with a
6488         TEMPLATE_DECL.
6489         (lookup_name_real): Do `struct stat' hack in local binding
6490         contexts.
6491         (build_ptrmemfunc_type): Adjust documentation.
6492         (grokdeclarator): Don't avoid building real array types when
6493         processing templates unless really necessary.
6494         (finish_method): Adjust calls to pop_binding.
6495         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
6496         not reparse_decl_as_expr.
6497         (build_expr_from_tree): Deal with a template-id as the function to
6498         call in a METHOD_CALL_EXPR.
6499         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
6500         (maybe_adjust_types_For_deduction): Don't do peculiar things with
6501         METHOD_TYPEs here.
6502         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
6503         pointer-to-member types where necessary.
6504         * tree.c (build_cplus_array_type_1): Don't avoid building real
6505         array types when processing templates unless really necessary.
6506         (build_exception_variant): Compare the exception lists correctly.
6508 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
6510         * cp-tree.def (CPLUS_BINDING): Update documentation.
6511         * cp-tree.h (LOCAL_BINDING_P): New macro.
6512         (lang_identifier): Rename local_value to bindings.
6513         (tree_binding): Make `scope' of type `void*', not `tree'.
6514         (BINDING_SCOPE): Update documentation.
6515         (IDENTIFIER_LOCAL_VALUE): Remove.
6516         (IDENTIFIER_CLASS_VALUE): Document.
6517         (IDENTIFIER_BINDING): New macro.
6518         (IDENTIFIER_VALUE): Likewise.
6519         (TIME_IDENTIFIER_TIME): Likewise.
6520         (TIME_IDENTIFIER_FILEINFO): Likewise.
6521         (IMPLICIT_TYPENAME_P): Likewise.
6522         (set_identifier_local_value): Remove.
6523         (push_local_binding): New function.
6524         (push_class_binding): Likewise.
6525         * class.c (pushclass): Update comments; use push_class_binding.
6526         * decl.c (set_identifier_local_value_with_scope): Remove.
6527         (set_identifier_local_value): Likewise.
6528         (push_binding): New function.
6529         (pop_binding): Likewise.
6530         (binding_level): Update documentation.  Remove shadowed.
6531         (BINDING_LEVEL): New macro.
6532         (free_binding_nodes): New variable.
6533         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
6534         BLOCK_VARs when doing for-scope extension.  Remove effectively
6535         dead code.
6536         (pushlevel_class): Tweak formatting.
6537         (poplevel_class): Adjust for new name-lookup scheme.
6538         (print_binding_level): Likewise.
6539         (store_bindings): Likewise.
6540         (pushdecl): Likewise.
6541         (pushdecl_class_level): Likewise.
6542         (push_class_level_binding): Likewise.
6543         (push_overloaded_decl): Update comments.  Adjust for new
6544         name-lookup scheme.
6545         (lookup_name_real): Likewise.
6546         (lookup_name_current_level): Likewise.
6547         (cp_finish_decl): Likewise.
6548         (require_complete_types_for_parms): Likewise.  Remove misleading
6549         #if 0'd code.
6550         (grok_parms): Likewise.  Don't call
6551         require_complete_types_for_parms here.
6552         (grok_ctor_properties): Don't treat templates as copy
6553         constructors.
6554         (grop_op_properties): Or as assignment operators.
6555         (start_function): Document.  Adjust for new name-lookup scheme.
6556         (finish_function): Likewise.
6557         * decl2.c (do_local_using_decl): Use push_local_binding.
6558         * lex.c (begin_definition_of_inclass_inline): New function, split
6559         out from ...
6560         (do_pending_inlines): Here, and ...
6561         (process_next_inline): Here.
6562         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
6563         (init_filename_times): Likewise.
6564         (extract_interface_info): Likewise.
6565         (ste_typedecl_interface_info): Likewise.
6566         (check_newline): Likewise.
6567         (dump_time_statistics): Likewise.
6568         (handle_cp_pragma): Likewise.
6569         (do_identifier): Adjust for new name-lookup scheme.
6570         * parse.y (function_try_block): Return ctor_initializer_opt value.
6571         (fndef): Use it.
6572         (fn.defpen): Pass appropriate values to start_function.
6573         (pending_inline): Use functor_try_block value, and pass
6574         appropriate values to finish_function.
6575         * pt.c (is_member_template): Update documentation; remove handling
6576         of FUNCTION_DECLs.  As per name, this function should deal only in
6577         TEMPLATE_DECLs.
6578         (decl_template_parm_p): Change name of olddecl parameter to decl.
6579         (check_template_shadow): Adjust for new name-lookup scheme.
6580         (lookup_template_class): Likewise.
6581         (tsubst_decl): Tweak so as not to confuse member templates with
6582         copy constructors and assignment operators.
6583         (unify): Handle UNION_TYPEs.
6584         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
6585         (lang_print_xnode): Adjust for new name-lookup scheme.
6586         * typeck.c (mark_addressable): Likewise.
6587         (c_expand_return): Likewise.
6589 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
6591         * decl.c (grokdeclarator): Allow field with same name as class
6592         in extern "C".
6594         * decl.c (lookup_name_real): Don't limit field lookup to types.
6595         * class.c (check_member_decl_is_same_in_complete_scope): No error
6596         if icv and x are the same.
6597         * lex.c (do_identifier): Tweak error message.
6599 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
6601         * decl.c (start_enum): Use push_obstacks, not
6602         end_temporary_allocation.
6603         (finish_enum): Call pop_obstacks.
6605 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
6607         * class.c (instantiate_type): Return error_mark_node rather than
6608         junk.
6610 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
6612         * cp-tree.h (most_specialized_instantiation): New function.
6613         (print_candidates): Likewise.
6614         * class.c (validate_lhs): Remove.
6615         (resolve_address_of_overloaded_function): New function, split out
6616         and then substantially reworked, from ...
6617         (instantiate_type): Use it.  Simplify.
6618         * cvt.c (convert_to_reference): Complain when caller has indicated
6619         that's the right thing to do.  Don't crash if instantiate_type
6620         fails.
6621         * pt.c: Substitute `parameters' for `paramters' throughout.
6622         (print_candidates): Don't make it static.
6623         (most_specialized_instantiation): Split out from ...
6624         (most_specialized): Here.
6626 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
6628         * lex.c (lang_init_options): Initialize cpplib.
6629         * decl2.c (parse_options,cpp_initialized): Removed.
6630         (lang_decode_option): Move initialization of cpplib to
6631         lang_init_options.
6633 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
6635         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
6636         well as the TYPE_DECL, when a typedef name is assigned to a
6637         previously anonymous type.
6639 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
6641         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
6642         __cp_eh_info for getting the eh info pointer.  Add table_index to
6643         field list.
6644         (push_eh_cleanup): Don't increment 'handlers' data field.
6645         (process_start_catch_block): Don't set the 'caught' field.
6647         * cp/exception.cc (CP_EH_INFO): New macro for getting the
6648         exception info pointer within library routines.
6649         (__cp_eh_info): Use CP_EH_INFO.
6650         (__start_cp_handler): Get exception info pointer, set caught field,
6651         and increment the handlers field.  Avoids this being done by handlers.
6652         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
6653         (uncaught_exception): Use CP_EH_INFO macro.
6655 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
6657         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
6659 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
6661         * lex.c (check_newline): Add support for \ as `natural'
6662         characters in file names in #line to be consistent with #include
6663         handling.  We support escape processing in the # 1 "..." version of
6664         the command.  See also support in cp/lex.c.
6666 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6668         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
6669         structure.
6671 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
6673         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
6675         * error.c (dump_simple_decl): Also print namespace context.
6676         (dump_function_decl): Likewise.
6678         * decl2.c (ambiguous_decl): Don't print old value if it's
6679         error_mark_node.
6681         * decl.c (lookup_name_real): Fix handling of local types shadowed
6682         by a non-type decl.  Remove obsolete code.
6683         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
6685         * lang-options.h: Add -fpermissive.
6686         * decl2.c: Likewise.
6687         * cp-tree.h: Add flag_permissive.
6688         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
6689         were specified, set flag_pedantic_errors.
6690         * call.c (build_over_call): Turn dropped qualifier messages
6691         back into pedwarns.
6692         * cvt.c (convert_to_reference): Likewise.
6693         * typeck.c (convert_for_assignment): Likewise.
6695 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
6697         * decl2.c (coerce_new_type): Use same_type_p.
6698         (coerce_delete_type): Likewise.
6700         * call.c (check_dtor_name): Return 1, not error_mark_node.
6702 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
6704         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
6705         if MULTIPLE_SYMBOL_SPACES.
6707         * pt.c (check_template_shadow): New fn.
6708         * decl2.c (grokfield): Use it.
6709         * decl.c (pushdecl): Likewise.
6710         (pushdecl_class_level): Likewise.
6711         (start_method): Likewise.
6712         (xref_tag): Don't try to use 't' if we're defining.
6714         * call.c (check_dtor_name): Just return an error_mark_node.
6715         * pt.c (lookup_template_class): Complain about using non-template here.
6716         * parse.y (apparent_template_type): Not here.
6718         * pt.c (check_explicit_specialization): Complain about specialization
6719         with C linkage.
6721         * lang-options.h: Add -f{no-,}implicit-inline-templates.
6723         * pt.c (convert_nontype_argument): Don't assume that any integer
6724         argument is intended to be a constant-expression.
6726 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
6728         * class.c (handle_using_decl): Fix comment.  Don't lookup
6729         constructors in base classes.
6730         (validate_lhs): Fix typo in comment.
6731         * search.c (lookup_field_1): Don't return a USING_DECL.
6733         * cp-tree.h (DECL_ACCESS): Improve documentation.
6735         * decl.c (expand_static_init): Don't set the initialization-done
6736         flag until the initialization is done.
6738 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
6740         * decl2.c (validate_nonmember_using_decl): Complain about using
6741         declarations for class members.
6743 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
6745         * typeck2.c (process_init_constructor): Use same_type_p.
6747         * decl.c (check_tag_decl): Don't warn about null decl inside a
6748         class.
6750         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
6751         UNIFY_ALLOW_NONE.
6752         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
6753         (resolve_overloaded_unification): Strip baselinks.
6755 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6757         * g++spec.c: Don't prototype xmalloc.
6759 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
6761         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
6763         * decl.c (check_tag_decl): Do complain about null friend decl at
6764         file scope.
6766 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
6768         * lex.c (make_lang_type): Clear the whole struct lang_type, not
6769         only the first multiple of sizeof (int).
6771 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
6773         * decl.c (start_decl): An explicit specialization of a static data
6774         member is only a definition if it has an initializer.
6776         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
6777         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
6778         cp_finish_decl.
6779         * init.c (expand_default_init): Check for DIRECT_BIND instead of
6780         DECL_ARTIFICIAL.
6782         * call.c (build_over_call): Use build_decl.
6784         * except.c (expand_throw): Just use convert, not
6785         build_reinterpret_cast.
6787         * lex.c (handle_generic_pragma): Use token_buffer.
6789         * decl.c (check_tag_decl): Don't complain about null friend decl.
6791 1998-11-24  Dave Pitts  <dpitts@cozx.com>
6793         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
6794         first position.
6795         * lex.c (check_newline): Use ISALPHA.
6796         (readescape): Use ISGRAPH.
6797         (yyerror): Use ISGRAPH.
6799 1998-11-24  Nathan Sidwell  <nathan@acm.org>
6801         * search.c (get_abstract_virtuals): Do not use initial
6802         CLASSTYPE_ABSTRACT_VIRTUALS.
6803         * typeck2.c (abstract_virtuals_error): Show location of abstract
6804         declaration.
6805         * call.c (build_new_method_call): Use
6806         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
6807         * class.c (finish_struct_bits): Don't bother working out whether
6808         get_abstract_virtuals will do anything, just do it.
6810 1998-11-24  Graham  <grahams@rcp.co.uk>
6812         * typeck.c (build_component_ref): Remove unused statement.
6814 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
6816         * class.c (add_method): Catch invalid overloads.
6818         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
6819         * search.c (lookup_conversions): Handle getting real OVERLOADs.
6820         (add_conversions): Likewise.  Revert last change.
6821         * call.c (add_conv_candidate): Pass totype to add_candidate instead
6822         of fn.  Don't add a new candidate if the last one was for the same
6823         type.
6824         (print_z_candidates): Handle getting a type as a function.
6825         (joust): If we got two conversion candidates to the same type,
6826         just pick one.
6827         (build_object_call): Lose 'templates'.
6828         (build_user_type_conversion_1): Handle getting real OVERLOADs.
6830 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
6832         * typeck2.c (process_init_constructor): If there are elements
6833         that don't have initializers and they need to have constructors
6834         run, supply them with initializers.
6836         * class.c (finish_struct_1): A class with a 0-width bitfield is
6837         still empty.
6839 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
6841         * pt.c (instantiate_class_template): Don't try to figure out what
6842         specialization to use for a partial instantiation.  Correct
6843         typos in a couple of comments.  Avoid calling uses_template_parms
6844         multiple times.
6846 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
6848         * method.c (process_overload_item): Add call to
6849         build_mangled_C9x_name for intTI_type_nodes.
6850         (build_mangled_C9x_name): Add prototype, define.
6851         * decl.c (init_decl_processing): Add names for
6852         TImode_type_node.
6854 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
6856         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
6858         * class.c (finish_struct_1): Set things up for 0-width bitfields
6859         like we do for others.
6861         * decl.c (check_tag_decl): New fn.
6862         (shadow_tag): Split out from here.
6863         * decl2.c (grok_x_components): Call it.
6865 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
6867         * decl.c: Lose warn_about_return_type.
6868         (grokdeclarator): Always complain about implicit int, except for
6869         `main () { ... }'.
6871         * decl.c (tag_name): New fn.
6872         (xref_tag): Complain about using typedef-name after class-key.
6874         * init.c (expand_vec_init): Also keep going if from_array.
6876         * tree.c (is_overloaded_fn): Also handle the output of
6877         build_offset_ref.
6879         * decl.c (grokdeclarator): Use constructor_name when comparing
6880         field name against enclosing class.
6881         * class.c (finish_struct_anon): Likewise.
6883 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
6885         * decl.c (poplevel): Remove code to handle KEEP == 2.
6886         (finish_function): Don't confuse BLOCK-order when
6887         processing a destructor.
6889 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
6891         * decl.c (require_complete_types_for_parms): Call layout_decl
6892         after we've completed the type.
6894 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6896         * decl2.c (validate_nonmember_using_decl): Allow using templates
6897         from the global namespace.
6899 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
6901         Handle specifying template args to member function templates.
6902         * tree.c (build_overload): Always create an OVERLOAD for a template.
6903         * search.c (add_conversions): Handle finding an OVERLOAD.
6904         * decl2.c (check_classfn): Likewise.
6905         * lex.c (identifier_type): See through a baselink.
6906         * parse.y (do_id): Don't call do_identifier if we got a baselink.
6907         * class.c (instantiate_type, case TREE_LIST): Recurse.
6909         * decl.c (grokdeclarator): Allow a boolean constant for array
6910         bounds, odd as that sounds.
6912         * pt.c (unify): Be more strict about non-type parms, except for
6913         array bounds.
6914         (UNIFY_ALLOW_INTEGER): New macro.
6916 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
6918         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
6920 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
6922         * semantics.c (begin_class_definition): Call
6923         maybe_process_partial_specialization before push_template_decl.
6924         Don't call push_template_decl for a specialization.
6925         * search.c (lookup_field): Do return a member template class.
6926         * decl2.c (handle_class_head): Handle member template classes.
6928         * decl.c (grokdeclarator): A parm type need not be complete.
6930         * pt.c (convert_nontype_argument): Fix thinko.
6932 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
6934         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
6935         (global_delete_fndecl): New variable.
6936         * decl.c (global_delete_fndecl): Define it.
6937         (init_decl_processing): Set it.
6938         * init.c (build_builtin_delete_call): Use it.
6939         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
6940         nodes.
6942 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
6944         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
6945         type.
6947         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
6948         * call.c (build_object_call): Also support references to functions.
6949         * typeck.c (convert_for_initialization): Don't decay a function
6950         if the target is a reference to function.
6952         * search.c (add_conversions): Get all the overloads from a class.
6954         * decl.c (grok_ctor_properties): Complain about any constructor
6955         that will take a single arg of the class type by value.
6957         * typeck2.c (build_functional_cast): Can't create objects of
6958         abstract classes this way.
6959         * cvt.c (ocp_convert): Likewise.
6961         * decl.c (grokfndecl): Member functions of local classes are not
6962         public.
6964 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
6966         * Make-lang.in (cc1plus): Add dependency on hash.o.
6968 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
6970         * search.c (get_abstract_virtuals): Complain about virtuals with
6971         no final overrider.
6972         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
6973         with no final overrider.
6974         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
6975         on virtuals with no final overrider.
6977         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
6979         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
6980         after layout_type.
6982         * friend.c (do_friend): Don't set_mangled_name_for_decl.
6984         * class.c (finish_struct_anon): Complain about non-fields.
6985         * decl2.c (build_anon_union_vars): Likewise.
6987         * decl.c (grokdeclarator): Normal data members can't have the same
6988         name as the class, either.
6989         * class.c (finish_struct_anon): Neither can members of an
6990         anonymous union.
6992 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
6994         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
6995         (TYPE_BINFO): Likewise.
6996         (IS_AGGR_TYPE): Tweak.
6997         (SET_IS_AGGR_TYPE): New macro.
6998         (CLASS_TYPE_P): Tweak.
6999         (lang_type): Group mark bitfields together.  Remove linenum.
7000         (CLASSTYPE_SOURCE_LINE): Remove macro.
7001         (CLASSTYPE_MARKED_N): New macro.
7002         (SET_CLASSTYPE_MARKED_N): Likewise.
7003         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
7004         (CLASS_TYPE_MARKED_*): Use them.
7005         (SET_CLASSTYPE_MARKED_*): Likewise.
7006         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
7007         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
7008         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
7009         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
7010         * class.c (class_cache_obstack): New variable.
7011         (class_cache_firstobj): Likewise.
7012         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
7013         (pushclass): Free the cache, when appropriate.
7014         (popclass): Tidy.
7015         (maybe_push_cache_obstack): Use class_cache_obstack.
7016         * decl.c (include hash.h).
7017         (typename_hash): New function.
7018         (typename_compare): Likewise.
7019         (build_typename_type): Check the hash table to avoid creating
7020         duplicates.
7021         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
7022         (grokdeclarator): Use CLASS_TYPE_P.
7023         (xref_basetypes): Likewise.
7024         (start_function): Likewise.  Don't put current_class_ref on the
7025         permanent obstack.
7026         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
7027         and TYPE_TI_ARGS.
7028         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
7029         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
7030         fields for types other than class types.  Do clear TYPE_ALIAS_SET
7031         for types other than class types, though.
7032         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
7033         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7034         * pt.c (process_template_parm): Don't set
7035         CLASSTYPE_GOT_SEMICOLON.
7036         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7037         Coerce arguments on the momentary obstack.
7038         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7039         (instantiate_class_template): Calculate template arguments on the
7040         momentary obstack.  Tidy.
7041         (tsubst_template_arg_vector): Use make_temp_vec.
7042         (tsubst_aggr_type): Put template arguments on the momentary
7043         obstack.
7044         (tsubst_decl): Likewise.
7045         (tsubst): Copy the array bounds index to the permanent obstack
7046         before building index types.  Use new macros.
7047         (unify): Use new macros.
7048         (do_type_instantiation): Likewise.
7049         * search.c (lookup_fnfields_1): Use new macros.
7050         (dfs_pushdecls): Build envelopes on the cache obstack.
7051         (dfs_compress_decls): Use new macros.
7052         (push_class_decls): Build on the cache obstack.
7053         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
7054         * sign.c (build_signature_pointer_or_reference_type): Use
7055         SET_IS_AGGR_TYPE.
7056         * tree.c (make_binfo): Check CLASS_TYPE_P.
7057         (copy_template_template_parm): Adjust.
7058         (make_temp_vec): Use push_expression_obstack.
7059         * typeck.c (complete_type): Use new macros.
7060         (comptypes): Likewise.
7062 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
7064         * pt.c (tsubst): Add diagnostics for invalid array, reference
7065         and pointer to member types.
7067 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
7069         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
7071         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
7072         Simplify.
7074         * parse.y (structsp): Fix cut-and-paste error.
7076         * init.c (build_new): Complain about non-integral size.
7078         * parse.y (unary_expr): Complain about defining types in sizeof.
7080         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
7082         * rtti.c (build_x_typeid): Complain about typeid without
7083         including <typeinfo>.
7084         (get_typeid): Likewise.  Complain about typeid of incomplete type.
7085         (get_tinfo_fn_dynamic): Likewise.
7086         (get_typeid_1): Not static anymore.
7087         * except.c (build_eh_type_type): Use get_typeid_1.
7089         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
7090         ambiguous or private bases.  Fix warning for reference cast.
7092 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
7094         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
7095         * decl.c (duplicate_decls): Remove special-case code to deal with
7096         template friends, and just do the obvious thing.
7097         * pt.c (register_specialization): Tweak for clarity, and also to
7098         clear DECL_INITIAL for an instantiation before it is merged with a
7099         specialization.
7100         (check_explicit_specialization): Fix indentation.
7101         (tsubst_friend_function): Handle both definitions in friend
7102         declaration and outside friend declarations.
7103         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
7104         (regenerate_decl_from_template): Tweak accordingly.
7105         (instantiate_decl): Likewise.
7107 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
7109         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
7110         member function reference to error.
7111         * cvt.c (ocp_convert): Complain about converting an overloaded
7112         function to void.
7114         * init.c (build_offset_ref): Just return a lone static member
7115         function.
7117         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
7118         not internal ones.
7120         * typeck.c (build_binary_op_nodefault): Improve error handling.
7122         * decl.c (grokfndecl): Complain about making 'main' a template.
7124         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
7126         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
7127         TYPE_DECL in a template.
7129 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
7131         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
7133         * decl.c (struct cp_function): Add named_label_uses.
7134         (push_cp_function_context): Save it.
7135         (pop_cp_function_context): Restore it.
7136         (define_label): Also complain about jumping into the scope of
7137         non-POD objects that don't have constructors.
7138         * tree.c (pod_type_p): New fn.
7140         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
7141         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
7142         (get_tinfo_fn): Not here.
7143         * repo.c (repo_get_id): Abort if we get called for an incomplete
7144         type.
7146 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
7148         * except.c (expand_throw): Make sure first argument to
7149         __cp_push_exception is of type `void*' to avoid spurious error
7150         messages.
7152 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
7154         * pt.c (try_one_overload): Take orig_targs again.  Only check for
7155         mismatches against them; we don't care what a previous call found.
7156         (resolve_overloaded_unification): Adjust.
7158         * search.c (lookup_field): Don't return anything for a non-type
7159         field from a dependent type.
7160         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
7161         in an array declarator.
7162         (start_decl): Push into the class before looking for the field.
7164 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
7166         * method.c (build_overload_value): Handle REFERENCE_TYPE.
7168 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7170         * decl.c (grokdeclarator): Allow namespace-scoped members if they
7171         are friends.
7173 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
7175         * pt.c (tsubst_decl): Don't mess with the global value of an
7176         un-mangled DECL_ASSEMBLER_NAME.
7178 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
7180         * decl.c (init_decl_processing): Remove CYGWIN conditional
7181         since CYGWIN is now able to deal with trapping signals.
7183 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7185         * cp-tree.h: Don't include gansidecl.h.
7186         * exception.cc: Include gansidecl.h (since we don't include config.h)
7187         * g++spec.c: Don't include gansidecl.h.
7189 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
7191         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
7192         size of dummy.
7193         (DECL_DEFINED_IN_CLASS_P): New macro.
7194         (TEMPLATE_PARMS_FOR_INLINE): Document.
7195         (check_static_variable_definition): New function.
7196         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
7197         appropriate.
7198         (check_static_variable_definition): Split out from ...
7199         (grokdeclarator): Here.
7200         * pt.c (check_default_tmpl_args): New function, split out from ...
7201         (push_template_decl_real): Here.
7202         (instantiate_template): Fix comment.
7204 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
7206         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
7207         (CP_TYPE_VOLATILE_P): Likewise.
7208         (CP_TYPE_RESTRICT_P): Likewise.
7210 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
7212         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
7214 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
7216         * class.c (instantiate_type): Be more helpful.
7218         * decl2.c (import_export_decl): Call import_export_class.
7220         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
7221         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
7222         * pt.c (tsubst_copy): Likewise.
7224 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
7226         * init.c (expand_vec_init): Fix off-by-one error.
7228 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
7230         * parse.y (apparent_template_type): New type.
7231         (named_complex_class_head_sans_basetype): Use it.
7232         * Makefile.in (CONFLICTS): One new conflict.
7233         * parse.c: Regenerated.
7235 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
7237         * cp-tree.h (COMPARE_STRICT): New macro.
7238         (COMPARE_BASE): Likewise.
7239         (COMPARE_RELAXED): Likewise.
7240         (COMPARE_REDECLARATION): Likewise.
7241         (same_type_p): Likewise.
7242         (same_or_base_type_p): Likewise.
7243         * call.c (standard_conversion): Use them, in place of comptypes
7244         with numeric arguments.
7245         (reference_binding): Likewise.
7246         (convert_like): Likewise.
7247         (build_over_call): Likewise.
7248         (is_subseq): Likewise.
7249         (is_properly_derived_from): Likewise.
7250         (compare_ics): Likewise.
7251         (joust): Likewise.
7252         * class.c (delete_duplicate_fields_1): Likewise.
7253         (resolves_to_fixed_type_p): Likewise.
7254         (instantiate_type): Likewise.  Remove #if 0'd code.
7255         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
7256         (pushdecl): Likewise.
7257         (lookup_name_real): Likewise.
7258         (grokdeclarator): Likewise.  Check for illegal array declarations.
7259         (grokparms): Likewise.
7260         (grok_op_properties): Likewise.
7261         * decl2.c (check_classfn): Likewise.
7262         * friend.c (is_friend): Likewise.
7263         (make_friend_class): Likewise.
7264         * init.c (expand_aggr_init): Likewise.
7265         (expand_vec_init): Likewise.
7266         * pt.c (is_member_template_class): Remove declaration.
7267         (is_specialization_of): Use COMPARE_* and new macros.
7268         (comp_template_parms): Likewise.
7269         (convert_nontype_argument): Likewise.
7270         (coerce_template_template_parms): Likewise.
7271         (template_args_equal): Likewise.
7272         (lookup_template_class): Likewise.
7273         (type_unification_real): Likewise.
7274         (unify): Likewise.
7275         (get_bindings_real): Likewise.
7276         * search.c (covariant_return_p): Likewise.
7277         (get_matching_virtual): Likewise.
7278         * sig.c (match_method_types): Likewise.
7279         * tree.c (vec_binfo_member): Likewise.
7280         (cp_tree_equal): Likewise.
7281         * typeck.c (common_type): Likewise.
7282         (comp_array_types): Likewise.  Get issues involving unknown array
7283         bounds right.
7284         (comptypes): Update comments.  Use new flags.
7285         (comp_target_types): Use new macros.
7286         (compparms): Likewise.
7287         (comp_target_parms): Likewise.
7288         (string_conv_p): Likewise.
7289         (build_component_ref): Likewise.
7290         (build_indirect_ref): Likewise.
7291         (build_conditional_expr): Likewise.
7292         (build_static_cast): Likewise.
7293         (build_reinterpret_cast): Likewise.
7294         (build_const_cast): Likewise.
7295         (build_modify_expr): Likewise.
7296         (convert_for_assignment): Likewise.
7297         (comp_ptr_ttypes_real): Likewise.
7298         (ptr_reasonably_similar): Likewise.
7299         (comp_ptr_ttypes_const): Likewise.
7301 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
7303         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
7305 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
7307         * decl2.c (delete_sanity): Pass integer_zero_node, not
7308         integer_two_node, to build_vec_delete.
7309         * init.c (build_array_eh_cleanup): Remove.
7310         (expand_vec_init_try_block): New function.
7311         (expand_vec_init_catch_clause): Likewise.
7312         (build_vec_delete_1): Don't deal with case that auto_delete_vec
7313         might be integer_two_node anymore.
7314         (expand_vec_init): Rework for initialization-correctness and
7315         exception-correctness.
7316         * typeck2.c (process_init_constructor): Make mutual exclusivity
7317         of cases more obvious.
7319 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
7321         * decl.c (lookup_name_real): OK, only warn if not lexing.
7322         Simplify suggested fix.
7324         * cp-tree.h (IDENTIFIER_MARKED): New macro.
7325         * search.c (lookup_conversions): Use breadth_first_search.
7326         (add_conversions): Avoid adding two conversions to the same type.
7327         (breadth_first_search): Work with base binfos, rather
7328         than binfos and base indices.
7329         (get_virtual_destructor): Adjust.
7330         (tree_has_any_destructor_p): Adjust.
7331         (get_matching_virtual): Adjust.
7333         * pt.c (push_template_decl_real): Generalize check for incorrect
7334         number of template parms.
7335         (is_member_template_class): #if 0.
7337 1998-10-29  Richard Henderson  <rth@cygnus.com>
7339         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
7340         last.
7342 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
7344         * lex.c: Call check_newline from lang_init always.  After
7345         calling cpp_start_read, set yy_cur and yy_lim to read from the
7346         cpplib token buffer.
7348 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
7350         * class.c (instantiate_type): Don't consider templates for a normal
7351         match.
7353         * class.c (finish_struct_1): Don't complain about non-copy
7354         assignment ops in union members.
7356         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
7357         (prepare_fresh_vtable): Likewise.
7358         (finish_struct_1): Don't call import_export_class.
7359         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
7360         (finish_prevtable_vardecl): Lose.
7361         (finish_file): Don't call it.
7362         * pt.c (instantiate_class_template): Likewise.
7363         * cp-tree.h: Remove it.
7365         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
7366         * decl.c (finish_function): Not here.
7367         (start_function): Do set DECL_INITIAL.
7369         * pt.c (push_template_decl_real): Complain about default template
7370         args for enclosing classes.
7372         * call.c (add_function_candidate): Treat conversion functions
7373         as coming from the argument's class.
7374         * cp-tree.h (DECL_CONV_FN_P): New fn.
7375         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
7376         * class.c (add_method): Use DECL_CONV_FN_P.
7377         * decl2.c (check_classfn): Likewise.
7378         * error.c (dump_function_name): Likewise.
7379         (dump_function_decl): Likewise.
7380         * pt.c (fn_type_unification): Likewise.
7381         * search.c (add_conversions): Likewise.
7383 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
7385         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
7386         * method.c (hack_identifier): Also check for using RESULT_DECL
7387         from outer context.
7389 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
7391         * decl.c (grokdeclarator): Use type_quals, rather than constp,
7392         consistently.
7394 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
7396         * call.c (standard_conversion): instantiate_type here.
7397         (reference_binding): And here.
7398         (implicit_conversion): Not here.
7399         (build_op_delete_call): No need to cons up an OVERLOAD.
7400         * cvt.c (cp_convert_to_pointer): instantiate_type here.
7401         (convert_to_reference): And here.
7402         * decl.c (grok_reference_init): Not here.
7403         (grokparms): Or here.
7404         * typeck2.c (digest_init): Or here.
7405         * typeck.c (decay_conversion): Take the address of overloaded
7406         functions, too.
7407         (require_instantiated_type): Lose.
7408         (convert_arguments): Don't handle unknown types here.
7409         (build_c_cast): Likewise.
7410         (build_binary_op): Gut.
7411         (build_conditional_expr): Don't require_instantiated_type.
7412         (build_modify_expr): Likewise.
7413         (build_static_cast): Don't instantiate_type.
7414         (build_reinterpret_cast): Likewise.
7415         (build_const_cast): Likewise.
7416         (convert_for_initialization): Likewise.
7417         (build_ptrmemfunc): Use type_unknown_p.
7418         (convert_for_assignment): Also do default_conversion on overloaded
7419         functions.  Hand them off to ocp_convert.
7421 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
7423         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
7424         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
7426         * class.c (finish_struct_1): Use build_cplus_array_type to build
7427         array types.
7428         * decl.c (init_decl_processing): Likewise.
7429         * except.c (expand_end_eh_spec): Likewise.
7430         * search.c (expand_upcast_fixups): Simplify very slightly.
7432 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
7434         * decl.c (grokdeclarator): Complain about a variable using
7435         constructor syntax coming back null from start_decl.
7437         * friend.c (make_friend_class): Complain about trying to make
7438         a non-class type a friend.
7440         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
7441         (start_function): Not here.
7443 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
7445         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
7447 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
7449         * typeck2.c (process_init_constructor): Only skip anonymous fields
7450         if they are bitfields.
7452         * cp-tree.def (TYPEOF_TYPE): New code.
7453         * error.c (dump_type_real): Handle it.
7454         * pt.c (tsubst): Likewise.
7455         * tree.c (search_tree): Likewise.
7456         * semantics.c (finish_typeof): New fn.
7457         * parse.y (typespec): Use it.
7458         * cp-tree.h: Declare it.
7460 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
7462         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
7464 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
7466         * typeck.c (convert_arguments): Don't handle pmf references
7467         specially.
7469         * init.c (build_member_call): Don't try to convert to the base type
7470         if it's ambiguous or pedantic.
7472         * typeck2.c (check_for_new_type): Only depend on pedantic for
7473         C-style casts.
7475 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
7477         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
7478         non-converting constructors.
7480 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7482         * gxxint.texi: Correct documentation for n, N, Q, and B.
7484 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7486         * parse.y (condition): Convert VAR_DECL from reference to indirect
7487         reference.
7489 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
7491         * exception.cc (__cp_pop_exception): Free the original exception
7492         value, not the potentially coerced one.
7494 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
7496         * Makefile.in (hash.h): Run gperf when necessary.
7498         * cp-tree.h (CP_TYPE_READONLY): Remove.
7499         (CP_TYPE_VOLATILE): Likewise.
7500         (CP_TYPE_QUALS): New macro.
7501         (CP_TYPE_CONST_P): Likewise.
7502         (CP_TYPE_VOLATILE_P): Likewise.
7503         (CP_TYPE_RESTRICT_P): Likewise.
7504         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
7505         (cp_build_type_variant): Rename to ...
7506         (cp_build_qualified_type): New function.
7507         (c_apply_type_quals_to_decl): Declare.
7508         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
7509         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
7510         (cp_type_qual_from_rid): New function.
7511         (compparms): Remove unused parameter.  All callers changed.
7512         (cp_type_quals): New function.
7513         (at_least_as_qualified_p): Likewise.
7514         (more_qualified_p): Likewise.
7516         * call.c (standard_conversion): Replace calls to
7517         cp_build_type_variant with cp_build_qualified_type.  Use
7518         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
7519         compare them.  Use CP_TYPE_* macros to check qualifiers.
7520         (reference_binding): Likewise.
7521         (implicit_conversion): Likewise.
7522         (add_builtin_candidates): Likewise.
7523         (build_over_call): Likewise.
7524         * class.c (overrides): Compare all qualifiers, not just `const',
7525         on method declarations.
7526         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
7527         (convert_pointer_to_real): Likewise.
7528         (type_promotes_to): Likewise.
7529         * decl.c (check_for_uninitialized_const_var): New function.
7530         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
7531         (cp_finish_decl): Use check_for_uninitialized_const_var.
7532         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
7533         handle `restrict'.
7534         (grok_ctor_properties): Likewise.
7535         (grok_op_properties): Likewise.
7536         (start_function): Likewise.
7537         (rever_static_member_fn): Likewise.
7538         * decl2.c (grok_method_quals): Likewise.
7539         (grokfield): Likewise.
7540         * error.c (dump_readonly_or_volatile): Rename to ...
7541         (dump_qualifiers): New function.  Handle `restrict'.
7542         (dump_type_real): Use it.
7543         (dump_aggr_type): Likewise.
7544         (dump_type_prefix): Likewise.
7545         (dump_type_suffix): Likewise.
7546         (dump_function_decl): Likewise.
7547         (cv_as_string): Likewise.
7548         * gxx.gperf: Add __restrict and __restrict__.
7549         * gxxint.texi: Document `u' as used for `__restrict', and a few
7550         other previously undocumented codes.
7551         * hash.h: Regenerated.
7552         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
7553         (build_member_call): Likewise.
7554         (build_new_1): Likewise.
7555         * lex.c (init_parse): Add entry for RID_RESTRICT.
7556         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
7557         (cp_type_qual_from_rid): Define.
7558         * lex.h (enum rid): Add RID_RESTRICT.
7559         * method.c (process_modifiers): Deal with `restrict'.
7560         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
7561         * parse.c: Regenerated.
7562         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
7563         (tsubst_aggr_type): Likewise.
7564         (tsubst): Likewise.
7565         (check_cv_quals_for_unify): Likewise.
7566         (unify): Likewise.
7567         * rtti.c (init_rtti_processing): Likewise.
7568         (build_headof): Likewise.
7569         (get_tinfo_var): Likewise.
7570         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
7571         (expand_class_desc): Likewise.
7572         (expand_attr_desc): Likewise.
7573         (synthesize_tinfo_fn): Likewise.
7574         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
7575         (get_matching_virtual): Likewise.
7576         (expand_upcast_fixups): Likewise.
7577         * sig.c (build_signature_pointer_or_reference_name): Take
7578         type_quals, not constp and volatilep.
7579         (build_signature_pointer_or_reference_type): Likewise.
7580         (match_method_types): More CP_TYPE_QUALS conversion, etc.
7581         (build_signature_pointer_constructor): Likewise.
7582         (build_signature_method_call): Likewise.
7583         * tree.c (build_cplus_array_type): Likewise.
7584         (cp_build_type_variant): Rename to ...
7585         (cp_build_qualified_type): New function.  Deal with `__restrict'.
7586         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
7587         (build_exception_variant): Likewise.
7588         (mapcar): Likewise.
7589         * typeck.c (qualif_type): Likewise.
7590         (common_type): Likewise.
7591         (comptypes): Likewise.
7592         (comp_cv_target_types): Likewise.
7593         (at_least_as_qualified_p): Define.
7594         (more_qualified_p): Likewise.
7595         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
7596         (compparms): Likewise.
7597         (inline_conversion): Likewise.
7598         (string_conv_p): Likewise.
7599         (build_component_ref): Likewise.
7600         (build_indirect_ref): Likewise.
7601         (build_array_ref): Likewise.
7602         (build_unary_op): Likewise.
7603         (build_conditional_expr): Likewise.
7604         (build_static_cast): Likewise.
7605         (build_c_cast): Likewise.
7606         (build_modify_expr): Likewise.
7607         (convert_For_assignment): Likewise.
7608         (comp_ptr_ttypes_real): Likewise.
7609         (cp_type_quals): New function.
7611 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
7613         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
7614         (CP_TYPE_VOLATILE): Likewise.
7615         * decl.c (grokdeclarator): Use them.
7616         * tree.c (canonical_type_variant): Likewise.
7618 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7620         * parse.y (named_class_head): Push into class while parsing the
7621         base class list.
7622         * decl2.c (push_scope, pop_scope): New functions.
7623         * cp-tree.h: Declare them.
7624         * init.c (build_new_1): Delay cleanup until end of full expression.
7626 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
7628         * typeck.c (build_component_ref): Use of a type here is an error.
7630 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
7632         Revamp references to member functions.
7633         * method.c (hack_identifier): Call build_component_ref for a
7634         reference to a member function.
7635         * typeck.c (build_component_ref): Only return a single function
7636         if it's static.  Otherwise, return a COMPONENT_REF.
7637         (build_x_function_call): Handle a COMPONENT_REF.
7638         (build_unary_op): Handle all unknown-type things.
7639         * decl2.c (arg_assoc): Handle COMPONENT_REF.
7640         * class.c (instantiate_type): Complain if the function we get is a
7641         nonstatic member function.  Remove code for finding "compatible"
7642         functions.
7643         * pt.c (tsubst_copy): Handle NOP_EXPR.
7644         * tree.c (build_dummy_object): New fn.
7645         (maybe_dummy_object): New fn.
7646         (is_dummy_object): New fn.
7647         * cp-tree.h: Declare them.
7648         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
7649         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
7650         * init.c (build_member_call): Use maybe_dummy_object and
7651         is_dummy_object.
7652         (build_offset_ref): Use maybe_dummy_object.
7653         (resolve_offset_ref): Use is_dummy_object.
7654         * typeck.c (build_x_function_call): Call build_dummy_object.
7655         (unary_complex_lvalue): Call is_dummy_object.
7657         * typeck.c (build_component_addr): Make sure field is a field.
7659         * call.c (build_new_op): Delete obsolete code.
7661         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
7663 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7665         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
7666         std if std is ignored.
7668 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
7670         * decl.c (grokvardecl): Fix thinko.
7672         * decl.c (grokdeclarator): Embedded attrs bind to the right,
7673         not the left.
7675         * parse.y (fn.def2): Fix 'attrs' format.
7677 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
7679         * Makefile.in (CONFLICTS): Update.
7680         * parse.y (expr_or_declarator_intern): New rule.
7681         (expr_or_declarator, direct_notype_declarator, primary,
7682         functional_cast): Use it.
7683         (notype_declarator_intern): New rule.
7684         (notype_declarator, complex_notype_declarator): Use it.
7686 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
7688         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
7689         (grokvardecl): Likewise.
7691 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7693         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
7694         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
7696         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
7698         * pt.c (process_partial_specialization): Cast 1st argument of
7699         `bzero' to (PTR).
7701         * tree.c (build_base_fields): Cast `base_align' to (int) when
7702         comparing against one.
7704 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
7706         * decl.c (lookup_name_real): Handle template parameters for member
7707         templates where said parameters have the same name as the
7708         surrounding class.
7710         * decl.c (expand_static_init): Build cleanups before entering the
7711         anonymous function used to do them to avoid access-checking
7712         confusion.
7714         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
7715         accidentally removed by previous change, and make DECL_RTL here.
7716         * class.c (add_method): Don't make DECL_RTL here.
7718         * pt.c (for_each_template_parm): Don't examine uninstantiated
7719         default arguments.
7721 1998-10-16  Dave Brolley  <brolley@cygnus.com>
7723         * lex.c (real_yylex): Fix unaligned access of wchar_t.
7725 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
7727         * class.c (add_method): Fix documentation to reflect previous
7728         changes.  Check for duplicate method declarations here.
7729         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
7730         correctly; such things never match.
7731         (grokfndecl): Don't look for duplicate methods here.
7732         * decl2.c (check_classfn): Don't assume names are mangled.
7733         Don't add bogus member function declarations to a class before the
7734         class type is complete.
7735         (grokfield): Reformat error message.
7736         * method.c (set_mangled_name_for_decl): Don't mangle names while
7737         processing_template_decl.
7739 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
7741         * typeck.c (build_indirect_ref): Complain about a pointer to data
7742         member, too.
7743         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
7744         data member.
7745         * init.c (resolve_offset_ref): Don't undo the above.
7747         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
7748         (struct lang_decl_flags): Add `bitfield'.
7749         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
7750         DECL_BIT_FIELD.
7751         * decl2.c (grokbitfield, grok_alignof): Likewise.
7752         * init.c (build_offset_ref): Likewise.
7753         * typeck.c (build_component_addr, expr_sizeof): Likewise.
7754         * cvt.c (build_up_reference): Don't crash if taking the address
7755         returns error_mark_node.
7757         * decl.c (grokfndecl): Also check ctype when checking for ::main().
7759 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
7761         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
7762         Do mangling here.
7763         (grokdeclarator): Instead of here.
7764         * friend.c (do_friend): Lose special handling of ::main and
7765         __builtin_*.
7766         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
7768         * spew.c (yylex): Clear looking_for_typename if we got
7769         'enum { ... };'.
7771 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
7773         * class.c (maybe_warn_about_overly_private_class): Improve error
7774         messages for class with only private constructors.
7776         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
7777         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
7778         (build_typename_type): New function.
7779         * decl.c (build_typename_type): Broken out from ...
7780         (make_typename_type): Use it.
7781         * search.c (lookup_field): Likewise.
7783 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
7785         * pt.c (convert_nontype_argument): Check against type_referred_to.
7786         * decl.c (grokvardecl): Check for declarator name before building
7787         DECL_ASSEMBLER_NAME.
7789 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
7791         * pt.c (lookup_template_class): Add comment.
7792         (instantiate_class_template): Don't mark the _TYPE node for
7793         member class templates as an instantiation.
7795 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
7797         * decl.c (grokfndecl): Fix my thinko.
7799 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
7801         * tinfo2.cc (fast_compare): Remove.
7802         (before): Just use strcmp.
7803         * tinfo.cc (operator==): Just use strcmp.
7805 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
7807         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
7808         declarations.
7810 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
7812         * cp-tree.h (specializations_of_same_template_p): Remove.
7813         * search.c (get_template_base): Don't use it.
7814         (get_template_base_recursive): Likewise.
7815         * pt.c (specializations_of_same_template_p): Remove.
7816         (unify): Don't use it.
7817         (lookup_template_class): Find the correct parent when setting
7818         CLASSTYPE_TI_TEMPLATE.
7820 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
7822         * tinfo.cc (operator==): Always compare names.
7824 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
7826         * decl.c (start_function): Fix cut-and-paste error.
7828 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
7830         * inc/typeinfo: Add #pragma interface.
7831         (operator!=): Just call operator==.
7832         * tinfo.cc: Add #pragma implementation.
7833         (operator==): Move from inc/typeinfo and tinfo2.cc.
7834         Check __COMMON_UNRELIABLE instead of _WIN32.
7836         * typeck2.c (my_friendly_abort): Add URL.
7838 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
7840         * decl.c (start_method): Added extra parameter for attributes.
7841         * cp-tree.h (start_method): Update prototype.
7842         * parse.y (fn.def2): Update start_method parameter list.
7844 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
7846         * cp-tree.h (specializations_of_same_template_p): Declare.
7847         * pt.c (specializations_of_same_template_p): New function.
7848         (unify): Use it.
7849         * search.c (get_template_base): Use it.
7850         (get_template_base_recursive): Likewise.
7852 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
7854         * decl2.c (start_objects): Add new variable `joiner' and
7855         initialize it properly.
7857 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
7859         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
7860         change to vtable types.
7862         * cvt.c (ocp_convert): Avoid infinite recursion caused by
7863         1998-10-03 change.
7865 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
7867         * pt.c (resolve_overloaded_unification): New fn.
7868         (try_one_overload): Likewise.
7869         (unify): Don't fail on unknown type.
7870         (type_unification_real): Likewise.  Use resolve_overloaded_unification
7871         to handle an overloaded argument.
7872         (template_args_equal): Split out...
7873         (comp_template_args): From here.
7874         (determine_specialization): Also allow a template with more
7875         parms than were explicitly specified.
7876         * cp-tree.h: Add template_args_equal.
7877         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
7879 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
7881         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
7882         change.
7884 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
7886         * typeck.c (unsigned_type): Only return TItype nodes when
7887         HOST_BITS_PER_WIDE_INT is >= 64 bits.
7888         (signed_type): Likewise.
7889         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
7890         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
7891         (init_decl_processing): Only create TItype nodes when
7892         HOST_BITS_PER_WIDE_INT is >= 64 bits.
7893         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
7894         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
7896 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7898         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
7899         (gxx.gperf): Update comments describing invocation flags.
7900         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
7902 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
7904         * class.c (finish_struct_1): Add commentary on previous change.
7906         * cp-tree.h (vtbl_ptr_type_node): New variable.
7907         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
7908         already of the right type.
7909         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
7910         Simplify code to grow vtable.
7911         * decl.c (vtbl_ptr_type_node): Define.
7912         (init_decl_processing): Initialize it.
7914 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
7916         * cp-tree.def (PTRMEM_CST): New tree node.
7917         * cp-tree.h (ptrmem_cst): New type.
7918         (lang_type): Remove local_typedecls.
7919         (dummy): Increase to 12 bits from 11.
7920         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
7921         (PTRMEM_CST_CLASS): New macro.
7922         (PTRMEM_CST_MEMBER): Likewise.
7923         (current_access_specifier): New variable.
7924         (current_class_type): Remove duplicate declaration.
7925         (finish_struct): Change prototype.
7926         (unreverse_member_declarations): New function.
7927         (pushdecl_class_level): Change prototype.
7928         (grok_enum_decls): Remove.
7929         (fixup_anonymous_union): New function.
7930         (grok_x_components): Change prototype.
7931         (tsubst_chain): Remove.
7932         (finish_member_template_decl): Likewise.
7933         (check_explicit_specialization): Fix indentation.
7934         (finish_class_definition): Change prototype.
7935         (finish_member_class_template): Likewise.
7936         (finish_member_declaration): New function.
7937         (check_multiple_declarators): Likewise.
7938         * class.c (class_stack_node_t): New type.
7939         (current_class_base): Remove.
7940         (current_class_stack): Change type.
7941         (current_access_specifier): New variable.
7942         (grow_method): Remove.
7943         (check_member_decl_is_same_in_complete_scope): Break out from
7944         finish_struct.
7945         (make_method_vec): New function.
7946         (free_method_vec): Likewise.
7947         (add_implicitly_declared_members): Break out from finish_struct_1.
7948         (free_method_vecs): New variable.
7949         (add_method): Rework for direct use from parser.
7950         (handle_using_decl): Watch for NULL_TREE while iterating through
7951         CLASSTYPE_METHOD_VEC.
7952         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
7953         just do some error-checking.
7954         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
7955         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
7956         (finish_struct): Change prototype.  Simplify; fields and methods
7957         are already set up at this point.
7958         (init_class_processing): Set up current_class_stack.
7959         (pushclass): Save current_access_specifier.
7960         (popclass): Restore it.
7961         (currently_open_class): Simplify.
7962         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
7963         * decl.c (saved_scope): Add access_specifier.
7964         (maybe_push_to_top_level): Save it.
7965         (pop_from_top_level): Restore it.
7966         (maybe_process_template_type_declaration): Use
7967         finish_member_declaration.
7968         (pushtag): Likewise.
7969         (pushdecl_class_level): Don't return a value.
7970         (fixup_anonymous_union): Break out from grok_x_components.
7971         (shadow_tag): Use it.
7972         (xref_tag): Complain about using an elaborated type specifier to
7973         reference a template type parameter or typedef name.
7974         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
7975         (current_local_enum): Remove.
7976         (build_enumerator): Call finish_member_declaration.
7977         (grok_enum_decls): Remove.
7978         * decl2.c (grok_x_components): Simplify.
7979         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
7980         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
7981         (merge_functions): Add to comment.
7982         (arg_assoc_type): Prototype.
7983         (arg_assoc): Pass as many arguments as there are parameters.
7984         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
7985         OFFSET_REF.
7986         * expr.c (cpls_expand_expr): Remove dead code.  Handle
7987         PTRMEM_CST.
7988         * friend.c (do_friend): Lookup friends when in nested classes.
7989         Change comments.
7990         * init.c (build_offset_ref): Do lookup even for classes that are
7991         only partially defined.
7992         (decl_constant_value): Remove dead code.
7993         * method.c (build_overload_value): Remove hack where by TYPE was
7994         not a TYPE.  Handle PTRMEM_CST.
7995         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
7996         should go.
7997         * parse.y (components, notype_components, component_decl,
7998         component_decl_1, component_declarator, component_declarator0):
7999         Now all are itype rather than ttype.  Rework to add members to
8000         classes on the fly.
8001         (typesqpecqual_reserved): Use check_multiple_declarators.
8002         (structsp): Update class to finish_class_definition.
8003         (do_xref_defn): Unsplit into named_class_head.
8004         (access_specifier): Set current_access_specifier.
8005         * pt.c (set_current_access_from_decl): New function.
8006         (finish_member_template_decl): Don't take the parameters.
8007         (comp_template_args): Make more robust.
8008         (lookup_template_class): Don't use current_local_enum.
8009         (for_each_template_parm): Handle PTRMEM_CST.
8010         (instantiate_class_template): Use set_current_access_from_decl,
8011         finish_member_declaration and unreverse_member_declarations.  Set
8012         lineno/input_filename before generating implicit member functions.
8013         (type_unification_real): Don't assume back-unification happens
8014         only for the last argument.
8015         (regenerate_decl_from_template): Call pushclass a bit earlier.
8016         (tsubst_chain): Remove.
8017         (tsubst_enum): Use set_current_access_from_decl.
8018         (set_mangled_name_for_template_decl): Fix indentation.
8019         * search.c (lookup_fnfields_1): Change iteration through
8020         CLASSTYPE_METHOD_VEC.
8021         (dfs_pushdecls): Likewise.
8022         (dfs_compress_decls): Likewise.
8023         (add_conversions): Likewise.
8024         * semantics.c (finish_class_definition): Don't take components.
8025         Change call to finish_struct.
8026         (finish_member_declaration): New function.
8027         (finish_member_class_template): Don't take template parameters.
8028         Change call to grok_x_components.  Call finish_member_template_decl.
8029         (check_multiple_declarators): New function.
8030         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
8031         a passed in fieldlist.
8032         * tree.c (search_tree): Handle PTRMEM_CST.
8033         (mapcar): Likewise.
8034         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
8035         INTEGER_CSTs, for pointer-to-data members.
8037         * call.c (resolve_args): Resolve template specializations, if
8038         possible.
8040 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8042         * Makefile.in (spew.o): Depend on toplev.h.
8044         * call.c (compare_ics): Initialize variables `deref_from_type2',
8045         `deref_to_type1' and `deref_to_type2'.
8047         * except.c (get_eh_type): Hide prototype and definition.
8048         (process_start_catch_block_old): Remove unused static prototype.
8050         * pt.c (tsubst_decl): Initialize variable `argvec'.
8052         * spew.c: Include toplev.h.
8054 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
8056         * pt.c (instantiate_decl): Do save and restore file position.
8058 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8060         * method.c (build_decl_overload_real): Clear
8061         numeric_output_need_bar after __.
8063 1998-10-05  Nathan Sidwell  <nathan@acm.org>
8065         * call.c (build_new_method_call): Issue 'incomplete type' error,
8066         if class is not defined.
8068 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8070         * call.c (build_object_call): Move declaration of variable
8071         `fn' into the scope where it is used.  Don't access variable
8072         `fn' when it is uninitialized, instead use `fns'.
8074 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
8076         * errfn.c (cp_thing): Print buf as a string not as a printf format
8077         to avoid problems with the operator%.  Consequently, `%%' sequences
8078         in format are copied as `%' in buf.
8080 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
8082         * pt.c (pop_tinst_level): Call extract_interface_info.
8083         (instantiate_decl): Don't save and restore file position.
8085         * decl.c (cp_finish_decl): Make statics in extern inlines and
8086         templates common, if possible and the target doesn't support weak
8087         symbols.
8089         * decl.c (grokdeclarator): Remove redundant calls to
8090         build_type_variant and some duplicated code.
8091         * sig.c (build_signature_reference_type): Only take the type parm.
8092         (build_signature_pointer_type): Likewise.
8093         * tree.c (build_cplus_method_type): Adjust.
8094         * cp-tree.h: Update.
8096 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
8098         * call.c (build_over_call): Make pedwarns about dropped qualifiers
8099         into full-fledged errors.
8100         * cvt.c (convert_to_reference): Likewise.
8101         * typeck.c (convert_for_assignment): Likewise.
8103         * search.c (expand_upcast_vtables): In addition to unsetting
8104         TREE_READONLY, remove top-level const type qualifier.
8106 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
8108         * class.c (current_class_ptr, current_class_ref): Clarify
8109         documentation.
8110         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
8111         NOP type conversions.
8112         * decl.c (decls_match): Use comptypes directly; ignore
8113         qualifiers on the DECL.
8114         (duplicate_decls): Remove qualifier checks on DECL.
8115         (grokdeclarator): Make the type built up include top-level
8116         qualifiers.
8117         * decl2.c (do_dtors): Fix spelling error.
8118         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
8119         when printing type information.
8120         * init.c (build_new_1): Add documentation.  Deal with the fact
8121         that type of allocated memory now contains qualifiers.
8122         * lex.c (is_global): Improve error-recovery.
8123         * sig.c (build_member_function_pointer): Don't cast away const
8124         on fields of sigtable_entry_type.
8125         * tree.c (lvalue_type): Don't look at top-level qualifiers on
8126         expressions.
8127         * typeck.c (decay_conversion): Likewise.
8128         (build_component_ref): Make sure the type of the COMPONENT_REF
8129         contains top-level qualifiers, as appropriate.  Improve
8130         error-handling.
8131         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
8132         (build_array_ref): Likewise.
8133         (build_unary_op): Improve error-recovery.
8134         (unary_complex_lvalue): Make taking the address a bound member
8135         function an error, not a sorry.
8136         (build_conditional_expr): Look at the type qualifiers, not the
8137         qualifiers on the expression itself.
8139 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
8141         * decl2.c (merge_functions): Remove duplicates.
8143         * decl2.c: Add -f{no-,}implicit-inline-templates.
8144         (import_export_decl): Check it.
8146         * decl.c (lookup_name_real): Template parms also take precedence
8147         over implicit typename.  Only warn if yylex.
8149         * typeck.c (build_conditional_expr): Only fold if ifexp is an
8150         INTEGER_CST.
8152         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
8153         instead of linkage.
8155 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
8157         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
8158         * class.c (build_vbase_pointer): Use it.
8159         * rtti.c (expand_class_desc): Likewise.
8160         * tree.c (build_vbase_pointer_fields): Likewise.
8162 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
8164         * decl.c (start_decl): Add invocation of
8165         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
8166         (start_function): Add invocation of
8167         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
8169         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
8170         HANDLE_GENERIC_PRAGMAS.
8172 1998-09-28  Anthony Green  <green@cygnus.com>
8174         * semantics.c (finish_asm_stmt): Always permit volatile asms.
8176 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
8178         * decl.c (grokdeclarator): Tighten checks for invalid
8179         destructors.  Improve error-messages and error-recovery.
8180         * decl2.c (check_classfn): Don't assume that mangled destructor
8181         names contain type information.
8183 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
8185         * search.c (get_base_distance): Remove assert.
8187         * decl2.c (build_anon_union_vars): Don't process a field with no
8188         name.
8189         (finish_anon_union): Also complain about local anon unions with no
8190         members.
8192 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8194         * decl.c (lookup_namespace_name): If the name is a namespace,
8195         return it immediately.
8197 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8199         * cp-tree.h (define_case_label): Remove unused parameter.
8200         (check_java_method): Likewise.
8201         (grokclassfn): Likewise.
8202         (expand_aggr_init): Likewise.
8203         (build_x_delete): Likewise.
8204         (maybe_end_member_template_processing): Likewise.
8205         (unshare_base_binfos): Add prototype.
8206         (string_conv_p): Likewise.
8207         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
8209         * cvt.c (build_up_reference): Remove unused parameter
8210         `checkconst', all callers changed.
8211         (build_type_conversion): Mark parameter `code' with
8212         ATTRIBUTE_UNUSED.
8213         (build_expr_type_conversion): Initialize variable `conv'.
8215         * decl.c (push_namespace): Initialize variable `d'.
8216         (define_case_label): Remove unused parameter `decl', all callers
8217         changed.
8219         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
8220         `argc' with ATTRIBUTE_UNUSED.
8221         (grokclassfn): Remove unused parameter `cname', all callers
8222         changed.
8223         (check_java_method): Likewise for parameter `ctype'.
8224         (copy_assignment_arg_p): Mark parameter `virtualp' with
8225         ATTRIBUTE_UNUSED.
8226         (finish_prevtable_vardecl): Likewise for parameter `prev'.
8228         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
8230         * init.c (expand_aggr_init_1): Remove unused parameter
8231         `alias_this', all callers changed.
8232         (expand_aggr_init): Likewise.
8233         (expand_default_init): Likewise.
8234         (build_new_1): Initialize variable `susp'.
8235         (build_x_delete): Remove unused parameter `type', all callers
8236         changed.
8238         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
8239         ATTRIBUTE_UNUSED.
8240         (readescape): Use (unsigned) value in shift.
8241         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
8242         comparing to a signed quantity.
8244         * pt.c (maybe_end_member_template_processing): Remove unused
8245         parameter `decl', all callers changed.
8246         (check_explicit_specialization): Add braces around empty body in
8247         an else-statement.
8248         (current_template_args): Initialize variable `args'.
8249         (lookup_template_class): Likewise for variable `prev_local_enum'.
8250         (tsubst_decl): Likewise for variable `r'.
8251         (set_mangled_name_for_template_decl): Initialize variable
8252         `context'.
8254         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
8255         Likewise for variable `i'.
8256         (yylex): Initialize variable `trrr'.
8258         * typeck.c (compparms): Mark variable `strict' with
8259         ATTRIBUTE_UNUSED.
8261         * xref.c (simplify_type): Cast argument of ctype function to
8262         `unsigned char'.
8264 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
8266         * cp-tree.h (language_lvalue_valid): Remove.
8267         * decl.c (grokdeclarator): Don't disallow references to functions.
8268         * tree.c (lvalue_p_1): New function, combining duplicated
8269         code from ...
8270         (lvalue_p): Use it.
8271         (real_lvalue_p): Likewise.
8272         * typeck.c (language_lvalue_valid): Remove.
8273         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
8274         they don't have TREE_READONLY set.
8275         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
8277 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
8279         * spew.c (yylex): Give diagnostic.
8280         * hash.h (is_reserved_word): Add export.
8281         * gxx.gperf: Likewise.
8282         * lex.h (rid): Add RID_EXPORT.
8283         * lex.c (init_parse): Likewise.
8285 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
8287         * friend.c (do_friend): Make warning a full sentence.
8289 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
8291         * parse.y (component_decl_list): Improve error-recovery.
8293 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
8295         * decl.c (make_typename_type): Move error to point where name
8296         variable can be used by dump_type.
8298 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
8300         * decl.c (grokfndecl): Improve error-recovery.
8301         * decl2.c (grokfield): Likewise.
8302         * pt.c (finish_member_template_decl): Likewise.
8304 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8306         * method.c (hack_identifier): Finding multiple members is always
8307         an error.
8309 1998-09-21  Per Bothner  <bothner@cygnus.com>
8311         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
8313 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
8315         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
8317 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
8319         * class.c (maybe_warn_about_overly_private_class): Reformat.
8321 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
8323         * exception.cc (__cplus_type_matcher): Realign some code.
8325 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
8327         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
8328         (tinfo2.o): Likewise.
8329         (exception.o): Likewise.
8330         (new.o): Likewise.
8331         (opnew.o): Likewise.
8332         (opnewnt.o): Likewise.
8333         (opvnew.o): Likewise.
8334         (opvnewnt.o): Likewise.
8335         (opdel.o): Likewise.
8336         (opdelnt.o): Likewise.
8337         (opvdel.o): Likewise.
8338         (opvdelnt.o): Likewise.
8340 1998-09-16  Richard Henderson  <rth@cygnus.com>
8342         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
8344 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
8346         * call.c (build_field_call): Handle static data members too.
8348         * typeck.c (comptypes): When comparing pointer types, check
8349         whether referred types match even in strictest modes.
8351 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
8353         * cp-tree.h: Revert previous change.
8354         (finish_struct_methods): Remove declaration.
8355         * class.c: Revert previous change.
8356         (maybe_warn_about_overly_private_class): New function.
8357         (finish_struct_methods): Declare here, and make static.  Remove
8358         unnecessary parameters.  Tidy slightly.  Use
8359         maybe_warn_about_overly_private_class.
8360         (finish_struct_1): Adjust.  Remove check for private constructors,
8361         now done elsewhere.
8362         (finish_struct): Adjust.
8364 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
8366         * except.c (expand_start_catch_block): No need to check for new
8367         exception model.
8368         (process_start_catch_block_old): Deleted.
8369         (process_start_catch_block): Add call to start_decl_1().
8370         (expand_end_catch_block): Add call to end_catch_handler().
8371         * exception.cc (__cplus_type_matcher): Only check the exception
8372         language if there is an exception table.
8374 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
8376         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
8377         as used to prevent conflicts with virtual function tables.
8379 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
8381         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
8382         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
8383         * class.c (maybe_class_too_private_p): New function.
8384         (finish_struct_methods): Use it.
8385         (finish_struct_1): Likewise.
8386         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
8387         appropriate.
8389         * pt.c (check_specialization_scope): Fix spelling error.
8390         (check_explicit_specialization): Remove code to handle explicit
8391         specializations in class scope; they are now correctly diagnosed
8392         as errors.
8394 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
8396         * decl.c (pushdecl): Don't copy types if the
8397         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
8398         type.
8400 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8402         * class.c (get_enclosing_class): New function.
8403         (is_base_of_enclosing_class): Likewise.
8404         * cp-tree.h (get_enclosing_class): Declare.
8405         (is_base_of_enclosing_class): Likewise.
8406         * pt.c (coerce_template_parms): Use them.
8408 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
8410         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
8411         null to decide whether to use it.
8413         * error.c (dump_type_real): Handle NAMESPACE_DECL.
8414         * parse.y (base_class.1): Avoid crash on error.
8416 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8418         * decl.c (make_typename_type): If context is a namespace, the code
8419         is in error.
8421 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
8423         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
8425 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
8427         * cp-tree.h (anonymous_namespace_name): Declare.
8428         * decl.c: Define it.
8429         (push_namespace): Use anonymous_namespace_name, rather than local
8430         static anon_name.
8431         * error.c (dump_decl): If a namespace is named
8432         anonymous_namespace_name, call it {anonymous}.
8434         * decl.c (grokparms): Distinguish between references and pointers
8435         in error message.
8437 1998-09-08  Richard Henderson  <rth@cygnus.com>
8438             Mark Mitchell  <mark@markmitchell.com>
8440         * pt.c (process_partial_specialization): Consistently allocate
8441         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
8442         tpd.parms, where appropriate.
8444 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
8446         * Makefile.in (INCLUDES): Update after recent toplevel gcc
8447         reorganizations.
8449 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
8451         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
8452         * class.c (finish_struct): Remove hackery to deal with explicit
8453         specializations in class scope.
8454         * decl.c (grokfndecl): Improve error-recovery.
8455         * decl2.c (grokfield): Likewise.
8456         * pt.c (check_specialization_scope): New function.
8457         (begin_specialization): Call it.
8458         (process_partial_specialization): New function, split out from
8459         push_template_decl.  Check partial specializations more
8460         stringently.
8461         (push_template_decl): Call it.
8462         (check_explicit_specialization): Don't attempt to handle explicit
8463         specializations in class scope.
8464         (template_parm_data): Document.  Add current_arg and
8465         arg_uses_template_parms.
8466         (mark_template_parm): Set it.
8467         (tsubst_arg_types): Remove unused variable.
8468         * semantics.c (begin_class_definition): Tweak.
8470 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
8472         * inc/typeinfo (type_info::type_info(const char*)): Make
8473         `explicit'.
8475         * cp-tree.h (hash_tree_cons_simple): New macro.
8476         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
8477         (coerce_template_parms): Use make_temp_vec, instead of
8478         make_tree_vec.  Document this behavior.
8479         (lookup_template_class): Likewise.
8480         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
8481         Remove dead code (and add assertion to check its deadness).  Fix
8482         bug w.r.t. exception specifications.
8484 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
8486         * decl2.c (import_export_vtable): Always make artificials comdat.
8487         (import_export_decl): Likewise.
8488         * pt.c (mark_decl_instantiated): Likewise.
8490 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
8492         * cp-tree.h (finish_globally_qualified_member_call_expr):
8493         Rename to ...
8494         (finish_qualified_call_expr).
8495         * semantics.c: Likewise.
8496         * parse.y (primary): Use it.
8497         * method.c (hack_identifier): Remove redundant code.
8499         * init.c (resolve_offset_ref): Call convert_from_reference to
8500         handle members of reference type.  Improve error recovery.
8502 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
8504         * cp-tree.h: Declare warn_nontemplate_friend.
8505         * decl2.c (lang_decode_option): Set.
8506         * lang-options.h: Add -Wnon-template-friend.
8507         * friend.c (do_friend): Use to toggle non-template function warning.
8509 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
8511         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
8512         corresponding INTEGER_CSTs when processing_template_decl.
8513         * pt.c (tsubst_enum): Tweak accordingly.
8515 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
8517         * decl.c (pushdecl_class_level): Add warning here.
8518         (pushdecl): Tweak.
8520 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
8522         * cvt.c (convert_pointer_to_real): Tidy.
8523         * search.c (get_base_distance_recursive): Simplify.
8524         (get_base_distance): Likewise.
8526         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
8527         parms.
8529 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
8531         * lex.c (check_newline):  Call HANDLE_PRAGMA before
8532         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
8533         if unknown pragmas are encountered.
8534         (handle_sysv_pragma): Interpret return code from
8535         handle_pragma_token ().  Return success/failure indication rather
8536         than next unprocessed character.
8537         (pragma_getc): New function: retrieves characters from the
8538         input stream.  Defined when HANDLE_PRAGMA is defined.
8539         (pragma_ungetc): New function: replaces characters back into the
8540         input stream.  Defined when HANDLE_PRAGMA is defined.
8542 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
8544         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
8545         * class.c (build_vtable_entry_ref): Likewise.
8547 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
8549         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
8550         * decl2.c (import_export_decl): Likewise.
8551         * pt.c (instantiate_decl): Use it.
8553 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
8555         * decl.c (lookup_name_real): Also do implicit typename thing for
8556         artificial TYPE_DECLs.
8557         * search.c (lookup_field): Likewise.
8558         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
8559         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
8560         (enter_scope_of): Extract type from implicit typename.
8561         (begin_class_definition): Likewise.
8562         * lex.c (identifier_type): Handle implicit typename when checking
8563         for SELFNAME.
8565         * cp-tree.h: Declare flag_strict_prototype.
8566         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
8567         -fstrict-prototype.
8568         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
8569         specified, set it to the value of pedantic.
8571 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
8573         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
8575 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
8577         * decl.c (finish_enum): Handle member enums of classes declared in
8578         template functions.
8580         * decl2.c (grok_x_components): Strip attributes before calling
8581         groktypename.
8583 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
8585         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
8586         -fenum-int-equivalence and -fno-nonnull-objects.
8587         * class.c (check_for_override): Remove support for -fall-virtual.
8588         (finish_struct_1): Likewise.
8589         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
8590         * typeck.c (build_binary_op_nodefault): Likewise.
8591         * cvt.c (ocp_convert): Likewise.
8592         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
8593         * class.c (build_vbase_path): Likewise.
8595 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
8597         * Makefile.in (INTERFACE): New, set to 1.
8599 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
8601         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
8602         comparing with global_namespace.
8603         (dump_aggr_type): Likewise.
8605         * decl.c (grokfndecl): Issue error on declaration of friend
8606         templates with explicit template arguments.
8608         * pt.c (convert_template_argument): New function, split out
8609         from...
8610         (coerce_template_parms): Here.
8611         (tsubst): Attempt better error-recovery.
8613 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
8615         * pt.c (decl_template_parm_p): Add checks for
8616         TEMPLATE_TEMPLATE_PARM.
8618 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
8620         * lex.c (do_identifier): Fix thinko in previous change.
8622 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
8624         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
8625         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
8627 1998-08-28  Richard Henderson  <rth@cygnus.com>
8629         Add support for discarding unused virtual functions.
8630         * lang-options.h: Add -fvtable-gc.
8631         * cp-tree.h: Add flag_vtable_gc.
8632         * decl2.c (output_vtable_inherit): New fn.
8633         (finish_vtable_vardecl): Call it.
8634         * class.c (build_vtable_entry_ref): New fn.
8635         (build_vtbl_ref): Call it.
8637 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
8639         * cp-tree.h (build_enumerator): Take the enumeration type as a
8640         parameter.
8641         * decl.c (finish_enum): Don't set the TREE_TYPE for the
8642         enumeration constant values if we're processing_template_decls.
8643         Don't set the type for the CONST_DECLs either; that's done in
8644         build_enumerator.
8645         (build_enumerator): Take the enumeration type as a
8646         parameter.
8647         * lex.c (do_identifier): Don't resolve enumeration constants while
8648         processing template declarations, even if they happen to be
8649         TEMPLATE_PARM_INDEXs.
8651         * parse.y (current_enum_type): New variable.
8652         (primary): Don't allow statement-expression in local classes just
8653         as we don't in global classes.
8654         (structsp): Use current_enum_type.
8655         (enum_list): Likewise.
8656         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
8657         finish_enum; they no longer occur.
8659         * cp-tree.h (finish_base_specifier): New function.
8660         * parse.y (base_class): Use it.
8661         * semantics.c (finish_base_specifier): Define it.
8663         * parse.y (structsp): Warn on use of typename outside of template
8664         declarations.
8666 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
8668         * lex.c (handle_cp_pragma): Remove #pragma vtable.
8669         * lang-options.h: Remove +e options.
8670         * decl2.c (lang_decode_option): Likewise.
8671         (import_export_vtable): Don't check write_virtuals.
8672         (finish_vtable_vardecl, finish_file): Likewise.
8673         * search.c (dfs_debug_mark): Likewise.
8674         * semantics.c (begin_class_definition): Likewise.
8675         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
8677         * call.c (build_over_call): Check flag_elide_constructors.
8678         * decl2.c: flag_elide_constructors defaults to 1.
8679         * typeck.c (convert_arguments): Remove return_loc parm.
8680         (build_function_call_real): Adjust.
8682         * search.c: Tear out all mi_matrix and memoize code.
8683         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
8684         * lang-options.h: Remove documentation for -fhandle-exceptions,
8685         -fmemoize-lookups and -fsave-memoized.
8686         * cp-tree.h: Lose mi_matrix and memoize support.
8687         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
8688         * class.c: Lose struct class_level.
8689         (pushclass, popclass): Lose memoize support.
8690         * init.c (build_offset_ref): Likewise.
8692         Never change BINFO_INHERITANCE_CHAIN.
8693         * init.c (emit_base_init): Change modification of
8694         BINFO_INHERITANCE_CHAIN to an assert.
8695         * search.c (get_base_distance_recursive): Likewise.
8696         (get_base_distance): Likewise.
8697         (lookup_member): Likewise.
8698         (convert_pointer_to_single_level): Likewise.
8699         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
8700         (lookup_fnfields): Likewise.
8701         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
8702         (unshare_base_binfos): Don't call propagate_binfo_offsets.
8703         (layout_basetypes): Call propagate_binfo_offsets instead of
8704         unshare_base_binfos.
8705         * decl.c (xref_basetypes): Call unshare_base_binfos.
8706         * pt.c (instantiate_class_template): Likewise.
8707         * tree.c (reverse_path): Remove 'copy' parm; always make a
8708         temporary copy.
8709         * class.c (build_vbase_path): Just call it.
8710         * search.c (compute_access): Likewise.  Don't re-reverse.
8712 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
8714         * class.c (build_vbase_path): Use reverse_path.
8715         (finish_base_struct): Move warnings for inaccessible bases to
8716         layout_basetypes.
8717         (modify_one_vtable): Remove check of TREE_USED (binfo).
8718         (fixup_vtable_deltas1): Likewise.
8719         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
8720         (xref_tag): Remove binfos parameter.
8721         (make_binfo): Remove chain parameter.
8722         (reverse_path): Add copy parameter.
8723         * decl.c (init_decl_processing): Change calls to xref_tag.
8724         (xref_tag): Remove binfos parameter.
8725         (xref_basetypes): Change calls to make_binfo.
8726         * decl2.c (grok_x_components): Change calls to xref_tag.
8727         (handle_class_head): Likewise.
8728         * friend.c (do_friend): Likewise.
8729         * lex.c (make_lang_type): Change calls to make_binfo.
8730         * parse.y (structsp): Change calls to xref_tag.
8731         (named_complex_class_head_sans_basetype): Likewise.
8732         (named_class_head): Likewise.
8733         * rtti.c (init_rtti_processing): Likewise.
8734         * search.c (compute_access): Change calls to reverse_path.
8735         (dfs_get_vbase_types): Change calls to make_binfo.
8736         (get_vbase_types): Remove dead code.
8737         * tree.c (unshare_base_binfos): Change calls to make_binfo.
8738         (layout_basetypes): Warn here about inaccessible bases.
8739         (make_binfo): Remove chain parameter.
8740         (reverse_path): Add copy parameter.
8742 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
8744         * class.c: #if 0 complete_type_p.
8745         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
8746         * method.c (process_overload_item): Likewise.
8747         * typeck.c (comp_target_types): Likewise.
8749         Stop sharing binfos for indirect virtual bases.
8750         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
8751         (layout_basetypes): Likewise.
8752         (unshare_base_binfos): Copy vbases, too.
8753         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
8754         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
8755         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
8756         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
8757         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
8758         reference to BINFO_VIA_PUBLIC.
8759         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
8760         (push_class_decls): Use them.
8761         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
8762         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
8764 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
8766         * decl.c (build_enumerator): Set DECL_CONTEXT for the
8767         CONST_DECLs.
8769 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
8771         * cp-tree.h (finish_enum): Change prototype.
8772         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
8773         VALUES parameter.  Don't try to compute mins/maxs if
8774         processing_template_decl.
8775         * parse.y (structsp): Use new calling sequence for finish_enum.
8776         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
8777         (lookup_template_class): Remove unused variables.  Tweak.
8778         Register enums on instantiation list before substituting
8779         enumeration constants.
8780         (tsubst_decl): Remove unused variables.
8781         (regenerate_decl_from_template): Likewise.
8783         * decl.c (duplicate_decls): Don't obliterate the
8784         DECL_TEMPLATE_INFO for a template if we're not replacing it with
8785         anything.
8787         * lex.c (do_identifier): Fix typo in comment.
8789 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8791         * errfn.c: Remove stdarg.h/varargs.h.
8792         * tree.c: Likewise.
8794 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
8796         * pt.c (tsubst_copy): Only do typename overloading on an
8797         IDENTIFIER_NODE that happens to look like a typename if it actually
8798         has a type for us to use.
8800 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
8802         * typeck.c (comp_cv_target_types): Split out...
8803         (comp_target_types): From here.  Don't allow cv-qual changes under
8804         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
8805         (build_ptrmemfunc): Pass 1 to nptrs.
8806         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
8808 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
8810         * search.c (dependent_base_p): Don't compare a binfo to
8811         current_class_type; use the TREE_TYPE of the binfo instead.
8813         * cp-tree.h (CLASS_TYPE_P): Revise definition.
8815 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
8817         * decl.c (duplicate_decls): Don't complain about different
8818         exceptions from an internal decl even if pedantic.
8820         * typeck.c (convert_for_assignment): Converting from pm of vbase
8821         to derived is an error, not a sorry.
8823         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
8824         * class.c (fixed_type_or_null): Rename from
8825         resolves_to_fixed_type_p.  Return the dynamic type of the
8826         expression, if fixed, or null.
8827         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
8828         does not match the static type.
8829         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
8830         resolves_to_fixed_type_p again.
8832 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
8834         * pt.c (tsubst_decl): Move special case code for dealing with
8835         tricky friend templates here from ...
8836         (regenerate_decl_from_template): Here.
8838 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
8840         * decl.c (start_decl): Remove redundant linkage check.
8842 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
8844         * typeck.c (c_expand_return): Handle the case that valtype
8845         is wider than the functions return type.
8847 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
8849         * cp-tree.h (CLASS_TYPE_P): New macro.
8850         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
8851         * pt.c (process_template_parm): Undo previous change.
8853 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
8855         * cp-tree.h: Declare.
8856         * pt.c (decl_template_parm_p): New function.
8857         * decl.c (pushdecl): Check decls for redeclaring template parms.
8858         (xref_tag): Make redeclaration an error, print decl.
8859         * decl2.c (grokfield): Check field_decls for redeclaration as well.
8861 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
8863         * parse.y (primary): Fix up the type of string constants.
8865 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
8867         * typeck.c (convert_for_initialization): Move check for odd uses
8868         of NULL to avoid duplicate warnings.
8870 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
8872         * tree.c (lvalue_type): Fix for arrays.
8873         * typeck.c (string_conv_p): New fn.
8874         (convert_for_assignment): Use it.
8875         (build_unary_op): Use lvalue_type.
8876         * call.c (standard_conversion, convert_like): Use string_conv_p.
8877         (add_function_candidate): Use lvalue_type.
8878         * cvt.c (convert_to_reference): Likewise.
8879         * decl2.c (lang_decode_option): Ignore -traditional.
8880         * decl.c (init_decl_processing): flag_writable_strings inhibits
8881         flag_const_strings.
8883 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
8885         * lang-options.h (lang_options): Add fconst-strings to the list
8886         of valid options.
8887         * decl2.c (lang_f_options, lang_decode_option): Likewise.
8889 1998-08-24  Nathan Sidwell  <nathan@acm.org>
8891         * lex.c (real_yylex): Don't warn about long long constants if
8892         we're allowing long long.
8894 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8896         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
8897         accessing bindings directly.
8899         * search.c (my_tree_cons): Reimplement.
8901         * lang-specs.h: Remove __HONOR_STD.
8902         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
8904 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
8906         * decl.c (grokdeclarator): Complain about in-class initialization
8907         of aggregates and/or references.
8908         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
8909         TEMPLATE_TYPE_PARMs.
8911         * decl2.c (grok_array_decl): Add comment.
8912         (mark_used): Don't instantiate an explicit instantiation.
8913         * friend.c (make_friend_class): Remove bogus comment.  Fix check
8914         for partial specializations.
8915         * pt.c (check_explicit_specialization): Don't
8916         SET_DECL_EXPLICIT_INSTANTIATION here.
8917         (mark_decl_instantiated): Or here.
8918         (do_decl_instantiation): Do it here, instead.  Add checks for
8919         duplicate explicit instantiations, etc.  Tidy.
8920         (do_type_instantiation): Likewise.
8921         (instantiate_decl): Improve comments.  Complain about explicit
8922         instantiations where no definition is available.
8924         * cp-tree.h (ansi_null_node): Remove.
8925         * call.c (build_over_call): Warn about converting NULL to an
8926         arithmetic type.
8927         * cvt.c (build_expr_type_conversion): Likewise.  Use
8928         null_ptr_cst_p instead of expanding it inline.
8929         * decl.c (ansi_null_node): Remove.
8930         (init_decl_processing): Make null_node always have integral type.
8931         * except.c (build_throw): Warn about converting NULL to an
8932         arithmetic type.
8933         * lex.c (init_parse): Remove handling of ansi_null_node.
8934         * pt.c (type_unification_real): Don't convert NULL to void* type.
8935         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
8936         (convert_for_assignment): Warn about converting NULL to an
8937         arithmetic type.
8938         (convert_for_initialization): Likewise.
8940 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
8942         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
8943         * pt.c (coerce_template_parms): Use no_linkage_check.
8944         * decl.c (grokvardecl): Likewise.
8945         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
8947         * method.c (process_overload_item): Remove useless code.
8949 1998-08-20  Per Bothner  <bothner@cygnus.com>
8951         Handle new'ing of Java classes.
8952         * init.c (build_class_classref):  New function.
8953         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
8954         constructor does not return this;  don't need to exception-protect.
8956         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
8957         * decl2.c (acceptable_java_type):  Handle template-derived types.
8959 1998-08-20  Per Bothner  <bothner@cygnus.com>
8961         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
8963 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
8965         * decl.c (duplicate_decls): Always merge the old and new patterns
8966         for templates, regardless of whether or not the new one has
8967         DECL_INITIAL.  Don't throw away specializations.  Merge
8968         DECL_SAVED_TREE.
8969         * pt.c (tsubst_decl): Use the right pattern when calculating the
8970         complete args for a new template instance.
8971         (do_decl_instantiation): Fix typo in comment.
8972         (regenerate_decl_from_template): Deal with tricky friend template
8973         case.
8974         (instantiate_decl): Likewise.
8976 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
8978         * init.c (build_builtin_delete_call): Add missing assemble_external
8979         call.
8981 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
8983         * parse.y (notype_unqualified_id): Also accept ~A<int>.
8985 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
8987         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
8988         arithmetic.
8989         * except.c (build_throw): Warn when NULL is thrown, even with
8990         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
8991         thrown expression.
8993         * cp-tree.h (ansi_null_node): New variable.
8994         * decl.c (ansi_null_node): New variable.
8995         (init_decl_processing): Initialize its type.
8996         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
8997         for null_node in non-ANSI mode.
8998         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
8999         place of null_node to avoid spurious errors.
9001 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
9003         * cp-tree.h (enter_scope_of): New function.
9004         * parse.y (complex_direct_notype_declarator): Use it.
9005         * semantics.c (enter_scope_of): New function.
9007 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
9009         * decl.c (grokparms): No, here.
9011         * decl.c (grokdeclarator): Catch parm with pointer to array of
9012         unknown bound here...
9013         * method.c (process_overload_item): ...not here.
9015         * gxxint.texi: Remove obsolete documentation of overloading code.
9017         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
9018         * class.c (finish_struct_bits): Likewise.
9020         * tree.c (lvalue_type): Fix for arrays.
9021         * typeck.c (build_unary_op): Use lvalue_type.
9022         * call.c (add_function_candidate): Likewise.
9023         * cvt.c (convert_to_reference): Likewise.
9025         * decl2.c (lang_decode_option): Ignore -traditional.
9027         * init.c (build_offset_ref): Don't mess with error_mark_node.
9028         * lex.c (do_scoped_id): Use cp_error.
9030         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
9032 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
9034         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
9036 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
9038         * cp-tree.h (set_identifier_local_value): Provide prototype.
9040         * decl2.c (do_namespace_alias): Remove unused variables `binding'
9041         and `old'.
9043 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
9045         * Makefile.in: Rename BBISON to BISON so that it can be properly
9046         inherited from the parent makefile.
9048 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
9050         * lang-options.h: Add -finit-priority.
9051         * decl2.c: Likewise.  Check flag_init_priority instead of
9052         USE_INIT_PRIORITY.
9054         * decl2.c (setup_initp): New fn.
9055         (start_objects, finish_objects, do_ctors): Handle init_priority.
9056         (do_dtors, finish_file): Likewise.
9058 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
9060         * pt.c (tsubst_copy): Hush warning.
9062         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
9064 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
9066         * pt.c (print_template_context): Don't abort when instantiating a
9067         synthesized method.
9069         * decl.c (grokdeclarator): Issue errors on namespace qualified
9070         declarators in parameter lists or in class scope.
9072 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
9074         * pt.c (check_explicit_specialization): Don't abort on bogus
9075         explicit instantiations.
9077 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
9079         * typeck.c (require_complete_type): Use complete_type_or_else.
9080         (complete_type_or_else): Always return NULL_TREE on failure, as
9081         documented.
9083         * pt.c (tsubst_aggr_type): Prototype.
9084         (tsubst_decl): New function, split out from tsubst.  Set
9085         input_filename and lineno as appropriate.
9086         (pop_tinst_level): Restore the file and line number saved in
9087         push_tinst_level.
9088         (instantiate_class_template): Set input_filename and lineno as
9089         appropriate.
9090         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
9091         context for a TYPENAME_TYPE is complete.
9093         * decl2.c (grokbitfield): Issue errors on bitfields declared with
9094         function type.
9095         (do_dtors): As in do_ctors, pretend to be a member of the same
9096         class as a static data member while generating a call to its
9097         destructor.
9099         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
9100         conversions, even in complex virtual base class hierarchies.
9102 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
9104         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
9105         (TYPE_TEMPLATE_INFO): Likewise.
9106         (SET_TYPE_TEMPLATE_INFO): Likewise.
9107         (ENUM_TI_TEMPLATE): Likewise.
9108         (ENUM_TI_ARGS): Likewise.
9109         (lookup_nested_type_by_name): Remove.
9110         * decl.c (maybe_process_template_type_declaration): Handle enums.
9111         (start_enum): Don't check for primary-template enum declarations
9112         here.
9113         (finish_enum): Clean up, document.  Make sure template enum
9114         constants get the correct type.
9115         (build_enumerator): Copy initializers for template enumerations,
9116         too.
9117         (grok_enum_decls): Document.
9118         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
9119         better.  Build LOOKUP_EXPRs for local variables, even if they are
9120         TREE_PERMANENT.
9121         * pt.c (tsubst_enum): Remove field_chain parameter.
9122         (template_class_depth): Include the depth of surrounding function
9123         contexts.
9124         (push_template_decl): Check for primary-template enum declarations
9125         here.  Deal with enumeration templates.
9126         (lookup_template_class): Likewise.
9127         (for_each_template_parm): Likewise.
9128         (instantiate_class_template): Don't call tsubst_enum directly,
9129         call tsubst instead, to instantiate enums.  Deal with all
9130         field_chain issues here, not in tsubst_enum.
9131         (lookup_nested_type_by_name): Remove.
9132         (tsubst_aggr_type): Revise handling of enumeration types.
9133         (tsubst): Likewise.
9134         (tsubst_copy): Likewise.
9135         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
9137 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
9139         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
9140         uses template parameters.
9141         * method.c (build_template_parm_names): Use the full set of
9142         template arguments for tsubst'ing.
9143         (build_overload_identifier): Pass the full set of template
9144         arguments to build_template_parm_names, not just the
9145         innermost_args.
9146         * pt.c (TMPL_ARGS_DEPTH): Define using
9147         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
9148         (NUM_TMPL_ARGS): New macro.
9149         (add_outermost_template_args): Deal with the case where the outer
9150         args will be completely discarded.
9151         (coerce_template_parms): Use the full set of template arguments
9152         for tsubst'ing.  Simplify.  Add some asserts.  Improve
9153         error messages.
9154         (lookup_template_class): Pass the full set of template arguments
9155         to coerce_template_parms.
9156         (tsubst): Add assertion.
9157         (do_type_instantiation): Don't instantiate member template
9158         classes.
9160         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
9161         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
9163 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
9165         * method.c (set_mangled_name_for_decl): Change return type to void.
9167         * decl.c (lookup_name_real): A namespace-level decl takes priority
9168         over implicit typename.  Avoid doing the same lookup twice.
9170         * search.c (dependent_base_p): New fn.
9171         (dfs_pushdecls, dfs_compress_decls): Use it.
9173         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
9174         virtual functions if the type doesn't have any.
9176 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
9178         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
9179         uses template parameters.
9181 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
9183         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
9184         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
9185         * lex.c (do_identifier): Don't use a second argument, or a type,
9186         when building LOOKUP_EXPRs.
9187         (do_identifier): Likewise.
9188         (do_scoped_id): Likewise.
9189         * method.c (hack_identifier): Improve error message.
9190         * pt.c (lookup_template_function): Don't needlessly call
9191         copy_to_permanent or build_min.
9192         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
9193         necessary.
9194         (do_decl_instantiation): Improve error message.
9195         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
9196         (build_min): Copy the type to the permanent obstack, too.
9198 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
9200         * init.c (init_init_processing): Remove BI* handling.
9201         (build_builtin_call): Remove.
9202         (build_builtin_delete_call): New fn.
9203         (build_delete): Use it.
9205 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
9207         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
9208         (maybe_check_template_type): New function.
9209         * decl.c (maybe_process_template_type_declaration): New function,
9210         split out from pushtag  Call maybe_check_template_type.
9211         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
9212         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
9213         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
9214         * pt.c (template_class_depth_real): Generalization of ...
9215         (template_class_depth): Use it.
9216         (register_specialization): Use duplicate_decls for duplicate
9217         declarations of specializations.
9218         (maybe_check_template_type): New function.
9219         (push_template_decl_real): Fix comment.
9220         (convert_nontype_argument): Likewise.
9221         (lookup_template_class): Likewise.  Avoid an infinite loop on
9222         erroneous code.
9223         (tsubst_friend_function): Fix comment.
9224         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
9225         an IDENTIFIER_NODE.
9226         * semantics.c (begin_function_definition): Use
9227         reset_specialization to note that template headers don't apply
9228         directly to declarations after the opening curly for a function.
9230 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
9232         * decl.c (push_overloaded_decl): Use current_namespace instead of
9233         DECL_CONTEXT (decl) to determine where we go.
9235         * decl.c (lookup_name_real): Fix typo.
9237 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
9239         * friend.c (is_friend): Be lenient with member functions to deal
9240         with nested friends.
9242 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
9244         * class.c (finish_struct_1): Convert integer_zero_node to
9245         ssizetype before passing it to set_rtti_entry.
9246         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
9247         of any size to a pointer.
9249 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
9251         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
9252         (build_template_decl_overload): Remove.
9253         (set_mangled_name_for_decl): New function.
9254         (innermost_args): Remove is_spec parameter.
9255         (most_specialized, most_specialized_class): Remove declarations.
9256         (lookup_template_class): Add entering_scope parameter.
9257         (maybe_process_partial_specialization): New function.
9258         (finish_template_decl): Likewise.
9259         (finish_template_type): Likewise.
9260         * class.c (finish_struct): Clean up processing of member template
9261         specializations.
9262         * decl.c (pushtag): Fix formatting.
9263         (lookup_tag): Improve handling of pseudo-global levels.
9264         (make_typename_type): Adjust call to lookup_template_class.
9265         (shadow_tag): Use maybe_process_partial_specialization.
9266         (xref_tag): Improve handling of member friends.
9267         (start_function): Call push_nested_class before
9268         push_template_decl.  Don't call push_template_decl for
9269         specializations.
9270         * decl2.c (grok_x_components): Don't call xref_tag for
9271         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
9272         (grokclassfn): Use set_mangled_name_for_decl.
9273         (arg_assoc_class): Adjust call to innermost_args.
9274         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
9275         * error.c (dump_function_name): Improve printing of template
9276         function names.
9277         * friend.c (is_friend): Don't compare types of decls to determine
9278         friendship, unless flag_guiding_decls.
9279         (make_friend_class): Partial specializations cannot be friends.
9280         (do_friend): Use set_mangled_name_for_decl.  Call
9281         push_template_decl_real instead of push_template_decl.
9282         * method.c (build_decl_overload_real): Remove prototype.  Give it
9283         external linkage.
9284         (build_overload_identififer): Adjust call to innermost_args.
9285         (build_template_decl_overload): Remove.
9286         (set_mangled_name_for_decl): New function.
9287         * parse.y (.finish_template_type): New non-terminal.
9288         (template_def): Use finish_template_decl.  Use template_extdef
9289         instead of extdef.
9290         (template_extdef, template_datadef): New non-terminals, containing
9291         only those rules for things which can be templates.
9292         (datadef): Tidy.
9293         (template_type, self_template_type): Use .finish_template_type.
9294         (named_class_head): Use maybe_process_partial_specialization.
9295         * pt.c (mangle_class_name_for_template): Remove context parameter.
9296         (get_class_bindings): Remove outer_args parameter.
9297         (complete_template_args): Remove.
9298         (add_outermost_template_args): New function.
9299         (register_specialization): Return the specialization.
9300         (unregister_specialization): New function.
9301         (tsubst_template_parms): Likewise.
9302         (most_specialized, most_specialized_class): Prototype here as
9303         static.
9304         (original_template): Rename to most_general_template.
9305         (tsubst_template_parms): New function.
9306         (set_mangled_name_for_template_decl): Likewise.
9307         (TMPL_ARGS_DEPTH): New macro.
9308         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
9309         (TMPL_ARGS_LEVEL): New macro.
9310         (SET_TMPL_ARGS_LEVEL): Likewise.
9311         (TMPL_ARG): Likewise.
9312         (SET_TMPL_ARG): Likewise.
9313         (TMPL_ARGS_DEPTH): Likewise.
9314         (finish_member_template_decl): Use finish_template_decl.
9315         (maybe_process_partial_specialization): New function, split out
9316         from tsubst.
9317         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
9318         (maybe_begin_member_template_processing): Use new macros.
9319         (is_member_template): Likewise.
9320         (is_member_template_class): Likewise.
9321         (add_to_template_args): Likewise.  Deal with multiple levels of
9322         args.
9323         (maybe_process_partial_specialization): New function.
9324         (retrieve_specialization): Add consistency check.
9325         (determine_specialization): Return full argument list.
9326         (check_explicit_specialization): Tweak friend handling.  Use full
9327         argument lists.  Simplify.
9328         (current_template_args): Use new macros.
9329         (push_template_decl_real): Change ill-named mainargs to specargs.
9330         Check that a partial specialization actually specializes at least
9331         one parameter.   Improve friend handling.  Modify for full
9332         template arguments.
9333         (classtype_mangled_name): Don't mangle the names of
9334         specializations.
9335         (lookup_template_class): Add entering_scope parameter.  Use it to
9336         avoid finding a template type when an instantiation is required.
9337         Simplify.  Use full template arguments.
9338         (tsubst_friend_function): Use unregister_specialization.  Use new
9339         macros.  Use full template arguments.
9340         (tsubst_friend_class): Substitute, using tsubst_template_parms,
9341         into the template parameters before passing them to
9342         redeclare_class_template.
9343         (instantiate_class_template): Simplify.  Use full template
9344         arguments.  Adjust calls to get_class_bindings.  Use
9345         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
9346         (innermost_args): Use new macros.
9347         (tsubst_aggr_type): New function, split out from tsubst.
9348         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
9349         conventions for lookup_template_class.  Refine handling of partial
9350         instantiations.   Remove calls to complete_template_args.
9351         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
9352         and set_mangled_name_for_template_decl.
9353         (tsubst_copy): Use tsubst_aggr_type.
9354         (instantiate_template): Use full template arguments.
9355         (more_specialized): Improve formatting.
9356         (more_specialized_class): Adjust calls to get_class_bindings.
9357         (get_bindings_real): Don't call complete_template_args.
9358         (most_specialized): Don't overwrite input; create a new list.
9359         (most_specialized_class): Use most_general_template.
9360         (regenerate_decl_from_template): Use unregister_specialization.
9361         Use full template arguments.
9362         (instantiate_decl): Use full template arguments.
9363         (set_mangled_name_for_template_decl): New function.
9364         * semantics.c (begin_class_definition): Use
9365         maybe_process_partial_specialization.
9366         (finish_member_class_template): New function.
9367         (finish_template_decl): Likewise.
9368         (finish_template_type): Likewise.
9369         (typeck.c): Don't crash after issuing a compiler_error.
9370         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
9372 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
9374         * typeck2.c (build_functional_cast): Handle default-initialization.
9376         * call.c (build_over_call): Pass 1 to popclass.
9378         * parse.y (direct_notype_declarator): Add precedence declaration
9379         to notype_unqualified_id case.
9380         * Makefile.in (EXPECT): Adjust.
9382         * tree.c (ovl_member): Fix for single function in OVL.
9384 1998-07-27  Dave Brolley  <brolley@cygnus.com>
9386         * c-lex.c (yylex): Fix boundary conditions in character literal and
9387         string literal loops.
9389 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
9391         * decl.c (lookup_name_real): OK, do return the from_obj value
9392         unless got_object depends on template parms.
9394         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
9396         * pt.c (coerce_template_parms): Also complain about local enums.
9398         * cp-tree.h: Add prototype for set_identifier_local_value.
9399         * decl.c (set_identifier_local_value_with_scope): Make static,
9400         prototype.
9401         * search.c (covariant_return_p): Likewise.
9402         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
9404         * call.c (build_method_call): Only pull out the type of a destructor
9405         if it's a template type parm.
9406         * decl.c (lookup_name_real): Never return the from_obj value.
9408 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
9410         * except.c (process_start_catch_block_old): Call start_decl_1 for
9411         catch parm.
9412         * decl.c (start_decl_1): Avoid duplicate error.
9414         * init.c (expand_default_init): Only perform the initialization if
9415         it will do something.
9417 1998-07-23  H.J. Lu  (hjl@gnu.org)
9419         * parse.y (base_class): Check for invalid base class.
9421 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
9423         * decl2.c (import_export_template): Fold in...
9424         (import_export_class): ...to here.  Handle dllimport/export.
9426         * class.c (build_vtable): Pass at_eof to import_export_vtable.
9427         (prepare_fresh_vtable): Likewise.
9428         * decl2.c (import_export_class): Split out...
9429         (finish_prevtable_vardecl): From here.
9430         * class.c (finish_struct_1): Call import_export_class if at_eof.
9432         * decl.c (start_function): #if 0 mysterious code I wrote and have
9433         forgotten why.
9434         * rtti.c (get_tinfo_fn): If this is for a class type, set
9435         DECL_CONTEXT.
9437 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
9439         * inc/exception: Change terminate and unexpected to ().
9441         * parse.y (named_class_head_sans_basetype_defn): A
9442         named_class_head_sans_basetype followed by '{' or ':' is a defn.
9444 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
9446         * tree.c (canonical_type_variant): New fn to handle arrays.
9447         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
9448         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
9449         * method.c (process_overload_item): Use build_overload_value for
9450         arrays.
9452 1998-07-20  Dave Brolley  <brolley@cygnus.com>
9454         * lex.c (mbchar.h): #include it.
9455         (GET_ENVIRONMENT): New macro.
9456         (init_parse): Set character set based on LANG environment variable.
9457         (real_yylex): Handle multibyte characters in character literals.
9458         (real_yylex): Handle multibyte characters in string literals.
9460 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
9462         * lex.c (do_identifier): Look for class value even if we don't
9463         have a global value.  Do implicit declaration if parsing is 2.
9464         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
9465         lookup.
9467 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
9469         * decl.c (pushtag): Revert previous change.
9470         * pt.c (lookup_template_class): Don't put out debugging
9471         information for types that use template parameters.
9473         * decl.c (pushtag): Don't put out debugging information for
9474         compiler-generated typedefs.
9476         * error.c (dump_type_real): Don't crash when presented with
9477         intQI_type_node or the like.
9479         * semantics.c (finish_translation_unit): Fix spelling error in
9480         comment.
9482 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
9484         * decl.c (lookup_name_real): Pull out single function here.
9485         (select_decl): Not here.
9486         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
9488         * decl.c (qualify_lookup): Tweak again.
9490         * pt.c (lookup_template_class): Don't mess with the context of the
9491         instantiation.
9492         * decl2.c (current_decl_namespace): Remove special handling for
9493         templates.
9495         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
9496         a member template specialization.
9498         * tree.c (ovl_member): Use decls_match to compare functions.
9499         * decl.c (decls_match): Check the context of a function.
9501         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
9502         in Koenig lookup support rules.
9503         * semantics.c (finish_call_expr): Handle the new cases.
9505         * typeck.c (build_x_function_call): Handle overloaded methods.
9507         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
9509 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
9511         * semantics.c (finish_object_call_expr): Revert previous change.
9512         * call.c (build_new_method_call): Likewise.  Instead, convert
9513         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
9515 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
9517         * decl.c (qualify_lookup): Handle templates.
9519         * decl2.c (do_using_directive): Don't pass ancestor.
9520         * decl.c (push_using_directive): Calculate ancestor.
9522         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
9523         * decl.c (pushdecl): Move type shadowing handling from here...
9524         (duplicate_decls): ...to here.
9525         * decl.c (set_identifier_local_value_with_scope): New fn.
9526         (pushdecl): Use it.
9527         (set_identifier_local_value, lookup_type_current_level): New fns.
9528         * decl2.c (do_local_using_decl): Handle types and binding level
9529         stuff properly.
9531         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
9532         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
9533         (lookup_namespace_name): Likewise.
9534         * typeck.c (build_unary_op): Not here anymore.
9536         * decl2.c (do_class_using_decl): Make sure we get an identifier.
9537         * class.c (handle_using_decl): Ignore TYPE_DECLs.
9539         * decl.c (qualify_lookup): New fn.
9540         (lookup_name_real): Use it.
9542 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9544         * decl2.c (add_using_namespace): When directly using a namespace
9545         that was indirect before, promote it.
9547         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
9548         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
9549         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
9550         * decl.c (select_decl): Replace two flag parameters by one.
9551         (unqualified_namespace_lookup): Likewise, pass flag.
9552         (lookup_flags): New function.
9553         (lookup_name_real): Compute flags, pass them.
9554         (lookup_namespace_name): Call with zero-flag.
9555         * decl2.c (ambiguous_decl): Add flag parameter, complain only
9556         according to flags.
9557         (lookup_using_namespace, qualified_lookup_using_namespace):
9558         Add flag parameter, pass them through.
9559         * lex.c (do_scoped_id): Call with zero-flag.
9561 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
9563         * typeck.c (convert_for_assignment): Use comptypes.
9565 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
9567         * semantics.c (finish_object_call_expr): Move test for the
9568         function called being a TYPE_DECL to ...
9569         * call.c (build_new_method_call): Here.
9571 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
9573         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
9574         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
9576         * lex.c (looking_for_typename): Don't initialize.
9578         * decl2.c (ambiguous_decl): Clarify error message.
9580         * decl.c (push_using_directive): Iterate over namespaces used
9581         indirectly.
9583 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9585         * decl2.c (add_using_namespace): Iterate over namespaces used
9586         indirectly.
9588         * decl.c (lookup_name_real): Accept namespace aliases as locals.
9589         (cat_namespace_levels): Ignore aliases.
9590         (duplicate_decls): Ignore duplicate aliases.
9591         * decl2.c (do_namespace_alias): Process block level namespace
9592         aliases.  Store alias with pushdecl.  Remove odr errors.
9593         * parse.y (namespace_alias): New non-terminal.
9594         (extdef): Use it.
9596 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
9598         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
9599         Handle TEMPLATE_TYPE_PARM.
9600         (arg_assoc): Rewrite.
9602         * pt.c (complete_template_args): Don't look at the context unless
9603         we have to.
9605         * method.c (build_decl_overload_real): Fix namespace handling.
9607         * typeck.c (build_unary_op): Extract a lone function from an
9608         OVERLOAD.
9610         * call.c (build_scoped_method_call): Handle getting a namespace
9611         for basetype in a destructor call.
9612         (check_dtor_name): Handle enums.
9614         * parse.y (using_directive): New nonterminal.
9615         (extdef, simple_stmt): Use it.
9617 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9619         * decl2.c (add_function): Move error message ...
9620         (arg_assoc_namespace): ... from here.
9622 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
9624         * parse.y (namespace_qualifier): Fix multiple level handling.
9625         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
9626         (arg_assoc): Don't skip the first argument of a function.
9628 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
9630         * search.c (my_tree_cons): Clean up.
9632 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
9634         * call.c (joust): Don't warn about "confusing" conversions to the
9635         same type.
9637 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9639         * class.c (push_nested_class): Complain about namespaces.
9640         * decl.c (start_decl): Enter the object's namespace.
9641         (cp_finish_decl): Leave it.
9642         (grokdeclarator): Likewise.
9643         * decl2.c (check_decl_namespace): New function.
9644         (finish_file): Call it.
9645         * parse.y (complex_direct_notype_declarator): Set complexity
9646         of namespace-qualified ids to -1, enter the namespace.
9648         * method.c (build_template_decl_overload): Expect _DECL as first
9649         parameter.  Put context temporarily into current_namespace.
9650         * pt.c (check_explicit_specialization): Change caller.
9651         (tsubst): Likewise.
9653         * init.c (build_offset_ref): Call mark_used and
9654         convert_from_reference for namespace members.
9656 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9658         * search.c (my_tree_cons): The bitfield is at index 2.
9660 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
9662         * lang-options.h: Format changed to work with new --help support
9663         in gcc/toplev.c
9665 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9667         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
9668         Do Koenig lookup in CALL_EXPR.
9669         (arg_assoc): Handle error_mark.
9670         * lex.c (is_global): New function.
9671         (do_identifier): Expect arguments for Koenig lookup.
9672         * parse.y (primary): Add rules for calls of unqualified function calls.
9673         (do_id): Change call of do_identifier.
9674         * pt.c (finish_stmt_expr): Likewise.
9675         * semantics.c (finish_id_expr): Likewise.
9676         (finish_call_expr): Add integer parameter to indicate
9677         argument-dependent lookup.
9679         * decl.c (struct binding_level): New field using_directives.
9680         (push_using_decl): Not sorry anymore.
9681         (push_using_directive): New function.
9682         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
9683         (unqualified_namespace_lookup): New function, code from ...
9684         (lookup_name_real): ... here.
9685         * decl2.c (lookup_using_namespace): Pass using list instead of
9686         initial scope.
9687         (validate_nonmember_using_decl): New function.
9688         (do_nonmember_using_decl): New function.
9689         (do_toplevel_using_decl): Use them.
9690         (do_local_using_decl): New function.
9691         (do_using_directive): Support block-level directives.
9692         * parse.y (simple_stmt): Support using declarations and
9693         directives.
9694         (namespace_qualifier, namespace_using_decl): New non-terminals.
9696         * xref.c (classname): New function.
9697         (GNU_xref_hier): Change class and base parameters to tree.
9698         * decl.c (xref_baseypes): Change caller.
9699         * friend.c (make_friend_class): Likewise.
9701 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
9703         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
9704         comparison.
9706         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
9707         template template parameter, record its use.
9708         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
9709         its template arguments if exists.
9711         * pt.c (coerce_template_template_parms): New function equivalent
9712         to coerce_template_parms when IS_TMPL_PARM is true.
9713         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
9714         all callers changed.
9716         (coerce_template_parms): Access ARGLIST properly when creating a
9717         new vector.  Only accept implicit TYPE_DECL as valid argument for
9718         a template template parameter when it is a base class of
9719         current_class_type.  Don't display error message when COMPLAIN is
9720         false.
9722 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
9724         * repo.c (get_base_filename): Use file_name_nondirectory.
9725         (open_repo_file): Likewise.
9726         * cp-tree.h (file_name_nondirectory): Add prototype.
9728 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
9730         * friend.c (do_friend): Pull the identifier out of declarator.
9731         Use cp_error and friends.
9732         * decl2.c (qualified_lookup_using_namespace): Fix call to
9733         purpose_member.
9734         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
9735         (grokvardecl): Use DECL_CLASS_SCOPE_P.
9736         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
9737         * class.c (warn_hidden): Fix for OVERLOAD.
9738         From grahams@rcp.co.uk:
9739         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
9740         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
9742 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
9744         * g++.1 (-traditional): Remove duplicated documentation.
9746 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
9748         * method.c (flush_repeats): Add nrepeats parameter.
9749         (issue_nrepeats): Likewise.
9750         (is_back_referenceable_type): New function.  Don't back-reference
9751         TEMPLATE_TYPE_PARMs as well as simple types like integers.
9752         (build_mangled_name_for_type): Likewise.
9753         (build_mangled_name_for_type_with_Gcode): Likewise.
9754         (lasttype): Remove.
9755         (nrepeats): Likewise.
9756         (Nrepeats): Likewise.
9757         (start_squangling): Don't clear the variables removed above.
9758         (end_squangling): Likewise.
9759         (flush_repeats): Tidy.  Use nrepeats parameter rather than
9760         Nrepeats global.
9761         (issue_nrepeats): Likewise, but with nrepeats global.  Use
9762         is_backreferenceable_type.
9763         (build_overload_nested_name): Tidy.  Add comment.  Use
9764         build_mangled_name_for_type.
9765         (build_underscore_int): Comment.
9766         (build_overload_scope_ref): Use build_mangled_name_for_type.
9767         (build_overload_int): Likewise.
9768         (build_template_template_parm_names): Tidy.
9769         (build_template_parm_names): Use build_mangled_name_for_type.
9770         (build_overload_identifier): Add comments.
9771         (build_mangled_name_for_type_with_Gcode): Split out from
9772         build_mangled_name.
9773         (build_mangled_name_for_type): Use it.
9774         (build_mangled_name): Rework to use build_mangled_name_for_type
9775         and to not use global nrepeats/Nrepeats.  Tidy.
9776         (process_modifiers): Tidy.
9777         (check_btype): Use is_backreferenceable_type.  Add comment.
9778         Rename `node' to `type'.
9779         (process_overload_item): Set numeric_output_need_bar here.
9780         Use build_mangled_name_for_type.  Tidy.
9781         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
9782         build_mangled_name_for_type.
9784         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
9785         for TYPE_DECLs.
9787 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
9789         * cp-tree.h (warn_long_long): Define.
9790         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
9791         warning "ANSI C++ does not support `long long'".
9792         * decl2.c (warn_long_long): Define.
9793         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
9795 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
9797         * decl.c (xref_tag): Handle attributes between 'class' and name.
9798         * parse.y (aggr): Likewise.
9799         * semantics.c (finish_class_definition): Likewise.
9800         * Makefile.in (EXPECTED): Adjust.
9802         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
9803         * decl2.c: Define them.
9804         (lang_decode_option): Handle them.
9805         * lang-options.h: Add -foptional-diags.
9806         * class.c (finish_struct): Don't complain about multiple meanings of
9807         name if -fno-optional-diags.
9808         * decl.c (pushdecl_class_level): Likewise.
9809         * lex.c (real_yylex): Check warn_multichar.
9811 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
9813         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
9815         * tree.c (make_binfo): Fix length.
9817 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
9819         * decl2.c (lang_decode_option): Remove warn_template_debugging.
9820         * lang-options.h: Likewise.
9822 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9824         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
9825         (process_start_catch_block): Likewise for variables
9826         `false_label_rtx', `call_rtx' and `return_value_rtx'.
9828 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
9830         * tree.c (build_srcloc): Make sure we allocate this node on the
9831         permanent obstack.
9833 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
9835         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
9836         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
9837         (lang_specific_driver): Only add -lm automatically if need_math is
9838         nonzero.
9840 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
9842         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
9844 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9846         * Makefile.in (EXPR_H): New dependency variable.
9847         (decl2.o): Depend on $(EXPR_H).
9848         (typeck.o): Likewise.
9849         (init.o): Likewise.
9850         (expr.o): Likewise.
9852 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
9854         * decl.c (start_enum): Put local enums on permanent_obstack.
9856 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
9858         * cp-tree.h (c_get_alias_set): Declare.
9859         * decl.c (init_decl_processing): Set lang_get_alias_set.
9861 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
9863         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
9864         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
9865         flag for all function decls which are in the exception table.
9866         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
9867         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
9868         code is emitted for any referenced rtti function.
9870 1998-06-25  Dave Brolley  <brolley@cygnus.com>
9872         * lang-specs.h: Use new | syntax to eliminate
9873         string concatenation.
9875 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
9877         * cp-tree.h (CP_DECL_CONTEXT): New macro.
9878         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
9879         * method.c (build_overload_nested_name): Likewise.
9880         * sig.c (build_signature_pointer_or_reference_type): Don't set
9881         DECL_CONTEXT.
9883 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9885         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
9886         * cp-tree.h (FROB_CONTEXT): New macro.
9887         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
9888         * decl.c (namespace_binding): Replace NULL_TREE with
9889         global_namespace.
9890         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
9891         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
9892         Likewise.
9893         * decl.c (pushtag): Use FROB_CONTEXT.
9894         (pushdecl, make_typename_type, define_function, grokdeclarator):
9895         Likewise.
9896         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
9897         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
9898         Likewise.
9899         * decl2.c (decl_namespace): Return global_namespace if no context.
9900         * method.c (build_overload_nested_name): Expect null as context.
9901         * pt.c (mangle_class_name_for_template): Do nothing for null
9902         contexts.
9903         (lookup_template_class): Allow for null id_context.
9905 1998-06-25  Richard Henderson  <rth@cygnus.com>
9907         * method.c (emit_thunk): Set current_function_is_thunk for the
9908         ASM_OUTPUT_MI_THUNK case as well.
9910 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
9912         * exception.cc (__cplus_type_matcher): Get a match_info pointer
9913         instead of an exception table entry as a parameter.
9915 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
9917         * parse.y (function_try_block): Don't call start_catch_handler.
9918         * except.c (call_eh_info): Remove coerced field from declaration.
9919         (build_eh_type_type_ref): New function to create an address of a
9920         rtti function for the new style exception tables.
9921         (expand_start_catch_block): Split function, this contains the
9922         common part.
9923         (process_start_catch_block_old): New function to perform the rest
9924         of expand_start_catch_block under old style exceptions.
9925         (process_start_catch_block_old): New function to perform the rest
9926         of expand_start_catch_block under new style exceptions.
9927         (expand_end_catch_block): Only pop the false label off the stack under
9928         the old style of exceptions.
9929         * semantics.c (finish_try_block): Don't call start_catch_handler.
9930         * exception.cc (struct cp_eh_info): Add original_value field.
9931         (__cplus_type_matcher): Perform type matching on the original exception
9932         value, and if we have a match, set the current value.
9933         (__cp_push_exception): Set the original exception value.
9935 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
9937         * call.c (joust): Fix confusing conversion warning.
9939         * call.c (build_op_delete_call): Add placement parm.  Check
9940         LOOKUP_SPECULATIVELY.
9941         * cp-tree.h, decl2.c, init.c: Adjust.
9942         * decl.c (finish_function): Use it.
9944         * pt.c (tsubst): Diagnose creating void fields or variables.
9946 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9948         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
9950         * cp-tree.h (check_dtor_name): Add prototype.
9952         * init.c (expand_member_init): Remove unused variables
9953         `ptr_type_node', `parm' and `rval'.
9955         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
9956         in call to fprintf.
9957         (lang_print_xnode): Likewise.
9959         * typeck2.c (enum_name_string): Cast argument to sprintf to long
9960         and use %ld specifier.
9962         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
9963         specifier in call to fprintf.
9964         (GNU_xref_member): Cast argument to sprintf to int.
9966 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
9968         * typeck2.c (pop_init_level): Warn about implicit zero initialization
9969         of struct members.
9971 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9973         * cp-tree.h: Prototype function `check_java_method'.
9975 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
9977         * class.c (finish_struct): Make conflicting use of id a pedwarn.
9978         * decl.c (pushdecl_class_level): Likewise.
9980 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
9982         * pt.c (convert_nontype_argument): Issue an error when presented
9983         with an integer (real) constant that cannot be simplified to an
9984         INT_CST (REAL_CST).
9986         * cp-tree.h (c_get_alias_set): Remove declaration added in
9987         1998-06-13 change that should never have been checked in.
9989 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
9991         * typeck.c (build_binary_op_nodefault): Change % in format strings
9992         to %%.
9994         * decl.c (grokvardecl): Don't build_static_name for decls that
9995         aren't at namespace scope.
9997         * init.c (perform_member_init): Catch default-initialization of
9998         references.
10000 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
10002         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
10004 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
10006         * method.c (hack_identifier): Complain about getting a namespace
10007         or class template.
10008         * typeck.c (decay_conversion): Remove check for namespaces.
10009         * typeck2.c (incomplete_type_error): Likewise.
10010         * parse.y (template_arg): Add PTYPENAME expansion.
10012 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
10014         * decl.c (grokvardecl): Don't build external assembler names for
10015         TYPENAMEs in other namespaces as there is no declarator.
10016         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
10017         info from DECL_CONTEXT if it is NULL.
10019 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
10021         * call.c (check_dtor_name): Split out.
10022         (build_scoped_method_call): Use it.
10023         (build_method_call): Use it.
10024         * init.c (build_offset_ref): Use it.
10026         * typeck.c (build_static_cast): Fix handling of pointers to members.
10028         * decl.c (finish_function): Just return nothing from a constructor.
10029         * typeck.c (c_expand_return): Complain about returning a void
10030         expression from a destructor.
10032 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
10034         * class.c (alter_access): Accept a BINFO explaining how to get
10035         from the entity whose accessed is being altered to the type doing
10036         the altering.
10037         (handle_using_decl): New function containing code split out from ...
10038         (finish_struct_1): Here.
10040         * cp-tree.h (complete_type_or_else): Declare.
10041         * init.c (build_new_1, build_delete): Use it.
10042         * typeck.c (require_complete_type): Use complete_type, rather than
10043         expanding it inline.
10044         (complete_type_or_else): New function.
10045         (build_component_ref): Use it.
10046         (pointer_int_sum): Make sure the type pointed to is complete.
10047         (pointer_diff): Likewise.
10049         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
10050         types.
10052         * search.c (get_matching_virtual): Note that member templates
10053         cannot override virtual functions.
10055 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
10057         * pt.c (check_explicit_specialization): If DECLARATOR turned into
10058         an error_mark_node from lookup_template_function, return the same.
10059         (determine_specialization): Also make sure TEMPLATE_ID isn't an
10060         error_mark_node, before we try to read its operands.
10061         * decl.c (grokdeclarator): If we got an error_mark_node from
10062         check_explicit_specialization, just return it right back.
10064 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
10066         * class.c (instantiate_type): Don't treat template-ids that don't
10067         specify any template arguments as equivalent to ordinary
10068         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
10069         pointer-to-members for member templates.  Tidy slightly.
10070         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
10071         * init.c (build_offset_ref): Handle template-ids like ordinary
10072         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
10073         offset part of the OFFSET_REF.
10074         * typeck.c (build_unary_op): Change check for unknown types to
10075         look for OFFSET_REFs, not SCOPE_REFs.
10077 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
10079         * pt.c (is_member_template_class): New function.
10080         (push_template_decl_real): Use it.
10082 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
10084         * friend.c (do_friend): Add support for nested classes using
10085         member functions of the enclosing class as friends.
10087 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
10089         * call.c (convert_default_arg): Make global, not static.
10090         (convert_arg_for_ellipsis): Split out from ...
10091         (build_over_call): Here.
10092         * cp-tree.h (convert_default_arg); Declare.
10093         (convert_arg_to_ellipsis): Likewise.
10094         (do_member_init): Remove.
10095         * init.c (do_member_init): Remove; this code is dead.
10096         (expand_member_init): Remove much of this code; it is dead.
10097         * typeck.c (convert_arguments): Use convert_default_arg and
10098         convert_arg_for_ellipsis, rather than duplicating here.
10100         * call.c (convert_like): Don't fail silently if
10101         build_user_type_conversion fails.  Always return error_mark_node
10102         for failure.
10104 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
10106         * search.c (covariant_return_p): Complain about ambiguous base.
10108         * typeck.c (build_component_ref): Diagnose ref to nested type.
10110 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
10112         * decl.c (grokparms): Check that INIT isn't an error_mark_node
10113         before giving error about invalid type for default arg.
10115 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
10117         * call.c (build_method_call): Fix thinko.
10119 1998-06-10  Dave Brolley  <brolley@cygnus.com>
10121         * decl2.c (lang_decode_option): New argc/argv interface.
10122         * cp-tree.h (lang_decode_option): New argc/argv interface.
10123         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
10124         specified for cpplib-enabled compilers.
10125         * lex.c (lang_init): Don't check_newline for cpplib.
10126         (init_parse): Don't initialize cpplib here.
10128 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
10130         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
10131         piece before checking DECL_MUTABLE_P.
10133 1998-06-10  John Carr  <jfc@mit.edu>
10135         * tree.c (debug_binfo): Make printf format match arguments.
10137         * error.c (OB_PUTI): Make printf format match arguments.
10139 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
10141         * init.c (perform_member_init): Handle default-initialization.
10143         * except.c (build_throw): Handle throwing NULL.
10145         * typeck.c (build_x_function_call): Use resolve_offset_ref.
10147         * search.c (compute_access): Only strip an anonymous union
10148         for a FIELD_DECL.
10150         * call.c (add_builtin_candidates): Tweak.
10152         * cvt.c (build_expr_type_conversion): Restore code for conversion
10153         from class types.
10154         * decl2.c (delete_sanity): Use it.  Clean up.
10156         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
10158 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
10160         * typeck.c (c_expand_return): Don't warn about void expressions on
10161         return statements in functions returning void.
10163 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
10165         * pt.c (fn_type_unification): Revise documentation.  Tidy.
10166         (type_unification): Likewise.
10168 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
10170         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
10171         expand_end_catch.
10172         * parse.y (function_try_block): Rename expand_start_catch, and delete
10173         expand_end_catch.
10174         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
10175         expand_end_catch.
10177 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
10179         * search.c (lookup_member): New fn.
10180         * class.c (finish_struct_1): Use it.
10181         * decl.c (lookup_name_real): Use it.
10183 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10185         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
10187         * cp-tree.h: Add prototype for `maybe_print_template_context' and
10188         `maybe_make_one_only'.
10190         * decl.c (auto_function): Remove unused variable `decl'.
10192         * decl2.c: Include dwarf2out.h and dwarfout.h.
10194         * lex.c: Remove redundant declarations of `set_float_handler' and
10195         `asm_out_file'.
10197 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
10199         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
10200         time flag.  Call __cp_eh_info instead of __cp_exception_info.
10201         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
10202         (__cp_exception_info): Return offset into cp_eh_info structure to
10203         match what use to be the start of this structure.
10204         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
10205         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
10206         compile time flag.
10207         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
10208         __cp_eh_info instead of __cp_exception_info.
10210 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
10212         * decl.c (cp_finish_decl): Disable inlining of extern inlines
10213         with static variables.
10215 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
10217         * init.c (build_offset_ref): Correct previous change to use build,
10218         not build_min.
10220 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
10222         * class.c (instantiate_type): Handle pointer-to-members where the
10223         member is a template.
10224         * init.c (build_offset_ref): Likewise.
10225         * typeck.c (build_unary_op): Likewise.
10227 1998-06-07  Richard Henderson  <rth@cygnus.com>
10229         * lex.c (lang_init_options): New function.
10230         (lang_init): Remove flag_exceptions == 2 hack.
10232 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
10234         * search.c (envelope_add_decl): Tweak for implicit typename.
10236         * call.c (joust): Also warn about confusing conversion op/constructor
10237         overload resolution.
10239         * spew.c (yylex): Also return the TYPE_DECL if got_object.
10240         Don't clear got_object after '~'.
10241         * call.c (build_scoped_method_call): Tweak destructor handling.
10242         (build_method_call): Likewise.
10243         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
10244         TYPE_MAIN_VARIANT for destructors.
10245         * semantics.c (finish_object_call_expr): Complain about calling a
10246         TYPE_DECL.
10248 1998-06-05  Per Bothner  <bothner@cygnus.com>
10250         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
10251         Define - update needed by gcc.c change.
10253 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
10255         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
10257 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
10259         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
10260         * decl.c (lookup_name_real): Add namespaces_only parameter.
10261         If set, return only NAMESPACE_DECLs.
10262         (select_decl): Likewise.
10263         (identifier_type_value): Give additional parameter.
10264         (lookup_name_nonclass): Likewise.
10265         (lookup_name): Likewise.
10266         (find_binding): Skip namespace aliases.
10267         (binding_for_name): Likewise.
10268         (push_namespace): Check for namespace aliases.
10269         (lookup_name_namespace_only): New function.
10270         (begin_only_namespace_names, end_only_namespace_names): New functions.
10271         * decl2.c (set_decl_namespace): Skip namespace aliases.
10272         (do_using_directive): Likewise.
10273         (do_namespace_alias): Produce namespace aliases, fix alias
10274         redeclaration.
10275         * error.c (dump_decl): Support SCOPE_REF.
10276         * parse.y (extdef): Wrap lookup with namespace_only for namespace
10277         aliases and using declarations.
10279 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
10281         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
10283         * error.c (dump_expr): Clean up NEW_EXPR case.
10285 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10287         Suggested by Brendan Kehoe
10288         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
10289         treat it as using ::decl.
10291         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
10293         * tree.c (mapcar): Support NEW_EXPR.
10295         * error.c (dump_expr): Support NEW_EXPR.
10297 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
10299         * method.c (make_thunk): Use overload machinery to make name.
10300         * search.c (covariant_return_p): New fn.
10301         (get_matching_virtual): Use it.
10303         * init.c (build_new_1): Fix check for void.
10305 1998-06-01  Per Bothner  <bothner@cygnus.com>
10307         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
10308         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
10309         java_int_type_node, java_long_type_node, java_float_type_node,
10310         java_double_type_node, java_char_type_node, java_boolean_type_node):
10311         New "primitive" types, with predefined names __java_byte etc.
10312         (record_builtin_java_type):  New function.
10313         (init_decl_processing):  Make Java types with record_builtin_java_type.
10314         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
10315         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
10316         (grokfndecl):  Call check_java_method for Java classes.
10317         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
10318         (process_overload_item):  Match types against specific
10319         java_XX_type_node types, rather than using is_java_type.
10320         * class.c (finish_struct_1):  Don't add default copy constructor
10321         or operator= if TYPE_FOR_JAVA.
10322         (pop_lang_conext):  Restore strict_prototyp proper if Java.
10323         * decl2.c (acceptable_java_type, check_java_method):  New functions.
10324         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
10325         (tsubst):  Move common statement after if statement.
10326         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
10328 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
10330         * pt.c (for_each_template_parm): Use first_rtl_op.
10332         * tree.c (build_cplus_array_type_1): Also check index_type for
10333         template parms.
10335 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
10337         * pt.c (tsubst): Always copy BINFO_BASETYPES.
10339 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
10341         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
10342         TYPE_SIZE_UNIT too.
10344 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
10346         * decl.c (grokdeclarator): Don't complain about in-class
10347         initialization of static consts if we don't really know the type
10348         of the variable.
10350 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
10352         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
10353         * method.c (build_destructor_name): New fn.
10354         * decl2.c (maybe_retrofit_in_chrg): Split out...
10355         (grokclassfn): From here.  Reorganize.
10356         * decl.c (grok_ctor_properties): Make sure ctors for types with
10357         vbases have the in_chrg parm.
10358         * pt.c (instantiate_class_template): Update
10359         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
10360         grok_*_properties.
10361         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
10363 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
10365         * pt.c (instantiate_decl): Make test for whether or not static
10366         variables should be instantiated early match its comment.
10368 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
10370         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
10371         a member.
10372         (start_function): Call check_default_args.
10373         * decl2.c (grokfield): Don't call check_default_args.
10374         (check_default_args): Use cp_error_at.
10375         * lex.c (do_pending_defargs): Call check_default_args.
10377 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
10379         * call.c (build_method_call): Make sure get_type_value returns
10380         something before we try to use its TYPE_MAIN_VARIANT.
10381         (build_scoped_method_call): Likewise.
10383 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
10385         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
10386         initialize an array.
10388         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
10389         DECL_VIRTUAL_P.
10391         * friend.c (do_friend): Clarify template warning.
10393 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
10395         * decl.c (shadow_label): Don't treat decls as identifiers.
10396         (maybe_push_to_top_level): Clear shadowed_labels.
10398         * pt.c (instantiate_decl): Reset lineno and filename after calling
10399         regenerate_decl_from_template.
10401         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
10402         error_mark_node.
10404 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
10406         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
10408 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10410         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
10411         (convert_nontype_argument): Handle cases when nontype template
10412         parameters become classes after substitution.
10414 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
10416         * friend.c (is_friend): Use comptypes, rather than == to compare
10417         types.  Modify for new representation of template friends.
10418         (make_friend_class): Likewise.
10419         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
10420         (instantiate_class_template): Deal with template friends.
10422         * decl.c (store_parm_decls): Remove redundant call to
10423         expand_main_function.
10425 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10427         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
10428         DECL_USE_TEMPLATE.
10430 1998-05-26  Per Bothner  <bothner@cygnus.com>
10432         * language_as_string:  Handle lang_java.
10434 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
10436         * decl.c (pushdecl): Don't copy the type_decl.
10438 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10440         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
10441         current_class_type.
10442         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
10444         * parse.y (complex_direct_notype_declarator): Use $1 to access
10445         scope of notype_qualified_id.
10447 1998-05-26  Dave Brolley  <brolley@cygnus.com>
10449         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
10450         (init_parse): Initialize cpplib interface.
10452         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
10453         empty continuation.
10455 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
10457         * decl.c (pushtag): Avoid crashing on erroneous input.
10459 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10461         * decl.c (push_namespace): Only produce one unique name for
10462         anonymous namespaces.
10463         (get_unique_name): Remove.
10465 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
10467         * call.c (tourney): Don't do any extra comparisons.
10469         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
10471         * cp-tree.h (processing_template_parmlist): Declare.
10472         * decl.c (pushtag): Don't call push_template_decl when we
10473         shouldn't.
10474         * pt.c (processing_template_parmlist): New variable.
10475         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
10476         (complete_template_args): Use it.
10477         (add_to_template_args): Likewise.
10478         (innermost_args): Likewise.
10479         (tsubst): Likewise.
10480         (begin_template_parm_list): Use processing_template_parmlist.
10481         (end_template_parm_list): Likewise.
10483         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
10484         * decl.c (grokdeclarator): Use it.
10485         * decl2.c (grok_x_components): Likewise.
10486         * init.c (initializing_context): Likewise.
10487         * method.c (do_build_copy_constructor): Likewise.
10488         (do_build_assign_ref): Likewise.
10489         * search.c (compute_access): Likewise.
10490         * typeck.c (build_component_ref): Likewise.
10492         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
10493         unnamed type a typedef name "for linkage purposes".
10495         * pt.c (lookup_template_class): Don't look at
10496         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
10498         * method.c (build_overload_int): Handle error cases gracefully.
10500         * pt.c (instantiate_decl): Handle static member variables
10501         correctly.
10503         * pt.c (tsubst): Use the tsubst'd type when producing new
10504         TEMPLATE_PARM_INDEX nodes.
10506 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
10508         * tree.c (cp_tree_equal): Handle pointers to member functions.
10510         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
10511         sure the type of the REF_BIND is a reference type.
10512         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
10513         target_type for clarity.
10515         * parse.y (xcond): Move call to condition_conversion ...
10516         * semantics.c (finish_for_cond): Here.
10517         * parse.c: Regenerated.
10519 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
10521         * decl.c (push_namespace): Namespaces have type void.
10522         * typeck2.c (incomplete_type_error): Complain about namespace
10523         used as expression.
10524         * typeck.c (decay_conversion): Likewise.
10526 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10528         * error.c (dump_expr): Support namespaces.
10530 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
10532         * cp-tree.def: Add SRCLOC.
10533         * cp-tree.h: Add struct tree_srcloc and accessor macros.
10534         * tree.c (build_srcloc, build_srcloc_here): New fns.
10535         * pt.c (add_pending_template): Use build_srcloc_here.
10536         (push_tinst_level): Update last_template_error_tick before erroring.
10537         (instantiate_decl): Restore lineno and input_filename before
10538         calling add_pending_template.
10539         * decl2.c (finish_file): Set up lineno and input_filename for
10540         pending templates.
10542 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
10544         * decl.c (lang_print_error_function): New fn.
10545         (init_decl_processing): Set print_error_function to use it.
10546         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
10548         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
10549         ICS_BAD_FLAG.
10551         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
10552         copy-initialization.
10554         * class.c (build_vtable_entry): Use int_fits_type_p.
10555         (build_vtable): Pass a signed offset to build_vtable_entry.
10556         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
10557         set_rtti_entry): Likewise.
10559 1998-05-22  Per Bothner  <bothner@cygnus.com>
10561         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
10562         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
10564 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
10566         * pt.c (print_template_context): Use fprintf instead of cp_error.
10568         * pt.c (determine_specialization): Just return an error_mark_node.
10569         Also print the decl we want in error messages.  If we complain,
10570         return error_mark_node.
10571         (tsubst_friend_function): Set lineno and input_filename so
10572         error messages will be useful.
10573         (instantiate_template): Just return an error_mark_node.
10574         (check_explicit_specialization): Don't mess with a returned
10575         error_mark_node.
10577         * pt.c (print_template_context): Add new argument.
10578         (maybe_print_template_context): New fn.
10579         (push_tinst_level): Increment tinst_level_tick.
10580         (pop_tinst_level): Likewise.
10581         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
10582         xrealloc instead of xmalloc.
10584         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
10586 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
10588         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
10589         if the template we looked up is the same as the one we already
10590         have.
10592 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
10594         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
10595         (cpp_reader,parse_in): Add for cpplib.
10596         (check_newline): Call handle_sysv_pragma with new interface.
10597         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
10599         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
10600         (sub_getch): Call GETC for cpplib.
10602         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
10603         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
10605         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
10607 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
10609         * decl2.c (maybe_make_one_only): New fn.
10610         (import_export_vtable): Use it.
10611         (import_export_decl): Likewise.
10612         * pt.c (mark_decl_instantiated): Likewise.
10614 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
10616         * decl2.c (find_representative_member): Rename to ...
10617         (build_anon_union_vars): New function.
10618         (finish_anon_union): Fix stupidity of previous change.
10620 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
10622         * decl.c (grokfndecl): Handle definition of specialization in
10623         friend declaration.
10625         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
10627 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
10629         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
10630         to look for type declarations.
10631         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
10632         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
10633         (finish_member_class_template): Declare.
10634         * decl.c (pushtag): Put member class templates on the
10635         CLASSTYPE_TAGS list, just as for ordinary member classes.
10636         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
10637         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
10638         IDENTIFIER_NAMESPACE_VALUEs.
10639         * parse.y (component_decl): Move code to ...
10640         * semantics.c (finish_member_class_template): New function.
10641         Don't put member class templates on the list of components for a
10642         class.
10643         * parse.c: Regenerated.
10644         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
10645         In fact, don't use DECL_CONTEXT at all here.
10647 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
10649         * decl.c (record_unknown_type): New function.
10650         (init_decl_processing): Call it for the unknown and global type
10651         nodes.
10653 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
10655         * decl2.c (find_representative_member): New function.
10656         (finish_anon_union): Use it.
10658         * cp-tree.h (MAIN_NAME_P): New macro.
10659         (DECL_MAIN_P): Likwise.
10660         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
10661         (grokfndecl): Use the new macros.
10662         (grokdeclarator): Likewise.
10663         (start_function): Likewise.
10664         (store_parm_decls): Likewise.
10665         (finsh_function): Likewise.
10666         * friend.c (do_friend): Likewise.
10667         * typeck.c (build_function_call_real): Likewise.
10668         (build_unary_op): Likewise.
10670 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
10672         * decl2.c (start_objects, finish_objects, do_dtors,
10673         do_ctors): Split out from...
10674         (finish_file): ...here.
10676 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
10678         * tree.c (is_overloaded_fn): Don't abort on placeholders from
10679         push_class_decls.
10681 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
10683         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
10685         * error.c (dump_expr): Handle an ARROW_EXPR.
10687 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
10689         * decl.c (saveable_obstack): Declare.
10690         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
10691         declare, if necessary.
10693 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
10695         * call.c (compare_qual): Remove.
10696         (is_subseq): Tweak.
10697         (is_properly_derived_from): New function.
10698         (maybe_handle_ref_bind): Likewise.
10699         (maybe_handle_implicit_object): Likewise.
10700         (compare_ics): Modify substantially to bring into conformance with
10701         the standard.
10702         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
10703         (comp_cv_qualification): Declare.
10704         (comp_cv_qual_signature): Likewise.
10705         * typeck.c (comp_cv_qualification): Likewise.
10706         (comp_cv_qual_signature): Likewise.
10708 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10710         * Makefile.in (parse.o): Depend on toplev.h.
10712         * class.c (typecode_p): Remove prototype and definition.
10714         * cp-tree.h (currently_open_class, is_empty_class, member_p):
10715         Add prototype.
10717         * decl.c (push_overloaded_decl_top_level): Remove prototype and
10718         definition.
10720         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
10721         in call to `cp_thing'.
10722         (cp_warning): Likewise for function pointer `warning'.
10724         * except.c (do_function_call): Remove prototype and definition.
10725         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
10727         * method.c (is_java_type): Add prototype and make it static.
10729         * parse.y: Include toplev.h.
10731         * pt.c (type_unification): Remove unused variable `arg'.
10732         (instantiate_decl): Likewise for `save_ti'.
10734         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
10736 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
10738         * init.c (build_member_call): Handle template_ids.
10739         * parse.y (primary): Add global_scope template_id.
10741 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
10743         * decl2.c (get_sentry): Use end_temporary_allocation.
10744         Don't declare permanent_obstack.
10746 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
10748         * parse.y (.finish_new_placement): New non-terminal.
10749         (unary_expr, new_type_id): Use it.
10750         * parse.c: Regenerated.
10752 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
10754         * pt.c (redeclare_class_template): Say where the original definition
10755         of the template-parameter's default argument appeared.
10757 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
10759         * call.c (build_over_call): Tweak empty class handling.
10761         * decl.c (make_typename_type): Use currently_open_class.
10763         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
10765 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
10767         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
10768         for a type unless it is one.
10770         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
10772 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
10774         * Makefile.in (program_transform_name, objdir): Define.
10776         * Makefile.in (BISON): Use bison from the build tree if it exists.
10777         (FLEX): Likewise.
10779 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
10781         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
10783         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
10785 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
10787         * call.c (build_scoped_method_call): Likewise.
10789 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
10791         * init.c (build_new_1): Call suspend_momentary around the creation
10792         of values that must be saved for exception handling.
10793         * parse.y (.build_new_placement): New non-terminal.
10794         (unary_expr, new_placement): Use it.
10795         * parse.c: Regenerated.
10797 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
10799         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
10800         old and new types.
10802         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
10803         canonical type.
10805         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
10807 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
10809         * decl.c (start_decl): Revert problem change.
10811         * Makefile.in (CONFLICTS): Fix.
10813 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
10815         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
10817 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
10819         * class.c (finish_struct_1): Use BINFO_SIZE.
10821         * decl.c (start_decl): Use 'tem'.
10823 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
10825         * exception.cc: Include eh-common.h.
10826         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
10827         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
10828         (__cp_push_exception): Initialize eh_info struct as well.
10829         * except.c: Remove local structs and include eh-common.h.
10830         (init_exception_processing): Set language and version codes.
10831         (call_eh_info): Add presence of eh_info to runtime description of
10832         struct cp_eh_info.
10833         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
10834         * semantics.c (finish_try_block): Call start_catch_block() and
10835         end_catch_block().
10836         * parse.y (function_try_block): Call start_catch_block() and
10837         end_catch_block().
10839 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
10841         * typeck.c (original_type): New function.
10842         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
10843         to see if they're actually the same.
10844         * cp-tree.h (original_type): Declare.
10846 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10848         * Makefile.in (lex.o): Depend on output.h.
10850         * call.c (add_function_candidate): Remove unused variable `cand'.
10851         (add_conv_candidate): Likewise.
10852         (build_builtin_candidate): Likewise.
10854         * cp-tree.h: Add prototype for `types_overlap_p'.
10856         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
10858         * decl2.c (merge_functions): Remove unused variables `tmp' and
10859         `tempn'.
10861         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
10862         (code_as_string): Likewise.
10863         (language_as_string): Likewise.
10864         (parm_as_string): Likewise.
10865         (op_as_string): Likewise.
10866         (assop_as_string): Likewise.
10867         (cv_as_string): Likewise.
10869         * lex.c: Include output.h.
10871         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
10873         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
10874         ATTRIBUTE_UNUSED.
10876         * tinfo.cc (__class_type_info::dcast): Change the type of variable
10877         `i' from int to size_t.
10879         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
10880         ATTRIBUTE_UNUSED.
10882 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
10884         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
10885         DECL_NAMESPACE_SCOPE_P.
10886         (lang_decl_name): Likewise.
10887         * pt.c (tsubst_friend_function, tsubst): Likewise.
10888         * decl.c (pushdecl, redeclaration_error_message, start_decl,
10889         cp_finish_decl, start_function): Likewise.
10890         * class.c (finish_struct_1): Likewise.
10891         * call.c (build_over_call): Likewise.
10892         (compare_ics): Use DERIVED_FROM_P.
10894 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
10896         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
10897         * method.c (build_mangled_name): Use it.
10898         (build_decl_overload_real): Likewise.
10900         * error.c (dump_simple_decl): New function, broken out from ...
10901         (dump_decl): Use it.
10903 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
10905         * ptree.c (lang_print_xnode): Add missing `break'.
10907         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
10909         * call.c (add_template_candidate): Adjust for changes to
10910         fn_type_unification.
10911         (add_template_candidate_real): Likewise.
10912         (add_template_conv_candidate): Likewise.
10913         (build_user_type_conversion_1): Likewise.
10914         (build_new_function_call): Likewise.
10915         (build_object_call): Likewise.
10916         (build_new_op): Likewise.
10917         (build_new_method_call): Likewise.
10918         * class.c (instantiate_type): Likewise.
10919         * cp-tree.h (unification_kind_t): New type.
10920         (fn_type_unification): Adjust prototype.
10921         (type_unificaiton): Likewise.
10922         * pt.c (UNIFY_ALLOW_NONE): New macro.
10923         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
10924         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
10925         (UNIFY_ALLOW_DERIVED): Likewise.
10926         (unify): Change prototype.
10927         (maybe_adjust_types_for_deduction): New function.
10928         (check_cv_quals_for_unify): Likewise.
10929         (determine_specialization): Adjust.
10930         (fn_type_unification): Likewise.
10931         (type_unification): Likewise.
10932         (type_unification_real): Likewise.  Use
10933         maybe_adjust_types_for_deduction.  Fix mishandling of
10934         back-unification of template functions passed as arguments.  Pass
10935         appropriate combination of UNIFY_ALLOW_* to unify.
10936         (unify): Remove unused NTPARMS parameter.  Use
10937         check_cv_quals_for_unify.  Remove bogus code that allowed
10938         too-generous unification in order to adhere more closely to standard.
10939         (get_bindings_real): Adjust.
10940         (get_class_bindings): Likewise.
10942         * method.c (build_overload_identifier): Only use the innermost
10943         template arguments when mangling.
10944         * pt.c (tsubst_template_argument_vector): New function.
10945         (complete_template_args): Deal with the situation where the
10946         extra_args contain more than one level of arguments.
10947         (lookup_template_class): Deal with member template classes, which
10948         may have more than one level of arguments.
10949         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
10950         Improve handling of member template classes.  Use
10951         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
10952         tsubst_template_argument_vector where appropriate.
10953         (regenerate_decl_from_template): Break out from ...
10954         (instantiate_decl): Here.
10956         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
10957         * parse.h: Regenerated.
10958         * parse.c: Really regenerated.
10960         * cp-tree.h (finish_unary_op_expr): New function.
10961         (finish_id_expr): Likewise.
10962         (begin_new_placement): Likewise.
10963         (finish_new_placement): Likewise.
10964         (finish_declarator): Likewise.
10965         (finish_translation_unit): Likewise.
10966         (finish_parmlist): Likewise.
10967         (begin_class_definition): Likewise.
10968         (finish_class_definition): Likewise.
10969         (finish_default_args): Likewise.
10970         (finish_inline_definitions): Likewise.
10971         * parse.y (GCC_ASM_KEYWORD): Remove.
10972         (TYPENAME_ELLIPSIS): Likewise.
10973         * parse.c: Regenerated.
10974         Use new functions in semantics.c in the actions for many rules.
10975         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
10976         * hash.h: Regenerated.
10977         * semantics.c (finish_expr_stmt): Allow NULL expr.
10978         (finish_unary_op_expr): New function, containing
10979         code previously in parse.y.
10980         (finish_id_expr): Likewise.
10981         (begin_new_placement): Likewise.
10982         (finish_new_placement): Likewise.
10983         (finish_declarator): Likewise.
10984         (finish_translation_unit): Likewise.
10985         (finish_parmlist): Likewise.
10986         (begin_class_definition): Likewise.
10987         (finish_class_definition): Likewise.
10988         (finish_default_args): Likewise.
10989         (finish_inline_definitions): Likewise.
10991 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
10993         * typeck.c (build_c_cast): Don't decay arrays and functions to
10994         pointer type when converting to a class type.
10996 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
10998         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
10999         (DECL_CLASS_SCOPE_P): Likewise.
11001 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
11003         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
11004         * decl2.c (constructor_name_full): Likewise.
11006 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
11008         * tree.c (mapcar): Add OVERLOAD support.
11010         * init.c (resolve_offset_ref): We must use basetype_path before we
11011         destroy it with a call to convert_pointer_to.
11013 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11015         * class.c (currently_open_class): New fn.
11016         * decl.c (lookup_name_real): Use it.
11017         * search.c (lookup_field): Likewise.
11019 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11021         * cp-tree.def (OVERLOAD): New node.
11022         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
11023         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
11024         (NAMESPACE_BINDING): Remove.
11025         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
11026         namespace_binding.
11027         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
11028         Define.
11029         (tree_overload): New struct.
11030         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
11031         (REAL_IDENTIFIER_TYPE_VALUE): Define.
11032         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
11033         (lang_decl_flags): Remove in_namespace.
11034         (lang_decl): Remove chain.
11035         (DECL_CHAIN, DECL_NAMESPACE): Remove.
11036         (flag_honor_std): Declare extern.
11037         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
11038         namespace_binding, set_namespace_binding,
11039         lookup_function_nonclass, cat_namespace_levels,
11040         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
11041         scratch_ovl_cons, ovl_member, build_overload): Declare.
11042         (decl_list_length, get_namespace_id, current_namespace_id,
11043         overloaded_globals_p): Remove.
11044         (lookup_using_namespace, qualified_lookup_using_namespace): Change
11045         return type.
11046         (push_scratch_obstack): New macro.
11047         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
11048         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
11049         convs, fns.
11050         (build_new_function_call): Iterate using OVL_CHAIN.
11051         Print DECL_NAME in when reporting ambiguities.
11052         (build_object_call): Iterate using OVL_NEXT for fns, convs.
11053         (build_new_op): Call lookup_function_nonclass.
11054         Iterate using OVL_NEXT.
11055         (build_op_delete_call): Change detection of members.
11056         Do not wrap TREE_LIST around fields and single global functions.
11057         (build_over_call): Don't push a class level if the context is a
11058         namespace.
11059         (build_new_method_call): Iterate using OVL_NEXT.
11060         * class.c (add_method): Chain overloaded members using
11061         build_overload.  Remove copying of method.
11062         (grow_method): When iterating through the obstack, expect OVERLOAD
11063         nodes.  Chain overload members.
11064         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
11065         nodes in call to get_baselinks.
11066         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
11067         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
11068         fdecls that are OVERLOAD nodes.
11069         (validate_lhs): New function.
11070         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
11071         code.  Use DECL_NAME in error messages.  Split code between global
11072         and member function processing.
11073         * decl.c (global_type_node): New static variable.
11074         (in_std): New global.
11075         (struct binding_level): New field usings.
11076         (resume_binding_level): Assert that we are not in a class.
11077         (toplevel_bindings_p): Just check for namespace_p or
11078         pseudo_global.
11079         (resume_level): Remove.
11080         (find_binding): New function.
11081         (binding_for_name): Call it.
11082         (namespace_binding, set_namespace_binding): New functions.
11083         (push_namespace): Associate binding level with new namespace,
11084         resume_binding_level for existing namespace.  Remove old code.
11085         Fake std by counting.
11086         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
11087         (maybe_push_to_top_level): Save current namespace.
11088         (pop_from_top_level): Restore saved namespace.
11089         (pop_namespace): Call suspend_binding_level.  Remove old code.
11090         (cat_namespace_levels): New function.
11091         (set_identifier_type_value_with_scope): For namespace bindings,
11092         set BINDING_TYPE, and use global_type_node.
11093         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
11094         (identifier_type_value): New function.
11095         (pushtag): If no context, use current_namespace.
11096         (duplicate_decls): Don't process DECL_CHAIN.
11097         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
11098         already set.  Never reset it to NULL_TREE.  Lookup global variables
11099         in their namespace.  Push overloaded templates if they are on
11100         namespace level.
11101         (pushdecl_namespace_level): New function.
11102         (pushdecl_top_level): Implement using pushdecl_namespace_level.
11103         (pushdecl_using_decl): New function.
11104         (overloaded_globals_p): Remove.
11105         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
11106         them.  Use namespace_binding and set_namespace_value.
11107         (redeclaration_error_message): Complain if the declarations come
11108         from different namespaces.
11109         (lookup_tag): On namespace level, look in the BINDING_TYPE.
11110         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
11111         old code.
11112         (select_decl): New function.
11113         (lookup_name_real): Call it for qualified and unqualified lookup.
11114         Pass tree_bindings from the stack.
11115         If prefer_type is 1, also accept namespaces.
11116         (lookup_function_nonclass): New function.
11117         (init_decl_processing): Set the binding level of the global
11118         namespace to global_binding_level.
11119         Build a proper type list for __builtin_apply.
11120         Initialize std_node to "fake std" if flag_honor_std is set.
11121         Initialize global_type_node.
11122         Allocated bad_alloc in namespace std if flag_honor_std.
11123         (define_function): Set the DECL_CONTEXT to the current_namespace.
11124         (start_decl): A namespace is not considered as a context here.  If
11125         the DECL_CONTEXT is a namespace, push the decl.
11126         (cp_finish_decl): Check for namespaces used as initializers.
11127         (grokfndecl): Add namespace parameter.  Remove processing of
11128         DECL_CHAIN.
11129         (grokvardecl): Add namespace parameter.
11130         (grokdeclarator): Process SCOPEs that are namespaces.  For
11131         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
11132         (start_function): Check for contexts that are namespaces.
11133         Set context for declarations that have not been pushed.
11134         (store_parm_decls): Check for ::main only.
11135         (finish_function): Likewise.
11136         (start_method): Check for contexts that are namespaces.
11137         (start_method): Remove DECL_CHAIN processing.
11138         * decl2.c (flag_honor_std): Declare.
11139         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
11140         (decl_namespace_list): New static global.
11141         (grok_x_components): Ignore namespaces as type contexts.
11142         (check_classfn): Expect OVERLOAD nodes.
11143         (grokfield): Remove DECL_CHAIN processing.
11144         (finish_file): Call cat_namespace_levels.
11145         (merge_functions): New function.
11146         (ambiguous_decl): Rewrite.
11147         (lookup_using_namespace): Produce tree_bindings.
11148         (qualified_lookup_using_namespace): Likewise.
11149         (set_decl_namespace, decl_namespace, current_decl_namespace,
11150         push_decl_namespace, pop_decl_namespace): New functions.
11151         (arg_lookup): New struct.
11152         (add_function, arg_assoc_namespace, arg_assoc_class,
11153         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
11154         New functions.
11155         (get_namespace_id, current_namespace_id): Remove.
11156         (do_toplevel_using_decl): Rewrite.
11157         (do_class_using_decl): Complain about namespace qualifiers.
11158         (do_using_directive): Sorry if not on namespace level.  Complain
11159         about unknown namespaces.
11160         * error.c (dump_aggr_type): Check for namespace contexts.
11161         * except.c (init_exception_processing): Push terminate into std.
11162         * friend.c (is_friend): A namespace is not a context, here.
11163         * init.c (expand_member_init): Remove DECL_CHAIN processing.
11164         (build_offset_ref): Process OVERLOAD nodes.
11165         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
11166         * lex.c (identifier_type): Loop using OVL_CHAIN.
11167         (see_typename): Set looking_for_typename to 2.
11168         (real_yylex): Likewise.
11169         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
11170         (do_scoped_id): Expect OVERLOAD nodes.
11171         Change calling convention for qualified_lookup_using_namespace.
11172         (build_lang_decl): Don't set in_namespace anymore.
11173         * method.c (typevec_size): New global.
11174         (build_overload_nested_name): Return if global_namespace.
11175         Otherwise, always expect a declaration context.
11176         (build_qualified_name): Likewise.
11177         Make sure we don't write beyond typevec_size.
11178         (build_decl_overload_real): Likewise.
11179         Allocate one extra slot for the namespace.
11180         (hack_identifier): Mark code dead.
11181         Process OVERLOAD and NAMESPACE_DECL nodes.
11182         * parse.y (program): Pop namespaces until in global namespace.
11183         (extdef): In a using-declaration, don't discard the identifier if
11184         there is no declaration.
11185         (left_curly): Ignore type contexts which are namespaces.
11186         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
11187         used as scope.
11188         * pt.c (template_class_depth): Expect types to be namespaces.
11189         (determine_specialization): Simplify by expecting OVERLOAD nodes.
11190         (push_template_decl): Push into namespace level.
11191         Reset ctx if it is a namespace.
11192         Set DECL_CONTEXT to current_namespace if not set already.
11193         Ignore real contexts that are namespaces.
11194         (mangle_class_name_for_template): Skip global_namespace.
11195         Mangle other namespaces as declarations.
11196         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
11197         (lookup_template_class): Push into namespace of context.
11198         If the context is a namespace, set it to global_namespace.
11199         Use id_context for mangling.
11200         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
11201         (tsubst_friend_function): Ignore namespace contexts.
11202         Push into namespace level.
11203         (tsubst): Handle NAMESPACE_DECL nodes.
11204         Remove DECL_CHAIN processing.
11205         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
11206         * ptree.c (print_lang_identifier): Print bindings.
11207         (lang_print_xnode): Print OVERLOAD nodes.
11208         * rtti.c (init_rtti_processing): Push type_info into std.
11209         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
11210         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
11211         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
11212         lookup_fnfields_here): Likewise.
11213         Process all nodes, instead of going through TREE_CHAIN.
11214         * sig.c (build_signature_pointer_or_reference_type): Set context
11215         to global_namespace.
11216         (build_signature_table_constructor): Expect OVERLOAD nodes.
11217         * spew.c (yylex): Save old setting of looking_for_typename.
11218         * tree.c (decl_list_length): Remove.
11219         (binding_init): New function.
11220         (count_functions): Rewrite.
11221         (is_overloaded_fn): Expect OVERLOAD nodes.
11222         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
11223         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
11224         ovl_member): New functions.
11225         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
11226         (type_unknown_p): Likewise.
11227         (require_instantiated_type): Likewise.
11228         (build_component_ref): Declare code dead.
11229         (build_x_function_call): Create and expect OVERLOAD nodes.
11230         (build_function_call_real): Check for ::main only.
11231         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
11232         (convert_for_assignment): Check for TREE_LIST before accessing
11233         TREE_VALUE.
11234         * decl.c (duplicate_decls): Check for namespace bindings instead
11235         of global bindings.
11236         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
11237         lookup_name_current_level, start_decl, xref_tag,
11238         finish_enum): Likewise.
11239         * init.c (build_offset_ref): Likewise.
11240         * search.c (lookup_field): Likewise.
11241         (lookup_fnfields): Likewise.
11242         (dfs_debug_mark): Likewise.
11243         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
11244         (poplevel_class, pop_from_top_level): Likewise.
11245         * decl2.c (finish_method): Likewise.
11246         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
11247         * decl.c (record_builtin_type): Likewise.
11248         (init_decl_processing, grokfndecl): Likewise.
11249         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
11250         (make_lang_type): Likewise.
11251         * parse.y (make_thunk): Likewise.
11252         * pt.c (tsubst): Likewise.
11253         * tree.c (debug_binfo): Likewise.
11254         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
11255         tinfo2.cc, inc/new.h: Add std qualifications.
11256         * inc/new: Wrap with namespace std if __HONOR_STD.
11257         * inc/typeinfo: Likewise.
11259 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
11261         * call.c (build_user_type_conversion_1): Handle second_conv
11262         properly for templates.
11264 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
11266         * method.c (build_decl_overload_real): Set TREE_USED flag to
11267         zero for build_type_variants nodes as well.
11269 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
11271         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
11273 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
11275         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
11276         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
11277         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
11278         xref.o): Add toplev.h dependencies.
11280 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
11282         * errfn.c (cp_error, cp_warning): Remove declarations for
11283         error and warning respectively.
11285 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11287         * error.c: Convert to using ctype macros defined in system.h.
11288         * method.c: Likewise.
11289         * xref.c: Likewise.
11290         * lex.c: Likewise.  Also remove redundant system header stuff.
11292 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
11294         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
11295         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
11296         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
11297         xref.c: Add include of toplev.h.
11299 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
11301         * tree.c (perm_manip): Also regenerate the RTL of an extern.
11302         (copy_to_permanent): Use end_temporary_allocation.
11304 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
11306         * init.c (expand_vec_init): The initialization of each array
11307         element is a full-expression.
11309 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
11311         * method.c (build_mangled_name): Add a call to build_type_variant
11312         to get the right type.
11314 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
11316         * Makefile.in: Add .SUFFIXES.
11318         * cp-tree.def: Remove NAMESPACE_DECL.
11320 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
11322         * call.c (build_over_call): Do evaluate arg even if it has empty
11323         class type.
11324         * decl.c (start_function): Don't push a member function.
11326 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
11328         * Makefile.in (g++FAQ.info): Put -o option before input file.
11330 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
11332         * gxxint.texi: Add info for squangling codes K and B.
11334 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
11336         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
11337         the expression in templates.
11338         (finish_stmt_expr): Likewise.
11340 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
11342         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
11344 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
11346         * decl.c (maybe_push_to_top_level): Always clear
11347         current_template_parms and processing_template_decl.
11348         (pushtag): Remove check of current_class_type and some comments,
11349         since maybe_push_to_top_level no longer creates confusion.
11351 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
11353         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
11354         (DECL_CLASS_TEMPLATE_P): Likewise.
11355         (DECL_PRIMARY_TEMPLATE): Likewise.
11356         (PRIMARY_TEMPLATE_P): Use it.
11357         (push_template_decl_real): New function.
11358         (redeclare_class_template): Take new template parameters as
11359         input.
11360         (is_specialization_of): New function.
11361         (comp_template_args): Declare.
11362         * decl.c (pushtag): Handle friend template classes.
11363         (xref_tag): Likewise.  Use new calling convention for
11364         redeclare_class_template.
11365         * decl2.c (grok_x_components): Handle friend templates.
11366         * friend.c (is_friend): Use is_specialization_of where
11367         appropriate.  Deal with friend class templates.
11368         (make_friend_class): Let a class template be friends with itself.
11369         * pt.c (comp_template_args): Remove declaration.
11370         (tsubst_friend_class): New function.
11371         (push_template_decl_real): New function.
11372         (push_template_decl): Use it.
11373         (redeclare_class_template): Adjust for new calling convention.
11374         (comp_template_args): Give it external linkage.
11375         (instantiate_class_type): Use tsubst_friend_class to deal
11376         with friend templates.
11377         * typeck.c (comptypes): Use comp_template_args, rather than
11378         expanding it inline.
11379         * parse.y (component_decl): Handle a nested template type
11380         like other component type declarations.
11382         * pt.c (check_explicit_specialization): Handle overloaded
11383         constructors correctly.
11385         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
11386         (lookup_template_class): Use it.
11388 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
11390         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
11391         * cp-tree.h: Add WRAPPER support.
11392         * call.c (add_candidate): Split out from add_*_candidate fns.
11393         (build_over_call): Take the candidate instead of function and args.
11394         Enforce access control here.  Emit overload warnings here.
11395         (add_warning): New fn.
11396         (joust): Add WARN parm.  If not set, call add_warning instead of
11397         printing a warning.  Re-enable some warnings.
11398         (tourney): Pass it.
11399         (convert_like): Adjust.
11400         (build_new_op): Adjust.
11401         (build_new_function_call): Adjust.
11402         (build_user_type_conversion_1): Adjust.
11403         (USER_CONV_FN): Adjust.
11404         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
11405         build_int_wrapper): New fns.
11407 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
11409         * pt.c (unify): Fix typo in previous change.
11411 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
11413         * error.c (dump_type_real): Declare canonical_name.
11415         * typeck.c (comp_target_types): Fix PMFs.
11417 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
11419         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
11420         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
11421         TEMPLATE_DECL.
11423         * pt.c (tsubst): Decrease the template-level of
11424         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
11425         TEMPLATE_PARM_INDEX.
11426         (template_decl_level): New function.
11427         (unify): Make sure to record unifications for template
11428         parameters, even when the parameters exactly match the arguments.
11429         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
11430         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
11431         aren't from the level we're currently working on.
11433 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
11435         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
11437         * decl2.c (check_member_template): Set DECL_IGNORED for member
11438         class templates, too.
11440         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
11442 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11444         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
11446 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
11448         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
11449         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
11450         (init_decl_processing): Handle TI types.
11451         * typeck.c (unsigned_type, signed_type): Handle TI types.
11453 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
11455         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
11456         New local added_libraries.  Increment count when add library to
11457         arglist.
11459 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
11461         * cp-tree.h (type_as_string_real): New function.
11462         * pt.c (mangle_class_name_for_template): Use it.
11463         * error.c (dump_aggr_type): Change prototype.
11464         (dump_type_prefix): Likewise.
11465         (dump_type_suffix): Likewise.
11466         (dump_type_real): Convert from dump_type.  If desired, the
11467         "canonica" name of a typedef, i.e., the name of the underlying
11468         type, can be printed.
11469         (dump_type): Call dump_type_real.
11471 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
11473         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
11475         * typeck.c (comp_target_types): Tweak pedantic case.
11476         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
11477         Return -1 or 1 instead of 1 or 2.
11478         (compparms): Remove STRICT handling.
11479         (convert_for_assignment): Fix handling of pmfs.
11481 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
11483         * typeck.c (comp_target_types): Handle references like pointers.
11484         (comp_target_parms): Note that return code from comp_target_types
11485         can be negative to indicate failure.
11487 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
11489         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
11490         which requires a working target compiler to build.
11492 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
11494         * tree.c (avoid_overlap): Add prototype.
11496         * spew.c (num_tokens): Add prototype.
11497         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
11499         * search.c (dfs_check_overlap): Add prototype.
11500         (dfs_no_overlap_yet): Likewise.
11502         * pt.c (original_template): Add prototype.
11503         (inline_needs_template_parms): Likewise.
11504         (push_inline_template_parms_recursive): Likewise.
11505         (retrieve_specialization, register_specialization): Likewise.
11506         (print_candidates, reduce_template_parm_level): Likewise.
11507         (build_template_decl, mark_template_parm): Likewise.
11508         (tsubst_friend_function, get_bindings_real): Likewise.
11510         * method.c (start_squangling): Add prototype.
11511         (end_squangling, check_ktype, issue_ktype): Likewise.
11512         (build_overloaded_scope_ref, check_btype): Likewise.
11513         (build_mangled_template_parm_index): Likewise.
11515         * lex.c (init_cpp_parse): Add prototype.
11516         (handle_cp_pragma, handle_sysv_pragma): Likewise.
11517         (reduce_cmp, token_cmp): Likewise.
11519         * except.c (call_eh_info): Add prototype.
11520         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
11521         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
11523         * decl2.c (is_namespace_ancestor): Add prototype.
11524         (namespace_ancestor, add_using_namespace): Likewise.
11525         (ambiguous_decl): Likewise.
11527         * decl.c (indent): Add prototype.
11529         * call.c (add_template_candidate_real): Add prototype.
11531 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
11533         * decl2.c (build_expr_from_tree): Just return a PMF.
11535 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
11537         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
11538         when doing initializations.
11540         * pt.c (unify): Use comptypes to compare type args.
11542 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
11544         * decl.c (duplicate_decls): Fix check for when it's safe to free
11545         the new decl.
11547         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
11548         to type_as_string.
11550 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
11552         * pt.c (build_template_parm_index): Add prototype.
11554         * search.c (my_tree_cons): Don't clear words outside the
11555         newly allocated node.
11557 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
11559         * lex.c (init_parse): Now returns char* containing the filename.
11561 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
11562                           Jeff Law   <law@cygnus.com>
11564         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
11565         than a pointer.
11567 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11569         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
11571 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
11573         * decl.c (duplicate_decls): Don't warn for redundant decls if
11574         friend: let add_friend take care of it.
11576 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
11578         * sig.c (build_signature_pointer_constructor): Don't set
11579         TREE_HAS_CONSTRUCTOR for a signature pointer.
11580         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
11581         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
11582         here, too.
11583         * typeck.c (build_unary_op): Only allow taking the address of a
11584         real constructor.
11585         * typeck2.c (digest_init): Simplify.
11586         (store_init_value): Don't pedwarn about using { } for pmfs.
11588 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
11590         * cp-tree.h (start_decl):  Update prototype.
11591         * decl.c (start_decl):  Like the C version, new parameters
11592         for the attributes.  Call cplus_decl_attributes here,
11593         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
11594         (grokdeclarator):  Pass NULL for new start_decl arguments.
11595         * pt.c (tsubst_expr):  Likewise.
11596         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
11597         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
11598         * lex.c (build_lang_decl): Add lang_name_java.
11599         * class.c (push_lang_context): Add lang_name_java.
11600         * method.c (build_mangled_name): Check for is_java_type.
11602 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
11604         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
11605         * call.c (build_scoped_method_call): Check for TREE_CODE for
11606         VOID_TYPE instead of type ==  void_type_node.
11607         (build_method_call): Likewise.
11608         * decl.c (lookup_name_real): Likewise.
11609         (grokdeclarator): Likewise.
11610         (start_decl): Likewise.
11611         (grokparms): Likewise.
11612         (start_function): Likewise.
11613         (finish_function): Likewise.
11614         (start_method): Likewise.
11616 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
11618         * lex.c (finput): New variable.
11619         (init_cpp_parse):  Renamed from init_parse.
11620         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
11621         (finish_parse): New function.
11622         * cp-tree.h (init_lex, init_parse): Remove declarations.
11624 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
11626         * call.c (build_call): Still evaluate the actual argument.
11627         * class.c (is_empty_class): Update for -fnew-abi.
11629         * decl2.c: -fnew-abi implies -fsquangle.
11631         * method.c (do_build_assign_ref): Don't do anything to copy
11632         an empty class.
11633         (do_build_copy_constructor): Likewise.
11634         * call.c (build_over_call): Likewise.
11636 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
11638         * tree.c (avoid_overlap): Return a value.
11640 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
11642         * method.c (check_btype): Add missing argument to xrealloc.
11643         (check_ktype): Likewise.
11645 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
11647         Implement empty base optimization.
11648         * class.c (finish_struct_1): Add vbase fields earlier.  Set
11649         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
11650         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
11651         (types_overlap_p): New fn.
11652         * tree.c (avoid_overlap): New fn.
11653         (build_base_fields): Use it to avoid overlapping empty bases.
11654         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
11656         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
11658         Re-implement allocation of base class subobjects.
11659         * tree.c (unshare_base_binfos): New fn.
11660         (layout_basetypes): Use it.  Now handles offsets of both virtual and
11661         non-virtual bases, after layout_type.
11662         (layout_vbasetypes): Remove.
11663         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
11664         (build_vbase_pointer_fields): Split out from old layout_basetypes.
11665         * class.c (finish_base_struct): Lose offset handling code.
11666         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
11667         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
11668         * cp-tree.h: Adjust.
11670 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
11672         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
11673         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
11674         * class.c (duplicate_tag_error): Likewise.
11675         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
11676         * tree.c (layout_vbasetypes): Update from layout_record, remove
11677         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
11678         (layout_basetypes): Likewise.
11680 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
11682         * class.c, Make sure system.h is included just after config.h.
11683         Delete lingering stdio and errno references too.
11684         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
11686 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
11688         * friend.c (is_friend): Fix access control for local classes.
11690         * class.c (is_empty_class): New fn.
11691         * call.c (build_call): Don't pass empty class objects to a function.
11693 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
11695         * call.c (build_over_call): Do name resolution for default
11696         arguments of function templates in the scope of the templates.
11698 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
11700         * call.c: Include system.h.  Remove includes, declarations and
11701         defines provided by system.h.
11702         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
11703         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
11704         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
11705         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
11706         * typeck2.c, xref.c: Likewise.
11707         * Makefile.in: Dependencies updated as appropriate.
11708         * Make-lang.in: Likewise.
11710 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
11712         * pt.c (fn_type_unification): Allow incomplete unification without
11713         an immediate error message.
11715 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
11717         * tree.c (member_p): New fn.
11718         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
11719         initializing class members.
11721         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
11722         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
11724         * call.c (build_method_call): Handle non-scoped destructors, too.
11725         * pt.c (tsubst_copy): Likewise.
11727         * pt.c (print_template_context): Split out...
11728         (push_tinst_level): ...from here.
11730         * friend.c (is_friend): Don't pass a type to decl_function_context.
11732         * typeck.c (convert_for_initialization): Always hand off
11733         conversions to class type.
11735 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
11737         * friend.c (is_friend): Local classes have the same access as the
11738         enclosing function.
11740 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
11742         * typeck.c (expand_target_expr): Delete dead function.
11744         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
11746         * repo.c (save_string): Delete dead function.
11748         * method.c (thunk_printable_name): Delete dead function.
11750         * lex.c (yynextch): Delete dead function.
11752         * expr.c (tree_extract_aggr_init): #if 0 out.
11754         * except.c (do_unwind): Delete dead function.
11755         (easy_expand_asm): Likewise.
11757         * cvt.c (build_conversion_type_1): Delete dead function.
11759         * cp-tree.h (push_expression_obstack): Declare.
11761         * call.c (source_type): #if 0 out.
11763         * class.c (alter_access): Remove unused label.  Add braces
11764         around empty else clause.
11766         * lex.c (yyprint): Fix argument to printf.
11768 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
11770         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
11772         * pt.c (instantiate_class_template): Make sure template
11773         arguments are permanent.
11774         * init.c (resolve_offset_ref): Don't go looking around in
11775         template types.
11777         * semantics.c: Add routines to handle expressions, and some
11778         declaration processing.
11779         * parse.y: Use them.
11780         (current_class_depth): Move declaration to cp-tree.h.
11781         * parse.c: Regenerated.
11782         * cp-tree.h: Use them.
11783         (current_class_depth): Declare.
11784         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
11786 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
11788         * error.c (dump_decl): Be a bit more explicit with template
11789         type arguments, when verbose.
11791 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
11793         * inc/exception: Reorder closing braces.
11795 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
11797         * pt.c (redeclare_class_template): New function.
11798         * cp_tree.h (redeclare_class_template): Declare it.
11799         * decl.c (xref_tag): Use it.
11801 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
11803         * call.c (build_over_call): Check IS_AGGR_TYPE, not
11804         TYPE_LANG_SPECIFIC.
11805         * typeck.c (convert_arguments): Likewise.
11807         * decl.c (grokdeclarator): Remove const and volatile from type after
11808         setting constp and volatilep.
11810         * class.c (finish_struct_1): Don't warn about bool bitfield larger
11811         than one bit.
11813 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
11815         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
11817 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
11819         * call.c (build_object_call): Complain about ambiguous operator(),
11820         rather that crashing.
11821         (build_new_op): Likewise.
11822         (build_op_delete_call): Likewise.
11824 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
11826         * cvt.c (perform_qualification_conversions): Use comp_target_types
11827         instead of comp_ptr_ttypes.
11829 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
11831         * cp-tree.h (enforce_access): Declare.
11832         * call.c (enforce_access): Make it extern, not static.
11833         * class.c (alter_access): Use enforce_access; modify code for ISO
11834         compliance, rather than ARM rules.
11836 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11838         * cp-tree.h: Fix typo.
11840 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
11842         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
11843         if (aggregate_value_p (type)).
11845         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
11847 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
11849         * tree.c (mapcar): When dealing with a DECL, use it's constant
11850         value, if any.
11851         * pt.c (lookup_template_class): Don't mangle the names of template
11852         classes whose arguments are unknown.
11854         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
11856 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
11858         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
11860 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
11862         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
11863         boolean_type_node to 1.
11865 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
11867         * error.c (dump_expr): Remove unused variable `l'.
11869         * pt.c (for_each_template_parm): New function, created by
11870         converting uses_template_parms.
11871         (tree_fn_t): New typedef.
11872         (uses_template_parms): Use it.
11873         (mark_template_parm): New function.
11874         (push_template_decl): Check that the argument list of a partial
11875         specialization uses all the template parameters.
11877         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
11878         with it; we might want it for debugging.
11879         * cp-tree.h (type_unification): Change interface.
11880         * class.c (finish_struct_1): Skip nested template types, just like
11881         ordinary nested types.
11882         (instantiate_type): Use new interface to type_unification.
11883         * lex.c (init_lex): Add __sz as opname for sizeof.
11884         * method.c (build_overload_scope_ref): New function.
11885         (build_overload_int): Handle complex expressions.  Set
11886         numeric_output_need_bar if necessary.
11887         (build_overload_value): Handle non-PARM_DECL nodes; this
11888         routine is now used by build_overload_int.  Remove some
11889         assignments to numeric_output_need_bar.  Use
11890         build_overload_scope_ref.
11891         (build_qualified_name): Note that some template mangled names end
11892         with digits, and set numeric_output_need_bar appropriately.  Use
11893         build_underscore_int.
11894         * pt.c (unify): Change interface.
11895         (type_unification_real): Likewise.
11896         (determine_specialization): Use new interfaces.
11897         (tsubst): Deal gracefully with situations in which the argument
11898         vector is not fully filled.
11899         (fn_type_unification): Use new interfaces.
11900         (type_unification): Likewise.  Remove NOP_EXPR hack.
11901         (type_unification_real): Likewise.
11902         (unify): Likewise.  Deal with unification of complex expressions.
11904 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11906         * pt.c (complete_template_args): Initialize skip properly.
11908         * decl.c (make_typename_type): Revert.
11909         (make_implicit_typename): Remove.
11910         (lookup_name_real): Don't call it.  Call lookup_field if we see a
11911         TYPE_DECL from a template base.
11912         * search.c (lookup_field): Do implicit typename stuff.
11914 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
11915                           Geoff Noer    <noer@cygnus.com>
11917         * Makefile.in: Various fixes for building cygwin32 native toolchains.
11918         * Make-lang.in: Likewise.
11920 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11922         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
11924 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
11926         * decl.c (make_implicit_typename): Rewrite removed code.
11927         (make_typename_type): Call it if the type we look up comes from
11928         a base that uses template parms.
11930         * pt.c (complete_template_args): Rewrite.
11931         (tsubst, FUNCTION_DECL): Use it.
11933 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
11935         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
11936         c_expand_asm_operands () if output_operands, input_operands or
11937         clobbers is not NULL_TREE.
11939 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
11941         * pt.c (complete_template_args): New function.
11942         (get_bindings): Deal with specializations of function templates
11943         with return type containing parameters from outer class
11944         templates.
11945         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
11946         substitute arguments and compose a new type.
11948 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
11950         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
11951         FUNCTION_DECLs.
11953 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
11955         * decl.c (make_implicit_typename): Lose useless code.
11957         * call.c (standard_conversion): Handle A* -> const A* properly.
11959         * pt.c (get_bindings_real): Rename from get_bindings.  Add
11960         check_rettype parm.
11961         (get_bindings): Pass 1.
11962         (get_bindings_overload): Pass 0.
11964 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
11966         * pt.c (check_explicit_specialization): When reverting a static
11967         member function, also remove the `this' parameter from
11968         last_function_parms.
11970 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
11972         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
11973         a function context.
11975         * decl.c (store_bindings): Use free_binding_vecs.
11976         (pop_from_top_level): Likewise.
11978 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
11980         * decl.c (make_implicit_typename): Only change the type of a
11981         TYPENAME_TYPE.
11983 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
11985         * semantics.c: New file, containing routines to perform the
11986         semantic phase of parsing.
11987         * parse.y: Use it.
11988         * pt.c (tsubst_expr): Likewise.
11989         * cp-tree.h: Declare the various functions in semantics.c.
11990         Provide macros to access _STMT tree nodes.
11991         * cp-tree.def: Add ASM_STMT tree node.
11992         * Makefile.in, Make-lang.in: Add dependencies on and for
11993         semantics.c.
11995 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
11997         * pt.c (push_template_decl): Only check primary templates.
11999         * pt.c (check_explicit_specialization): Complain about default args
12000         in explicit specialization.
12002         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
12003         constructor_declarator.
12005 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
12007         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
12008         has no overloaded operator ->.
12010         * call.c (build_field_call): Don't crash when presented with a
12011         field that is actually a nested type.
12013         * decl.c (pushtag): Deal with friend class injection in local
12014         classes.
12016         * call.c (build_object_call): Don't crash if OBJ is a
12017         pointer-to-member-function.
12019 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
12021         * pt.c (push_template_decl): Complain about template with C linkage,
12022         anonymous template class.
12024 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
12026         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
12027         * search.c: Likewise.
12029         * lex.c (do_pending_defargs): Only call
12030         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
12032         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
12034 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
12036         * parse.y: Deal with CONSTRUCTORS in new_initializers.
12038 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
12040         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
12041         closely mimics the behavior in parse.y.
12042         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
12043         into a compound statement.
12045 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
12047         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
12048         * pt.c (inline_needs_template_parms): New fn.
12049         (original_template): New fn.
12050         (push_inline_template_parms_recursive): New fn.
12051         (maybe_begin_member_template_processing): Use them.
12052         (maybe_end_member_template_processing): Likewise.
12053         (is_member_or_friend_template): Rename to is_member_template.
12054         Member functions of local classes are never member templates.
12056 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12058         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
12059         added in the class scope to catch redefinition error.
12061         * pt.c (reduce_template_parm_level): Also copy
12062         the DECL_TEMPLATE_PARMS field.
12064 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
12066         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
12067         reduced-level template type parameter.
12069 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12071         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
12072         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
12073         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
12074         * decl.c (duplicate_decls): Propagate it.
12075         * typeck2.c (abstract_virtuals_error): Use two loops to emit
12076         abstract virtual functions and virtual functions which need a
12077         final overrider separately.
12079 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12081         * lang-specs.h: Properly put brackets around array elements in
12082         initializer.
12084         * typeck.c (build_binary_op_nodefault): Correctly place parens around
12085         && and || in expression.
12087 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12089         * call.c (default_parm_conversions): Remove prototype definition.
12090         (build_method_call): Remove unused variable result.
12092         * cvt.c (ocp_convert): Remove unused variable conversion.
12094         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
12096         * except.c (do_unwind): #if 0 definition of unused variables fcall
12097         and next_pc.
12099         * expr.c (extract_scalar_init): #if 0 prototype and function
12100         definition.
12102         * init.c (expand_aggr_init_1): Remove unused variable init_type.
12103         (build_new_1): Remove unused variable t.
12105         * pt.c (instantiate_class_template): Remove unused variable newtag;
12106         cast called function return value to void.
12107         (do_decl_instantiation): Remove unused variables name and fn.
12109         * tree.c (get_type_decl): Add default return to shut up compiler from
12110         complaining control reaches end of non-void function.
12112         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
12114 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12116         * call.c (default_parm_conversions): Remove prototype definition.
12117         (build_method_call): Remove unused variable result.
12118         (build_over_call): Add default case in enumeration switch.
12120 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12122         * decl2.c (lang_decode_option): Change j's type to size_t.
12124         * tree.c (layout_vbasetypes): record_align and desired_align are of
12125         type unsigned int; const_size and nonvirtual_const_size likewise.
12127 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
12129         * parse.y (new_initializer): Make sure all initializers are
12130         lists.
12132 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
12134         * decl2.c (import_export_decl): Mark tinfo functions for
12135         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
12137 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
12139         * method.c: Fix typo.
12141 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12143         * method.c: Include "system.h" to get stdlib.h, stdio.h,
12144         ctype.h, string.h, etc.
12145         (issue_nrepeats): Add default case in enumeration switch.
12146         (check_btype): Likewise.
12147         (process_overload_item): Likewise.
12149         * Makefile.in (method.o): Depend on system.h.
12151 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
12153         * lex.c (do_scoped_id): Fix parenthesizing.
12155 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
12157         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
12158         FLAG_RTTI is unset, initialize type info machinery and continue
12159         with FLAG_RTTI enabled.
12160         (get_typeid): Likewise.
12162 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
12164         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
12165         from B.
12167 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
12169         * pt.c (finish_member_template_decl): Deal more gracefully with
12170         invalid declarations.
12172 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
12174         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
12175         cp-tree.h: Clean up more old overloading code, old RTTI code, and
12176         some formatting quirks.
12178         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
12179         method.c, pt.c, ptree.c, typeck.c: Remove support for
12180         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
12181         * class.h: Remove.
12182         * Makefile.in: Adjust.
12184         * pt.c (unify): Don't allow reduced cv-quals when strict.
12186         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
12187         *type_unification* and unify.
12189 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
12191         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
12192         (nested_name_specifier): And add it before this use.
12193         (typename_sub0): And this use.  Also add use without the keyword.
12194         (typename_sub1): Likewise.
12195         * pt.c (instantiate_class_template): Don't actually instantiate
12196         anything if our type uses template parms.
12198 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
12200         * decl.c (start_function): Don't call temporary_allocation for a
12201         nested function.
12203 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
12205         * pt.c (instantiate_class_template): Don't mess with friends if
12206         our type uses template parms.
12208 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
12210         * parse.y (nested_name_specifier): Use explicit_template_type.
12211         (typename_sub): Allow a template_type, an explicit_template_type,
12212         or an implicit template type at the end.
12213         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
12214         * decl.c (make_typename_type): Handle template-id where the name
12215         is a TEMPLATE_DECL.
12216         * call.c (build_scoped_method_call): Handle member template
12217         destructor call.
12218         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
12219         destructor is represented by the type.
12221         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
12222         * parse.y (nested_name_specifier): Add 'template' case.
12223         (explicit_template_type): New rule.
12224         (typename_sub): Use it.
12225         * decl.c (make_typename_type): Handle getting a template-id for NAME.
12226         * pt.c (tsubst): Likewise.
12228 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
12230         * pt.c (add_to_template_args): Fix thinko.
12231         (instantiate_class_template): Call it later.
12233         * pt.c (get_class_bindings): Add outer_args parm.
12234         (most_specialized_class): Likewise.
12235         (instantiate_class_template): Pass it.
12236         (more_specialized_class): Likewise.
12237         (lookup_template_class): Get context from template if none
12238         was specified.
12239         (finish_member_template_decl): Don't do anything with a
12240         partial specialization.
12241         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
12242         AGGREGATE_TYPE_P.
12243         * class.c (finish_struct): Member class templates have already been
12244         checked for name clashes.
12245         * decl.c (pushdecl_with_scope): Handle pushing at class level.
12247 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
12249         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
12250         (tsubst, *_PARM): Support multiple levels of template classes.
12251         (instantiate_class_template): Look up the pattern from the
12252         original template.
12253         (lookup_template_class): Handle getting a template for d1.
12254         (push_template_decl): Correct setting of 'primary'.
12255         (reduce_template_parm_level): Add 'levels' parm.
12256         (finish_member_template_decl): Support member class templates.
12257         (template_class_depth): Handle multiple levels.
12258         * parse.y (component_decl_1, fn.def2): Remove member template case.
12259         (component_decl): Add member template cases.
12260         * decl2.c (check_member_template): We now handle member template
12261         classes.
12262         * decl.c (pushtag): Handle member templates.
12263         * method.c (do_inline_function_hair): Don't touch
12264         IDENTIFIER_GLOBAL_VALUE.
12265         * init.c (build_offset_ref): If name isn't an identifier, just
12266         return it.
12267         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
12269         * typeck.c (get_delta_difference): Do adjust for conversions to
12270         and from virtual base.
12272 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
12274         * typeck.c (get_delta_difference): Give hard error for conversion
12275         from virtual base.
12277         * cp-tree.h: Tweak formatting.
12279 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
12281         * decl.c (push_namespace): Handle redeclaration error.
12283         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
12284         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
12285         (NAMESPACE_BINDING): New macro.
12286         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
12287         * *.c: Use them.
12289         * pt.c (push_template_decl): Use innermost_args.
12291         * decl.c (get_unique_name): Tweak from earlier in the name.
12293 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12295         * cp-tree.def: Add CPLUS_BINDING node.
12296         * cp-tree.h (tree_binding): New struct.
12297         (BINDING_SCOPE, BINDING_VALUE): New macros.
12298         (current_namespace, global_namespace): Declare extern.
12299         (struct lang_decl_flags): New field in_namespace.
12300         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
12301         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
12302         (TREE_INDIRECT_USING): New macro.
12303         * decl2.c (current_namespace, global_namespace): Declare.  The
12304         value is a NAMESPACE_DECL now, not a TREE_LIST.
12305         (is_namespace_ancestor, namespace_ancestor): New static functions.
12306         (add_using_namespace, ambiguous_decl): Likewise.
12307         (lookup_using_namespace): New support function for lookup_name.
12308         (qualified_lookup_using_namespace): New support function for
12309         do_scoped_id and lookup_namespace_name.
12310         (get_namespace_id): Mark as obsolete.
12311         (current_namespace_id): Likewise.
12312         (do_namespace_alias): Implement.
12313         (do_using_directive): Implement as call to add_using_namespace.
12314         * decl.c (binding_for_name): New function.
12315         (push_namespace, pop_namespace): Implement.
12316         (push_decl): Don't install a FUNCTION_DECL in the global branch.
12317         (lookup_namespace_name): Implement using qualified lookup.
12318         (lookup_name_real): For global scoping, lookup in
12319         global_namespace.  For namespace scoping, lookup in given
12320         namespace.  For unscoped lookup, iterate over namespace,
12321         considering using directives.
12322         (init_decl_processing): Initialize global_namespace.
12323         (grokvardecl): Build assembler name as static name for globals.
12324         (grokdeclarator): Remove old namespace mangling.
12325         (xref_tag): When installing a global binding for the
12326         tag, make sure we have an identifier.
12327         * method.c (build_overload_nested_name): Mangle namespaces.
12328         (build_qualified_name): Likewise.
12329         (build_decl_overload_real): Likewise.
12330         * lex.c (build_lang_decl): Set namespace for new declaration to
12331         current_namespace.
12332         (do_scoped_id): Find global names in global or current
12333         namespace, or using qualified namespace lookup, depending on
12334         context.
12335         * init.c (build_member_call): When scope is namespace, use
12336         build_x_function_call instead.
12337         (build_offset_ref): When scope is namespace, collapse processing
12338         to lookup_namespace_name instead.
12339         * error.c (dump_decl): Support NAMESPACE_DECL.
12340         * decl.c (pushdecl): Bind globals to current namespace.
12341         (push_overloaded_decl): Likewise.
12342         (lookup_tag): Likewise.
12343         (lookup_name_current_level): Likewise.
12344         (xref_tag): Likewise.
12345         (start_function): Likewise.
12346         * lex.c (do_identifier): Likewise.
12347         (identifier_typedecl_value): Likewise.
12348         (real_yylex): Likewise.
12349         * method.c (do_inline_function_hair): Likewise.
12350         * parse.y (unscoped): Likewise.
12351         * pt.c (check_explicit_specialization): Likewise.
12352         (lookup_template_class): Likewise.
12353         * rtti.c (call_void_fn): Likewise.
12354         * sig.c (build_sigtable): Likewise.
12355         * ptree.c (lang_print_xnode): New function.
12357 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
12359         * pt.c (instantiate_class_template): Don't instantiate if pedantic
12360         and the args use template parms.
12362         * pt.c (push_tinst_level): If the instantiation uses template parms,
12363         fail silently.
12364         * decl.c (xref_basetypes): Do call complete_type for basetypes
12365         that involve template parameters.
12367 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
12369         * typeck2.c (process_init_constructor): Fix labeled init check.
12371 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
12373         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
12374         argument to tsubst and friends.
12376         * pt.c (tsubst, FUNCTION_DECL): Tidy.
12378         * typeck.c (build_x_function_call): Handle static member function
12379         templates like non-templates.  Handle friend templates like normal
12380         function templates.
12381         * pt.c (tsubst, *_PARM): Don't use orig_level.
12382         (get_bindings): Don't call add_to_template_args.
12383         (instantiate_template): Likewise.
12384         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
12385         * ptree.c (print_lang_type): Print index/level for template parms.
12387 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
12389         * Make-lang.in (cc1plus): Note that cc1plus depends on
12390         cp/cp-tree.h and cp/cp-tree.def.
12392         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
12393         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
12394         position in a template parameter list.
12395         * cp-tree.h (template_parm_index): New structure, used as the tree
12396         structure for a TEMPLATE_PARM_INDEX.
12397         (TEMPLATE_PARM_IDX): New macro.
12398         (TEMPLATE_PARM_LEVEL): Likewise.
12399         (TEMPLATE_PARM_DESCENDANTS): Likewise.
12400         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
12401         (TEMPLATE_PARM_DECL): Likewise.
12402         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
12403         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
12404         (TEMPLATE_TYPE_DECL): Likewise.
12405         (TEMPLATE_CONST_IDX): Remove.
12406         (TEMPLATE_CONST_LEVEL): Likewise.
12407         (TEMPLATE_CONST_SET_INFO): Likewise.
12408         (TEMPLATE_TYPE_SET_INFO): Likewise.
12409         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
12410         node.
12411         (TEMPLATE_TYPE_LEVEL): Likewise.
12412         * decl.c (decls_match): Call comp_template_parms, rather than
12413         expanding it inline.
12414         (duplicate_decls): If two template declarations are being merged,
12415         then their TEMPLATE_INFOs should be merged as well.
12416         (grokfndecl): Save template-id information when declaring a friend
12417         with explicit template arguments.  Pass arguments to
12418         check_explicit_specialization via correct convention; at some
12419         point check_explicit_specialization changed, but these call-sites
12420         did not.
12421         (grokdeclarator): Tidy up slightly.
12422         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
12423         two template functions with the same DECL_ASSEMBLER_NAME the same,
12424         since the names are not yet mangled.
12425         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
12426         TEMPLATE_CONST_PARM.
12427         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
12428         decl for a non-type parameter, rather than printing `<tparm ...>'.
12429         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
12430         (do_friend): Deal with template friends.
12431         * lex.c (do_pending_inlines): Call
12432         maybe_begin_member_template_processing, rather than
12433         conditionally calling begin_member_template_processing.
12434         (process_next_inline): Likewise.  Call
12435         maybe_end_member_template_processing, rather than
12436         conditionally calling end_member_template_processing.
12437         (do_pending_defargs): Likewise.
12438         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
12439         TEMPLATE_CONST_PARM.
12440         * method.c (build_mangled_template_parm_index): New function.
12441         (build_overload_value): Use it.
12442         (build_overload_name): Likewise.
12443         * pt.c (finish_member_template_decl): Allow friend declarations.
12444         (template_class_depth): New function.
12445         (is_member_template): Rename, and modify, to become...
12446         (is_member_or_friend_template): New function.
12447         (end_member_template_processing): Rename, and modify, to become...
12448         (maybe_end_member_template_processing).
12449         (build_template_parm_index): New function.
12450         (reduce_template_parm_level): New function.
12451         (process_template_parm): Modify to use build_template_parm_index.
12452         (push_template_decl): Deal with friend templates.
12453         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
12454         TEMPLATE_CONST_PARM.
12455         (tsubst_friend_function): New function.
12456         (instantiate_class_template): Generate the DECL_FRIENDLIST
12457         for a new instantiation by using tsubst_friend_function rather
12458         than just tsubst.
12459         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
12460         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
12461         appropriate new macros.  Use reduce_template_parm_level to
12462         generate lower-level template parameters.  Handle tsubst'ing into
12463         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
12464         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
12465         templates.  Similarly for the template parameters for a new
12466         template.
12467         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
12468         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
12469         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
12470         (get_bindings): Call add_to_template_args if necessary.
12471         (instantiate_decl): Handle instantiations of friend templates.
12472         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
12473         TEMPLATE_TYPE_PARM as a list of fields; it's not!
12474         * spew.c (yylex): Do a little manual constant propagation to
12475         clarify the code.
12477 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
12479         * error.c: Include sys/types.h.
12481 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
12483         * method.c (build_mangled_name): Start CPP directives in column zero.
12485 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
12487         * typeck2.c (process_init_constructor): Sorry about non-trivial
12488         labeled initializers.
12489         * parse.y (initlist): Re-enable labeled initializers.
12491 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12493         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
12494         all callers changed.  Rely on the new parameter instead of arg
12495         being a TREE_LIST when determine whether we are working inside
12496         template template parameter.  Clean up is_type test.
12498 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
12500         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
12501         * typeck2.c (initializer_constant_valid_p): Allow conversions
12502         between pointers and references.
12504 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
12506         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
12507         if pedantic || warn_pointer_arith.
12509 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12511         * pt.c (unify): Handle TEMPLATE_DECL.
12513 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
12515         * cp-tree.h (strip_attrs): Remove decl.
12517 1998-02-18  Doug Evans  <devans@cygnus.com>
12519         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
12520         Update olddecl's attributes too.
12521         (strip_attrs): Remove function.
12522         * typeck.c (common_type): Call merge_machine_type_attributes.
12524 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
12526         * parse.y (initdcl0_innards): New grammar symbol.
12527         (nomods_initdecls, nomods_initdcl0): Change type from itype to
12528         none, since the resulting value is never used.
12529         (parse_decl): New function.
12530         (datadef): Remove redundant actions.
12531         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
12532         * parse.c: Regenerated.
12534 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
12536         * parse.y (simple_stmt): Use getdecls() to check for decl.
12538 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12540         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
12541         macros.
12542         (c++.install-common): Install c++filt properly as native or as cross
12543         variant.
12544         (c++.uninstall): Add c++filt.
12546 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
12548         * call.c (standard_conversion): Fix multi-level ptr conversions.
12550 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
12552         * init.c (build_new): Propagate error_mark_node up.
12554 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
12556         * parse.y (simple_stmt): If the condition isn't a declaration,
12557         start the controlled block after the test.
12559 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
12561         * call.c (build_over_call): Convert builtin abs, labs and fabs to
12562         tree-codes.
12563         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
12564         builtins.
12566 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
12568         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
12570 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
12572         * cp-tree.h: Add access_protected_virtual_node.
12573         * class.c (init_class_processing): Initialize it.
12574         * decl.c (xref_basetypes): Use it.
12575         * parse.y (base_class_access_list): Likewise.
12577         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
12578         (c++.install-common): Install c++filt.
12580 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12582         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
12584 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
12586         * call.c (reference_binding): Use comptypes when comparing
12587         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
12589 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
12591         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
12592         (really_overloaded_fn): Move check here from is_overloaded_fn.
12593         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
12595 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
12597         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
12598         conversions.
12600 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
12602         * cp-tree.h (push_template_decl): Return the decl passed in, or an
12603         equivalent duplicate.
12604         * decl.c (pushtag): Use the return value from push_template_decl.
12605         (duplicate_decls): When duplicating a template declaration, merge
12606         the DECL_TEMPLATE_RESULTs as well.
12607         (make_implicit_typename): Don't try to dive into typename types to
12608         find a context for making a new implicit typename.
12609         (start_decl): Use the return value from push_template_decl.
12610         (grokdeclarator): Complain about declarations list `const operator
12611         int'.  Since we don't correctly handle in-class initializations of
12612         non-static data members, complain about this (now illegal)
12613         practice.  Issue an error for initializations of non-const statics
12614         since that is illegal as well, and since we don't handle that case
12615         correctly either.
12616         (start_function): Use the return value from push_template_decl.
12617         (start_method): Likewise.
12618         * decl2.c (grokfield): Likewise.  Since the change to
12619         grokdeclarator ensures that all initialized fields are in fact
12620         static, remove a redundant test for TREE_PUBLIC.
12621         * parse.y (initlist): Disable labeled initializers since they do
12622         not work as per the documentation, and since they do not use the
12623         same syntax as the C front end.
12624         * pt.c (push_template_decl): Return the decl passed in, or an
12625         equivalent duplicate.
12626         (lookup_template_class): When searching in a nested context,
12627         use the right arguments.
12628         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
12629         * typeck.c (build_component_ref): Assign the correct type to the
12630         result of build_vfn_ref.
12632 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
12634         * pt.c (convert_nontype_argument): Fix typo.
12635         (check_explicit_specialization): Allow old-style specialization
12636         of class template members.
12638 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
12639                           Manfred Hollstein  <manfred@s-direktnet.de>
12641         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
12642         when deciding to override DECL_ASSEMBLER_NAME.
12644 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
12646         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
12647         * cp-tree.h (flag_do_squangling): Add declaration.
12648         * lang-options.h: Add -fsquangle and -fno-squangle.
12649         * method.c: Add macros and static variables for squangling.
12650         (build_overload_name): Rename to build_mangled_name, add logic for B
12651         compression, and split into process_modifiers and
12652         process_overload_item.
12653         (process_modifiers): New function, to handle constant, reference,
12654         and pointer types.
12655         (process_overload_item): New function, handles issue of type codes.
12656         (build_overload_name): New function, start squangling and call
12657         build_mangled_name.
12658         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
12659         (start_squangling): New function to initialize squangling structs.
12660         (end_squangling): New function to destroy squangling structs.
12661         (nrepeats): Rename variable to Nrepeats.
12662         (issue_nrepeats): New function for issuing 'n' type repeats.
12663         (check_ktype): New function to check for type K name compression.
12664         (build_overload_nested_name): Add a check for K name compression.
12665         (build_qualified_name): Add a check for K name compression and don't
12666         use DECL_ASSEMBLER_NAME when squangling is on.
12667         (check_btype): New function, checks for B type compression.
12668         (build_static_name, build_decl_overload_real): Initiate squangling.
12669         (build_typename_overload, build_overload_with_type): Initiate
12670         squangling
12672 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
12674         * method.c (make_thunk): Avoid name buffer overflow.
12676 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
12678         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
12679         don't define them yet.
12681         * parse.y (nomods_initdcl0): Add constructor_declarator case.
12683 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12685         * config-lang.in (diff_excludes): Use basename only.
12687 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
12689         * tinfo2.cc: Add tinfo for signed char.
12691 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
12693         * search.c (compute_access): Handle protected constructors in derived
12694         classes as accessible.
12696 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
12698         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
12699         Call convert_from_reference sooner.
12701 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
12703         * cvt.c (ocp_convert): Obtain the constant values from constant
12704         decls even if the destination type is the same as the type of the
12705         decl.
12707         * decl2.c (finish_file): Make sure that static inlines with
12708         definitions are not marked DECL_EXTERNAL before returning.
12710 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
12712         * decl.c: Lose arg_looking_for_template.
12713         (lookup_name_real): Likewise.
12714         * parse.y: Lose processing_template_arg, template_arg1.
12715         (primary): Likewise.
12716         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
12718 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12720         * error.c (dump_decl): Fix type of default arguments for template
12721         template parameters and nontype template parameters.
12722         * parse.y (template_parm): Handle invalid default template
12723         template arguments here.
12725         * parse.y (template_parm): Use template_arg instead of PTYPENAME
12726         for default template template argument.
12727         * pt.c (coerce_template_parms): Merge default template argument
12728         codes.  Can treat RECORD_TYPE as template name if it is implicitly
12729         created.  Fix argument index in error message.
12730         * typeck.c (comptypes): Merge template argument comparison codes in
12731         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
12733 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
12735         * lex.c (file_name_nondirectory): Also check for '/'.
12737 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
12739         * parse.y (primary): Deal with statement-expressions in
12740         templates.
12741         * pt.c (tsubst_copy): Handle BIND_EXPR.
12742         * tree.c (mapcar): Likewise.
12744         * call.c (add_template_candidate_real): Pass extra parameter to
12745         fn_type_unification.
12746         * cp-tree.h (fn_type_unification): Add parameter.
12747         * pt.c (fn_type_unification): Add additional parameter to deal with
12748         static member functions.
12749         (get_bindings): Deal with static member functions.
12751         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
12752         (revert_static_member_fn): Declare.
12753         * decl.c (revert_static_member_fn): Remove declaration.  Change
12754         linkage from internal to external.
12755         (cp_finish_decl): Deal with virtual functions in classes local to
12756         template functions.
12757         * decl2.c (finish_file): Don't forget to emit increment/decrement
12758         expressions in initializers for file-scope variables.
12759         * parse.y (typename_sub2): If the typename doesn't names a
12760         template, rather than a type, issue an error message.
12761         * pt.c (check_explicit_specialization): Handle specializations of
12762         static member functions.
12763         (coerce_template_parms): Handle offset references to lists of
12764         member functions.
12765         * search.c (note_debug_info_needed): Don't crash when handed a
12766         type which is being defined.
12767         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
12768         that can happen with some illegal code.
12770 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12772         * call.c (user_harshness): Initialize `code' to 0.
12773         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
12774         (null_ptr_cst_p): Add parentheses around && within ||.
12775         (standard_conversion): Likewise.
12776         (z_candidate): Likewise.
12777         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
12778         (build_object_call): Likewise for `mem_args'.
12779         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
12780         default case in enumeration switch.
12782         * class.c (build_vtable_entry): Add explicit braces to avoid
12783         ambiguous `else'.
12784         (build_class_init_list): Likewise.
12785         (finish_struct_1): Initialize `width' to 0.
12786         (instantiate_type): Initialize `name' to NULL_TREE.  Add
12787         explicit braces to avoid ambiguous `else'.
12789         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
12790         `else'.
12792         * decl.c (grok_reference_init): Eliminate unused parameter, all
12793         callers changed.
12794         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
12795         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
12796         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
12797         (grokdeclarator): Add parentheses around && within ||.  Add
12798         explicit braces to avoid ambiguous `else'.
12799         (grokparms): Initialize `type' to NULL_TREE.
12800         (xref_tag): Remove unused label `just_return'.
12801         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
12802         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
12803         (hack_incomplete_structures): Add parentheses around assignment
12804         used as truth value.
12806         * decl2.c (coerce_delete_type): Hide definition of `e3'.
12808         * error.c: Include <stdlib.h>.
12809         (dump_expr): Change the type of `i' to size_t.  Remove unused
12810         label `error'.
12812         * except.c (init_exception_processing): Remove unused variable `d'.
12813         (expand_throw): Likewise for `label'.
12815         * friend.c (add_friends): Add explicit braces to avoid ambiguous
12816         `else'.
12818         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
12819         (sort_base_init): Likewise for `binfo'.
12820         (expand_member_init): Likewise for `rval'.
12821         (build_member_call): Add parentheses around assignment used as
12822         truth value.
12823         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
12824         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
12825         `old_immediate_size_expand' to 0.
12826         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
12827         (build_vec_delete_1): Remove unused variable `block'.
12828         (expand_vec_init): Initialize `itype' to NULL_TREE.
12830         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
12831         declaration of `index' and `rindex' with autoconf macros.
12832         (reinit_parse_for_expr): Remove unused variables
12833         `look_for_semicolon' and `look_for_lbrac'.
12834         (cons_up_default_function): Initialize `args' to NULL_TREE.
12835         (readescape): Initialize `firstdig' to 0.
12836         (real_yylex): Add parentheses around assignment used as truth value.
12838         * method.c: Include <strings.h> if we don't have <string.h>.
12839         Protect declaration of `index' with autoconf macro.
12841         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
12842         Initialize `type' to NULL_TREE.
12843         (structsp): Remove unused variable `id'.
12845         * pt.c (coerce_template_parms): Add explicit braces to avoid
12846         ambiguous `else'.
12847         (lookup_template_class): Initialize `template' to NULL_TREE.
12848         (instantiate_class_template): Remove unused variable `name' and `e'.
12849         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
12850         (do_poplevel): Initialize `saved_warn_unused' to 0.
12851         (type_unification): Remove unused varable `parm'.
12852         (unify): Likewise for `j'.
12854         * repo.c (init_repo): Add parentheses around assignment used as
12855         truth value.
12856         (finish_repo): Remove unused varable `p'.
12858         * search.c (get_binfo): Initialize `type' to NULL_TREE.
12859         (get_base_distance): Likewise.
12860         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
12861         and `new_v' to NULL_TREE.
12862         (lookup_fnfields): Likewise for `rval_binfo_h'.
12863         (breadth_first_search): Add parentheses around assignment used as
12864         truth value.
12865         (get_template_base): Initialize `type' to NULL_TREE.
12867         * sig.c (append_signature_fields): Initialize `last_mfptr' to
12868         NULL_TREE.
12869         (build_signature_table_constructor): Likewise for
12870         `last_rhs_field', `pfn' and `vt_off'.
12871         (build_sigtable): Likewise for `init'.
12873         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
12874         (propagate_binfo_offsets): Likewise for `delta'.
12875         (hash_tree_cons): Initialize hashcode to 0.
12876         (can_free): Likewise for `size'.
12877         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
12879         * typeck.c (convert_sequence): Hide prototype.
12880         (common_type): Add explicit braces to avoid ambiguous `else'.
12881         (comp_target_types): Likewise.
12882         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
12883         (build_function_call_real): Add explicit braces to avoid ambiguous
12884         `else'.
12885         (convert_arguments): Initialize `called_thing' to 0.
12886         (convert_for_initialization): Initialize `savew' and `savee' to 0.
12888         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
12889         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
12890         (build_x_arrow): Likewise for `last_rval'.
12892         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
12894 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
12896         * decl.c (init_decl_processing): Use set_sizetype.
12897         * decl2.c (sizetype): Don't declare.
12898         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
12899         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
12900         (build_component_addr, unary_complex_lvalue): Likewise.
12901         * rtti.c (expand_class_desc): Likewise.
12902         * class.c (get_vfield_offset): Likewise.
12904 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
12906         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
12907         early to avoid bogus error.  Handle overloaded function
12908         names provided as template arguments correctly.
12909         (coerce_template_parms): Don't mishandle overloaded functions when
12910         dealing with template template parameters.
12911         (lookup_template_class): Issue an error message, rather than
12912         crashing, when the TYPE_DECL provided is not a template type.
12914 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
12916         * class.c (instantiate_type): Don't just return a known type if
12917         it's wrong.
12919 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
12921         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
12922         since that code could never be reached.
12924         * error.c (dump_decl): Avoid aborting in the midst of printing an
12925         error message about an illegal template declaration.
12927         * parse.y (structsp): Print an error message, rather than crashing,
12928         when a class-head does not name a class.
12930         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
12931         template arguments as a g++ extension.
12933         * cp-tree.def (ALIGNOF_EXPR): New tree code.
12934         * decl2.c (grok_alignof): If processing_template_decl, just store
12935         the expression.
12936         * typeck.c (c_alignof): Likewise.
12937         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
12938         * error.c (dump_expr): Likewise.
12939         * pt.c (tsubst_copy): Likewise.
12940         * tree.c (cp_tree_equal): Likewise.
12941         * pt.c (uses_template_parms): Correctly determine whether or not a
12942         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
12943         folding can be done.
12945         * cp-tree.h (grok_enum_decls): Remove type parameter.
12946         * decl.c (grok_enum_decls): Likewise.
12947         * decl2.c (grok_x_components): Call grok_enum_decls
12948         unconditionally, since it will do nothing if there is no
12949         current_local_enum.  Use the new calling sequence.
12950         * pt.c (tsubst_enum): Use the new calling sequence for
12951         grok_enum_decls.
12953         * decl.c (start_function): Make member functions of local classes
12954         in extern inline functions have comdat linkage here...
12955         (grokdeclarator): Rather than here.
12957 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
12959         * pt.c (convert_nontype_argument): Use decl_constant_value.
12961 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
12963         * call.c (add_template_candidate_real): New function.
12964         (add_template_candidate): Use it.
12965         (add_template_conv_candidate): Likewise.
12966         (joust): Pass extra argument to more_specialized.
12967         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
12968         (is_local_class): Remove.
12969         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
12970         * cp-tree.h (is_local_class): Remove.
12971         (perform_array_to_pointer_conversion): Likewise.
12972         (finish_member_template_decl): Add.
12973         (check_explicit_specialization): Return a tree, not an int.
12974         (more_specialized): Take additional argument.
12975         (get_bindings): Likewise.
12976         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
12977         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
12978         (perform_array_to_pointer_conversion): Remove.
12979         * decl.c (saved_scope): Add processing_specialization,
12980         processing_explicit_instantiation fields.
12981         (maybe_push_to_top_level): Save them.
12982         (pop_from_top_level): Restore them.
12983         (grokfndecl): Use new return value from
12984         check_explicit_specialization.
12985         (start_decl): Don't check flag_guiding_decls before pushing
12986         decls.
12987         (cp_finish_decl): Remove previous (bogus) change.
12988         (grok_declarator): Use decl_function_context rather than
12989         is_local_class.
12990         * decl2.c (finish_file): Pass extra argument to get_bindings.
12991         (build_expr_from_tree): Let build_x_component_ref check
12992         validity of arguments rather than doing it here.
12993         * lex.c (cons_up_default_function): Remove code fooling with
12994         processing_specialization, processing_explicit_instantiation
12995         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
12996         * method.c (build_overload_identifier): Mangle local classes in
12997         template functions correctly.
12998         * parse.y (finish_member_template_decl): Move to pt.c.
12999         * pt.c (finish_member_template_decl): Moved here from parse.y.
13000         (print_candidates): New function.
13001         (determine_specialization): Change interface.  Properly look for
13002         most specialized versions of template candidates.
13003         (check_explicit_specialization): Fully process explicit
13004         instantiations.
13005         (push_template_decl): Avoid looking at CLASSTYPE fields in
13006         FUNCTION_DECLS.
13007         (determine_overloaded_function): Remove.
13008         (convert_nontype_argument): Change name from
13009         convert_nontype_parameter.  Use determine_overloaded_function
13010         instead of instantiate_type.
13011         (mangle_class_name_for_template): Handle type contexts as well as
13012         function contexts.
13013         (classtype_mangled_name): Likewise.
13014         (lookup_template_class): Likewise.
13015         (tsubst): Likewise.
13016         (more_specialized): Take explict template arguments as a
13017         parameter.
13018         (most_specialized): Likewise.
13019         (get_bindings): Likewise.  Check that return types match before
13020         proclaiming a function a match.
13021         (do_decl_instantiation): Remove code searching for function to
13022         instantiate; that is now done in check_explicit_specialization.
13023         (add_maybe_template): Pass extra argument to get_bindings.
13024         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
13025         implementation.
13026         * typeck.c (build_component_ref): Check for invalid arguments.
13028 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
13030         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
13031         return_target and call_target are equivalent.
13033         * pt.c (type_unification_real): Just accept function parms that
13034         don't use any template parms.
13036 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
13038         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
13039         unset DECL_NOT_REALLY_EXTERN.
13041         * parse.y (typename_sub*): Fix std::.
13043 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
13045         * error.c (dump_decl): Fix type default template args.
13046         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
13048 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
13050         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
13051         (file_name_nondirectory): Use.
13053 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13055         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
13056         that are not really present.  Substitute default arguments in
13057         template template arguments.  Correctly convert TEMPLATE_DECL to
13058         TEMPLATE_TEMPLATE_PARM.
13059         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
13060         are no longer treated specially here.
13061         * parse.y (template_template_parm): Fix copy error.
13062         * decl.c (grokdeclarator): Warn about missing `typename' for nested
13063         type created from template template parameters.
13064         * parse.y (bad_parm): Likewise
13066         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
13067         (push_nested_class): Likewise.
13068         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
13069         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
13070         (copy_template_template_parm): Declare.
13071         * decl.c (arg_looking_for_template): New variable.
13072         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
13073         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
13074         node if arg_looking_for_template is nonzero.
13075         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
13076         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
13077         (grokdeclarator): Handle TEMPLATE_DECL.
13078         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
13079         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
13080         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
13081         (dump_decl): Handle unnamed template type parameters.
13082         Handle template template parameters.
13083         (dump_function_name): Handle template template parameters.
13084         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
13085         Handle TEMPLATE_TEMPLATE_PARM.
13086         * method.c (build_template_template_parm_names): New function.
13087         (build_template_parm_names): Handle TEMPLATE_DECL.
13088         (build_overload_nested_name, build_overload_name):
13089         Handle TEMPLATE_TEMPLATE_PARM.
13090         * parse.y (maybe_identifier): New nonterminal.
13091         (template_type_parm): Use it.
13092         (template_template_parm, template_arg1): New nonterminal.
13093         (template_parm): Add template_template_parm rules.
13094         (template_arg): Set processing_template_arg.
13095         (template_arg1): Rules moved from template_arg.
13096         (primary, nonnested_type): Set arg_looking_for_template if we are
13097         processing template arguments.
13098         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
13099         (process_template_parm): Handle template template parameters.
13100         (coerce_template_parms, comp_template_args): Likewise.
13101         (mangle_class_name_for_template, lookup_template_class): Likewise.
13102         (uses_template_parms): Handle TEMPLATE_DECL and
13103         TEMPLATE_TEMPLATE_PARM.
13104         (current_template_args): Handle TEMPLATE_DECL.
13105         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
13106         * search.c (dfs_walk, dfs_record_inheritance):
13107         Handle TEMPLATE_TEMPLATE_PARM.
13108         * tree.c (copy_template_template_parm): New function.
13109         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
13110         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
13112 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
13114         * decl.c (start_decl): Don't allow duplicate definitions of static
13115         data members.
13117         * call.c (build_user_type_conversion_1): Handle user-defined
13118         template conversion operators correctly.
13120         * decl2.c (build_expr_from_tree): Issue an error message if the
13121         object in a COMPONENT_REF is a TEMPLATE_DECL.
13123         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
13125         * class.c (is_local_class): New function.
13126         * cp-tree.h (is_local_class): Declare it.
13127         (last_tree): Likewise.
13128         (begin_tree): Likewise.
13129         (end_tree): Likewise.
13130         (lookup_template_class): Change prototype.
13131         * decl.c (cp_finish_decl): Check for NULL where necessary.
13132         Consider FUNCTION_DECLS to declare objects with top-level binding,
13133         when calling make_decl_rtl.
13134         (grokdeclarator): Give members of local classes internal linkage.
13135         (start_function): Remove declaration of last_tree.
13136         (finish_function): Set flag_keep_inline_functions around call to
13137         rest_of_compilation if we are processing a member function in a
13138         local class.
13139         (start_method): Call push_template_decl for member functions of
13140         local classes in template functions.
13141         * decl2.c (import_export_decl): Don't give external linkage to
13142         instantiations of templates with internal linkage.
13143         * parse.y (last_tree): Remove declaration.
13144         (template_type): Pass extra parameter to lookup_template_class.
13145         (self_template_type): Likewise.
13146         (structsp): Move call to reset_specialization into left_curly.
13147         (left_curly): Call reset_specialization, and begin_tree.
13148         * pt.c (saved_trees): New variable.
13149         (mangle_class_name_for_template): Change prototype.  Use
13150         additional function context to name local classes in templates
13151         correctly.
13152         (classtype_mangled_name): Pass the context.
13153         (push_template_decl): Handle local classes and templates, and
13154         member functions for such classes.
13155         (convert_nontype_parameter): Fix handling of pointer-to-member
13156         constants.
13157         (lookup_template_class): Handle local classes in templates.
13158         (tsubst): Likewise.  Don't assume that template instantiations
13159         have external linkage; pay attention to the template declaration.
13160         (mark_decl_instantiated): Likewise.
13161         (begin_tree): New function.
13162         (end_tree): Likewise.
13164         * decl.c (xref_basetypes): Don't call complete_type for basetypes
13165         that involve template parameters; that can lead to infinite
13166         recursion unnecessarily.
13168         * pt.c (register_specialization): Do not register specializations
13169         that aren't ready to be registered yet.
13170         (check_explicit_specialization): Handle explicit specialization of
13171         constructors and destructors.
13172         (build_template_decl): New function.
13173         (push_template_delc): Handle out-of-class specializations of
13174         member templates.
13176         * pt.c (check_explicit_specialization): Set up the template
13177         information before registering the specialization.
13178         (coerce_template_parms): Fix thinko.
13179         (tsubst): Handle specializations of member templates correctly.
13181         * class.c (finish_struct_methods): Remove calls to
13182         check_explicit_specialization from here.
13183         (finish_struct): And insert them here.
13184         * cp-tree.h (perform_qualification_conversions): New function.
13185         (perform_array_to_pointer_conversion): Likewise.
13186         (begin_explicit_instantiation): Likewise.
13187         (end_explicit_instantiation): Likewise.
13188         (determine_specialization): Renamed from
13189         determine_explicit_specialization.
13190         (comp_template_parms): New function.
13191         (processing_explicit_instantiation): New variable.
13192         * cvt.c (perform_qualification_conversions): New function.
13193         (perform_array_to_pointer_conversion): Likewise.
13194         * decl.c (duplicate_decls): Don't consider template functions
13195         alike unless they have the same parameters.  Refine handling of
13196         instantiation/specialization mismatches.
13197         (start_decl): Don't call pushdecl for template specializations,
13198         since they don't affect overloading.
13199         (start_function): Likewise.
13200         (grokfndecl): Call check_explicit_specialization a little later.
13201         Don't call duplicate_decls for memberm template specializations.
13202         (grokdeclarator): Don't update template_count for classes that are
13203         themselves specializations.  Remove use of `2' as parameter to
13204         grokfndecl since that value isn't used.
13205         * lex.c (cons_up_default_function): Save and restore
13206         processing_explicit_instantiation around calls to grokfield.
13207         * parse.y (finish_member_template_decl): New function.
13208         (component_decl_1): Use it.
13209         (fn.def2): Likewise.
13210         (template_arg_list_opt): New nonterminal.
13211         (template_type): Use it.
13212         (self_template_type): Likewise.
13213         (template_id): Likewise.
13214         (object_template_id): Likewise.
13215         (notype_template_declarator): Likwise.
13216         (begin_explicit_instantiation): Likewise.
13217         (end_explicit_instantiation): Likewise.
13218         (explicit_instantiation): Use them.
13219         * pt.c (coerce_template_parms): Add parameters.
13220         (processing_explicit_instantiation): New variable.
13221         (convert_nontype_parameter): New function.
13222         (determine_overloaded_function): Likewise.
13223         (begin_explicit_instantiation): Likewise.
13224         (end_explicit_instantiation): Likewise.
13225         (retrieve_specialization): Likewise.
13226         (register_specialization): Likewise.
13227         (processing_explicit_specialization): Removed.
13228         (determine_specialization): Handle specializations of member
13229         functions of template class instantiations.
13230         (check_explicit_specialization): Refine to conform to standard.
13231         (comp_template_parms): New function.
13232         (coerce_template_parms): Call convert_nontype_parameter.
13233         (tsubst): Refine handling of member templates.  Use
13234         register_specialization.
13235         (instantiate_template): Use retrieve_specialization.
13236         (do_decl_instantiation): Likewise.
13237         (instantiate_decl): Likewise.
13238         (type_unification): Improve handling of explict template
13239         arguments.
13240         * tree.c (mapcar): Return error_mark_node, rather than aborting,
13241         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
13242         * typeck.c (build_unary_op): Call determine_specialization, rather
13243         than determine_explicit_specialization.
13245 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
13247         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
13249 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13251         * error.c (dump_decl): For enum tags, output the tag, not its value.
13253 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
13255         * decl.c (init_decl_processing): Only call init_rtti_processing
13256         FLAG_RTTI is set.
13258 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
13260         * init.c (build_new_1): Split out from build_new.
13261         (build_new): Just return a NEW_EXPR.
13262         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
13264         * decl2.c (get_temp_regvar): Tweak.
13266         * cp-tree.h (TREE_CALLS_NEW): Comment out.
13267         * class.c (resolves_to_fixed_type_p): Remove use.
13268         * method.c (build_opfncall): Likewise.
13269         * call.c (build_new_op): Likewise.
13271 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
13273         * exception.cc (__eh_alloc, __eh_free): New fns.
13274         (__cp_push_exception, __cp_pop_exception): Use them.
13275         (__uncatch_exception): Call terminate here if no exception.
13276         * except.c (build_terminate_handler): New fn.
13277         (expand_start_catch_block): Use it.
13278         (expand_exception_blocks): Likewise.
13279         (alloc_eh_object): New fn.
13280         (expand_throw): Use it.  Protect exception init with terminate.
13281         * typeck.c (build_modify_expr): Remove code that ignores trivial
13282         methods.
13284 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13286         * call.c (add_builtin_candidate): Add default case in enumeration
13287         switch.
13288         (build_new_op): Likewise.
13289         (convert_like): Likewise.
13290         * cvt.c (build_expr_type_conversion): Likewise.
13291         * tree.c (real_lvalue_p): Likewise.
13292         (lvalue_p): Likewise.
13293         (cp_tree_equal): Likewise.
13294         * typeck.c (comptypes): Likewise.
13295         (build_component_ref): Likewise.
13296         (build_function_call_real): Likewise.
13297         (build_binary_op_nodefault): Likewise.
13298         (build_unary_op): Likewise.
13299         (build_modify_expr): Likewise.
13300         * typeck2.c (initializer_constant_valid_p): Likewise.
13302 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
13304         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
13306 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
13308         * pt.c (coerce_template_parms): Make sure to digest_init if
13309         possible.
13311         * decl.c (duplicate_decls): Make the newdecl virtual if the
13312         olddecl was, just as is done with other attributes of olddecl.
13314 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
13316         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
13317         address of an OFFSET_REF.
13319         * cp-tree.def: Add AGGR_INIT_EXPR.
13320         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
13321         AGGR_INIT_EXPR where appropriate.
13322         * expr.c (cplus_expand_expr): Likewise.  Simplify.
13324         * decl2.c (finish_file): Remove call to register_exception_table.
13326 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13328         * pt.c (instantiate_class_template): Don't do injection when
13329         processing_template_decl is true, as pollutes current_binding_level
13330         for base classes.
13332 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
13334         * pt.c (maybe_fold_nontype_arg): Add prototype.
13336 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
13338         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
13339         * error.c (dump_expr): Likewise.
13341 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
13343         * typeck.c (build_function_call_real): Remove "inline called before
13344         definition" pedwarn.
13346         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
13348 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
13350         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
13352         * pt.c (type_unification_real): Change __null to type void* with
13353         a warning.
13355 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
13357         * call.c (implicit_conversion): Don't call
13358         build_user_type_conversion_1 with a NULL expr, since it will
13359         crash.
13361         * pt.c (unify): Don't try to unify array bounds if either array is
13362         unbounded.
13364 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
13366         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
13367         Replace extern decls with casts.
13369         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
13370         Update last_parm_cleanup_insn.
13371         (store_after_parms): Remove.
13372         * cp-tree.h: Adjust.
13374 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
13376         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
13377         (finish_file): Check DECL_COMDAT instead of weak|one_only.
13378         (import_export_vtable): Use make_decl_one_only instead of
13379         comdat_linkage for win32 tweak.
13380         (import_export_decl): Likewise.
13381         * pt.c (mark_decl_instantiated): Likewise.
13383         * decl2.c (finish_file): Lose handling of templates in pending_statics.
13385 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
13387         * decl2.c (finish_file): Lose call to expand_builtin_throw.
13388         * except.c (expand_builtin_throw): Remove.
13389         * cp-tree.h: Remove ptr_ptr_type_node.
13390         * decl.c: Likewise.
13392 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
13394         * decl.c (ptr_ptr_type_node): Define.
13395         (init_decl_processing): Initialize it.
13396         * cp-tree.h: Declare it.
13397         * exception.cc (__cp_exception_info): Use __get_eh_info.
13398         (__cp_push_exception): Likewise.
13399         (__cp_pop_exception): Likewise.
13401         From Scott Snyder <snyder@d0sgif.fnal.gov>:
13402         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
13403         saved_pc.
13404         (init_exception_processing): Removed saved_pc initialization.
13406 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
13408         * pt.c (instantiate_decl): Defer all templates but inline functions.
13410 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13412         * init.c (expand_vec_init): Don't fold a list of parameters.
13414         * decl.c (copy_args_p): Handle copy elision for types with virtual
13415         bases.
13416         * call.c (build_over_call): Likewise.
13418 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
13420         * pt.c (lookup_template_function): Copy the template arguments,
13421         not just the list containing them, to the permanent obstack.
13423 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
13425         * except.c (expand_start_catch_block): suspend_momentary for the
13426         terminate handler.
13428         * error.c (dump_decl): Handle LOOKUP_EXPR.
13430 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
13432         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
13433         permanent obstack if we are processing a template decl.
13434         * typeck.c (build_static_cast): Likewise.
13435         (build_const_cast): Likewise.
13436         (build_reinterpret_cast): Likewise.
13438         * pt.c (coerce_template_parms): Coerce some expressions, even
13439         when processing_template_decl.
13441 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13443         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
13444         handling of pointer difference expressions.
13446         * typeck.c (comp_target_types): Comparison of function/method types
13447         is independent of nptrs.
13449 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
13451         * pt.c (tsubst): Avoid creating pointer to reference and
13452         reference to reference types.
13454 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
13456         * parse.y (do_id): New nonterminal.
13457         (template_id): Use it.
13459 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
13461         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
13462         * spew.c (yylex): Don't do_identifier here.
13463         * decl2.c (build_expr_from_tree): Revert last change.
13465         * decl2.c (build_expr_from_tree): Expand the name for a method call.
13466         * parse.y (object_template_id): Don't try to take the DECL_NAME.
13468 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
13470         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
13471         alloc_expr.
13472         * call.c (build_op_delete_call): Adjust.
13474         * except.c (expand_end_catch_block): Lose rethrow region.
13475         (expand_start_catch_block): Likewise.
13476         (expand_end_catch_block): Don't expand_leftover_cleanups.
13478 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13480         * pt.c (tsubst): Remove tree_cons call (places redundant info into
13481         DECL_TEMPLATE_INSTANTIATION).
13483 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
13485         * tree.c (is_overloaded_fn): Handle getting a fn template.
13486         (really_overloaded_fn): Likewise.
13487         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
13488         * pt.c (check_explicit_specialization): Tweak.
13489         (determine_explicit_specialization): Tweak.
13491         * tree.c, cp-tree.h (get_target_expr): New fn.
13493 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
13495         * pt.c (check_explicit_specialization): Fix misspelling in
13496         diagnostic: `preceeded'.
13497         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
13498         `conversiona'.
13500 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
13502         * pt.c (determine_explicit_specialization): Avoid an internal
13503         error for bad specializations.
13505         * method.c (build_overload_value): Handle SCOPE_REF.
13507 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
13509         * class.c (prepare_fresh_vtable): Enable even more complex MI
13510         vtable names.
13512 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
13514         * exception.cc (__check_eh_spec): Optimize a bit.
13516         * exception.cc (__cp_pop_exception): Lose handler arg.
13517         * except.c (do_pop_exception): Likewise.
13518         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
13519         (expand_end_catch_block): Likewise.
13521 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
13523         * pt.c (check_explicit_specialization): Complain about using a
13524         template-id for a non-specialization.
13526 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
13528         * repo.c: Prototype rindex only if needed.
13529         * xref.c: Likewise.
13531 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13533         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
13535 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
13537         * typeck.c (build_const_cast): Handle references here instead of
13538         handing off to convert_to_reference.
13540         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
13541         TerminateFunctionCall.
13542         (init_exception_processing): Likewise.  Terminate et al are now
13543         the fns, not ADDR_EXPRs.
13544         (various): Lose redundant assemble_external calls.
13545         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
13547         * cp-tree.h (struct lang_decl_flags): Add comdat.
13548         (DECL_COMDAT): New macro.
13549         * decl.c (duplicate_decls): Propagate it.
13550         (cp_finish_decl): Handle it.
13551         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
13553         * class.c: Remove static pending_hard_virtuals.
13554         (add_virtual_function): Take pointers to pending_virtuals
13555         and pending_hard_virtuals.
13556         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
13558 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
13560         * decl2.c (import_export_vtable): If we support one_only but not
13561         weak symbols, mark instantiated template vtables one_only.
13562         (import_export_decl): Likewise for tinfo functions.
13563         (finish_vtable_vardecl): Also write out vtables from explicitly
13564         instantiated template classes.
13565         * pt.c (mark_class_instantiated): Revert last change.
13567         * except.c (expand_throw): Call mark_used on the destructor.
13569 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
13571         * lex.c (lang_init): Enable flag_exceptions by default if no
13572         command line switch was specified.
13574 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
13576         * pt.c (unify): Handle `void' template parameters in
13577         specializations.
13579 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
13581         * rtti.c (build_dynamic_cast): Handle template case here.
13582         (build_dynamic_cast_1): Not here.
13584         * typeck2.c (digest_init): Make copies where appropriate.
13586         * decl2.c (delete_sanity): resolve_offset_ref.
13588         * except.c: Call terminate without caching so many bits.
13590         * except.c (expand_start_catch_block): Fix catching a reference
13591         to pointer.
13593 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
13595         * init.c (build_new): Copy size to the saveable obstack.
13597         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
13598         TRY_CATCH_EXPR for now.
13600 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
13602         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
13603         has DECL_LANG_SPECIFIC.
13605         * exception.cc (struct cp_eh_info): Add handlers field.
13606         (__cp_push_exception): Initialize it.
13607         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
13608         (__throw_bad_exception): Remove.
13609         * except.c (call_eh_info): Add handlers field.
13610         (get_eh_handlers): New fn.
13611         (push_eh_cleanup): Increment handlers.
13613 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
13615         * except.c (expand_start_eh_spec): Use the try/catch code.
13616         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
13617         doing everything inline.
13618         (init_exception_processing): throw_type_match now takes
13619         const void pointers.
13620         * exception.cc (__check_eh_spec): New fn.
13621         * inc/exception: Neither terminate nor unexpected return.
13622         * decl.c: Make const_ptr_type_node public.
13623         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
13625         * except.c (expand_start_catch_block): We only need the rethrow
13626         region for non-sjlj exceptions.
13627         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
13629 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
13631         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
13632         (various.o): Likewise.
13633         * inc/new: Add placement deletes.  Add throw specs for default new.
13634         * new.cc (set_new_handler): Move here from libgcc2.
13635         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
13636         (new): Move from libgcc2.  Throw bad_alloc.
13637         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
13638         * decl.c (init_decl_processing): Update exception specs on new and
13639         delete.
13641         * method.c (build_decl_overload_real): Don't mess with global
13642         placement delete.
13644         * init.c (build_new): Check for null throw spec, not nothrow_t.
13646         * decl.c (duplicate_decls): Don't complain about different exceptions
13647         from an internal declaration.
13649         * call.c (build_op_delete_call): Fix check for member fns again.
13651         * decl2.c (import_export_decl): Interface hackery affects
13652         virtual synthesized methods.
13654 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
13656         * decl.c (start_decl): Don't just complain about a mismatched
13657         scope, fix it.
13659         * decl.c (make_implicit_typename): Handle case where t is not
13660         actually from context.
13661         * tree.c (get_type_decl): Lose identifier case.
13662         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
13663         * parse.y (nonnested_type): Just use lookup_name.
13664         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
13666 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
13668         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
13669         T was built in C language context (for example, by
13670         output_func_start_profiler).
13672 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
13674         * decl.c (make_implicit_typename): New fn.
13675         (lookup_name_real): Use it.  Use current_class_type as the context.
13677 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
13679         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
13681 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
13683         * friend.c (do_friend): Warn about non-template friends in templates.
13685         * call.c (build_op_delete_call): Fix handling of inherited delete.
13687         * search.c (dfs_record_inheritance): Ignore template type parms.
13689 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
13691         * call.c (build_new_op): Fix copy error.
13692         (build_op_new_call): New fn.
13693         (build_op_delete_call): New fn.
13694         * cp-tree.h: Declare them.
13695         * init.c (build_new): Use them.  Support placement delete.
13696         (build_x_delete): Use build_op_delete_call.
13697         (build_delete): Likewise.
13698         * decl2.c (delete_sanity): Likewise.
13699         (coerce_delete_type): Don't complain about placement delete.
13701 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
13703         * call.c (build_new_function_call): Remove unused 'obj' parm.
13704         * cp-tree.h, typeck.c: Adjust.
13706         * init.c (build_new): Make the cleanup last longer.
13707         (expand_vec_init): Call do_pending_stack_adjust.
13709 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
13711         * pt.c (do_type_instantiation): Fix typo.
13712         (mark_class_instantiated): If we support one_only but not weak
13713         symbols, don't mark this as known.
13715         * init.c (build_new): Handle vec delete in EH cleanup.
13717 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13719         * call.c (build_method_call): Call complete_type before checking
13720         for destructor.
13722 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
13724         * decl.c (add_block_current_level): Delete.
13725         * init.c (build_vec_delete_1): Delete build_block and
13726         add_block_current_level calls.
13728 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
13730         * init.c (build_new): Handle freeing allocated memory when the
13731         constructor throws.
13733         * call.c (build_new_method_call): Fix flags arg.
13735         * pt.c (do_type_instantiation): Don't try to instantiate
13736         member templates.
13737         (mark_decl_instantiated): If we support one_only but not
13738         weak symbols, mark this one_only.
13739         * decl2.c (import_export_vtable): Don't defer handling of vtables
13740         if MULTIPLE_SYMBOL_SPACES.
13742 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
13744         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
13746 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
13748         * except.c (do_pop_exception): Return a value.
13750 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
13752         * call.c (build_new_method_call): Handle getting a
13753         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
13754         if we got template parms.
13755         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
13756         not just the args.
13757         * decl2.c (build_expr_from_tree): Tweak last change.
13758         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
13759         (maybe_fold_nontype_arg): Split out from tsubst_copy.
13760         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
13762 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
13764         * pt.c (tsubst_copy): Handle explicit template arguments in
13765         function calls.
13766         * typeck.c (build_x_function_call): Likewise.
13767         * decl2.c (build_expr_from_tree): Lookup function name if it
13768         hasn't been done.
13770         * pt.c (tsubst): Instantiate template functions properly when
13771         template parameter does not appear in function arguments and return
13772         type.
13773         (comp_template_args): Handle member templates required by tsubst.
13775 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
13777         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
13778         previous change.
13780 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13782         * pt.c (coerce_template_parms): Tweak error message.
13784         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
13785         return type defaults to `int', even if there are storage-class
13786         specifiers.
13788 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
13790         Complete nested exception support.
13791         * except.c (do_pop_exception): Split out...
13792         (push_eh_cleanup): From here.  Handle the EH region by hand.
13793         (expand_start_catch_block): Add a new level for the catch parm.
13794         Move the rethrow region outside the two cleanup regions.
13795         Protect the initializer for the catch parm with terminate.
13796         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
13797         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
13798         popping off the middle of the stack.
13799         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
13800         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
13801         (build_cplus_new): Only wrap CALL_EXPRs.
13802         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
13803         the constructor call.
13805 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13807         * Make-lang.in (c++.distdir): Make inc subdirectory.
13809 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
13811         * decl2.c (finish_file): Put back some code.
13813 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
13815         * decl2.c (finish_file): Remove redundant code.
13816         * method.c (emit_thunk): Don't let the backend defer generic thunks.
13818 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
13820         * except.c (call_eh_info): Split out...
13821         (push_eh_info): From here.
13822         (expand_builtin_throw): Use it.
13823         (expand_start_catch_block): Move region start back.
13825 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
13827         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
13828         (real_yylex): Record wide strings using target endianness, not host.
13830 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
13832         * repo.c (rindex): Add decl unconditionally.
13833         (get_base_filename, open_repo_file): Don't cast rindex.
13834         * xref.c (rindex): Add decl unconditionally.
13835         (index): Remove unused decl.
13836         (open_xref_file): Don't cast rindex.
13838 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
13840         * class.c (build_vbase_path): Propagate the result type properly.
13842 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
13844         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
13845         remaining use of saved_throw_type with a call to get_eh_type.
13847 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
13849         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
13850         (file_name_nondirectory): New function, doing the same as the macro.
13851         (set_typedecl_interface_info): Use it instead of the macro.
13852         (check_newline): Likewise.
13853         (handle_cp_pragma): Likewise.
13855         * repo.c (get_base_filename): Cast result of rindex to char*.
13856         (open_repo_file): Likewise.
13857         * xref.c (open_xref_file): Likewise.
13858         * error.c (dump_char): Make its arg int, not char.
13860         * except.c (push_eh_info): Pass the number of fields - 1 down, not
13861         the exact number of fields.
13863 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
13865         Support for nested exceptions.
13866         * tinfo2.cc (__is_pointer): New fn.
13867         * exception.cc (struct cp_eh_info): Define.
13868         (__cp_exception_info, __uncatch_exception): New fns.
13869         (__cp_push_exception, __cp_pop_exception): New fns.
13870         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
13871         Lose empty_fndecl.
13872         (init_exception_processing): Likewise.  __eh_pc is now external.
13873         (push_eh_info): New fn.
13874         (get_eh_{info,value,type,caught}): New fns.
13875         (push_eh_cleanup): Just call __cp_pop_exception.
13876         (expand_start_catch_block): Use push_eh_info.  Start the eh region
13877         sooner.
13878         (expand_end_eh_spec): Use push_eh_info.
13879         (expand_throw): Call __cp_push_exception to set up the exception info.
13880         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
13881         when we rethrow.
13882         (expand_builtin_throw): Don't refer to empty_fndecl.
13884 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
13886         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
13888 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
13890         * method.c (build_template_parm_names, build_decl_overload_real):
13891         Add static to definitions.
13892         * pt.c (add_to_template_args, note_template_header,
13893         processing_explicit_specialization, type_unification_real): Likewise.
13894         ({determine,check}_explicit_specialization): Use a single string for
13895         error messages.
13897 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
13899         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
13900         (expand_end_catch_block): Likewise.
13901         (expand_end_eh_spec): Likewise.
13903 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
13905         * decl.c (duplicate_decls): Handle template specializations
13906         correctly.
13907         * error.c (dump_function_name): Fix printing of specializations of
13908         member functions that are not member templates.
13909         * cp-tree.h (processing_specialization): Make global.
13910         * pt.c (processing_specialization): Likewise.
13911         * lex.c (cons_up_default_function): Save and restore
13912         processing_specialization to avoid confusion.
13914 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
13916         * decl.c (init_decl_processing): Give null_node unknown* type.
13917         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
13918         (common_type): Likewise.
13919         * error.c (args_as_string): Recognize null_node.
13921 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13923         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
13924         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
13926         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
13928         * Make-lang.in (g++): Include prefix.o.
13930 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
13932         * pt.c (determine_explicit_specialization): Initialize "dummy"
13933         to keep Purify quiet.
13935 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
13937         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
13938         (build_overload_int): Not here.
13940 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
13942         * class.c (build_type_pathname): Remove.
13943         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
13945 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
13947         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
13948         &&label GNU extension.
13950 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
13952         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
13953         so as to avoid incorrect manglings.
13954         * method.c (build_decl_overload_real): Don't mangle return types
13955         for constructors.
13957 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
13959         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
13960         scratch_tree_cons): Define as macros for now.
13961         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
13962         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
13963         typeck2.c: Use them and the expression_obstack variants.
13965 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13967         * decl.c (store_return_init): Allow classes with explicit ctors to
13968         be used with the named return values extension.
13970 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
13972         * pt.c (instantiate_decl): Fix previous change.
13974 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
13976         * pt.c (tsubst): Fix thinko.
13977         (instantiate_decl): Really use the original template.
13979         * call.c (build_new_method_call): Use simple constructor_name for
13980         error messages.
13982 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
13984         * method.c (build_underscore_int): Don't use ANSI specific
13985         features.
13987 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
13989         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
13990         for our key method; it might have been inlined by -O3.
13992 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
13994         * decl.c (make_typename_type): Do not try to call lookup_field for
13995         non-aggregate types.
13997 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
13999         * typeck.c (build_reinterpret_cast): Tweak.
14001 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
14003         * typeck.c (build_reinterpret_cast): Converting a void pointer
14004         to function pointer with a reinterpret_cast produces a warning
14005         if -pedantic is issued.
14007 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14009         * typeck.c (c_expand_return): Don't warn about returning a
14010         reference-type variable as a reference.
14012 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
14014         * method.c (build_static_name): Fix typo.
14016 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
14018         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
14019         OLDDECL before we try to do DECL_USE_TEMPLATE.
14021 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
14023         * decl.c (duplicate_decls): Don't warn about template instances.
14025         * typeck.c (mark_addressable): Lose ancient code that unsets
14026         DECL_EXTERNAL.
14028         * pt.c (do_decl_instantiation): Lose support for instantiating
14029         non-templates.
14031         * call.c (build_new_function_call): Fix handling of null explicit
14032         template args.
14033         (build_new_method_call): Likewise.
14035 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
14037         * method.c (build_underscore_int): Fix typo.
14039 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
14041         * tree.c (print_lang_statistics): #if 0 call to
14042         print_inline_obstack_statistics until its definition is checked in.
14044 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
14046         * decl2.c (finish_file): Move dump_tree_statistics to end.
14048         * pt.c (instantiate_decl): Look for the original template.
14049         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
14050         of member templates.
14052 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
14054         * Makefile.in (g++FAQ.*): New rules.
14055         (CONFLICTS): Update.
14056         * g++FAQ.texi: Moved from libg++.
14058         * parse.y (PFUNCNAME): Only specify the type once.
14060 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
14062         * lex.c (real_yylex): Clean up the code to fully behave the way
14063         the c-lex.c parser does for complex and real numbers.
14065 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
14067         * method.c (build_decl_overload_real): Reformat.
14069 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
14071         * method.c (synthesize_method): If at_eof, determine our linkage.
14073 1997-09-29  Paul Eggert  <eggert@twinsun.com>
14075         * lex.c (real_yylex): Treat `$' just like `_', except issue a
14076         diagnostic if !dollars_in_ident or if pedantic.
14078         * lang-specs.h (@c++): -ansi no longer implies -$.
14080         * decl2.c (lang_decode_option):
14081         -traditional and -ansi now do not mess with
14082         dollars_in_ident.
14084 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
14086         * Makefile.in (parse.o, decl.o): Also depend on
14087         $(srcdir)/../except.h $(srcdir)/../output.h.
14088         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
14089         $(srcdir)/../except.h $(srcdir)/../output.h.
14090         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
14091         ../insn-codes.h.
14093         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
14095         * expr.c (cplus_expand_expr): Make it static.
14097         * decl2.c, init.c, typeck.c: Include "expr.h".
14098         (expand_expr): Use proper values when calling the function.
14100 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
14102         * lang-options.h: New -Wold-style-cast flag.
14103         * cp-tree.h (warn_old_style_cast): New variable.
14104         * decl2.c (warn_old_style_cast): Likewise.
14105         (lang_decode_option): Support -Wold-style-cast.
14106         (reparse_absdcl_as_casts): Produce old-style-cast warning.
14108 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14110         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
14111         TREE_USED, reset value based on already_used.
14113         * init.c (expand_member_init): Revert change.
14115 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
14117         * cp-tree.h, decl.c, decl2.c, pt.c:
14118         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
14120         * decl2.c (lang_decode_option): Add missing ;.
14122 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
14124         * friend.c (do_friend): Disable injection for all template-derived
14125         decls.
14126         * decl2.c (lang_decode_option): Handle -fguiding-decls.
14127         * parse.y (notype_template_declarator): New nonterminal.
14128         (direct_notype_declarator): Use it.
14129         (complex_direct_notype_declarator): Likewise.
14130         (object_template_id): Accept any kind of identifier after TEMPLATE.
14131         (notype_qualified_id): Don't add template declarators here.
14133 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
14135         * call.c (add_template_candidate): Add explicit_targs parameter.
14136         (build_scoped_method_call): Use it.
14137         (build_overload_call_real): Likewise.
14138         (build_user_type_conversion_1): Likewise.
14139         (build_new_function_call): Likewise.
14140         (build_object_call): Likewise.
14141         (build_new_op): Likewise.
14142         (build_new_method_call): Likewise.
14143         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
14144         (build_new_method_call): Likewise.
14146         * class.c (finish_struct_methods): Add specialization pass to
14147         determine which methods were specializing which other methods.
14148         (instantiate_type): Handle TEMPLATE_ID_EXPR.
14150         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
14152         * cp-tree.h (name_mangling_version): New variable.
14153         (flag_guiding_decls): Likewise.
14154         (build_template_decl_overload): New function.
14155         (begin_specialization): Likewise.
14156         (reset_specialization): Likewise.
14157         (end_specialization): Likewise.
14158         (determine_explicit_specialization): Likewise.
14159         (check_explicit_specialization): Likewise.
14160         (lookup_template_function): Likewise.
14161         (fn_type_unification): Add explicit_targs parameter.
14162         (type_unification): Likewise.
14164         * decl.c (duplicate_decls): Add smarts for explicit
14165         specializations.
14166         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
14167         specializations.
14168         (grokfndecl): Call check_explicit_specialization.
14170         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
14171         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
14172         (check_classfn): Handle specializations.
14174         * error.c (dump_function_name): Print specialization arguments.
14176         * friend.c (do_friend): Don't call pushdecl for template
14177         instantiations.
14179         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
14181         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
14182         and -fno-guiding-decls.
14184         * lex.c (identifier_type): Return PFUNCNAME for template function
14185         names.
14187         * method.c (build_decl_overload_real): New function.
14188         (build_template_parm_names): New function.
14189         (build_overload_identifier): Use it.
14190         (build_underscore_int): New function.
14191         (build_overload_int): Use it.  Add levels for template
14192         parameters.
14193         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
14194         (build_overload_nested_names): Handle template type parameters.
14195         (build_template_decl_overload): New function.
14197         * parse.y (YYSTYPE): New ntype member.
14198         (nested_name_specifier): Use it.
14199         (nested_name_specifier_1): Likewise.
14200         (PFUNCNAME): New token.
14201         (template_id, object_template_id): New non-terminals.
14202         (template_parm_list): Note specializations.
14203         (template_def): Likewise.
14204         (structsp): Likewise.
14205         (fn.def2): Handle member template specializations.
14206         (component_decl_1): Likewise.
14207         (direct_notype_declarator): Handle template-ids.
14208         (component_decl_1): Likewise.
14209         (direct_notype_declarator): Handle template-ids.
14210         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
14212         * pt.c (processing_specializations): New variable.
14213         (template_header_count): Likewise.
14214         (type_unification_real): New function.
14215         (processing_explicit_specialization): Likewise.
14216         (note_template_header): Likewise.
14217         (is_member_template): Handle specializations.
14218         (end_template_decl): Call reset_specialization.
14219         (push_template_decl): Handle member template specializations.
14220         (tsubst): Likewise.
14221         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
14222         (instantiate_template): Handle specializations.
14223         (instantiate_decl): Likewise.
14224         (fn_type_unification): Handle explicit_targs.
14225         (type_unification): Likewise.  Allow incomplete unification
14226         without an error message, if allow_incomplete.
14227         (get_bindings): Use new calling sequence for fn_type_unification.
14229         * spew.c (yylex): Handle PFUNCNAME.
14231         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
14232         (really_overloaded_fn): Likewise.
14233         (get_first_fn): Handle function templates.
14235         * typeck.c (build_x_function_call): Use really_overloaded_fn.
14236         Handle TEMPLATE_ID_EXPR.
14237         (build_x_unary_op): Likewise.
14238         (build_unary_op): Likewise.
14239         (mark_addressable): Templates whose address is taken are marked
14240         as used.
14242 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14244         * decl.c (init_decl_processing): Declare __builtin_constant_p as
14245         accepting any kind of type, not only int.
14247 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
14249         * search.c (get_matching_virtual): Notice virtual bases when sorrying
14250         about covariant returns.
14252         * parse.y (member_init): Also imply typename here.  Remove ancient
14253         extension for initializing base members.
14255 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
14257         Handle multi-level typenames and implicit typename in base list.
14258         * parse.y (typename_sub{,[0-2]}): New rules.
14259         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
14260         (nonnested_type): New rule.
14261         (complete_type_name): Use it.
14262         (base_class.1): Use typename_sub and nonnested_type.
14263         (nested_name_specifier): Don't elide std:: here.
14264         * decl.c (make_typename_type): Handle getting a type for NAME.
14265         (lookup_name_real): Turn std:: into :: here.
14267         Rvalue conversions were removed in London.
14268         * call.c (is_subseq): Don't consider lvalue transformations.
14269         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
14270         (joust): Re-enable ?: kludge.
14272 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
14274         * decl.c (start_function): Up warning of no return type to be a
14275         pedwarn.
14277 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14279         * init.c (expand_member_init): Don't set TREE_USED.
14280         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
14281         set,don't clear TREE_USED wholesale.
14283 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
14285         * call.c (build_over_call): Do require_complete_type before
14286         build_cplus_new.
14288 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
14290         * search.c (lookup_field): Call complete_type in all cases.
14292         * decl.c (finish_function): Just warn about flowing off the end.
14294 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
14296         * decl.c (grokparms): Don't bash a permanent list node if we're
14297         in a function.
14299 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
14301         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
14303 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
14305         * call.c (build_new_op): Give better error for syntactically
14306         correct, but semantically invalid, use of undeclared template.
14308         * call.c (compare_qual): Handle pmfs.
14310         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
14311         after the exception spec.
14313 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
14315         * call.c (null_ptr_cst_p): Integer type, not integral type.
14317         * call.c (joust): Disable warnings until they can be moved to the
14318         right place.
14320 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
14322         * Makefile.in, config-lang.in:  Convert to autoconf.
14324 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
14326         * decl.c (lookup_name_real): Add implicit 'typename' to types from
14327         base classes.
14329         * pt.c (most_specialized_class): Fix typo.
14330         (tsubst): Move constant folding to TREE_VEC case.
14332 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
14334         * pt.c (do_poplevel): Don't warn about unused local variables
14335         while processing_template_decl since we don't always know whether
14336         or not they will need constructing/destructing.
14338         * pt.c (uses_template_parms): Check the values of an enumeration
14339         type to make sure they don't depend on template parms.
14341         * decl.c (make_typename_type): Don't lookup the field if the
14342         context uses template parms, even if we're not
14343         processing_template_decl at the moment.
14345         * pt.c (coerce_template_parms): Avoid looking at the
14346         TYPE_LANG_DECL portion of a typename type, since there won't be
14347         one.
14348         (tsubst): Do constant folding as necessary to make sure that
14349         arguments passed to lookup_template_class really are constants.
14351 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
14353         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
14354         * decl2.c (finish_file): Only register exception tables if we
14355         need to.
14357         * decl.c (init_decl_processing): Add __builtin_[fs]p.
14359 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
14361         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
14363 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
14365         * error.c (dump_decl): Avoid crashing when presented with a
14366         uninitialized constant, as can occur with a template parameter.
14367         (dump_expr): Make sure that there are enough levels of
14368         current_template_parms before we start diving through them.
14370 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
14372         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
14373         c-typeck.c.
14375 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14377         * except.c (expand_throw): Call build_delete for all
14378         exception types, not just objects with destructors.
14380 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
14382         * decl.c (current_local_enum): Remove static.
14383         * pt.c (tsubst_enum): Save and restore value of current_local_enum
14384         in case template is expanded in enum decl.
14385         (instantiate_class_template): Use new tsubst_enum signature.
14386         (tsubst_expr): Likewise.
14388 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
14390         * pt.c (begin_member_template_processing): Take a function as
14391         argument, not a set of template arguments.  Use the template
14392         parameters, rather than the arguments.  Handle non-type parameters
14393         correctly.  Push a binding level for the parameters so that multiple
14394         member templates using the same parameter names can be declared.
14395         (end_member_template_processing): Pop the binding level.
14396         (push_template_decl): Mark member templates as static when
14397         appropriate.
14399         * lex.c (do_pending_inlines): Pass the function, not its template
14400         arguments, to begin_member_template_processing.
14401         (process_next_inline): Likewise.
14402         (do_pending_defargs): Likewise.
14404         * error.c (dump_expr): Obtain the correct declaration for a
14405         TEMPLATE_CONST_PARM.
14407         * call.c (add_template_conv_candidate): New function.
14408         (build_object_call): Handle member templates, as done in the other
14409         build_ functions.
14411 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
14413         * decl.c (replace_defag): Undo previous change.
14414         * lex.c (do_pending_defargs): Deal with member templates.
14416         * pt.c (is_member_template): Avoid crashing when passed a
14417         non-function argument.
14419 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
14421         * class.c (grow_method): Remove check for redeclaration.
14423 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
14425         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
14426         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
14427         (PRIMARY_TEMPLATE_P): Use it.
14428         * call.c (build_overload_call_real): Use it.
14429         * class.c (instantiate_type): Likewise.
14430         * decl.c (decls_match): Likewise.
14431         * method.c (build_overload_identifier): Likewise.
14432         * pt.c (push_template_decl): Likewise.
14433         (classtype_mangled_name): Likewise.
14434         (lookup_template_class): Likewise.
14436         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
14437         DECL_NTPARMS to conform to usage elsewhere.
14438         * call.c (add_template_candidate): Likewise.
14439         * class.c (instantiate_type): Likewise.
14440         * pt.c (instantiate_template): Likewise.
14441         (get_bindings): Likewise.
14443         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
14444         is_member_template.
14446         * pt.c (unify): Undo changes to allow multiple levels of template
14447         parameters.
14448         (type_unification): Likewise.
14449         (fn_type_unification): Likewise.
14450         (get_class_bindings): Likewise.
14451         * cp-tree.h (Likewise).
14453         * decl.c (replace_defarg): Check that the type of the default
14454         parameter does not invlove a template type before complaining
14455         about the initialization.
14457         * error.c (dump_expr): Deal with template constant parameters in
14458         member templates correctly.
14460         * pt.c (is_member_template): Deal with class specializations
14461         correctly.
14462         (tsubst): Handle "partial instantiation" of member templates
14463         correctly.
14465 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
14467         * pt.c (type_unification): Change calling sequence to allow for
14468         multiple levels of template parameters.
14469         (tsubst_expr): Likewise.
14470         (tsubst): Likewise.
14471         (tsubst_copy): Likewise.
14472         (instantiate_template): Likewise.
14473         (unify): Likewise.
14474         * call.c (build_overload_call_real): Use it.
14475         (add_builtin_candidate): Use it.
14476         (build_new_method_call): Use it.
14477         * class.c (instantiate_type): Use it.
14478         * decl.c (grokdeclarator): Use it.
14479         * decl2.c (finish_file): Use it.
14480         * method.c (build_overload_identifier): Use it.
14482         * call.c (add_template_candidate):  Add additional parameter for
14483         the function return type.  Call fn_type_unification istead of
14484         type_unification.
14485         (build_user_type_conversion_1): Handle member templates.
14486         (build_new_function_call): Likewise.
14487         (build_new_op): Likewise.
14488         (build_new_method_call): Likewise.
14490         * class.c (grow_method): Don't give an error message indicating
14491         that two member templates with the same name are ambiguous.
14492         (finish_struct): Treat member template functions just like member
14493         functions.
14495         * cp-tree.h (check_member_template): Add declaration.
14496         (begin_member_template_processing): Likewise.
14497         (end_member_template_processing): Likewise.
14498         (fn_type_unification): Likewise.
14499         (is_member_template): Likewise.
14500         (tsubst): Change prototype.
14501         (tsubst_expr): Likewise.
14502         (tsubst_copy): Likewise.
14503         (instantiate_template): Likewise.
14504         (get_bindings): Likewise.
14506         * decl.c (decls_match): Handle multiple levels of template
14507         parameters.
14508         (pushdecl): Handle template type params just like other type
14509         declarations.
14510         (push_class_level_binding): Return immediately if the
14511         class_binding_level is NULL.
14512         (grokfndecl): If check_classfn() returns a member_template, use
14513         the result of the template, not the template itself.
14515         * decl2.c (check_member_template): New function.  Check to see
14516         that the entity declared to be a member template can be one.
14517         (check_classfn): Allow redeclaration of member template functions
14518         with different types; the new functions can be specializations or
14519         explicit instantiations.
14521         * error.c (dump_decl): Handle multiple levels of template
14522         parameters.
14523         (dump_function_decl): Update to handle function templates.
14525         * lex.c (do_pending_inlines): Set up template parameter context
14526         for member templates.
14527         (process_next_inline): Likewise.
14529         * method.c (build_overload_identifier): Adjust for multiple levels
14530         of template parameters.
14532         * parse.y (fn.def2): Add member templates.
14533         (component_decl_1): Likewise.
14535         * pt.c (begin_member_template_processing): New function.
14536         (end_member_template_processing): Likewise.
14537         (is_member_template): Likewise.
14538         (fn_type_unification): Likewise.
14539         (current_template_parms): Return a vector of all the template
14540         parms, not just the innermost level of parms.
14541         (push_template_decl): Deal with the possibility of member
14542         templates.
14543         (lookup_template_class): Likewise.
14544         (uses_template_parms): Likewise.
14545         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
14546         TEMPLATE_CONST_PARM to deal with multiple levels of template
14547         arguments.   Add processing of TEMPLATE_DECL to produce new
14548         TEMPLATE_DECLs from old ones.
14549         (do_decl_instantiation): Handle member templates.
14551         * search.c (lookup_fnfields_1): Handle member template conversion
14552         operators.
14554         * tree.c (cp_tree_equal): Check the levels, as well as the
14555         indices, of TEMPLATE_CONST_PARMs.
14557         * typeck.c (comptypes): Check the levels, as well as the indices,
14558         fo TEMPLATE_TYPE_PARMs.
14559         (build_x_function_call): Treat member templates like member
14560         functions.
14562 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
14564         * typeck.c (c_expand_return): Always convert_for_initialization
14565         before checking for returning a pointer to local.
14567         * pt.c (type_unification): If strict and the function parm doesn't
14568         use template parms, just compare types.
14570 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
14572         * method.c (build_overloaded_value): Replace direct call
14573         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
14575 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
14577         * typeck.c (convert_arguments): Don't arbitrarily choose the first
14578         of a set of overloaded functions.
14580 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
14582         * lex.c (real_yylex): Don't elide __FUNCTION__.
14584         * method.c (build_overload_value): Add in_template parm.
14585         (build_overload_int): Likewise.
14586         (build_overload_identifier): Pass it.
14588         * decl.c (duplicate_decls): Don't bash a previous template
14589         definition with a redeclaration.
14591         * pt.c (unify): float doesn't match double.
14593         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
14594         TYPE_DECL.  Handle getting non-template types.
14595         * parse.y (explicit_instantiation): Use typespec instead of
14596         aggr template_type.
14598 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
14600         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
14602 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
14604         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
14605         (compare_ics): Likewise.
14607 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
14609         * call.c (joust): Warn about choosing one conversion op over
14610         another because of 'this' argument when the other return type is
14611         better.
14612         (source_type): New fn.
14614         * call.c (build_new_op): Strip leading REF_BIND from first operand
14615         to builtin operator.
14617         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
14618         use its RTL.
14620 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
14622         * call.c (null_ptr_cst_p): Remove support for (void*)0.
14624 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
14626         * typeck.c (expand_target_expr): Make definition match declaration.
14628         * class.c (get_basefndecls): Make definition match declaration.
14630 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
14632         * input.c (sub_getch): Eventually give up and release the input file.
14634         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
14635         right place.
14637         * call.c (joust): Tweak message.
14639 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
14641         * error.c (type_as_string): Put const/volatile on template type
14642         parameters where appropriate.
14644 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
14646         * call.c (strictly_better): Make arguments unsigned ints.
14648 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
14650         * lex.c (real_yylex): Refer to __complex instead of complex.
14652 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
14654         * lex.c (real_yylex): Don't use getc directly.
14656 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
14658         * call.c (is_subseq): Don't try to be clever.
14660 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
14662         * parse.y, pt.c: Include "except.h".
14663         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
14664         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
14665         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
14666         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
14667         prototyping.
14669 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
14671         * decl2.c (mark_vtable_entries): Instead of replacing pure
14672         virtuals with a reference to __pure_virtual, copy the decl and
14673         change the RTL.
14675 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
14677         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
14679         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
14681         * pt.c (instantiate_class_template): Call repo_template_used
14682         before finish_prevtable_vardecl.
14684         * call.c (is_subseq): New fn.
14685         (compare_ics): Use it.
14687         * repo.c (finish_repo): Don't crash on no args.
14689         * parse.y (named_complex_class_head_sans_basetype): Handle
14690         explicit global scope.
14691         * decl2.c (handle_class_head): New fn.
14693         * pt.c (unify): Add CONST_DECL case.
14695 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14697         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
14699         * cp-tree.h (report_type_mismatch): Add prototype.
14700         * call.c (build_overload_call_real): Remove erroneous fourth
14701         argument to report_type_mismatch.
14702         (build_user_type_conversion_1): Remove erroneous second arg to
14703         tourney.
14704         (build_new_function_call): Likewise.
14705         (build_object_call): Likewise.
14706         (build_new_op): Likewise.
14707         (build_new_method_call): Likewise.
14709 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
14711         * error.c (dump_decl): Don't bother processing a function with no
14712         DECL_LANG_SPECIFIC.
14714         * method.c (emit_thunk): Call init_function_start in the macro case.
14716 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
14718         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
14719         defined and used to set flag_vtable_thunks.
14721 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
14723         * parse.y: Don't clear the inlines from their obstack until they've
14724         all been processed.
14726         * decl.c (duplicate_decls): Don't complain about exception
14727         specification mismatch if flag_exceptions is off.
14729 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
14731         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
14733 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
14735         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
14736         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
14737         Include <stdio.h> before include files that formerly used STDIO_PROTO.
14739         * decl.c, g++spec.c, lex.c, method.c, repo.c:
14740         Include "config.h" first, as per autoconf manual.
14742 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
14744         * decl.c (duplicate_decls): Tweak wording.
14745         * lex.c (do_pending_defargs): Don't die if we see a default arg
14746         that isn't a DEFAULT_ARG.
14747         * error.c (dump_expr): Handle DEFAULT_ARG.
14749         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
14750         * lang-options.h: Add -fhandle-exceptions.
14752         * class.c (build_vtable): Vtables are artificial.
14753         (prepare_fresh_vtable): Likewise.
14755 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
14757         * cvt.c (ocp_convert): After converting to the target type, set
14758         LOOKUP_NO_CONVERSION.
14760         * call.c (joust): Warn about potentially confusing promotion rules
14761         with -Wsign-promo.
14762         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
14764 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
14766         * exception.cc: Declare __terminate_func with noreturn attribute.
14768 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
14770         * parse.y: Break out eat_saved_input, handle errors.
14771         (function_try_block): Use compstmt instead of compstmt_or_error.
14773 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
14775         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
14777 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14779         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
14780         existence of cc1plus check whether $(LANGUAGES) contains C++.
14782 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14784         * method.c (do_build_copy_constructor): When copying an anonymous
14785         union member loop around to handle nested anonymous unions.  Use
14786         the offset of the member relative to the outer structure, not the
14787         union.
14789 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
14791         * call.c (resolve_args): New fn.
14792         (build_new_function_call): Use it.
14793         (build_object_call): Likewise.
14794         (build_new_method_call): Likewise.
14796 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
14798         * call.c (build_over_call): tsubst all default parms from templates.
14800 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
14802         * decl.c (struct cp_function): Add static_labelno.
14803         (push_cp_function_context): Save it.
14804         (pop_cp_function_context): Restore it.
14806 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
14808         * typeck.c (build_component_ref_1): Convert from reference.
14810 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14812         * parse.y (current_declspecs, prefix_attributes): Initialize to
14813         NULL_TREE.
14815         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
14816         before we try to force it to be a TREE_LIST.
14817         (decl): Make sure $1.t is non-nil.
14819 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
14821         * pt.c (uses_template_parms): Handle template first-parse codes.
14823         * decl.c (cp_finish_decl): Only warn about user-defined statics.
14825 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
14827         * pt.c (unify): Handle BOOLEAN_TYPE.
14829         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
14830         * pt.c (tsubst): Don't set it.
14831         * call.c (build_over_call): Use uses_template_parms.
14833 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
14835         * method.c (build_overload_nested_name): Use static_labelno
14836         instead of var_labelno.
14837         (build_qualified_name): New fn.
14838         (build_overload_name): Split out from here.
14839         (build_static_name): Use build_qualified_name.
14840         * decl.c (cp_finish_decl): Statics in extern inline functions
14841         have comdat linkage.
14842         (start_function): Initialize static_labelno.
14844 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14846         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
14847         before "all member functions in class [] are private".
14849 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
14851         * lex.c (do_scoped_id): convert_from_reference.
14852         * init.c (build_offset_ref): Likewise.
14854 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
14856         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
14858 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
14860         * typeck.c (get_member_function_from_ptrfunc): Promote index
14861         before saving it.
14863 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
14865         * tree.c (layout_basetypes): Move non-virtual destructor warning.
14866         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
14868 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14870         * decl.c (grokdeclarator): Call add_defarg_fn for the function
14871         type, too.
14872         * lex.c (add_defarg_fn): Adjust.
14873         (do_pending_defargs): Adjust.  Don't skip the first parm.
14875 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
14877         * decl.c (build_enumerator): Global enumerators are also readonly.
14879         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
14880         (build_dynamic_cast): Call it and convert_from_reference.
14882         * lex.c (add_defarg_fn): New fn.
14883         (snarf_defarg): Don't add to defarg_types.
14884         (do_pending_defargs): Lose defarg_types.  All fns we process now
14885         have defargs.
14886         * decl.c (grokfndecl): Call add_defarg_fn.
14888         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
14889         * cp-tree.def: Add DEFAULT_ARG.
14890         * spew.c (yylex): Call snarf_defarg as appropriate.
14891         * parse.y: New tokens DEFARG and DEFARG_MARKER.
14892         (defarg_again, pending_defargs, defarg, defarg1): New rules.
14893         (structsp): Use pending_defargs.
14894         (parms, full_parm): Use defarg.
14895         * lex.c (init_lex): Initialize inline_text_firstobj.
14896         (do_pending_inlines): Never pass the obstack to feed_input.
14897         (process_next_inline): Call end_input instead of restore_pending_input.
14898         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
14899         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
14900         * input.c (end_input): New fn.
14901         (sub_getch): At the end of some fed input, just keep returning EOF
14902         until someone calls end_input.
14903         Remove 'obstack' field from struct input_source.
14904         * decl.c (grokparms): Handle DEFAULT_ARG.
14905         (replace_defarg): New fn.
14906         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
14908 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14910         * call.c (implicit_conversion): If nothing else works, try binding
14911         an rvalue to a reference.
14913 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
14915         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
14916         ifndef for Cygwin32 to include SIGSEGV.
14918 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
14920         * class.c (finish_struct_1): Only complain about pointers without
14921         copy stuff if there are any constructors.
14923         * rtti.c (build_dynamic_cast): Call complete_type on the types.
14925         * decl.c (grokfndecl): If the function we chose doesn't actually
14926         match, die.
14928         * decl2.c (grokclassfn): Don't specify 'const int' for the
14929         artificial destructor parm.
14931         * pt.c (type_unification): If we are called recursively, nothing
14932         decays.
14934 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
14936         * decl.c (init_decl_processing): Stop trying to catch signals
14937         other than SIGABRT since the Cygwin32 library doesn't support
14938         them correctly yet.  This fixes a situation in which g++ causes
14939         a hang on SIGSEGVs and other such signals in our Win32-hosted
14940         tools.
14942 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
14944         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
14946 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
14948         * typeck2.c (store_init_value): Always return the value if our
14949         type needs constructing.
14951         * method.c (hack_identifier): Convert class statics from
14952         reference, too.
14954 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
14956         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
14958 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
14960         * typeck.c (c_expand_return): Make sure we clean up temporaries at
14961         the end of return x;
14963 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
14965         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
14967 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
14969         * except.c (expand_builtin_throw): Add support
14970         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
14972 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
14974         * repo.c (extract_string): Null-terminate.
14976         * cp-tree.h (TI_SPEC_INFO): New macro.
14977         (CLASSTYPE_TI_SPEC_INFO): New macro.
14978         * pt.c (push_template_decl): Correctly determine # of template parms
14979         for partial specs.
14981         * call.c (compare_ics): Really fix 'this' conversions.
14983         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
14984         non-template fn.
14986         * pt.c (push_template_decl): Complain about mismatch in # of
14987         template parms between a class template and a member template.
14989 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
14991         * method.c (synthesize_method): You can't call
14992         function_cannot_inline_p after finish_function.
14993         * decl.c (finish_function): Turn on flag_inline_functions and turn
14994         off DECL_INLINE before handing a synthesized method to the
14995         backend.
14997 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14999         * method.c (synthesize_method): Remove July 30 change to never set
15000         DECL_INLINE if at_eof.
15002 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
15004         * xref.c (GNU_xref_member): Ensure that the node has a
15005         decl_lang_specific part before checking DECL_FRIEND_P.
15007 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
15009         * pt.c (instantiate_class_template): Diagnose non-class types used
15010         as bases.
15012 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
15014         * typeck.c (build_conditional_expr): Use convert_for_initialization
15015         instead of convert_and_check.
15017 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15019         * parse.y (typespec): Don't pedwarn for typeof.
15021 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
15023         * repo.c (finish_repo): Only check changes if we would write a
15024         repo file.
15026         * call.c (compare_ics): Fix handling of 'this' conversions.
15028         * pt.c (do_decl_instantiation): Support static data too.  Rename
15029         from do_function_instantiation.
15030         * cp-tree.h: Adjust.
15031         * parse.y: Adjust.
15033         * repo.c (extract_string): New fn.
15034         (get_base_filename): Use it.
15035         (init_repo): Compare old args with current args.
15037 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
15039         * Makefile.in, Make-lang.in: Protect C-ls with a comment
15040         character, idea from Paul Eggert <eggert@twinsun.com>.
15042 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
15044         * typeck.c (c_expand_return): Be more persistent in looking for
15045         returned temps.
15047         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
15048         pointer to reference.
15050         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
15052 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
15054         * init.c (build_member_call, build_offset_ref):
15055         Use do_scoped_id instead of do_identifier.
15057         * cvt.c (convert): Remove bogosity.
15059 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15061         * cvt.c (build_up_reference): Do checks of ARGTYPE and
15062         TARGET_TYPE before trying to use get_binfo.
15064 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
15066         * cvt.c (build_up_reference): Call get_binfo to get access control.
15068         * decl2.c (import_export_decl): If we don't support weaks, leave
15069         statics undefined.
15071 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
15073         * except.c (expand_builtin_throw): Add support for machines that
15074         cannot access globals after throw's epilogue when
15075         -fno-sjlj-exceptions is used.
15077 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
15079         * parse.y: 'std::' becomes '::'.
15080         * lex.c (real_yylex): Remove 'namespace' warning.
15081         * init.c (build_member_call): Ignore 'std::'.
15082         (build_offset_ref): Likewise.
15083         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
15084         (do_toplevel_using_decl): Ignore 'using std::whatever'.
15085         * decl.c (push_namespace): Just sorry.
15086         (pop_namespace): Nop.
15087         (init_decl_processing): Declare std namespace.
15089 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
15091         * search.c (push_class_decls): A name which ambiguously refers to
15092         several instantiations of the same template just refers to the
15093         template.
15095 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
15097         * decl.c (build_enumerator): Fix problem with unsigned long
15098         enumerated values being smashed to ints, causing overflow
15099         when computing next enumerated value (for enum values around
15100         MAX_VAL).
15102 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
15104         * typeck.c (build_component_ref): Only call mark_used on a decl.
15106 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15108         * typeck.c (build_c_cast): Make the check for a ptr to function
15109         more specific before possible default_conversion call.
15111 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
15113         * except.c (expand_exception_blocks): Simplify and fix and make
15114         sure we don't end a region in a sequence, as expand_end_bindings
15115         doesn't like it.
15117 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
15119         * except.c (init_exception_processing): Mark terminate as not
15120         returning so that the optimizer can optimize better.
15122 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
15124         * cvt.c (convert): Don't do any extra work, if we can avoid it
15125         easily.
15127 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
15129         * *.[chy]: Change cp_convert to ocp_convert, change convert to
15130         cp_convert.  convert is now reserved for the backend, and doesn't
15131         have the semantics a frontend person should ever want.
15133 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
15135         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
15136         Lose -traditional support.
15138 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
15140         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
15142         * parse.y (self_reference): Do it for templates, too.
15143         * class.c (pushclass): Don't overload_template_name; the alias
15144         generated by build_self_reference serves the same purpose.
15146         * tree.c (list_hash): Make static, take more args.
15147         (list_hash_lookup): Likewise.
15148         (list_hash_add): Make static.
15149         (list_hash_canon): Lose.
15150         (hash_tree_cons): Only build a new node if one isn't already in the
15151         hashtable.
15152         (hash_tree_chain): Use hash_tree_cons.
15153         * cp-tree.h: Adjust.
15154         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
15155         of calling lookup_name.
15157 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
15159         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
15160         doesn't refer to the CONST_DECLs.
15162 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
15164         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
15165         is bigger.
15166         (expand_class_desc): Convert the last argument to a sizetype.
15168 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15170         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
15171         __real__): Add reswords.
15172         * hash.h: Regenerate.
15173         * lex.h (rid): Add RID_COMPLEX.
15174         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
15175         * lex.c (init_lex): Add building of RID_COMPLEX.
15176         (real_yylex): General cleanup in line with what c-lex.c also has,
15177         sans the cruft for traditional; add handling of SPEC_IMAG, complex
15178         types, and imaginary numeric constants.
15179         * parse.y (REALPART, IMAGPART): Add tokens.
15180         (unary_expr): Add REALPART and IMAGPART rules.
15181         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
15182         * decl.c (complex_{integer,float,double,long}_type_node): Define
15183         types.
15184         (init_decl_processing): Set up the types.
15185         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
15186         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
15187         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
15188         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
15189         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
15190         COMPLEX_TYPE case.
15191         * method.c (build_overload_name): Add handling of the different
15192         COMPLEX_TYPEs, prefixing them with `J'.
15193         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
15194         as a template parm.
15195         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
15196         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
15197         (mapcar): Handle COMPLEX_CST.
15198         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
15199         (common_type): Add code for complex types.
15200         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
15201         (convert_for_assignment): Likewise.
15202         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
15204 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
15206         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
15207         tsubst_expr, as it might try to do overload resolution.
15209 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
15211         * pt.c (instantiate_class_template): Oops.
15213 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
15215         * cp-tree.def: Add TAG_DEFN.
15216         * pt.c (tsubst_enum): New fn.
15217         (instantiate_class_template): Use it.
15218         (tsubst_expr): Support TAG_DEFN.
15219         (tsubst): Support local enums.
15220         (tsubst_copy): Likewise.
15221         * decl.c (finish_enum): Likewise.
15222         (start_enum): If this is a local enum, switch to permanent_obstack.
15224 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
15226         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
15227         (finish_function): Put the base init code for constructors just
15228         after the parm cleanup insns.
15229         (struct cp_function): Add last_parm_cleanup_insn.
15230         (pu